This demonstration shows the relationship between the Type I error (α), Type II error (β), difference in means ([math]μ−μ_0[/math]), sample size (n), standard deviation ([math]σ_X[/math]) and the power of a 2-sided hypothesis test.
[list=1][br][*] [b]The hypothesised distribution.[/b] The top curve shows the hypothesised distribution of the sample mean [math]\overline{X}[/math] under the null hypothesis[br][math]H_0 : μ = μ_0[/math].[br]The region corresponding to a Type I error is shaded red.[br]You can change α, n and σ using the controls at the top-right corner.[br][br][*] [b]The alternate distribution.[/b] When ready, click 'Show alternate distribution' to display an alternate distribution of the sample mean [math]\overline{X}[/math].[br]Click the 'Show power' checkbox to reveal the area (shaded green) corresponding to the power of the test.[br]Click the 'Show Type II error region' checkbox to reveal the area (shaded blue) corresponding to the probability of making a Type II error.[br][br]Drag the green point to change the alternate mean μ. Or press the 'play' button in the bottom-left corner to make it animate.[br][/list][br][br]Use the 'Vertical separation' slider to superimpose or separate the two graphs. (This is purely visual, it has no effect on the hypothesis test.)[br][br][br]There is a version of this applet with larger sample sizes available at [url]http://geogebratube.org/student/maRmuYxRY[/url]