I want to conduct a Chi square test of independence.

I have three different genotypes (CC/CG/GG, independent variable) and "health conditions" (outcomes) which is basically a patient group with a certain disease and a control group without the disease.

Does it sound right if my null hypothesis states that "the distribution of these alleles in these "study groups" doesn't influence disease outcome"

Whereas the alternative hypothesis says that "the distribution of these alleles in these study groups does influence disease outcome".

Is i formulated in a right way? Because I can't state (with the Chi square) that there are a certain risk-allele that lies behind disease.

And lastly, I have heard that you can only use odds ratio if it is a 2x2 table, but if I use a "dominant" model of Pearsons Chi-square then the result would no longer be significant and there should no longer be any point to perform a OR.

Thankful for comments!

  • $\begingroup$ There is no such thing as independent variable in this test. You're not doing regression testing. You're testing whether there is any dependence between the levels of the variable. $\endgroup$ – SmallChess May 26 '15 at 11:12
  • $\begingroup$ More precisely, the null hypothesis is that the levels of the variables are independent. The alternative is that they are dependent. $\endgroup$ – SmallChess May 26 '15 at 11:13
  • $\begingroup$ Do you have absolute numbers or percentages? Are the number of patients and controls equal and what is the total sample size? $\endgroup$ – rnso May 26 '15 at 11:14
  • $\begingroup$ To Student T: So basically it mean if I got a significant result, my alternative hypothesis would say something like "there is a significant association between the occurrence of these genotypes and occurrence of this certain disease"? $\endgroup$ – Zorua May 26 '15 at 11:20
  • 2
    $\begingroup$ Of possible interest: stats.stackexchange.com/q/8774/930, stats.stackexchange.com/q/9062/930. $\endgroup$ – chl May 26 '15 at 11:21

Regarding calculating odds ratios:

> tt
genotype sick healthy
      CC   14      34
      CG   14      24
      GG    8       3
> oddsratio(tt, rev='col')
genotype healthy sick Total
   CC         34   14    48
   CG         24   14    38
   GG          3    8    11
   Total      61   36    97

        odds ratio with 95% C.I.
genotype estimate     lower    upper
      CC 1.000000        NA       NA
      CG 1.409998 0.5628447  3.55030
      GG 6.087096 1.4813184 32.87432

genotype midp.exact fisher.exact  chi.square
      CC         NA           NA          NA
      CG 0.46208267   0.49321142 0.450640195
      GG 0.01142108   0.01320433 0.007043333


[1] "median-unbiased estimate & mid-p exact CI"
Warning message:
In chisq.test(xx, correct = correction) :
  Chi-squared approximation may be incorrect

The odds ratios are calculated for second and third genotypes with respect to first genotype.

Edit: I have edited the code above to have numbers as in comments. The odds ratio for GG (with respect to CC) being sick is 6.1 (95% CI 1.5,32.9; significant since it does not overlap 1). The odds of CG being sick (as compared with CC) is not significantly different 1. The P values are also shown in the output.

| cite | improve this answer | |
  • $\begingroup$ @mso Are you using R or any other kind of program? Because I have been using GraphPad and have not been able to calculate odds ratio (probably because I did not know about a reference genotype). But this is very interesting! Does it mean that people who have GG genotype has 2,76 higher risk to become sick? I have a huge problem to formulate correct null- and alternative hypothesis... $\endgroup$ – Zorua May 26 '15 at 11:42
  • $\begingroup$ Yes, I am using R. The odds ratios above are for the fictitious numbers that I have used. What are your actual numbers? $\endgroup$ – rnso May 26 '15 at 12:25
  • $\begingroup$ I am sorry, I have been spelling your user namn wrong this whole time. My numbers are for "sick": 14, 14, 8. And for the healthy: 34, 24, 3 (CC, CG, GG) @rnso $\endgroup$ – Zorua May 26 '15 at 12:33
  • $\begingroup$ I have edited the answer above using these numbers. $\endgroup$ – rnso May 26 '15 at 12:49

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.