Skip to content

Commit 94f2667

Browse files
committed
Add introduction
1 parent c1108f3 commit 94f2667

File tree

1 file changed

+66
-0
lines changed
  • lib/node_modules/@stdlib/stats/incr/grubbs

1 file changed

+66
-0
lines changed

lib/node_modules/@stdlib/stats/incr/grubbs/README.md

+66
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,72 @@ limitations under the License.
2424
2525
<section class="intro">
2626

27+
[Grubbs' test][grubbs-test] (also known as the **maximum normalized residual test** or **extreme studentized deviate test**) is a statistical test used to detect outliers in a univariate dataset assumed to come from a normally distributed population. [Grubbs' test][grubbs-test] is defined for the hypothesis:
28+
29+
- **H_0**: the dataset does **not** contain outliers.
30+
- **H_1**: the dataset contains **exactly** one outlier.
31+
32+
The [Grubbs' test][grubbs-test] statistic for a two-sided alternative hypothesis is defined as
33+
34+
<!-- <equation class="equation" label="eq:grubbs_test_statistic" align="center" raw="G = \frac{\operatorname{max}_{i=0,1,ldots,N-1} |Y_i - \bar{Y}|}{s}" alt="Grubbs' test statistic."> -->
35+
36+
<div class="equation" align="center" data-raw-text="G = \frac{\operatorname{max}_{i=0,1,ldots,N-1} |Y_i - \bar{Y}|}{s}" data-equation="eq:grubbs_test_statistic">
37+
<img src="" alt="Grubbs' test statistic.">
38+
<br>
39+
</div>
40+
41+
<!-- </equation> -->
42+
43+
where `s` is the sample standard deviation. The [Grubbs test][grubbs-test] statistic is thus the largest absolute deviation from the sample mean in units of the sample standard deviation.
44+
45+
The [Grubbs' test][grubbs-test] statistic for the alternative hypothesis that the minimum value is an outlier is defined as
46+
47+
<!-- <equation class="equation" label="eq:grubbs_test_statistic_min" align="center" raw="G = \frac{\bar{Y} - Y_{\textrm{min}}}{s}" alt="Grubbs' test statistic for testing whether the minimum value is an outlier."> -->
48+
49+
<div class="equation" align="center" data-raw-text="G = \frac{\bar{Y} - Y_{\textrm{min}}}{s}" data-equation="eq:grubbs_test_statistic_min">
50+
<img src="" alt="Grubbs' test statistic for testing whether the minimum value is an outlier.">
51+
<br>
52+
</div>
53+
54+
<!-- </equation> -->
55+
56+
The [Grubbs' test][grubbs-test] statistic for the alternative hypothesis that the maximum value is an outlier is defined as
57+
58+
<!-- <equation class="equation" label="eq:grubbs_test_statistic_max" align="center" raw="G = \frac{Y_{\textrm{max}} - \bar{Y}}{s}" alt="Grubbs' test statistic for testing whether the maximum value is an outlier."> -->
59+
60+
<div class="equation" align="center" data-raw-text="G = \frac{Y_{\textrm{max}} - \bar{Y}}{s}" data-equation="eq:grubbs_test_statistic_max">
61+
<img src="" alt="Grubbs' test statistic for testing whether the maximum value is an outlier.">
62+
<br>
63+
</div>
64+
65+
<!-- </equation> -->
66+
67+
For a two-sided test, the hypothesis that a dataset does **not** contain an outlier is rejected at significance level α if
68+
69+
<!-- <equation class="equation" label="eq:grubbs_test_two_sided" align="center" raw="G > \frac{N}{N-1} \sqrt{\frac{t^2_{\alpha/(2N),N-2}}{N - 2 + t^2_{\alpha/(2N),N-2}}}" alt="Two-sided Grubbs' test."> -->
70+
71+
<div class="equation" align="center" data-raw-text="G > \frac{N}{N-1} \sqrt{\frac{t^2_{\alpha/(2N),N-2}}{N - 2 + t^2_{\alpha/(2N),N-2}}}" data-equation="eq:grubbs_test_two_sided">
72+
<img src="" alt="Two-sided Grubbs' test.">
73+
<br>
74+
</div>
75+
76+
<!-- </equation> -->
77+
78+
where `t` denotes the upper critical value of the _t_-distribution with `N-2` degrees of freedom and a significance level of `α/(2N)`.
79+
80+
For a one-sided test, the hypothesis that a dataset does **not** contain an outlier is rejected at significance level α if
81+
82+
<!-- <equation class="equation" label="eq:grubbs_test_one_sided" align="center" raw="G > \frac{N}{N-1} \sqrt{\frac{t^2_{\alpha/N,N-2}}{N - 2 + t^2_{\alpha/N,N-2}}}" alt="One-sided Grubbs' test."> -->
83+
84+
<div class="equation" align="center" data-raw-text="G > \frac{N}{N-1} \sqrt{\frac{t^2_{\alpha/N,N-2}}{N - 2 + t^2_{\alpha/N,N-2}}}" data-equation="eq:grubbs_test_one_sided">
85+
<img src="" alt="One-sided Grubbs' test.">
86+
<br>
87+
</div>
88+
89+
<!-- </equation> -->
90+
91+
where `t` denotes the upper critical value of the _t_-distribution with `N-2` degrees of freedom and a significance level of `α/N`.
92+
2793
</section>
2894

2995
<!-- /.intro -->

0 commit comments

Comments
 (0)