# Probability of deviation of percentages

In a set of N individuals X% have some characteristic.

In a random subset of M individuals of this set, we observe that Y% have the characteristic. Note that M is not necessarily very small compared to N.

1) What is the probability P(N, M, X, Z) that | Y% - X% | <= Z% ?

2) What is the probability P'(N, M, X, Z) that Y% - X% > Z% ?

Example: There are 200 inhabitants in a village. 12% have blue eyes. In a random sample of 20 inhabitants, what is the probability that, among them, the proportion having blue eyes is between 10% and 14% (i.e. 12% +/- 2%)? Strictly greater than 14%?

• Hypergeometric distribution. Interpreting 10-14% of 20 to mean 2 or 3, one can use R code sum(dhyper(2:3, 24, 200-24, 20)), which returns 0.5221374. For just 2 with blue eyes it's ${24 \choose 2}{176 \choose 18}/{200 \choose 20}=0.2852916.$ – BruceET Jan 7 at 18:46