# 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

## 2 Answers

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.

Both formulas are discussed with examples in the book by Lemeshow et al (1990).

• 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
• Many thanks for your advice. Yes, I already read that book(by Stanley Lemeshow), but still could not got clarity where to use absolute precision and where to use relative precision? Is my assumption is right i.e. In order to find out prevalence of any disease(probably to establish a hypothesis) we should use absoulte precision(1st formula) and to test such hypothesis or to assess differences in proportions between two study groups, we should use second formula(relative precision); Is it right or wrong? – Sudhakar Feb 2 '15 at 8:54
• There is no 'hard and fast' rule as to when to use which formula. I think it is a matter of your own decision. If you want to use a fixed value for precision, go for the first formula. If you want to estimate the precision as a function of the expected prevalence, go for the second formula. However, the distinction between the two is not a matter of wanting 'to generate a hypothesis' or 'to test a hypothesis'. This link may give you additional help. – Ayalew A. Feb 2 '15 at 11:27

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})$