# Probability of deviation in sample proportion

#### Krapula

##### New Member
Hi!

I’m very new to statistics and I’m stuck on what formula to use for an assignment.

I have the information that 32.19 % of my population is positive to a product. If I take a sample of 100 from my population, then what is the probability of the sample proportion, of people being positive to the product, deviates max +/- 5 % from the proportion of positive people in the population.

The curve is 0,256 in skewness, population consists of 4 260, population mean is 2,71 and standard deviation is 1,267

Would be really grateful for any help in how to solve this. The answer to the question would be nice but what I'm really looking for is what formula to use for this and what the formula is called. My book on the subject is heavy and confusing

#### BGM

##### TS Contributor
Let $$X$$ be the number of people being positive to the product.

Then $$X \sim \text{Binomial}(100, 32.19\%)$$

Now the question ask you to calculate

$$\Pr\{100(32.19\%-5\%) < X < 100(32.19\%+5\%) \}$$

You can calculate this "exactly", or as most of the text suggested using normal approximation.

#### Krapula

##### New Member

I was dead wrong sitting looking through the chapters of hypothesis tests and z/t-tests This subject makes my poor head hurt hehe.

#### Krapula

##### New Member
heh I feel stupid but I still can't solve this.

I'm not sure how to use the formula I got. I've got no program to use, I think I need calculator and pencil, perhaps SPSS although the assignment doesn't state it.

I've tried with the binomial formula but my calculator can't handle 100!/(0.2519!(100-0.2519)!)

Anyway the way I tried to interpret the answer I've gotten is to type:
100!/(0.2519!(100-0.2519)!) * 0.3019^0.2519(1-0.6981)^100-0.2519 thereby trying to calculate the probability of the sample proportion being max -5 % below.
I was then going to do the same for sample proportion being +5 % above and then just construct a Y<0.3019<X type interval as answer to the question. Am I way out in the blue here?

Also how do I calculate how big of a sample I need to take if there is a requirement that the Standard Deviation to the estimated proportion is at the most 2.5 %. If I use the proportion of people being positive to the product in the population (30.19 %)?

#### Dason

I've tried with the binomial formula but my calculator can't handle 100!/(0.2519!(100-0.2519)!)
I don't think you're applying the binomial formula correctly.

#### Krapula

##### New Member
I've been using n!/x!(n-x)!

Where n is sample size, 100
x is the probability I want to see the chance of it happening

then multiply that with p^x * q^n-x
where p is the probability of success (positive attitude)
and q is the probability of failure (negative attitude)