Menu
Sign up Sign in

AI HL · AHL 8

Statistics 2

AHL 8.12

z-intervals, t-intervals and choosing between them

AHL 8.12

z-intervals, t-intervals and choosing between them

Target: I can find a z-interval for a mean from summary statistics or raw data when the population standard deviation is known. (+5 more)

By the end of this section

Key points

z-interval or t-interval

  • Known population variance (or \(\sigma\)): z-interval. Unknown, estimated from the sample: t-interval, for any sample size.
  • On the calculator, a z-interval asks for \(\sigma\), a t-interval asks for \(s_{n-1}\). Say which you use and why.
  • A z-interval is narrower than a t-interval at the same confidence, so it is more accurate. Both need a normal population.

Getting ready for the interval

  • If you are given \(s_n\) or the sample variance, convert to \(s_{n-1}\) first: \(s_{n-1}=\sqrt{\frac{n}{n-1}}\,s_n\).
  • Grouped data: use class midpoints and the frequencies. The interval is approximate because the midpoints replace the true values.
  • Paired data: take the differences and find a t-interval for the mean difference.

Width, assumptions and interpretation

  • A higher confidence level gives a wider interval. A larger sample gives a narrower one.
  • State the assumption: the population is normal. For a large sample, the central limit theorem justifies a z-interval even if the population is not normal.
  • To interpret an interval against a target or claim: is the value inside it? Inside means no evidence the mean is different. If the whole interval is above the value, the mean is likely above it.
  • From an interval \(a<\mu<b\): \(\bar x=\dfrac{a+b}{2}\) and margin of error \(=\dfrac{b-a}{2}\). The margin is \(t\times\dfrac{s_{n-1}}{\sqrt n}\) (or \(z\times\dfrac{\sigma}{\sqrt n}\)), so you can find \(s_{n-1}\) if you know n and the confidence level.
  • The width is proportional to \(\dfrac{1}{\sqrt n}\): four times the sample size halves the width. To halve the width you need four times as many observations, not twice as many.

On the calculator

z Interval

Menu > Statistics > Confidence Intervals > z Interval

  • Choose Data or Stats as the input method.
  • Enter the population \(\sigma\), then the list (or \(\bar x\) and n) and the C level.
  • Read the interval.

Screenshot and video to come

Grouped data with a frequency list

  • Put the class midpoints in one list and the frequencies in another.
  • Run 1-Variable Stats with the frequency list to get \(\bar x\) and \(s_{n-1}\), then use t Interval, Stats.

Screenshot and video to come

Paired differences

  • Make a list of the differences, after minus before.
  • Run t Interval on that list.

Screenshot and video to come

Explore: what a confidence level means

The population is normal with μ = 50 and σ = 8, so we know where μ is. Each press takes more random samples and builds an interval for the mean from each. Orange intervals miss μ.

Intervals so far
Intervals that contain μ
As a percentage

The picture shows the latest 60 intervals, the newest at the top. The count is of all of them. Changing the level or the kind of interval keeps the same samples.

Press 10 more to start.

  1. Take 100 intervals at 95%. About how many contain μ? Take 100 more. Is the count the same?
  2. Change the level to 99% without taking new samples. What happens to the width of the intervals, and to the number that miss μ?
  3. Make n small, then large. What happens to the width of the intervals? Does the percentage that contain μ change?
  4. Look at one interval. Is it right to say there is a 95% probability that μ is inside it? Why not?

Worked examples

Problems like the ones in class. Pick one, try it, then open the working.
A z-interval from a summary

The masses of newborn lambs on a farm are normally distributed with standard deviation 0.62 kg. A random sample of 30 lambs has mean mass 4.18 kg. Find a 95% confidence interval for the mean mass of newborn lambs on the farm.

Working
  1. Choose the interval

    Population standard deviation known: z-interval

    Known variance means z. State it.

  2. Enter the summary

    From the calculator: z Interval, Stats, \(\sigma=0.62\), \(\bar x=4.18\), \(n=30\), C Level 0.95

    The calculator asks for the population \(\sigma\).

  3. Read the interval

    \(3.96 < \mu < 4.40\) kg

    Check: \(4.18\pm1.96\times\frac{0.62}{\sqrt{30}}\).

Video walkthrough coming
A z-interval from a list

A call centre knows the standard deviation of its call lengths is 1.8 minutes. Nine randomly chosen calls lasted 12.4, 15.1, 13.8, 11.9, 14.6, 13.2, 12.7, 14.9, 13.5 minutes. Assume the lengths are normally distributed. Find a 90% confidence interval for the mean call length.

Working
  1. Choose the interval

    \(\sigma\) known: z-interval

    The 1.8 is the population standard deviation.

  2. Enter the data

    From the calculator: z Interval, Data, the list, \(\sigma=1.8\), C Level 0.90

    Choose Data and enter \(\sigma\) yourself: the calculator does not use the sample's.

  3. Read the interval

    \(12.6 < \mu < 14.6\) minutes

    The mean of the list is 13.57.

Video walkthrough coming
Confidence level and width

The masses of packets of rice are normally distributed with standard deviation 12 g. A sample of 25 packets has mean 340 g. Find the 90% and the 99% confidence intervals for the mean mass, and say which is wider and why.

Working
  1. Choose the interval

    \(\sigma\) known: z-interval

    If only a sample standard deviation were given, use the t-interval.

  2. 90%

    \(336 < \mu < 344\), width \(7.90\)

    From the calculator: z Interval, C Level 0.90.

  3. 99%

    \(334 < \mu < 346\), width \(12.4\)

    Same data, C Level 0.99.

  4. Compare

    The 99% interval is wider

    To be more sure of catching \(\mu\) you need a wider interval. Higher confidence means a wider interval.

Video walkthrough coming
Convert, find the interval, compare with a claim

A bottling plant says its bottles hold 500 ml. A random sample of 9 bottles has mean 502.3 ml and standard deviation 3.9 ml (dividing by n). Assume the volumes are normal. (a) Find \(s_{n-1}\). (b) Find a 95% confidence interval for the mean volume. (c) Does the interval support a claim that the mean is more than 500 ml?

Working
  1. Convert

    \(s_{n-1}=\sqrt{\dfrac{9}{8}}\times3.9=4.137\)

    The calculator's Stats input wants \(s_{n-1}\).

  2. The interval

    From the calculator: t Interval, Stats, \(\bar x=502.3\), \(s_{n-1}=4.137\), \(n=9\), C Level 0.95: \(499 < \mu < 505\)

    \(\sigma\) is unknown, so t.

  3. Compare with 500

    500 lies inside the interval

    The interval does not rule out a mean of 500, so it does not support a mean above 500.

Video walkthrough coming
A grouped-data interval

The heights of 50 sunflowers are in the table. Assume they are normally distributed. Find an approximate 95% confidence interval for the mean height, and say why it is approximate.

Height h (cm)100 ≤ h < 120120 ≤ h < 140140 ≤ h < 160160 ≤ h < 180180 ≤ h < 200Frequency6132083
Working
  1. Midpoints

    Midpoints: 110, 130, 150, 170, 190; frequencies: 6, 13, 20, 8, 3

    Use the midpoint of each class as its value.

  2. Statistics

    From the calculator: 1-Variable Stats on the midpoints with the frequencies: \(\bar x=145.6\), \(s_{n-1}=21.11\)

    Put the frequencies in the frequency list.

  3. The interval

    t Interval, Stats: \(140 < \mu < 152\)

    \(\sigma\) unknown, so t.

  4. Why approximate

    Every height is replaced by its class midpoint

    We do not know the true heights, so \(\bar x\) and \(s_{n-1}\) are only estimates.

Video walkthrough coming
Paired differences

Ten students sit a spelling test before and after a revision course. Scores before: 41, 35, 52, 47, 38, 44, 50, 36, 43, 49. Scores after: 44, 40, 51, 52, 45, 43, 56, 41, 47, 53. Assume the differences are normally distributed. Find a 90% confidence interval for the mean improvement and say whether it shows the course helps.

Working
  1. Differences

    After − before: 3, 5, −1, 5, 7, −1, 6, 5, 4, 4

    Work with one list of differences. Each difference is one observation.

  2. The interval

    From the calculator: t Interval, Data, the list of differences, C Level 0.90: \(2.13 < \mu_d < 5.27\)

    Variance unknown, so t. \(\mu_d\) is the mean difference.

  3. Interpret

    The whole interval is above 0

    So the mean improvement is likely positive: the course appears to help. If 0 were inside, there would be no evidence of a change.

Video walkthrough coming
A large sample and the central limit theorem

The waiting times at a clinic are not normally distributed, but their standard deviation is known to be 9.4 minutes. A random sample of 75 patients has mean wait 23.8 minutes. Find a 95% confidence interval for the mean wait. Is it valid?

Working
  1. Choose the interval

    \(\sigma\) known: z-interval

    The 9.4 is the population standard deviation.

  2. The interval

    From the calculator: z Interval, Stats, \(\sigma=9.4\), \(\bar x=23.8\), \(n=75\), C Level 0.95: \(21.7 < \mu < 25.9\)

    Read the interval.

  3. Why it is valid

    n = 75 is large, so by the central limit theorem \(\bar X\) is approximately normal even though the waits are not

    If the sample were small and the population not normal, the z-interval would not be justified.

Video walkthrough coming
Working back from an interval

A 95% confidence interval for the mean time, in seconds, to complete a task is \(41.22<\mu<48.58\). It was found from a random sample of 16 times from a normal population, using \(s_{n-1}\). Find the sample mean, the margin of error and \(s_{n-1}\).

Working
  1. The mean

    \(\bar x=\dfrac{41.22+48.58}{2}=44.90\)

    The interval is centred on the sample mean.

  2. The margin of error

    \(\dfrac{48.58-41.22}{2}=3.68\)

    Half the width.

  3. The t value

    df = 15, 95% (upper tail 0.025): \(t=2.131\)

    From the calculator: inverse t with 15 degrees of freedom.

  4. Solve for \(s_{n-1}\)

    \(3.68=2.131\times\dfrac{s_{n-1}}{\sqrt{16}}\) gives \(s_{n-1}=6.91\)

    \(s_{n-1}=\dfrac{3.68\times4}{2.131}\).

Video walkthrough coming
Sample size and width

The masses of packets of rice are normally distributed with \(\sigma=8\) g. A sample has mean 60 g. Find the 95% confidence interval for the mean mass when the sample size is 25 and when it is 100. Compare the widths.

Working
  1. n = 25

    \(56.9<\mu<63.1\), width 6.27

    From the calculator: z Interval, Stats, \(\sigma=8\), \(\bar x=60\), \(n=25\), C Level 0.95.

  2. n = 100

    \(58.4<\mu<61.6\), width 3.14

    Same \(\sigma\), \(\bar x\) and C Level, with \(n=100\).

  3. Compare

    \(\dfrac{6.27}{3.14}=2\)

    Four times the sample size halves the width, because the width is proportional to \(\dfrac{1}{\sqrt n}\).

Video walkthrough coming