# Sample size calculation for proportion

I am in a doubt about using Absolute and Relative precision for sample size calculations. Suppose if I want to conduct a study to asses the prevalence of Hypertension in a general population, which formula should I use among these two-

1. $n= Z^2 P(1-P)/d^2$
where $n$ = sample size; $Z$ = C.I.; $P$= anticipated prevalence or prevalence estimated from pilot study and $d$ = absolute precision.

2. $n = Z^2(1-P) / e^2 P$

Where $e$ = relative precision.

Please suggest me with some example.

• If this is a homework question could you please add the self-study tag? – Andy Jan 31 '15 at 8:01

Both formulas are right. In the first formula, the intent is to estimate the proportion within d percentage points of the true value P. In the second formula, you want to estimate the proportion within e of the true proportion P (ie, within e*P). That means, while in the first formula the precision is fixed, in the second formula the precision fluctuates based on the value of P.
• the second and third d in your comment should be e, to correspond to the constant in the poster's formula 2. – Steve Samuels Feb 1 '15 at 1:05
For a margin of error $m$, a minimum sample size, $n$ would be given by the following formula:
$n$ > $Z^2\over{m}^2$$\hat{p}(1-\hat{p})$