AP Statistics 3.12 Setting Up Two-Proportion z-Tests
Practise selecting a two-proportion z-test, writing hypotheses in context, and checking independence, sampling, and pooled large-count conditions.
- Syllabus
- Effective Fall 2026
- Course
- AP Statistics
Practise selecting a two-proportion z-test, writing hypotheses in context, and checking independence, sampling, and pooled large-count conditions.
A new anti-spam software program is field-tested on 250 randomly selected spam emails and on 750 randomly selected legitimate emails. The results are summarized in the following table (positive test = program labels email as spam):
\begin{tabular}[t]{|l|l|l|l|}
\hline & Spam & Legitimate & Total \\
\hline Positive
test & 205 & 90 & 295 \\
\hline Negative
test & 45 & 660 & 705 \\
\hline Total & 250 & 750 & 1,000 \\
\hline
\end{tabular}
The software developer claims that the proportion of all spam emails for which the tests are positive equals the proportion of all legitimate emails for which the tests are negative.

Identify the appropriate inference procedure.
Use a two-sample z-test for a difference between population proportions.
A survey conducted by a national research center in 2018 asked a random sample of people over age 12 years old in the United States whether it is very important to them personally to have a lot of money. Responses are summarized based on age in the following table of counts.
\begin{tabular}[t]{|l|l|l|}
\hline & Adults & Teenagers \\
\hline Very important & 281 & 86 \\
\hline Not very important & 180 & 168 \\
\hline Total & 461 & 254 \\
\hline
\end{tabular}

Identify the appropriate test and state the hypotheses.
Use a two-sample z-test for a difference in population proportions. Let pA and pT be the proportions of all U.S. adults and teenagers who would say having a lot of money is very important. Test H0:pA=pT against Ha:pA=pT.
.Three months from now,all of the parents/guardians of elementary school students in a certain large school
district will vote either yes or no on a new electronic tablet program.This program will allow every elementary
school student within the school district to be issued a tablet.In a recent survey of a random sample of 300
parents/guardians of elementary school students, 146 out of 300 (48.7 percent)indicated they would vote yes in
favor of such a program.
Mr.Robinson,the technology expert at the school district,is in favor of the elementary students being issued a
tablet.He develops a pamphlet showing the educational benefits of students having their own tablet.He did this to
increase the proportion of parents/guardians voting yes.To investigate the effectiveness of the pamphlet,Mr.
Robinson distributed the pamphlet to the same 300 parents/guardians from the original sample.After reading the
pamphlet,each parent/guardian was asked again whether each elementary student should be issued a tablet.
Parents/guardians could change their answer or keep the same answer from the original survey.The results of the
parent/guardian replies are shown in the table.

(b)Mr.Robinson is considering the use of a z-test for a difference of two population proportions for his inference
test.
(i)What are the conditions of a z-test for a difference of two population proportions?
First,the samples are chosen randomly and independently.
Second,the two sample proportion are both less than 10% of the population
Third,n1p^1=10n1(1−p^1)>10n2⋅p^2>10n2(1−p^2)>10
Last,two samples are mutually independent
(ii)Explain why a z-test,for a difference of two population proportions is not an appropriate test for Mr.Robinson
to use.
(ii)Explain why a z-test for a difference of two population proportions is not an appropriate test for Mr.Robinson
to use.
Question 6
Continue your response to QUESTION 6 on this page.
The table of parent/guardian replies is repeated here.

The district statistician explains to Mr.Robinson that the appropriate inference test to use is one called
McNemar's chi-square test.The hypotheses for McNemar's test are shown here.
Let p1 be the proportion of all parents/guardians of elementary school students in the district who would say NO
before reading the pamphlet and would say YES after reading the pamphlet.Let p2 be the proportion of all
parents/guardians of elementary school students in the district who would say YES before reading the pamphlet
and would say NO after reading the pamphlet.
To apply McNemar's test in this study,consider only the 105 responses of the parents/guardians whose opinions
changed(i.e., 69 from NO to YES and 36 from YES to NO).McNemar's test statistic is given by
where b represents the number of parents/guardians in the sample that said NO before reading the pamphlet and
YES after reading the pamphlet and c represents the number of parents/guardians in the sample that said YES
before reading the pamphlet and NO after reading the pamphlet.
1.Size B too small which B not representive to the population
2.Not independne of observation
3.violation of the 10%condition
4.Samples are not normally distributed.
Question 6
Continue your response to QUESTION 6 on this page.
The table of parent/guardian replies is repeated here.
\begin{tabular}[t]{|l|l|l|l|l|}
\hline
YES,after reading
the pamphlet Gi
NO,after reading
the pamphlet
6.
Total
YES,before reading the pamphlet
110 8%. 115
36
58.8
NO,before reading the pamphlet
6991.880
85
62.1
Total
179
121
The district statistician explains to Mr.Robinson that the appropriate inference test to use is one called
McNemar's chi-square test.The hypotheses for McNemar's test are shown here.
Let p1 be the proportion of all parents/guardians of elementary school students in the district who would say NO
before reading the pamphlet and would say YES after reading the pamphlet.Let p2 be the proportion of all
parents/guardians of elementary school students in the district who would say YES before reading the pamphlet
and would say NO after reading the pamphlet.
To apply McNemar's test in this study,consider only the 105 responses of the parents/guardians whose opinions
changed(i.e., 69 from NO to YES and 36 from YES to NO).McNemar's test statistic is given by
where b represents the number of parents/guardians in the sample that said NO before reading the pamphlet and
YES after reading the pamphlet and c represents the number of parents/guardians in the sample that said YES
before reading the pamphlet and NO after reading the pamphlet.