Q-test
/ KYOO-test /
You measure something five times and four results huddle together while one sits off on its own, far from the pack. The tempting move is to quietly delete the lonely value, but that is cheating unless you have a rule. The Q-test is that rule: a simple, fair procedure for deciding whether a single suspicious result is far enough out to be discarded.
The Q-test works by comparing two distances. You find the gap between the suspect value and its nearest neighbour, then divide it by the total range of all the data, from smallest to largest. This ratio, called Q, measures how isolated the outlier is. If Q exceeds a critical value from a table, set by how many measurements you have and your chosen confidence, the point may be rejected; otherwise it must stay.
It matters because throwing away inconvenient data by gut feeling biases your result and is scientifically dishonest, while the Q-test gives a defensible, agreed-upon criterion. The honest caveat is that it is weak with very small datasets, can only test one outlier at a time, and a value passing the test is not necessarily wrong — there may be a real reason behind it worth investigating.
Five results are 10.1, 10.2, 10.3, 10.2 and 11.0. The suspect 11.0 sits 0.7 from its nearest neighbour over a total range of 0.9, giving Q of about 0.78 — compared with the table value to decide if it can be dropped.
Deciding by rule, not by hunch, whether a lone value can be rejected.
Best practice is to apply the Q-test only once to a dataset and never to chase the result you want by repeatedly discarding points; if a value is rejected, that should be recorded honestly in the lab notebook.