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)*(X1+..X30)
We can test a hypothesis such as

H0:  p = p0
against the alternative hypothesis

Ha:  p > p0
by using the statistic

(p_hat-p0)/ sqrt(p0(1-p0)/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 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?

null