Hi Salma,
Formula for this is:
n=(zalpha/2 /e)2(p(1-p)
Let’s break this down.
n=sample size, what we are looking for
zalpha/2=
z-critical value for [(1-confidence level)/2]
Confidence level here is 90%, so 1-(confidence level)=10% or 0.1. 0.1/2=0.05.
z0.05=1.645
That value is worth memorizing in most introductory statistics classes.
e=margin of error
p=probability of success
1-p=probability of failure
Note that “success” can be defined however we want. In this case, success implies that people vote for, instead of against, our candidate.
So, for our problem:
zalpha/2=1.645
e=0.04
When we are not given a value for probability of success, we can assume that it is effectively a coin flip. That is:
p=0.5
So:
p=0.5
1-p=0.5
Therefore:
n=(1.645/0.04)2(0.5)(1-0.5)
n=422.81
Rounding to the next whole person:
n=423
I hope this helps.