SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
  • 1.  McNemar Test Results

    Posted Thu June 12, 2025 09:30 AM
    When conducting the McNemar test in SPSS, with discordant cells of b = 5 and c = 15, the software produces a p value of .041. Using the actual binomial table, the odds of 5/20 with a 50/50 proposition are reported as p = .0148, for a one-tailed test. Can anyone explain the discrepancy between .041 and .0296 (two-tailed test)?

    Thanks, 
    Cliff


  • 2.  RE: McNemar Test Results

    Posted Fri June 13, 2025 01:50 AM

    Hi, I made the same test (in SPSS version 30 ) as you to figure out and I got these p-values:   p-value of 0.041 (one-tailed) and p-value 0.021 (two-tailed). My guess is that the reason why you don't get the same p-value in the table you look at, is because SPSS use exact tests instead of asymptotic tests (where exakt test is the best to use for small materials).  

    Regarding one-tailed vs. two-tailed:

    • A one-tailed test looks for a difference in one direction only (e.g., testing specifically if c > b).

    • A two-tailed test checks for any difference (b ≠ c), regardless of direction.

      /Gunilla



    ------------------------------
    Gunilla Rudander
    ------------------------------



  • 3.  RE: McNemar Test Results

    Posted Fri June 13, 2025 10:07 AM

    Hello Cliff.  You have found the probability (not odds) that X = 5.  But p-values are tail probabilities.  The two-tailed p-value CROSSTABS is showing you is  p(x <= 5) + p(x >= 15) = 0.041389.  Here is a little demo you can play around with, if you like.  

    NEW FILE.
    DATA LIST FREE / X (F5.0).
    BEGIN DATA
    0 1 2 3 4 5 6 7 8 9 10 
    11 12 13 14 15 16 17 18 19 20.
    END DATA.    
    DATASET NAME ds2.
    COMPUTE pX = PDF.BINOM(X,20,.5).
    COMPUTE LeftTail = CDF.BINOM(X,20,.5).
    COMPUTE RightTail = CDF.BINOM(20-X,20,.5).
    IF ANY(X,5,15) p2tail = 2*MIN(LeftTail,RightTail).
    FORMATS pX LeftTail RightTail p2tail (F8.6).
    LIST.

    Here is the output.

     
        X       pX LeftTail RightTail   p2tail 
     
        0  .000001  .000001  1.000000  . 
        1  .000019  .000020   .999999  . 
        2  .000181  .000201   .999980  . 
        3  .001087  .001288   .999799  . 
        4  .004621  .005909   .998712  . 
        5  .014786  .020695   .994091  .041389 
        6  .036964  .057659   .979305  . 
        7  .073929  .131588   .942341  . 
        8  .120134  .251722   .868412  . 
        9  .160179  .411901   .748278  . 
       10  .176197  .588099   .588099  . 
       11  .160179  .748278   .411901  . 
       12  .120134  .868412   .251722  . 
       13  .073929  .942341   .131588  . 
       14  .036964  .979305   .057659  . 
       15  .014786  .994091   .020695  .041389 
       16  .004621  .998712   .005909  . 
       17  .001087  .999799   .001288  . 
       18  .000181  .999980   .000201  . 
       19  .000019  .999999   .000020  . 
       20  .000001 1.000000   .000001  . 
     
    Number of cases read:  21    Number of cases listed:  21

    For confirmation, here are results from Stata's -bitesti- command.

    . bitesti 20 5 .5

    Binomial probability test

                N   Observed k   Expected k   Assumed p   Observed p
    ----------------------------------------------------------------
               20            5           10     0.50000      0.25000

      Pr(k >= 5)            = 0.994091  (one-sided test)
      Pr(k <= 5)            = 0.020695  (one-sided test)
      Pr(k <= 5 or k >= 15) = 0.041389  (two-sided test)

    I hope this helps. 



    ------------------------------
    Bruce Weaver
    ------------------------------