Tests of Proportions
In this applet, we simulate a series of hypothesis of tests for the value
of the parameter p in
a Bernoulli random variable. Each column of red and green marks represents
a sample of 30 observations.
``Successes'' are coded by green marks and ``failures'' by red marks. The
estimate for the parameter
p is then
p_hat = (1/30)*(X_{1}+..X_{30})
We can test a hypothesis such as
H_{0}: p = p_{0}
against the alternative hypothesis
H_{a}: p > p_{0}
by using the statistic
(p_hatp_{0})/ sqrt(p_{0}(1p_{0})/n)
since n=30, this should be approximately normal under the null hypothesis.
The pink region in the applet represents the region in which the null hypothesis
would be rejected.
You should try:

the effect of changing alpha

changing the form of the hypotheses

making p different from p_{0}
The red dots represent the samples for which the null hypothesis would be
rejected, while the black
dots represent those for which the null hypothesis would not be
rejected. Which decision is correct?