2.5 Some statistical test
2.5.1 Parametric statistical test
2.5.1.1 t-test
2.5.1.1.1 One sample t-test
This test is used to determine if the mean of a single population is significantly different from a specified value μ0.
-
- Null hypothesis: H0:μ=μ0
- Alternative hypothesis: H1:μ≠μ0 (two-sided), H1:μ>μ0 (one-sided), or H1:μ<μ0 (one-sided)
t=ˉx−μ0s/√n where ˉx is the sample mean, s is the sample standard deviation, and n is the sample size.
df=n−1
Reject H0 if |t|>tα/2,df (two-sided) or t>tα,df (one-sided, upper tail) or t<−tα,df (one-sided, lower tail), where tα/2,df and tα,df are the critical values from the t-distribution with df degrees of freedom and significance level α.
2.5.1.1.2 Two sample t-test
This test is used to determine if the means of two independent populations are significantly different, assuming that the populations have equal variances.
-
- Null hypothesis: H0:μ1=μ2
- Alternative hypothesis: H1:μ1≠μ2 (two-sided), H1:μ1>μ2 (one-sided), or H1:μ1<μ2 (one-sided)
t=ˉx1−ˉx2sp√1n1+1n2 where ˉx1 and ˉx2 are the sample means, n1 and n2 are the sample sizes, and sp is the pooled sample standard deviation:
sp=√(n1−1)s21+(n2−1)s22n1+n2−2 where s1 and s2 are the sample standard deviations.
df=n1+n2−2
Reject H0 if |t|>tα/2,df (two-sided) or t>tα,df (one-sided, upper tail) or t<−tα,df (one-sided, lower tail).
2.5.1.1.3 Welch’s t-test
This test is used to determine if the means of two independent populations are significantly different, without assuming that the populations have equal variances.
-
- Null hypothesis: H0:μ1=μ2
- Alternative hypothesis: H1:μ1≠μ2 (two-sided), H1:μ1>μ2 (one-sided), or H1:μ1<μ2 (one-sided)
t=ˉx1−ˉx2√s21n1+s22n2
df≈(s21n1+s22n2)2(s21n1)2n1−1+(s22n2)2n2−1
Reject H0 if |t|>tα/2,df (two-sided) or t>tα,df (one-sided, upper tail) or t<−tα,df (one-sided, lower tail). Note that the degrees of freedom will likely be a non-integer value, so you’ll need to interpolate in a t-table or use statistical software.