McNemar Test Calculator

Calculate McNemar Test



Formula

The formula for the McNemar test to calculate chi-squared (X²) is:

\[ X^2 = \frac{(b - c)^2}{b + c} \]

Where:

McNemar Test Definition

The McNemar test is a statistical test used to determine if there is a significant difference between the proportions of two related groups. It is often used when studying paired data, where the same subjects are measured before and after an intervention, or when comparing treatments on the same subjects.

The test is performed by constructing a 2×2 contingency table, with the rows representing the two groups being compared and the columns representing the two possible outcomes. The cells in the table contain the frequencies of the four possible combinations of outcomes.

The McNemar test calculates a chi-square statistic based on the discrepancies between the frequencies in the diagonal cells of the contingency table. This statistic is then compared to the chi-square distribution with one degree of freedom to determine if the observed differences are statistically significant.

Example Calculation

Let's assume the following values for an example:

Using the formula:

\[ X^2 = \frac{(10 - 5)^2}{10 + 5} = \frac{25}{15} \approx 1.67 \]

The Chi-Squared (X²) value is approximately 1.67.