Two Groups, A & B, undergo same intervention. Group A (n=20). Group B (n=10). The only outcomes are symptomatic or asymptomatic. After the intervention, 4/20 people in group A are asymptomatic. In Group B 6/10 are asymptomatic. Is this statistically significant (i.e. p <0.05).

  • 3
    $\begingroup$ Is this homework? If so then you should tag it with the self-study tag and tell us what you have tried, what you don't understand, what your course policy is on help/hints on the net, etc. If it is not homework you should still tell us what you have tried so far and why you have not been able to calculate your own p-value. $\endgroup$
    – Greg Snow
    Sep 24 '13 at 21:32
  • 1
    $\begingroup$ Thanks Greg. This is definitely not homework. I'm trying to analyze a subset of data from a retrospective study I am doing. I have applied the Fisher's exact test but not sure if that is the correct statistical test to use. Any help would be appreciated. $\endgroup$
    – Kam Sam
    Sep 24 '13 at 22:02
  • 1
    $\begingroup$ Moreover, applying the Fishers test, I came up with a p value of 0.0449 (two tailed). Although, I am not sure if I entered the data appropriately in the contingency table. $\endgroup$
    – Kam Sam
    Sep 24 '13 at 22:03
  • 1
    $\begingroup$ Kam Sam - I get the same pvalue for the Fisher test. $\endgroup$
    – Glen_b
    Sep 25 '13 at 5:25

Rate A is 4/20 = 0.2. Rate B is 6/10 = 0.6. By "Is this statistically significant" I presume you mean, "is the difference between rate A and rate B statistically significant?" (And not "is the treatment effective?")

The implied null hypothesis is that the two groups have the same underlying rate, and that the observed difference was simply due to chance. You can test the equality of two rates in R as follows:

AB=matrix(c(4,16,6,4),ncol=2,byrow=T)  #4+16=20 and 6+4=10
# Take a look at the table:
# We can use a chi-squared test, first using Yates' continuity correction,
prop.test(AB)  #p = 0.075
# and also try it without Yates' continuity correction:
prop.test(AB, correct = FALSE) #p = 0.028
# If your data has fixed marginals (i.e., the category counts 10 and 20 
#    were not random elements in the experimental design), then the  
#    Fisher exact test may be the best way to do this:
fisher.test(AB) #p = 0.04486

In summary, I've confirmed your result.

Edit: This answer has been rewritten after some horrendous mistakes pointed out by @Glen_b.

  • $\begingroup$ You're not doing any of those tests correctly. (NB also, prop.test doesn't do the fisher exact test, as can be seen from reading the help on prop.test) $\endgroup$
    – Glen_b
    Sep 25 '13 at 5:26
  • 1
    $\begingroup$ However, a few appropriate edits (as long as you let me know) may turn my -1 to a +1 on your answer. $\endgroup$
    – Glen_b
    Sep 25 '13 at 5:36
  • $\begingroup$ @Glen_b, oops! Have another look if you don't mind! $\endgroup$
    – zkurtz
    Sep 25 '13 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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