An R Introduction to Statistics

Lower Tail Test of Population Proportion

The null hypothesis of the lower tail test about population proportion can be expressed as follows:

p ≥ p0

where p0 is a hypothesized lower bound of the true population proportion p.

Let us define the test statistic z in terms of the sample proportion and the sample size:

        ¯p− p0
z = ∘------------
      p0(1− p0)∕n

Then the null hypothesis of the lower tail test is to be rejected if z ≤−zα , where zα is the 100(1 α) percentile of the standard normal distribution.

Problem

Suppose 60% of citizens voted in last election. 85 out of 148 people in a telephone survey said that they voted in current election. At 0.5 significance level, can we reject the null hypothesis that the proportion of voters in the population is above 60% this year?

Solution

The null hypothesis is that p 0.6. We begin with computing the test statistic.

> pbar = 85/148          # sample proportion 
> p0 = .6                # hypothesized value 
> n = 148                # sample size 
> z = (pbarp0)/sqrt(p0(1p0)/n) 
> z                      # test statistic 
[1] 0.6376

We then compute the critical value at .05 significance level.

> alpha = .05 
> z.alpha = qnorm(1alpha) 
z.alpha               # critical value 
[1] 1.6449

Answer

The test statistic -0.6376 is not less than the critical value of -1.6449. Hence, at .05 significance level, we do not reject the null hypothesis that the proportion of voters in the population is above 60% this year.

Alternative Solution 1

Instead of using the critical value, we apply the pnorm function to compute the lower tail p-value of the test statistic. As it turns out to be greater than the .05 significance level, we do not reject the null hypothesis that p 0.6.

> pval = pnorm(z) 
> pval                   # lower tail pvalue 
[1] 0.26187

Alternative Solution 2

We apply the prop.test function to compute the p-value directly. The Yates continuity correction is disabled for pedagogical reasons.

> prop.test(85, 148, p=.6, alt="less", correct=FALSE) 
 
        1sample proportions test without continuity 
        correction 
 
data:  85 out of 148, null probability 0.6 
Xsquared = 0.4065, df = 1, pvalue = 0.2619 
alternative hypothesis: true p is less than 0.6 
95 percent confidence interval: 
 0.0000 0.63925 
sample estimates: 
      p 
0.57432