An often used method in applied statistics is determining the sample size necessary to view statistically significant results. Given the intended power, we can calculate the required sample size. Given the intended sample size, we can calculate the resulting power. Before we go in to how this works, we need to define a few things.

**Error Types**

Truth | |||
---|---|---|---|

H_{0} |
H_{1} |
||

Test | Negative Don’t Reject |
True Negative | False Negative β |

Positive Reject |
False Positive α |
True Positive Power = 1 – β |

- = False Positive Rate.

This is the chance of rejecting the null hypothesis , given that the null hypothesis is true. Note that this value does not depend on the existence of an alternative hypothesis. - = False Negative Rate.

This is the chance of failing to reject the null hypothesis, given the alternative hypothesis was true. Note that this value does depend on the alternative hypothesis. **Power**is viewed as the complement of , the false negative rate. The value for power is . The power of the test is the probability of rejecting the null hypothesis, given the null hypothesis is false. (Given the alternative hypothesis is true)

Using these error types, we can make guesses as to the sample size necessary to achieve significant results to support our alternative hypotheses.

**Sample Size Calculation**

**Case 1: One Sided Test:**In a one-sided test, we will only reject the null hypothesis if our sample mean falls to the side of it that we specified in advance. That means if we have a null hypothesis, , our alternative hypothesis is that , (exclusive) or .

GivenWe’re using , though this calculation will work for as well. We’re only concerned here that this is a

*one-sided*test.Due to the fact and can be interchanged with the quantity in the denominator always remaining positive, we can use this calculation for the case where as well.

**Case 2: Two-sided Test:**In a two-sided test, we will accept sample means that fall to either side of the null hypothesis as evidence against the null hypothesis. By this, if we have a null hypothesis , our alternative hypothesis is that , and that . That means that we will reject the null hypothesis if the sample mean is sufficiently far away from the null hypothesis, in either direction.In the event of a two-sided test, we are required to correct the value at which we reject the null hypothesis, to reflect that we are accepting values on both sides of the null hypothesis. This shifts out the value correspondingly.

**Additional Links**