The \(z\)-Proportion Test#
While the \(z\) procedures have been, in the main, replaced by \(t\) procedures, one area of study still uses the the normal curve: qualitative data with research questions framed as proportions per category.
Uses for \(z\)-Proportion Testing#
The quintessential example of using \(z\)-proportion procedures is political polling where researchers estimate the percentage of votes a candidate is likely to receive in the primaries or general election. As our class formula sheet makes clear, we are estimating the proportion data for the qualitative variable \(p\) using the following conversion to a normal distribution:
where the distribution of \(p\) is approximately \(N\left(p, \sqrt{\frac{p(1-p))}{n}}\right)\).
Example: Voting#
A gun control resolution is being considered for the metro Atlanta area. A pollster wishes to gauge opinion for or against the law in both Fulton and Gwinett counties. Test at the \(\alpha = 0.10\) level given that the data collected are shown in the table below.
For | Against | |
---|---|---|
Fulton | 281 | 192 |
Gwinnett | 214 | 229 |
Hypotheses#
This is a 2-sample proportion test where we test for a difference in the percent of voters who plan to vote for the resolution.
Conduct the Test#
We first proceed with table and a formula. The \(z\) table shows that \(t^* = \pm 1.65\) corresponds to \(\alpha = 0.05\) and \(\alpha = 0.95\) which, since we are conducting a 2-tailed hypothesis test, will be correct. The correct formula for a 2-sample \(z\)-proportion test is given below
where \(\hat p\) is the pooled (overall) proportion of successes.
Since \(z = 3.3683 > 1.65 = z^*\), we reject the null.
Using R to do all computations, we have the following:#
Creating the observed data matrix:
obs = matrix(c(281, 214, 192, 229), ncol =2)
obs
281 | 192 |
214 | 229 |
We set \(\textbf{correct} = \textbf{FALSE}\) to turn off the continuity correction which will force R into a similar computation as we do with formulas and tables:
test <- prop.test(obs, correct = FALSE)
test
2-sample test for equality of proportions without continuity
correction
data: obs
X-squared = 11.35, df = 1, p-value = 0.0007544
alternative hypothesis: two.sided
95 percent confidence interval:
0.04679303 0.17522769
sample estimates:
prop 1 prop 2
0.5940803 0.4830700
Our calculated test statistic \(z = 3.3683\) should be within rounding error of the square root of R’s calcuated test statistic:
sqrt(test$statistic)
We find that it is, and with \(p = 0.000754 < 0.05 = \alpha\), we reject the null.
Reporting Out#
Given that we reject the null (\(p < 0.001\)), we have evidence for a difference in voter preferrence on this referrendum. A higher percentage of Fulton County voters favor the referrendum than do Gwinnett County voters.