8

The following binomial test (exact binomial test) has a p-value of 0.05698, greater than 0.05 by a bit. 95% CI is (0.5698, 0.8077).

binom.test(x = 44, n = 63, p = 0.8, alternative = "two.sided")

The following proportions test (without Yates' continuity correction) has a p-value of 0.04382, less than 0.05 by a bit. 95% CI is (0.5764, 0.7976).

prop.test(x = x1, n = n1, p = 0.8, alternative = "two.sided", correct = FALSE)

So, which test should I choose? Which p-value to report? Thanks.

dwstu
  • 529
  • 5
  • 13
  • Please tell us what hypothesis you are testing. Also fix a mistake: "less" and "greater" are flipped. – Harvey Motulsky Dec 28 '13 at 17:51
  • Thanks @Harvey Motulsky for pointing out the typos. I wish to test H0: p=0.8 vs Ha: p <> 0.8, at alpha = 0.05. BTW, your _Intuitive Biostatistics_ is a great book! – dwstu Dec 28 '13 at 18:03
  • 1
    The answer you're looking for probably manifests from the underlying reasons why the proportions test is "approximate" and the binomial test is "exact." – ndoogan Dec 28 '13 at 18:14
  • 2
    Thanks @ndoogan, @Harvey. Does this mean that the binomial test (exact binomial test) is **always preferred** to the normal approximation in `prop.test()`? Some textbooks say that when the sample size $n$ is large, the binomial distribution is **cumbersome** to work with, and the normal approximation can be considerably **more convenient**. I guess such textbooks are saying so in the context of pen-and-paper calculations? With computers, is there still a need to do such approximations? – dwstu Dec 29 '13 at 03:06
  • 1
    If a well-considered significance test is part of your strategy, and if you are in doubt as to whether one type of test is more applicable than the other, best practice is to report results from both so as not to give the appearance of cherry-picking. As to the "well considered" part, I recommend http://stats.stackexchange.com/questions/10510/what-are-good-references-containing-arguments-against-null-hypothesis-significan. – rolando2 Dec 29 '13 at 13:33
  • 1
    @DanWu, you’re right that the binomial test is more cumbersome to work with for large *n*, but this only true if you’re calculating the results *by hand*. As long as you use R, there is no problem. And for large *n* it doesn’t matter, as both functions give approximately the same answer. But do note that `prop.test()` uses the score test, *not* a Wald test (which I guess is what the textbooks were talking about). Anyway, in practice, there is no reason not to use `binom.test()`, as this always gives exact *P*-values. – Karl Ove Hufthammer Jan 19 '14 at 13:00

1 Answers1

6

If you are testing whether 44 occurrences out of 63 can be a sample from the binomial population with probability 80% of a success in individual independent trial, then the first test is certainly correct.

Germaniawerks
  • 1,027
  • 1
  • 10
  • 15
  • 3
    ... as long as the Bernoulli assumptions hold -- independence, constant probability of success. – Glen_b Dec 28 '13 at 22:44
  • 1
    Hi @Germaniawerks, I used `prop.test` in the context of normal approximation to the binomial distribution, by the rule of thumb that $np$ and $n(1 − p)$ are both greater than 5. – dwstu Dec 29 '13 at 02:47