Worked examples
The question
Question: a sample of 16 has mean 50 and SD 8: find the 95% confidence interval for the true mean.
95% interval for μ: x̄ = 50, s = 8, n = 16
x̄, the sample mean, is 50: the middle of our interval.
s is the SD of the sample: 8.
And n is 16.
x̄: the sample mean, the middle
s: the SD of the sample
n: the sample size
1 Why t
We do not know σ, the SD of all the numbers.
We only have s, the SD of the sample.
So we use t instead of z.
= σ not known: use s and t
The t curve is a bit wider than the bell.
It makes the interval a bit wider, to be safe.
t: a bit wider than z, to be safe
The t-table has a row for each df, the degrees of freedom: n minus 1.
16 minus 1 is 15.
df = n − 1 = 16 − 1 = 15
2 Find t*
95 percent of the bell is in the middle.
That leaves 5 percent: 2.5 percent in each end.
95% in the middle: 5% left over, 2.5% in each end
t* marks the cut between the middle and the ends.
In the t-table we take row 15 and the 95 percent column.
Row 15, column 95%: t* = 2.131.
t* = 2.131
Careful!
df is n minus 1: 15, not 16.
Careful: not df = 16 ✗
3 Error bound
The error bound: t* times s over the square root of n.
EBM = t* × s√n
The square root of 16 is 4.
8/4 is 2.
Times 2.131: 4.262.
EBM = 2.131 × 8√16 = 2.131 × 84 = 4.262
4 The interval
Take the error bound away from the middle: 50 minus 4.262 is 45.738.
= x̄ − EBM = 50 − 4.262 = 45.738
And add it: 50 plus 4.262 is 54.262.
= x̄ + EBM = 50 + 4.262 = 54.262
The 95 percent confidence interval is (45.738, 54.262).
= (45.738, 54.262)
5 Say it in words
In words: we are 95 percent confident that the true mean is between 45.738 and 54.262.
95% confident: 45.738 < μ < 54.262
6 Check
Let's check: the middle of the interval should be 50.
45.738 plus 54.262, divided by 2, is 50.
middle: (45.738 + 54.262) ÷ 2 = 50
Half the width should be the error bound: 54.262 minus 45.738, divided by 2, is 4.262.
So it is right!
half the width: (54.262 − 45.738) ÷ 2 = 4.262
Let's look back.
First: why t.
Then: find t*.
Then: error bound.
Then: the interval.
Then: say it in words.
Last: check.
Answer = (45.738, 54.262)
▶ Watch it solved
The question
Question: a sample of 16 has mean 60 and SD 8: find the 80% confidence interval for the true mean.
80% interval for μ: x̄ = 60, s = 8, n = 16
x̄, the sample mean, is 60: the middle of our interval.
s is the SD of the sample: 8.
And n is 16.
x̄: the sample mean, the middle
s: the SD of the sample
n: the sample size
1 Why t
We do not know σ, the SD of all the numbers.
We only have s, the SD of the sample.
So we use t instead of z.
= σ not known: use s and t
The t curve is a bit wider than the bell.
It makes the interval a bit wider, to be safe.
t: a bit wider than z, to be safe
The t-table has a row for each df, the degrees of freedom: n minus 1.
16 minus 1 is 15.
df = n − 1 = 16 − 1 = 15
2 Find t*
80 percent of the bell is in the middle.
That leaves 20 percent: 10 percent in each end.
80% in the middle: 20% left over, 10% in each end
t* marks the cut between the middle and the ends.
In the t-table we take row 15 and the 80 percent column.
Row 15, column 80%: t* = 1.341.
t* = 1.341
Careful!
df is n minus 1: 15, not 16.
Careful: not df = 16 ✗
3 Error bound
The error bound: t* times s over the square root of n.
EBM = t* × s√n
The square root of 16 is 4.
8/4 is 2.
Times 1.341: 2.682.
EBM = 1.341 × 8√16 = 1.341 × 84 = 2.682
4 The interval
Take the error bound away from the middle: 60 minus 2.682 is 57.318.
= x̄ − EBM = 60 − 2.682 = 57.318
And add it: 60 plus 2.682 is 62.682.
= x̄ + EBM = 60 + 2.682 = 62.682
The 80 percent confidence interval is (57.318, 62.682).
= (57.318, 62.682)
5 Say it in words
In words: we are 80 percent confident that the true mean is between 57.318 and 62.682.
80% confident: 57.318 < μ < 62.682
6 Check
Let's check: the middle of the interval should be 60.
57.318 plus 62.682, divided by 2, is 60.
middle: (57.318 + 62.682) ÷ 2 = 60
Half the width should be the error bound: 62.682 minus 57.318, divided by 2, is 2.682.
So it is right!
half the width: (62.682 − 57.318) ÷ 2 = 2.682
Let's look back.
First: why t.
Then: find t*.
Then: error bound.
Then: the interval.
Then: say it in words.
Last: check.
Answer = (57.318, 62.682)
▶ Watch it solved
The question
Question: a sample of 10 has mean 4.2 and SD 0.9: find the 95% confidence interval for the true mean.
95% interval for μ: x̄ = 4.2, s = 0.9, n = 10
x̄, the sample mean, is 4.2: the middle of our interval.
s is the SD of the sample: 0.9.
And n is 10.
x̄: the sample mean, the middle
s: the SD of the sample
n: the sample size
1 Why t
We do not know σ, the SD of all the numbers.
We only have s, the SD of the sample.
So we use t instead of z.
= σ not known: use s and t
The t curve is a bit wider than the bell.
It makes the interval a bit wider, to be safe.
t: a bit wider than z, to be safe
The t-table has a row for each df, the degrees of freedom: n minus 1.
10 minus 1 is 9.
df = n − 1 = 10 − 1 = 9
2 Find t*
95 percent of the bell is in the middle.
That leaves 5 percent: 2.5 percent in each end.
95% in the middle: 5% left over, 2.5% in each end
t* marks the cut between the middle and the ends.
In the t-table we take row 9 and the 95 percent column.
Row 9, column 95%: t* = 2.262.
t* = 2.262
Careful!
df is n minus 1: 9, not 10.
Careful: not df = 10 ✗
3 Error bound
The error bound: t* times s over the square root of n.
EBM = t* × s√n
0.9 over the square root of 10 is about 0.2846.
Times 2.262: about 0.6438.
EBM = 2.262 × 0.9√10 = 2.262 × ≈ 0.2846 ≈ 0.6438
4 The interval
Take the error bound away from the middle: 4.2 minus 0.6438 is 3.5562.
= x̄ − EBM = 4.2 − 0.6438 = 3.5562
And add it: 4.2 plus 0.6438 is 4.8438.
= x̄ + EBM = 4.2 + 0.6438 = 4.8438
The 95 percent confidence interval is (3.5562, 4.8438).
= (3.5562, 4.8438)
5 Say it in words
In words: we are 95 percent confident that the true mean is between 3.5562 and 4.8438.
95% confident: 3.5562 < μ < 4.8438
6 Check
Let's check: the middle of the interval should be 4.2.
3.5562 plus 4.8438, divided by 2, is 4.2.
middle: (3.5562 + 4.8438) ÷ 2 = 4.2
Half the width should be the error bound: 4.8438 minus 3.5562, divided by 2, is 0.6438.
So it is right!
half the width: (4.8438 − 3.5562) ÷ 2 = 0.6438
Let's look back.
First: why t.
Then: find t*.
Then: error bound.
Then: the interval.
Then: say it in words.
Last: check.
Answer = (3.5562, 4.8438)
▶ Watch it solved