InfluentialPoints.com
Biology, images, analysis, design...
Use/Abuse Principles How To Related
"It has long been an axiom of mine that the little things are infinitely the most important" (Sherlock Holmes)

 

 

Predicting statistical power for the Z-test

One-tailed test

Worked example

The population mean (μ0) for the concentration of copper in blood of llamas was taken as 8.72 μmol/litre with the population standard deviation of observations as 1.3825. We ask what would be the probability of a one-tailed Z-test correctly rejecting the null hypothesis when comparing a mean of sample size = 4 drawn from a population with a mean μ1 of 9.59 μmol/litre.

Power   =   P[Z > 1.6449 − (9.59 − 8.72) / (1.3825 / √4)]
 
=   P[Z > 0.3863 ]
 
=   0.3496

We can conclude that the chance of getting a significant result with a one-tailed test is only 35%.

Two-tailed test

Worked example

Using exactly the same parameters as the example above, we ask what would be the probability of a two-tailed Z-test correctly rejecting the null hypothesis.
Power   =  P[ Z > 1.96 − (9.59 − 8.72) / (1.3825/√4) ]   +   1 − P[ Z > −1.96 − (9.59 − 8.72) / (1.3825/√4) ]
=  P[Z > 0.7014]   +   1 − P[ Z > −3.2186]
=  0.2415 + 1 − 0.999356
=  0.2421

We can conclude that the chance of getting a significant result with a two-tailed test is only 24.21%. Note that the probability of a Type III error here is very small at only 0.0006, so it has little effect on the power calculation.

Clearly if we only took four samples, our test would have very little power to reject the null hypothesis. The question then is how many samples would be required to give us a reasonable chance (say 80%) of rejecting the null hypothesis. We could use repeated estimates of the power for different sample sizes to produce a power curve:

{Fig. 2}
U05powr1.gif

The required number of samples for a power of 80% could then be read of the graph - in this case we would need around 20 samples. But it would be a lot easier to rearrange the equation, and estimate the required number of samples directly.

 

 

Estimating required sample size for the Z-test

One-tailed test

Worked example

If the normal concentration of copper in blood of llamas is 8.72 with a standard deviation of 1.3825, how many samples would have to be taken to detect a level of more than 10% above this level (that is a difference of 0.87 or more) with a power of 80%. Using the formula given above:

n   =   (1.6449 + .8416)2 1.38252   =   15.6
(9.59 − 8.72)2

We can conclude that to obtain a significant difference at the 5% level for a mean 10% greater than the population mean we would have to sample at least 16 animals.

Two-tailed test

Sample size calculations for a two-tailed test are identical except that you use the z values at α/2 instead of α.

Worked example

If the normal concentration of copper in blood of llamas is 8.72 with a standard deviation of 1.3825, how many samples would have to be taken to detect a difference of 10% or more above or below this level (that is a difference of 0.87 or more) with a power of 80%. Using the formula given above:

n   =   (1.96 + .8416)2 1.38252   =   19.8
(9.59 − 8.72)2

We can conclude that to obtain a significant difference at the 5% level for a mean 10% greater or less than than the population mean we would have to sample at least 20 animals.