Power Test
Statistical Power
The power statistic is defined as the probability
where is the null hypothesis and is the alternative hypothesis.
We can model the t-statistics of both hypothesis using the Student’s t-distribution.

On the right is the distribution for the hypothesis while on the left we have the or null hypothesis. The area in red is the probability of rejecting the null hypothesis given that is true. This is the significance level that is usually is set to 5%. The area in blue is the probability of rejecting the null given that is true. If the distributions are far apart then the power approaches 1, while if they are close to each other the power is small.
Consider a statistical test for the difference of means of two samples with equal sizes and variance. The t-statistic is
where is the pooled variance:
and are the number of degrees of freedom.
For large the Student t-distribution approaches a standard normal distribution. So we can calculate the power as
Here is the value for which the null hypothesis is rejected, and is the expected value when is true.
The value of power is usually set at 80%, which means that or:
while , which is the value for which . Definining the effect size as:
we can calculate the sample size with