Q test 497770 163723473 2007-10-11T03:00:07Z 74.117.117.155 /* Example */ In [[statistics]], the '''''Q'' test''' is used for identification and rejection of [[outlier]]s. 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<sub>gap</sub>/Q<sub>range</sub> Where ''Q''<sub>gap</sub> is the absolute difference between the outlier in question and the closest number to it. If ''Q''<sub>calculated</sub> > ''Q''<sub>table</sub> then reject the questionable point. ==Table== {| |----- | style="vertical-align: top;" | Number of values: | style="vertical-align: top; text-align: center;" | &nbsp;3<br> | style="vertical-align: top; text-align: center;" | 4<br> | style="vertical-align: top; text-align: center;" | 5<br> | style="vertical-align: top; text-align: center;" | 6<br> | style="vertical-align: top; text-align: center;" | 7<br> | style="vertical-align: top; text-align: center;" | 8<br> | style="vertical-align: top; text-align: center;" | 9<br> | style="vertical-align: top; text-align: center;" | 10<br> |----- | style="vertical-align: top;" | Q<sub>90%</sub>:<br> | style="vertical-align: top; text-align: center;" | 0.941<br> | style="vertical-align: top; text-align: center;" | 0.765<br> | style="vertical-align: top; text-align: center;" | 0.642<br> | style="vertical-align: top; text-align: center;" | 0.560<br> | style="vertical-align: top; text-align: center;" | 0.507<br> | style="vertical-align: top; text-align: center;" | 0.468<br> | style="vertical-align: top; text-align: center;" | 0.437<br> | style="vertical-align: top; text-align: center;" | 0.412<br> |----- | style="vertical-align: top;" | Q<sub>95%</sub>:<br> | style="vertical-align: top; text-align: center;" | 0.970<br> | style="vertical-align: top; text-align: center;" | 0.829<br> | style="vertical-align: top; text-align: center;" | 0.710<br> | style="vertical-align: top; text-align: center;" | 0.625<br> | style="vertical-align: top; text-align: center;" | 0.568<br> | style="vertical-align: top; text-align: center;" | 0.526<br> | style="vertical-align: top; text-align: center;" | 0.493<br> | style="vertical-align: top; text-align: center;" | 0.466<br> |} ==Example== For the data: :<math>0.189, 0.169, 0.187, 0.183, 0.186, 0.182, 0.181, 0.184, 0.181, 0.177</math> Arranged in increasing order: :<math>0.169, 0.177, 0.181, 0.181, 0.182, 0.183, 0.184, 0.186, 0.187, 0.189</math> Outlier is 0.169. Calculate ''Q'': :<math>Q=\frac{\mathrm{gap}}{\mathrm{range}}=\frac{(0.177-0.169)}{(0.189-0.169)}=0.400.</math> With 10 observations at 90% confidence, Q<sub>calculated</sub> < Q<sub>table</sub>. Therefore keep 0.169 at 90% confidence. {{math-stub}} {{statistics-stub}} [[Category:Statistical tests]] [[gl:Proba Q]] [[it:Test Q]]