Statistics – Mcnemar Test

T. Dhasaratharaman*

Statistician, Kauvery Hospitals, India

*Correspondence: +91 90037 84310; [email protected]

*Correspondence: Tel.: email:

In statistics, McNemar’s test is a statistical test used on paired nominal data. It is applied to 2 × 2 contingency tables with a dichotomous trait, with matched pairs of subjects, to determine whether the row and column marginal frequencies are equal. It is named after Quinn McNemar, who introduced it in 1947.

McNemar test is utilized for two related examples as a part of circumstances where the states of mind of individuals are noted previously, then after the fact treatment to test the essentialness of progress in sentiment if any.

The McNemar test is especially helpful when the information speaks the truth two related samples. For the most part this information is utilized as a part of circumstances where the states of mind of individuals are noted before overseeing the treatment and are then contrasted and investigations in the wake of managing the treatment. It can along these lines be said that utilizing McNemar test we can judge if there is any adjustment in the demeanours or supposition of individuals subsequent to regulating the treatment with the utilization of table as demonstrated as follows:


Before Treatment



After Treatment



Favour



A



B



Do Not Favour



C



D


As can be seen C and B don’t change their supposition and show ‘Do Not Favour’ and ‘Favour’ individually even after the treatment has been administered. However, A which was good before treatment demonstrates a ‘Do Not Favour’ reaction after treatment and vice versa for D. It can hence be said that A+DA+D shows change in individuals’ reaction.

The null hypothesis for McNemar test is that (A+D)2(A+D)2 cases change in one direction and the same proportion of change takes place in other direction.

McNemar test statistic uses a transformed test model as follows:

x2=(|A−D|−1)2/A+D) (Degree of freedom = 1.)

Acceptance Criteria: If the calculated value is less than the table value, accept null hypothesis.

Rejection Criteria: If the calculated value is more than table value then null hypothesis is rejected.

Illustration

In a before and after experiment the responses obtained from 300 respondents were classified as follows:


Before Treatment



After Treatment



Favour



A = 60

B = 90

Do Not Favour



C = 120

D = 30

Test at 5% significance level, using McNemar test if there is any significant difference in the opinion of people after the treatment.

Solution:

HoHo: There is no difference in the opinion of people even after the experiment.

The test statistic is calculated using the formula:

x2=(|A-D|-1)2(A+D)

(|60-30|-1)2(60+30) =9.34 × 2

(|A-D|-1)2/(A+D) = (|60-30|-1)2/(60+30) = (29)2/90 = 841/90 = 9.34

The value of test at 5% significance level for 1 D.F. is 3.84. Since the test is greater than the table value, the null hypothesis is rejected i.e. the opinion of people has changed after the treatment.

dhasa

Mr. T. Dhasaratharaman

Statistician

 

Kauvery Hospital