views:

79

answers:

2

If i want to calculate the amount of k-dimensional contingency tables which formula should I use?

For example, if i have 16 categorical variables in my dataset and want to calculate the amount of 1-dimensional contingency tables, then it's clear, there is only 1 table. If I want to calculate the amount of 2-dimensional contingency tables then I assume there are 120. But how do I calculate it? And what if i have much more variables and k-dimensional tables?

Im searching for one equations with gives me the number of available contingency tables, given the dimension (k) and the number of variables (n). Thanks

+1  A: 

For moron - a contingency table is defined here.

Sebi - I think you do need to clarify the problem a bit, but let me plow ahead. If I had 16 categorical variables and need to define a contingency table for each pair of variables, that would be C(16,2) = 120 tables. (Combinations of 16 choose 2). Is that what you mean by k-dimension tables?

If so, the number of k dimension tables is simply C(16,k). The excel function is Combin(n,k).

C(16,3) = 560 C(16,4) = 1820 C(16,5) = 4368 C(16,6) = 8008... and so on....

Grembo
nice this is what i need. will vote up as soon as i have votes again ;)
Roflcoptr
A: 

If I understand this correctly, you are trying to select distinct subsets of size k from the n variables, I suspect the formula will be: number of tables = n! / ( (n-k)! k!)

shuttle87