4.2 - The one-sample t-test

4.2 - The one-sample t-test

A small sample can test a claim about a population mean even when the population variance is unknown. You will estimate that variance, use a t-distribution with the correct degrees of freedom and tail, and express the conclusion as evidence about the population.

Normal samples with unknown variance

Sixteen measurements have mean 12.612.6 and estimated standard deviation 1.21.2. Is that convincing evidence that the population mean exceeds 1212? The difference 0.60.6 matters only in relation to the uncertainty in the sample mean.

For a small random sample, the one-sample t procedure assumes independent observations from a normal population. The population variance σ2\sigma^2 is unknown: we estimate it from the sample. A small sample does not make a non-normal population normal. Random sampling and the model assumptions are separate requirements.

Recall why the divisor in an unbiased variance estimate is one less than the sample size. The deviations from the fitted sample mean sum to zero: once n−1n-1 deviations are known, the last is fixed. Estimating the mean has used one degree of freedom.

Unbiased sample variance

For n≥2n\ge2 independent observations,

xˉ=∑xn,s2=∑(x−xˉ)2n−1=∑x2−(∑x)2/nn−1.\bar x=\frac{\sum x}{n},\qquad s^2=\frac{\sum(x-\bar x)^2}{n-1} =\frac{\sum x^2-(\sum x)^2/n}{n-1}.

Here s2s^2 estimates the population variance; s=s2s=\sqrt{s^2}. The standard error of the mean is estimated by s/ns/\sqrt n.

The mean and unbiased variance formulae are in the formula booklet. The standard-error relationship must be understood and applied.

Unbiased means that over repeated samples the estimate averages to the true population variance; an individual estimate can be above or below it. The booklet also gives the descriptive standard deviation with divisor nn. That describes the observed data; it is not the unbiased variance estimate used in this t-test.

Worked example 1: estimating from observations

Question. An independent random sample from a normal population is 8,9,10,11,128,9,10,11,12. Find the sample mean and an unbiased estimate of the population variance.

Plan. Find the mean, then add squared deviations and divide by n−1n-1.

xˉ=505=10,∑(x−xˉ)2=4+1+0+1+4=10.\bar x=\frac{50}{5}=10, \qquad \sum(x-\bar x)^2=4+1+0+1+4=10.

There are five observations, so

s2=104=2.5.s^2=\frac{10}{4}=2.5.

Answer. xˉ=10\bar x=10 and s2=2.5s^2=2.5.

Check. The raw squares total 510510. The alternative numerator is 510−502/5=10510-50^2/5=10, agreeing with the sum of squared deviations.

Now change only the way the same information is supplied. Summarised data need the same correction for estimating the mean.

Worked example 2: estimating from summaries

Question. A normal random sample has n=5n=5, ∑x=50\sum x=50 and ∑x2=510\sum x^2=510. Find xˉ\bar x, s2s^2 and the estimated standard error of Xˉ\bar X.

Plan. Recover the centred sum of squares before dividing by four.

xˉ=50/5=10s2=510−502/54=2.5SE⁡^(Xˉ)=2.55=0.707(3 s.f.).\begin{aligned} \bar x&=50/5=10 \\ s^2&=\frac{510-50^2/5}{4}=2.5 \\ \widehat{\operatorname{SE}}(\bar X)&=\sqrt{\frac{2.5}{5}}=0.707\quad\text{(3 s.f.)}. \end{aligned}

Answer. xˉ=10\bar x=10, s2=2.5s^2=2.5, estimated standard error 0.7070.707.

Check. The five observations in Worked example 1 realise exactly these summaries. Also, multiplying the standard error by 5\sqrt5 recovers s=2.5s=\sqrt{2.5}.

Keep the variance and standard deviation distinct: the t statistic below divides by a standard error, not by a variance.

The t statistic

The t statistic measures how far the sample mean is from the claimed population mean in estimated standard-error units.

If the population standard deviation were known, standardising a normal sample mean would give a standard normal variable. Replacing that fixed standard deviation by the random estimate SS adds uncertainty. The resulting t-distribution is symmetric about zero, with heavier tails than the standard normal distribution; its shape depends on the degrees of freedom.

One-sample t statistic

Under H0:μ=μ0H_0:\mu=\mu_0, for an independent normal sample with unknown variance,

T=Xˉ−μ0S/n∼tn−1.T=\frac{\bar X-\mu_0}{S/\sqrt n}\sim t_{n-1}.

The observed value is t=(xˉ−μ0)/(s/n)t=(\bar x-\mu_0)/(s/\sqrt n). The numerator fixes the sign. A positive value points towards a mean above μ0\mu_0.

The t statistic is not printed in the formula booklet; the t critical-value table is provided.

The table gives tν,pt_{\nu,p} satisfying P(T≤tν,p)=pP(T\le t_{\nu,p})=p, not an upper-tail probability of pp. At significance level α\alpha, an upper-tail test uses p=1−αp=1-\alpha; a two-tail test puts α/2\alpha/2 in each tail and uses p=1−α/2p=1-\alpha/2. For a lower-tail test, use symmetry to negate the corresponding positive value.

[DIAGRAM: asset_name: One tail or two tails; asset_slug: cam9231-t-test-tails; caption: At 5% significance, one upper tail starts at 1.860 but two tails start at plus or minus 2.306 for eight degrees of freedom; description: Two exact t density plots with eight degrees of freedom. The left plot shades the upper 0.05 tail beyond 1.860. The right plot shades two 0.025 tails beyond minus 2.306 and 2.306. The unshaded central probability is labelled 0.95 on the right. Labels distinguish the cumulative table columns p equals 0.95 and p equals 0.975.]
At 5% significance, one upper tail starts at 1.860 but two tails start at plus or minus 2.306 for eight degrees of freedom

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account