Steply

99% confidence interval: 80 of 400 walk to school

Step by step, with the reason for every step · Confidence interval for a proportion · University Statistics

Step by step

The question

Question: in a sample of 400, 80 walk to school: find the 99% confidence interval for the true proportion.

99% interval for p: 80 of 400 walk to school

1 Name the numbers

p prime is the part of the sample that says yes: x divided by n.

p′ = the part of the sample: x ÷ n

80 divided by 400 is 0.2.

p′ = 80400 = 0.2

q prime is the rest: 1 minus 0.2 is 0.8.

q′ = 1 − 0.2 = 0.8

Careful!

p prime is the fraction 0.2, not the count 80.

Careful: p′ is a part of 1: 80 ÷ 400, not 80

Both counts, 80 and 320, are at least 5.

So the normal bell works here.

n × p′ = 80, n × q′ = 320: both at least 5

2 Find z*

99 percent of the bell is in the middle.

That leaves 1 percent: 0.5 percent in each end.

99% in the middle: 1% left over, 0.5% in each end

z* marks the cut between the middle and the ends.

Left of z* are the middle and one end: 0.99 plus 0.005 is 0.9950.

left of z* = 0.99 + 0.005 = 0.9950

Now we look for 0.9950 inside the table.

0.9950 is halfway between 0.9949 and 0.9951.

So z is halfway between 2.57 and 2.58: 2.575.

With more digits it is 2.576.

That is the number books use.

with more digits: z* = 2.576
z* = 2.576

3 Error bound

The error bound for a proportion: z* times the square root of p prime times q prime over n.

EBP = z* × √p′ q′n

0.2 times 0.8 is 0.16.

Divided by 400: 0.0004.

p′ q′n = 0.2 × 0.8400 = 0.16400 = 0.0004

The square root of that is about 0.02.

√p′ q′n = √0.0004 ≈ 0.02

Times 2.576: about 0.0515.

EBP = 2.576 × 0.02 ≈ 0.0515

4 The interval

Take the error bound away from the middle: 0.2 minus 0.0515 is 0.1485.

= p′ − EBP = 0.2 − 0.0515 = 0.1485

And add it: 0.2 plus 0.0515 is 0.2515.

= p′ + EBP = 0.2 + 0.0515 = 0.2515

The 99 percent confidence interval is (0.1485, 0.2515).

= (0.1485, 0.2515)

5 Say it in words

In words: we are 99 percent confident that the true proportion is between 14.85% and 25.15%.

99% confident: between 14.85% and 25.15%

6 Check

Let's check: the middle of the interval should be 0.2.

0.1485 plus 0.2515, divided by 2, is 0.2.

middle: (0.1485 + 0.2515) ÷ 2 = 0.2

Half the width should be the error bound: 0.2515 minus 0.1485, divided by 2, is 0.0515.

So it is right!

half the width: (0.2515 − 0.1485) ÷ 2 = 0.0515

Let's look back.

First: name the numbers.

Then: find z*.

Then: error bound.

Then: the interval.

Then: say it in words.

Last: check.

Answer
= (0.1485, 0.2515)

Your turn

Try this one yourself, then check:

99% interval for p: 20 of 100 walk to school
Show the answer
(0.097, 0.303)

More from Confidence interval for a proportion

The whole lesson: Confidence interval for a proportion →