# Errors in Hypothesis Testing

Consider the following hypotheses:
H0: μ = μ0
H1: μ = μ1
• If the null hypothesis (H0) is true, then the statistic X has an approximately N(μ0, σ2) distribution (this is the "null distribution").
• If the alternative hypothesis (H1) is true, then X has an approximately N(μ1, σ2) distribution (this is the "alternative distribution").

The applet displays the null distribution by default. The user can choose to display the alternative distribution as well and can change the values of μ0, μ1, and σ using the sliders.

By selecting the appropriate check boxes, the user can see the area under the null or alternative distribution corresponding to
• Type I Error: A type I error occurs when a true null hypothesis is reject. P(Type I error) = α
• Type II Error: A type II error occurs when a false null hypothesis is not rejected (i.e. H1 is true). P(Type II error) = β
• Power (1-β): The probability of correctly rejecting the null hypothesis (rejecting H0 when H1 is true).

Applet instructions
• Drag the dots indicating the distributions of the means (μ0 and μ1) to change them.
• Use the slider to adjust the variance of the distributions (both have the same variance).
• Drag the triangle labeled 'R' to adjust the rejection region for the test.
• Use the checkboxes to
• Show the alternative distribution.
• Indicate the area under the null distribution corresponding to the probability of a Type I Error.
• Indicate the area under the alternative distribution corresponding to the probability of a Type II Error.
• Indicate the area under the alternative distribution corresponding to the power.
Note: The alternative distribution must be displayed before the Type II error or power can be illustrated.