Logical fallacy
Ignoring optional stopping
Repeatedly inspects accumulating data and stops when a desired threshold is crossed, then interprets the result using an analysis that assumes a fixed stopping point.
Examples
We checked the result after every ten participants and stopped at the first favorable test, then treated it as a fixed sample.
I planned to keep polling until one batch supported my claim. Now I present that batch as conclusive evidence.
We tested after every new volunteer and stopped once the nominal p-value fell below .05. That guarantees a five percent error rate.
A similar case that can be sound
A preplanned sequential analysis adjusts the threshold for the scheduled interim looks.