# Q test

In statistics, the ** Q test** is used for identification and rejection of outliers. This test should be used sparingly and never more than once in a data set. To apply a

*Q*test for bad data, arrange the data in order of increasing values and calculate

*Q*as defined:

Q = Q_{gap}/Q_{range}

Where *Q*_{gap} is the absolute difference between the outlier in question and the closest number to it. If *Q*_{calculated} > *Q*_{table} then reject the questionable point.

## Table

Number of values: | 3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |

Q_{90%}: |
0.941 |
0.765 |
0.642 |
0.560 |
0.507 |
0.468 |
0.437 |
0.412 |

Q_{95%}: |
0.970 |
0.829 |
0.710 |
0.625 |
0.568 |
0.526 |
0.493 |
0.466 |

## Example

For the data:

Arranged in increasing order:

Outlier is 0.169. Calculate *Q*:

With 10 observations at 90% confidence, Q_{calculated} < Q_{table}. Therefore keep 0.169 at 90% confidence.