Steply

90% confidence interval: 72 of 400 are vegetarian

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, 72 are vegetarian: find the 90% confidence interval for the true proportion.

90% interval for p: 72 of 400 are vegetarian

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

72 divided by 400 is 0.18.

p′ = 72400 = 0.18

q prime is the rest: 1 minus 0.18 is 0.82.

q′ = 1 − 0.18 = 0.82

Careful!

p prime is the fraction 0.18, not the count 72.

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

Both counts, 72 and 328, are at least 5.

So the normal bell works here.

n × p′ = 72, n × q′ = 328: both at least 5

2 Find z*

90 percent of the bell is in the middle.

That leaves 10 percent: 5 percent in each end.

90% in the middle: 10% left over, 5% in each end

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

Left of z* are the middle and one end: 0.9 plus 0.05 is 0.9500.

left of z* = 0.9 + 0.05 = 0.9500

Now we look for 0.9500 inside the table.

0.9500 is halfway between 0.9495 and 0.9505.

So z is halfway between 1.64 and 1.65: 1.645.

z* = 1.645

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.18 times 0.82 is 0.1476.

Divided by 400: 0.000369.

p′ q′n = 0.18 × 0.82400 = 0.1476400 = 0.000369

The square root of that is about 0.0192.

√p′ q′n = √0.000369 ≈ 0.0192

Times 1.645: about 0.0316.

EBP = 1.645 × 0.0192 ≈ 0.0316

4 The interval

Take the error bound away from the middle: 0.18 minus 0.0316 is 0.1484.

= p′ − EBP = 0.18 − 0.0316 = 0.1484

And add it: 0.18 plus 0.0316 is 0.2116.

= p′ + EBP = 0.18 + 0.0316 = 0.2116

The 90 percent confidence interval is (0.1484, 0.2116).

= (0.1484, 0.2116)

5 Say it in words

In words: we are 90 percent confident that the true proportion is between 14.84% and 21.16%.

90% confident: between 14.84% and 21.16%

6 Check

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

0.1484 plus 0.2116, divided by 2, is 0.18.

middle: (0.1484 + 0.2116) ÷ 2 = 0.18

Half the width should be the error bound: 0.2116 minus 0.1484, divided by 2, is 0.0316.

So it is right!

half the width: (0.2116 − 0.1484) ÷ 2 = 0.0316

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.1484, 0.2116)

Your turn

Try this one yourself, then check:

90% interval for p: 500 of 1000 are vegetarian
Show the answer
(0.474, 0.526)

More from Confidence interval for a proportion

The whole lesson: Confidence interval for a proportion →