# Is the overlap between two gene expression samples significant?

I have performed an experiment to study the response of a yeast (that contains 5000 genes) to stress caused by heat shock. I have one list of 48 genes that are overexpressed at 37ºC and another list of 145 genes that are overexpressed at 42ºC. There are 38 genes that are overexpressed in both of them.

By chance I expected only 1 gene overexpressed in both of them, how can I calculate if the overlap that I have obtained is significantly? How can I obtained the $p$ value? I know nothing about biostatistic or math software. Thanks you very much!!! Any help will be very welcome :)

-
 You could construct a Venn diagram to exhibit the overlap. – Michael Chernick Jul 4 '12 at 14:01 But How can I calculate the p value? – Laura Jul 4 '12 at 14:03 A p-value is always computed in relation to a hypothesis. What is the hypothesis that you wish to investigate here? That different genes are overexpressed at different temperatures? – MånsT Jul 4 '12 at 14:07 The hypothesis is that the genes overexpressed at 37ºC are also overexpressed at 42ªC. And it seems that it could be the case because 38 genes (of 48 genes in total) are overexpresed both at 37ºC and 42ºC. – Laura Jul 4 '12 at 14:14 That is not a statistical hypothesis that can be tested. I don't think you are looking for p-values. I think you want measure degree of overlap. – Michael Chernick Jul 4 '12 at 14:28

The table looks like this

                37 deg C
42 deg C     yes      no
yes          38       97
no           10      4855


yes and no refer to cases overexpressed or not I ran Fisher's exact test in SAS The output is pasted below:

Laura Gene expression data

The FREQ Procedure

Statistics for Table of Group by expressed

Fisher's Exact Test
Cell (1,1) Frequency (F) 4855
Left-sided Pr <= F 1.0000
Right-sided Pr >= F 4.776E-53

Table Probability (P) 8.132E-51
Two-sided Pr <= P 4.776E-53
Sample Size = 5000


You see here that the p value for Fisher's Exact test is very small far less than 0.0001.

This shows exactly what you stated the observed 38 overexpressed at both temperatures is far greater than what you wou expect under independence which as you stated would be 1.296.

-

The exact test referred to by Michael is probably the way I would recommend using to solve the problem (fewest assumptions). For reference, the corresponding common statistical test would be a $\chi^2$ test of independence.

-
The chi squared test is also nonparametric but requires asymptotic theory. Fisher's test has an extra assumption of fixed margins which the chi square and other contingency table tests don't assume. – Michael Chernick Jul 4 '12 at 19:10
@Laura You did have a well defined testing problem. I am sorry that it took so much back and forth discussion to find it. – Michael Chernick Jul 4 '12 at 19:11
Thank you very much Michael! Now I know the test I have to use and how to enter the data. Only two more little questions: Is there any online Fischer exact test calculator? Because I have not SAS and I would like to calculate more p value. And in your table what is the p value I have to considered? Maybe the two side probability? Thanks again!!! :) – Laura Jul 4 '12 at 20:25
Laura... go with the two-sided Pr. quantitativeskills.com/sisa/statistics/fishrhlp.htm (link "go to procedure"). The online calculator lacks the fidelity to give you a p-value that low. – Russell S. Pierce Jul 9 '12 at 5:44
OK, I will do it! Thanks a lot :) – Laura Jul 9 '12 at 7:57
show 1 more comment