Steply

Calculate 95% confidence interval: 45 of 100 say yes

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 100, 45 say yes: find the 95% confidence interval for the true proportion.

95% interval for p: 45 of 100 say yes

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

45 divided by 100 is 0.45.

p′ = 45100 = 0.45

q prime is the rest: 1 minus 0.45 is 0.55.

q′ = 1 − 0.45 = 0.55

Careful!

p prime is the fraction 0.45, not the count 45.

Careful: p′ is a part of 1: 45 ÷ 100, not 45

Both counts, 45 and 55, are at least 5.

So the normal bell works here.

n × p′ = 45, n × q′ = 55: both at least 5

2 Find z*

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

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

Left of z* are the middle and one end: 0.95 plus 0.025 is 0.9750.

left of z* = 0.95 + 0.025 = 0.9750

Now we look for 0.9750 inside the table.

0.9750 is in the table: row 1.9, column .06.

So z = 1.96.

z* = 1.96

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.45 times 0.55 is 0.2475.

Divided by 100: 0.002475.

p′ q′n = 0.45 × 0.55100 = 0.2475100 = 0.002475

The square root of that is about 0.0498.

√p′ q′n = √0.002475 ≈ 0.0498

Times 1.96: about 0.0975.

EBP = 1.96 × 0.0498 ≈ 0.0975

4 The interval

Take the error bound away from the middle: 0.45 minus 0.0975 is 0.3525.

= p′ − EBP = 0.45 − 0.0975 = 0.3525

And add it: 0.45 plus 0.0975 is 0.5475.

= p′ + EBP = 0.45 + 0.0975 = 0.5475

The 95 percent confidence interval is (0.3525, 0.5475).

= (0.3525, 0.5475)

5 Say it in words

In words: we are 95 percent confident that the true proportion is between 35.25% and 54.75%.

95% confident: between 35.25% and 54.75%

6 Check

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

0.3525 plus 0.5475, divided by 2, is 0.45.

middle: (0.3525 + 0.5475) ÷ 2 = 0.45

Half the width should be the error bound: 0.5475 minus 0.3525, divided by 2, is 0.0975.

So it is right!

half the width: (0.5475 − 0.3525) ÷ 2 = 0.0975

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.3525, 0.5475)

Your turn

Try this one yourself, then check:

95% interval for p: 90 of 200 say yes
Show the answer
(0.3811, 0.5189)

More from Confidence interval for a proportion

The whole lesson: Confidence interval for a proportion →