I have the a dataset like the following:

Experiment A B C Group
1 10 1 3 M
2 30 10 10 F
3 20 30 10 M
4 1 15 4 F

And I am looking for differences in the proportions of A, B and C between the groups M and F. I am not sure what test should I use.

Should I sum across the columns A, B and C to obtain a contingency table such as:

 A B C  
M 30 31 13
F 31 25 14

and perform a chi squared test?


1 Answer 1


You should do in R chisq.test(data) where the data is second table where you have 2 random variable one being gender and the other is having 3 classes A, B and C, what ever it is : say year. The degrees of freedom will be 2 for your case.

Of course, I assume you need a Test for independence, and Chi Squared distribution is used for Test for independence, because De Moivre theorem.


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.