PHLT 8331 Week 7 Chi-Square and McNemar Tests Example

Fundamentals of Biostatistics Walden University Free custom sample in 24 to 48h

This PHLT 8331 Week 7 categorical test example applies two tests to good anticoagulation control in a composite registry and argues each choice from how the counts were collected. Walden PHLT 8331 asks students to test proportions correctly, and the paper uses a chi-square test of independence for good control across three clinics, with expected counts checked, finding about two in three patients controlled at each pharmacist clinic against fewer than half at the physician clinic, and McNemar's test for change within the same 212 patients, using only the 58 who improved and 21 who worsened, for a net shift of 17.5%. It explains why a chi-square test on before-and-after counts would be wrong, prefers differences in proportions to odds ratios for a common outcome and notes the causal limits, guidance that applies to any binary outcome in PhD in Public Health work.

CoursePHLT 8331 Fundamentals of Biostatistics
WeekWeek 7
Paper typeCategorical test paper
LengthAbout 1,010 words, 6 pages
FormatAPA 7 student paper
SchoolWalden University
ProgramPhD in Public Health
UpdatedOctober 2026

Free sample paper for PHLT 8331 Week 7

1

Counts Need Their Own Tests: A Chi-Square Test of Good Anticoagulation Control Across Three Clinics and a McNemar Test of Change Within the Same Patients in a Composite Registry

Student Name

Walden University

PHLT 8331: Fundamentals of Biostatistics

Instructor Name

Month Day, Year

What this page is doingThe title pairs each question with its test and signals that the choice follows from how the counts were collected, independent groups in one case and the same patients in the other.
2

Counts Need Their Own Tests: A Chi-Square Test of Good Anticoagulation Control Across Three Clinics and a McNemar Test of Change Within the Same Patients in a Composite Registry

Two Questions About a Binary Outcome

Good anticoagulation control, defined in the composite registry as time in therapeutic range of at least 65%, is a yes-or-no outcome, so questions about it call for tests of counts and proportions rather than means. This paper answers two such questions. The first asks whether the proportion of patients with good control differs across the registry's three clinics, using a chi-square test of independence. The second asks whether good control changed from before to after a move to pharmacist management among the same 212 patients studied in Week 4, using McNemar's test. Each choice is argued from how the counts were collected. All figures are composite.

What this page is doingTying each test to the structure of the data before reporting results shows the reasoning behind the choice.
3

Question 1: Good Control by Clinic

Why a Chi-Square Test of Independence

Every one of the 804 patients whose six-month record is complete belongs to exactly one clinic and either has or lacks good control. The data form a table of three rows and two columns of counts from independent patients, which is the structure a chi-square test of independence addresses. The test compares the observed counts with the counts expected if good control were unrelated to clinic.

Checking the Condition

The approximation behind the chi-square test needs expected counts that are not too small, commonly at least five in each cell. The smallest expected count here is about 95, far above that threshold. If expected counts had been small, Fisher's exact test would be the safer choice.

The Result

The chi-square statistic was 31.96 on 2 degrees of freedom, p < .001. Good control is not independent of clinic. The two pharmacist-managed clinics had nearly identical proportions, about two in three patients with good control, while the physician-managed clinic had fewer than half. As in Week 5, the comparison is between clinics, which differ in more than management. The direction of the difference matches what reviews of pharmacist-managed anticoagulation have generally found (Manzoor et al., 2017), but the registry cannot separate management from other clinic differences.

Table 1

Good Anticoagulation Control by Clinic (Composite Figures)

ClinicManagementGood controlNot good controlTotalPercent good control |
APharmacist1688225067.2 |
BPharmacist1607623667.8 |
CPhysician15116731847.5 |
TotalAll47932580459.6 |

Note. Composite figures. A patient is counted as controlled when 65% or more of the latest six months' days sit inside the INR target.

Question 2: Change in Good Control Within Patients

Why McNemar's Test

For the 212 patients who moved to pharmacist management, each patient's control status was recorded before and after the move. The two sets of counts are not independent; they are paired observations on the same people. A chi-square test of independence would treat them as separate groups and give the wrong answer. McNemar's test uses only the patients whose status changed, comparing how many moved from not controlled to controlled with how many moved the other way. Patients whose status stayed the same carry no information about change, so the test sets them aside.

The Result

Fifty-eight patients moved from not controlled to controlled, and 21 moved from controlled to not controlled. The McNemar statistic, (58 minus 21) squared divided by (58 plus 21), was 17.33 on 1 degree of freedom, p < .001. The net shift was 37 patients, or 17.5% of the 212, toward good control. Fagerland et al. (2013) compared versions of the McNemar test and found that the asymptotic version used here performs well with discordant counts of this size, while the exact conditional version can be overly conservative.

Table 2

Good Control Before and After the Move to Pharmacist Management (Composite Figures, n = 212)

Before moveAfter: good controlAfter: not good controlTotal |
Good control702191 |
Not good control5863121 |
Total12884212 |

Note. Composite figures. Discordant pairs: 58 improved and 21 worsened.

Difference in Proportions or Odds Ratio?

Both results could be expressed as odds ratios, but for a clinic audience a difference in proportions is easier to grasp: about 20 more patients in every 100 had good control at the pharmacist clinics than at the physician clinic, and the share of transitioned patients with good control rose from 43% to 60%. Odds ratios exaggerate apparent differences when outcomes are common, as good control is here (Pagano et al., 2022).

Checking the McNemar Condition

McNemar's test relies on an approximation that works when the number of discordant pairs is reasonably large. Here there were 79 discordant pairs, 58 and 21, comfortably enough. With fewer than about 25 discordant pairs, the mid-p version of the test, which Fagerland et al. (2013) found performs well across sample sizes, would be a better choice than the asymptotic version.

Why Not a Chi-Square Test on the Before and After Counts?

A student might be tempted to build a two-by-two table of good control by time point, before and after, with 91 and 121 in the before row and 128 and 84 in the after row, and run an ordinary chi-square test. That table counts each patient twice and treats the two time points as independent groups, which they are not. It would ignore the pairing and give a misleading p-value. The table of paired outcomes used above, which counts each patient once by their combination of before and after status, is the correct structure for McNemar's test. The difference is not a technicality: the incorrect table would understate how strongly each patient's before and after status are linked, and the resulting p-value would describe a study design that was never carried out.

Summary

Good control differed across clinics, with the pharmacist-managed clinics ahead, and it improved within patients after the move to pharmacist management. As in earlier weeks, neither result establishes cause: the clinic comparison is confounded by clinic differences, and the within-patient change may partly reflect regression to the mean.

References

Fagerland, M. W., Lydersen, S., & Laake, P. (2013). The McNemar test for binary matched-pairs data: Mid-p and asymptotic are better than exact conditional. BMC Medical Research Methodology, 13, 91. https://doi.org/10.1186/1471-2288-13-91

Manzoor, B. S., Cheng, W.-H., Lee, J. C., Uppuluri, E. M., & Nutescu, E. A. (2017). Quality of pharmacist-managed anticoagulation therapy in long-term ambulatory settings: A systematic review. Annals of Pharmacotherapy, 51(12), 1122-1137. https://doi.org/10.1177/1060028017721241

Pagano, M., Gauvreau, K., & Mattie, H. (2022). Principles of biostatistics (3rd ed.). CRC Press.

The Walden PHLT 8331 Week 7 instructions

Week 7 usually asks students to analyze a categorical outcome using tests suited to how the data were collected. The expectation is a clear justification for each test: a chi-square test of independence for counts from separate groups and McNemar's test for paired yes-or-no outcomes on the same individuals. Conditions, such as adequate expected counts or enough discordant pairs, should be checked. Report the chi-square or McNemar value, its df and p-value, plus a measure readers can picture, such as a gap in percentages. Count on three or four pages, with contingency tables and methods citations for each test. Explaining why an incorrect test would mislead, not only why the correct one fits, strengthens the justification.

How the PHLT 8331 Week 7 example is put together

The paper opens by explaining that a binary outcome calls for tests of counts. The first question's section justifies the chi-square test of independence, checks expected counts and reports Table 1 with good control by clinic, then cites a review of pharmacist-managed care while noting the clinic confound. The second question's section explains why McNemar's test fits paired data and uses only discordant pairs, presents Table 2 of before and after status and reports the statistic and net shift, citing an evaluation of McNemar test versions. A section explains the preference for differences in proportions. Sections on the McNemar condition and on why a before-and-after chi-square would be wrong precede the summary.

Reading the PHLT 8331 Week 7 rubric

Points here hinge on matching each test to the data's structure, and the sample's justification of chi-square for independent groups and McNemar for paired outcomes earns that credit. Checking expected counts and discordant pairs shows attention to conditions. Results are checked for correct calculation and complete reporting. Explaining why a chi-square test on before-and-after counts would misrepresent the design demonstrates understanding beyond procedure. Preferring differences in proportions for a common outcome shows judgment about communication. Clear tables and accurate citations complete the assessment. Presenting the before-and-after table in its correct paired form, and explaining why the alternative table would mislead, shows mastery of the design. Instructors also notice the attention to discordant pairs when judging whether the McNemar approximation holds.

PHLT 8331 Week 7 help from the desk

Categorical analyses often apply a chi-square test to every table, including paired data where it does not belong. Ask how the counts were collected: separate groups or the same people twice. For paired yes-or-no data, use McNemar's test and remember it relies on the patients whose status changed. Check expected counts for chi-square tests and switch to Fisher's exact test when they are small. Report a difference in proportions alongside the test, especially when outcomes are common, since odds ratios can exaggerate. A categorical analysis of your own data can be ordered free. Draw the paired table first; it makes the right test obvious. And keep the clinic confound in view when reporting differences between groups.

Get a PHLT 8331 Week 7 example written to your instructions

Post the Week 7 prompt and rubric to the desk, describing the categorical variables and how they were collected, grouped or paired. An analysis choosing its tests by that structure, with effects in proportions, arrives in 24-48h, and the opening request is free. Its counts are composite and exist only to carry the reasoning.

More PHLT 8331 papers and PhD in Public Health samples

PHLT 8331 Week 7 questions, answered

Where can I find a free PHLT 8331 Week 7 sample paper?

You can read the complete Week 7 paper here, with a chi-square test of good control across three clinics and a McNemar test of change within the same patients, each justified from the data's structure.

When is Fisher's exact test the better choice over chi-square?

When expected counts in some cells are small, commonly below five. The chi-square approximation can be inaccurate then. In the sample, the smallest expected count is about 95, so chi-square is appropriate.

Why does McNemar's test ignore patients whose status did not change?

Patients who stayed controlled or stayed uncontrolled carry no information about change. The test compares how many moved in each direction, which is where evidence about change lies.

Is a difference in proportions better than an odds ratio here?

For a common outcome and a clinic audience, usually yes. A difference in proportions, such as 20 more patients per 100 with good control, is easier to understand, and odds ratios overstate differences when outcomes are common.

Why not run a chi-square test on before and after counts?

That table counts each patient twice and treats the two time points as independent groups, ignoring the pairing. The correct table counts each patient once by their combination of before and after status, the structure McNemar's test uses.