Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I have four datasets: D1, D2, D3 and D4. Each dataset contains elements (different sample size in each dataset) that can be described by 100 categories (1 represents that the element belongs to that category and 0 represents otherwise). So for example,

D1
Element     Category 1       Category 2       Category 3     ....
1               1                0                1
2               0                1                1
3               1                1                1
..
..

D2
Element     Category 1       Category 2       Category 3     ....
1               1                0                0
2               0                0                1
3               1                0                1
..
..

D3
Element     Category 1       Category 2       Category 3     ....
1               1                0                1
2               0                1                0
3               0                1                1
..
..

I would like to test for any statistical differences in the frequencies of the categories in each dataset. Can someone advise on how to approach this?

My initial thought is to get the frequencies of each category and get a single row that represents a dataset like this:

Dataset          f(Category 1)       f(Category 2)       f(Category 3)     ....
D1                  20                    30                   10
D2                  10                    10                   40
D3                  20                    40                   15

And then check to see for any statistical significance but am still not clear on what will be useful in understanding. My question in plain English is to understand the "differences" between the datasets. Any suggestions?

share|improve this question
2  
If I understand your question correctly, a chi square test may be for you. en.wikipedia.org/wiki/Pearson%27s_chi-squared_test – Roman Luštrik Apr 6 '12 at 6:22
@RomanLuštrik (+1), make this answer, but I suggest to add some for details. E.g. one has to take into account that we are dealing with a 3x100 table here. – steffen Apr 7 '12 at 7:28
Related question? What do these chi-square results mean? – chl Apr 12 '12 at 19:04

1 Answer

up vote 1 down vote accepted
+50

First you need to say what you mean by "differences between the data sets".

Chi-square analysis (suggested in a comment) asks about independence between rows and columns. If this is your question, then this is how to answer it. If you get a statistically significant result from a chi-square analysis, then that says that a chi-square as high as the one you get is unlike to arise from a sample of the size you have from a population where there is no difference in the proportions of category per data set.

But if you have a different question, then chi-square will not provide the right answer. You mention "frequencies" but you also say you have different N in each data set, so that is unlikely to be what you really want.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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