# Comparison of ratios between multiple groups

I need to perform statistical analysis whether there is any difference in the usage of each gene version between disease groups. I have 3 groups, in each group there is a different no. of patients. For each patient I have a different no. of sequencing reads (100%), from which I identified usage of each gene version for each patient. E.g.

Disease A
Patient 1 Total: 19402, version1: 492, version2: 45, version3: 3201, version 4: 15664
Patient 2 Total: 143, version1: 34, version2: 4, version3: 15, version4: 90
Patient 3 etc

Disease B
Patient 1
Patient 2
Patient 3
Patient 4

Disease C
Patient 1
Patient 2
Patient 3

etc.

There is a big difference in the total number of reads yielded per each patient from which I am identifying gene versions. What type of analysis would you recommend I carry out? I hope my explanation makes sense. I am a complete beginner in stats and any help would be much appreciated.

• It is not clear what exactly you want to determine. Do you want to compare versions in different diseases? For example, version4 may be commoner in disease A and version 2 in disease B?
– rnso
Commented Jul 11, 2015 at 18:03
• Yes, I want to compare usage of each version between disease groups to determine whether there are any significant differences :) Commented Jul 12, 2015 at 10:31

You can create a contingency table as follows:

  dss    1    2    3    4
1   A 1250 1833 1166 1792
2   B 2788 2396 1307 3024
3   C  828 1626 1741 2052
4   D 1271 2617  929 1505


Here each value is sum of all patients for that particular disease and version. Row and column percentages can be calculated (row and column sums are also shown here):

     [,1]  [,2] [,3]  [,4] [,5]
[1,] 20.7  30.3 19.3  29.7  100
[2,] 29.3  25.2 13.7  31.8  100
[3,] 13.3  26.0 27.9  32.8  100
[4,] 20.1  41.4 14.7  23.8  100
[5,] 83.4 122.9 75.6 118.1  400
>
[,1]  [,2]  [,3]  [,4]  [,5]
[1,]  20.4  21.6  22.7  21.4  86.1
[2,]  45.4  28.3  25.4  36.1 135.2
[3,]  13.5  19.2  33.9  24.5  91.1
[4,]  20.7  30.9  18.1  18.0  87.7
[5,] 100.0 100.0 100.1 100.0 400.1


Now this table can be subjected to standard Chi-squared test:

> chisq.test(mytable)

Pearson's Chi-squared test

data:  mytable
X-squared = 1422.7, df = 9, p-value < 0.00000000000000022