2
$\begingroup$

I am trying to understand a published analysis. This is the data of interest:

      D1>0    D1<0
D2>0   7        2     9
D2<0   9        15   24
total  16       17   33
The author notes that 17/33 is 51.5% and states:

"we expect about 50% of the D1's to be negative, and that is what we actually observe here (z=.08, p=n.s)".

Now I assume that the z comparison is 17/33 vs 16.5/33 (chance?) and that the statistic employed is the z-ratio for the significance of the difference between two proportions.

However my own calculation for this comes out as z=.123. Can anyone help with the discrepancy?

UPDATE: The author has responded and admits that the published z is an error. He gives the corrected answer as z=0.17.

I am still not sure how he worked it out though:

We are not considering the difference between two proportions, since they are not independent 16/33 = 17/33 -1. We are interested whether the proportion of D1<0 significantly deviated from the expected value of 0.5

The nearest I can get is R prop.test function. Is this directly comparable?

prop.test(c(17, 16.5), c( 33, 33))

2-sample test for equality of proportions with continuity correction
data:  c(17, 16.5) out of c(33, 33) 
X-squared = 0, df = 1, p-value = 1
alternative hypothesis: two.sided 
95 percent confidence interval:
 -0.2411995  0.2715025 
sample estimates:
   prop 1    prop 2 
0.5151515 0.5000000 
$\endgroup$
4
  • $\begingroup$ Hmm, that's what I get too: |O-E|/sqrt(E) = |17-16.5|/16.5 = 0.123. Can you add a link to the paper if it's available on the web? $\endgroup$
    – onestop
    Commented Oct 18, 2010 at 9:57
  • $\begingroup$ Unfortunately it isn't. I have collected comparable data and wish to compare my findings with the publication. I have found that the R function prop.test gives results that approximately agree with the paper, but I wanted to understand how the author arrives at his exact numbers. $\endgroup$ Commented Oct 18, 2010 at 10:11
  • $\begingroup$ I've contacted the author. Perhaps he can shed light on the problem. $\endgroup$ Commented Oct 18, 2010 at 11:27
  • $\begingroup$ Are these paired proportions or two independent samples? $\endgroup$
    – chl
    Commented Oct 18, 2010 at 12:32

2 Answers 2

3
$\begingroup$

The author is using a single proportion test. Try the following in R:

(p-0.5)/sqrt(0.5*0.5/33)

where p = 17/33.

See the wiki for the test statistic where the above test is called the One-proportion z-test.

$\endgroup$
1
  • $\begingroup$ That seems to be it. I will go away and think about it so more. Many thanks all. $\endgroup$ Commented Oct 19, 2010 at 17:51
2
$\begingroup$

I'm not sure the discrepancy is worth worrying about. The exact p-value is clearly 1 for a 2-sided test of p=0.5 given 17 positive responses out of 33, as there's no integer closer to 33/2 than 17. With small or moderate N as here there's no good reason for not doing the exact test (even without a PC, as the cdf of the binomial is commonly included in statistical tables). With a modern PC and decent software it's no problem even for large N, but for large N the resulting p-value will be very similar to that from a z-test anyway.

$\endgroup$
1
  • $\begingroup$ That was my understanding and like I say, the prop.test function of R gives the same direction of results. I just wondered if there was something that I was doing wrong to not get the z=.08. $\endgroup$ Commented Oct 18, 2010 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.