Example In two large populations there are
30% and 25% fair haired people respectively. Is the difference likely
to be hidden in sample of 1200 and 900 respectively from the two
populations ?
Solution:P_{1} = 30% = 0.30 and
P_{2} = 25% = 0.25 & q_{1} = 0.70 and q_{2}
= 0.75 n_{1} = 1200 and n_{2} = 900.
Therefore,  z  > 1.96 ( i.e. at 5% level of significance ). Hence it is unlikely that the real difference will be hidden.
Note : At times you may be interested in the comparison of proportions of persons possessing an attribute in a sample with proportion given by the population. In that case use:
where P_{2} = Population proportion . q_{2} = 1  P_{2}
n_{1} = Number of observations in the sample
n_{1} + n_{2} = Size of population
n_{2} = (Size of population  n_{1} )
Example There are 1000 students in a college
out of 20000 students in the whole university. In a study 200 were
found smokers in the college and 1000 in the university. Is there
a significant difference between the proportion of smokers in the
college and in the university?
Solution: H_{o} : P_{1}
= P_{2} i.e. there is no significant difference in the college
and university in case of proportion of smokers. Ha
: P_{1} ¹ P_{2}.
Proportion of smokers in college P_{1} =
Proportion of smokers in the university P_{2} =
q_{2} = 1  P2 = 0.95
Also n_{1} = 1000 and n_{1} + n_{2} = 20000. \ n_{2} = 19000.
Since the value is highly significant, it could not have arisen due to sample fluctuations. Rejecting H_{o} we say that there is a significant difference between proportion of smokers in the college and the university.
