# How to find the confidence interval without the variance?

I'm having a problem like this:

In a random sample of 1000 houses in a certain city, it is determined that 228 are heated by oil. Find a 99% confidence interval for the number of houses in this city that are heated by oil.

Normally, when calculating the confidence interval, I have to know the population variance or the sample variance. But how can I get the variance in this case? Or is there a way to calculate the confidence interval without the variance?

• I don't think there's enough information here: how could you possibly give them a number of houses, when no size of the city is provided? Commented Apr 22, 2013 at 2:41

You've actually been given information about the variance. Let's start by defining a variable:

Let X = # of houses out of 1000 that are heated by oil.

What type of random variable is X? What do we then know about the VAR[X]?

You're right, X would then be a binomial variable, with $population$ mean $\mu = n*p$ and $population$ variance $\sigma = n*p*q$. But in this case the population proportion is unknown, hence the question asking what the confidence interval for p is.

We estimate $p$ with $\hat{p} = \frac{X}{n}$, and the standard error of $\hat{p} = \sqrt{\frac{p*q}{n}}$, which is what you will plug into the confidence interval for $p$.

• can you please elaborate? Btw this is not a homework, I'm studying for my final exam and this is a problem in a past exam, so you don't have to "hold back"
– Chin
Commented Apr 22, 2013 at 3:06
• Well, I'm not deliberately holding back because I think this is a HW question @Chin, I just think it's more helpful to point out where you are getting stuck at than just tell you the answer. For now I will stick with that strategy... What types of random variables have you studied in this class? For sure you've studied normally distributed random variables, but what others? If you're still stuck, try answering is X in this case continuous or discrete?
– FAS
Commented Apr 22, 2013 at 3:10
• X is discrete right? I would guess X is binomial distributed, and so p=E(X)/n=0.228, so VAR(X) = 1000*0.228*0.772?
– Chin
Commented Apr 22, 2013 at 3:13
• Excellent you're on the right track. But here we actually don't know the value of p right? Instead we're trying to estimate it from a sample. What is the variance of a sample proportion? I think once you put it all together you will have your confidence interval!
– FAS
Commented Apr 22, 2013 at 3:20
• I don't get it. So is there anything wrong with my calculation here? Is the calculated variance correct?
– Chin
Commented Apr 22, 2013 at 4:08