Small Sample Tests
Small Sample Tests
n
Sˆ 2 = ∑ ( X i − X ) 2 /( n − 1) is an unbiased estimator of σ2. We let
i =1
X −µ
t=
Sˆ / n
This does not have a normal distribution. It can be shown that this
statistic, the t-statistic, has the t-distribution with n-1 degrees of freedom.
Confidence interval
If a random sample of size n comes from a normal population with mean
µ and variance σ2 (both µ and σ2 being unknown) we can state
⎡ X − µ⎤
P ⎢− tα / 2,n −1 < ⎥ < tα / 2,n −1 =1-α.
⎣ ˆ
S / n ⎦
Since there is a probability α/2 that the t-statistic will be higher than the
α/2 critical value, and another α/2 that it will be below minus that value.
This expression can be re-arrange to give the (1-α) confidence interval for
µ,
[ ]
P X − tα / 2,n −1 Sˆ / n < µ < X + tα / 2,n −1 Sˆ / n = 1-α.
Compare this with the 95% confidence interval in the large sample case,
and when we were assuming a known σ. Here we had
[
P X − 1.96σ / n < µ < X + 1.96σ / n =0.95. ]
Here, 1.96 is the critical value of the standard normal distribution, such
that P(Z>1.96) = 0.025. (Since this is a 2-tailed test). Thus, the α/2 critical
value of the standard normal distribution is replaced with the α/2 critical
value of the t-distribution. The population standard deviation σ is
replaced by an unbiased estimate of the standard deviation, Ŝ . In each
case, the confidence interval is measured in standard errors of the sample
mean; in the case of the known S.D., SE( X )=σ/√n, in the case of the
unknown SD, it is Ŝ /√n.
Example
1 n
As S2= ∑
n i =1
( X i − X ) 2 , we have
Ŝ 2=S2*n/(n-1) = (16/15)*102 = 106.67, so Ŝ =10.33.
Test of hypothesis
The procedure for testing a hypothesis is similar to that used for large
samples, i.e. based on the normal distribution, but instead of using the z-
statistic, we now use the t-statistic.
Procedure: Set up the null hypothesis, H0:µ=µ0 (say) and the alternative
hypothesis, H1: µ≠µ0. Choose the significance level α at which H0 is to be
X − µ0
tested. The test statistic is t= . The critical value of t is tα/2,n-1 as
Sˆ / n
this is a 2-tailed test, and is found from tables. The decision rule is to
reject H0 if |t|> tα/2,n-1, and accept H0 otherwise. If the alternative
hypothesis were H1:µ>µ0 or H1:µ<µ0, then we would use a 1-tailed test,
with the critical value being tα,n-1.
Note again that our decision rule is based on measuring how many
standard errors the sample mean is from the hypothesised population
mean.
We may
If two small random samples are taken from two normal populations with
the same variance, it can be shown that the statistic:
ˆ 2 n1 S1 2 + n 2 S 2 2
Sp = is a pooled estimate of the common population
n1 + n 2 − 2
variance, and n1 and n2 are the sample sizes. When the variables X1 and
X2 are not normally distributed, or when the population variances are not
equal, the test (sometimes called the student t-test) is not strictly valid.
However the t-distribution is quite robust, so that small deviations from
normality or small differences in the variances can be ignored in practice.
Very often, our null hypothesis will be that the two population means are
equal, so that µ1-µ2 in the above formula will be equal to 0.
Example
[ ]
Sˆ p 2 = 12(9 2 ) + 16(10 2 ) /(12 + 16 − 2) = 98.92, hence Ŝ p =9.95
(42 − 36) − 0
t= =1.58.
9.95 (1 / 16) + (1 / 12)
n
∑ (X i − X )2
χ2=nS2/σ2= i =1 2
where σ2 is the population variance has the χ2
σ
distribution with (n-1) degrees of freedom. The distribution depends on
the number of degrees of freedom, it has a complicated formula and is
positively skewed.
f(χ2)
χ2
n-1
Tables show the area (α) under the χ2 curve to the right of a particular
value of χ2 for a given number of degrees of freedom, k. For example, the
entry in the table for k=4 and α=0.95 is 0.7107. This means that
P(χ24)>0.7107=0.95. The entry for k=4 and α=0.05 is 9.488, so
P(χ24)>9.488=0.05.
As the statistic χ2=nS2/σ2 has the χ2 distribution with n-1 d.f., we can
write
2 2
P[χ .975,n-1<(nS /σ2)<χ2.025,n-1]=0.95.
P[nS2/χ2.975,n-1<σ2<nS2/χ2.025,n-1]=0.95.
( Sˆ12 / σ 12 )
F= has the F-distribution with k1=n1-1 and k2 = n2-1 d.f.,
( Sˆ 2 / σ 2 )
2 2
where Ŝ1 and Ŝ 2 2 are the unbiased estimates of the population
2
variances, that is
n
∑ ( X 1i − X 1 )
Ŝ1 = i =1
2
and similarly for Ŝ 2 2 .
n1 − 1
k2/k1 1 2 3 4
1 α=.05
α=.025
2 α=.05 19.25
α=.025 39.25
3 α=.05
α=.025
That is, if our F distribution has 4 d.f. in the numerator, and 2 in the
denominator, then the 95% critical value is 19.25, and the 97.5% critical
value is 39.25. Note that only the upper-tailed values of the F-distribution
are tabulated. This is because it is always possible to place the larger
value of Sˆ 2 / σ 2 in the numerator of the F ratio, so that the observed
values of F will always fall in the right-hand tail.
Test of hypothesis
Select level of α=0.025 (say, to get a 2-tailed test for significance level of
5%). The test statistic is
( Sˆ1 2 / σ 1 2 ) Sˆ1 2
F= = 2 since under H0, σ12=σ22.
( Sˆ 2 / σ 2 ) Sˆ 2
2 2
Decision rule: For a one-tail test, if F>Fα, k1,k2, H0 can be rejected at the α
level of significance. For a 2-tailed test (usually the case), H0 can only be
rejected at the 2α level of significance, e.g. if we want a 5% level of
significance we must take α=.025.
Example
(NB: it seems here that we have taken as our sample the whole class, so
what is the difference between the sample variance and the ‘population’
variance? In this case, we would be taking our ‘population’ to be male
and female students in general, or hypothetical future students on the
course. Of course, we would need to consider carefully whether it is
legitimate to extrapolate from our sample, this year’s class, to the general
case. This is a common problem in statistical and regression analysis; we
might have quite a limited sample, and the question of whether we can
extrapolate to future cases, or to say, different countries or different
circumstances, is often quite uncertain.)