t tests for a mean and the paired t-test

t tests for a mean and the paired t-test

Spec 7.1–2 · Edexcel A-Level Further Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • With σ\sigma unknown, T=Xˉ−μS/n∼tn−1T=\frac{\bar X-\mu}{S/\sqrt n}\sim t_{n-1}: symmetrical with heavier tails than N(0,1)N(0,1).
  • One-sample test: t=xˉ−μ0s/nt=\frac{\bar x-\mu_0}{s/\sqrt n} with ν=n−1\nu=n-1.
  • Confidence interval: xˉ±tn−1sn\bar x\pm t_{n-1}\frac{s}{\sqrt n}, using the upper α2\frac{\alpha}{2} point.
  • Paired data: find the differences, then do a one-sample tt-test on them, with nn = number of pairs.
  • The population (or the differences) must be Normal.

The t distribution

Replace σ\sigma by ss and the statistic follows a tt distribution with n−1n-1 degrees of freedom.

When X∼N(μ,σ2)X\sim\mathrm{N}(\mu,\sigma^2) and σ2\sigma^2 is unknown, replace σ\sigma by the sample standard deviation ss. Then T=Xˉ−μS/nT=\frac{\bar X-\mu}{S/\sqrt n} follows a tt distribution with ν=n−1\nu=n-1 degrees of freedom.

It is symmetrical about 00 but has heavier tails, more so for small nn, and approaches N(0,1)\mathrm{N}(0,1) as nn grows. The population must be Normal. Example: the upper 5%5\% point of t9t_9 is 1.8331.833.

−4−3−2−112340.10.20.30.4xyt₃N(0, 1)
t₃ (solid) has heavier tails than N(0, 1) (dashed).

A sample of size 12 is used to test a mean with σ\sigma unknown. How many degrees of freedom does tt have?

One-sample t test

Find t=xˉ−μ0s/nt=\frac{\bar x-\mu_0}{s/\sqrt n} and compare it with the critical value of tn−1t_{n-1}.

To test H0:μ=μ0H_0:\mu=\mu_0, find xˉ\bar x and ss (for summary data, s2=1n−1(∑x2−(∑x)2n)s^2=\frac{1}{n-1}\left(\sum x^2-\frac{(\sum x)^2}{n}\right)), then tt. Compare with tn−1t_{n-1}: one-tailed for μ>μ0\mu>\mu_0 or μ<μ0\mu<\mu_0, two-tailed with the level split for μ≠μ0\mu\ne\mu_0.

  1. 1

    Find xˉ\bar x and ss

    from the data or summary statistics

  2. 2

    Calculate tt

    xˉ−μ0s/n\frac{\bar x-\mu_0}{s/\sqrt n}

  3. 3

    Compare

    critical value of tn−1t_{n-1}

  4. 4

    Conclude

    in context

The one-sample t test

Worked example

n=8n=8, ∑x=99.4\sum x=99.4, ∑x2=1236.48\sum x^2=1236.48. Test H0:μ=12.0H_0:\mu=12.0 against H1:μ≠12.0H_1:\mu\ne12.0 at 5%5\%.

In the statistic t=xˉ−μ0s/nt=\frac{\bar x-\mu_0}{s/\sqrt n}, what is sn\frac{s}{\sqrt n}?

Interval with unknown variance

Use xˉ±tn−1sn\bar x\pm t_{n-1}\frac{s}{\sqrt n}, taking the upper α2\frac{\alpha}{2} point of tt.

A confidence interval for μ\mu uses tt in place of zz, where tn−1t_{n-1} is the upper α2\frac{\alpha}{2} point for a (100−α)%(100-\alpha)\% interval. For 95%95\% look up the upper 2.5%2.5\% point, not the 5%5\% point.

As before, a (100−α)%(100-\alpha)\% interval matches a two-tailed test at the α%\alpha\% level.

  • Confidence intervalxˉ±tn−1sn\bar x\pm t_{n-1}\dfrac{s}{\sqrt n}

Worked example

n=8n=8, xˉ=24.3\bar x=24.3, s=1.9s=1.9. Find a 95%95\% confidence interval for μ\mu.

Which tail probability do you look up for a 90%90\% confidence interval?

The paired t-test

Find the difference for each pair, then run a one-sample tt-test on the differences.

Use a paired test when each observation in one sample is linked to one in the other, such as the same people before and after. Calculate dd for each pair and treat the differences as one sample from N(μd,σd2)\mathrm{N}(\mu_d,\sigma_d^2). To test H0:μd=0H_0:\mu_d=0, use t=dˉsd/nt=\frac{\bar d}{s_d/\sqrt n} with ν=n−1\nu=n-1, where nn is the number of pairs.

The differences must be Normal. State the direction of dd and write H1H_1 to match.

Paired

Data:
Each value linked to one in the other sample
Test:
One-sample tt-test on the differences
Degrees of freedom:
ν=\nu= pairs −1-1

Independent samples

Data:
No link between the samples
Test:
Two-sample test of means
Degrees of freedom:
ν\nu from both sample sizes

Worked example

Scores before and after give differences 5,3,−1,7,5,6,3,75,3,-1,7,5,6,3,7. Test H0:μd=0H_0:\mu_d=0 against H1:μd>0H_1:\mu_d>0 at 5%5\%.

Eight people are weighed before and after a diet. How many degrees of freedom does the paired tt-test have?

Try an exam question

A random sample of 99 batteries from a Normal population has mean life 8.38.3 hours and sample standard deviation 0.60.6 hours. Test, at the 5%5\% level, whether the mean life is greater than 8.08.0 hours. The upper 5%5\% point of t8t_8 is 1.8601.860.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Under H0:μ=50H_0:\mu=50, which distribution does Xˉ−μS/n\frac{\bar X-\mu}{S/\sqrt n} have?

1 mark, marked against the mark scheme

Revision notes