# Statitical test on count data

I have a questions regarding a statistical analysis of a biologic experiment. In the experiment I have collected imaging data on the duration of contacts between immune cells. We have compared two distinct types of immune cells and their contact time with a third cell type. The duration of contacts was measured in minutes. Now I want to determine if there are significant differences number of contacts that lasted longer than 30 minutes. This gives mit counts for the two cell types. Example: Cell type 1: 23 out of 140 contacts measured; cell type 2: 34 out of 126 contacts measured. Which statistical test do I need to use in this case?

• Why use how many are longer than a threshold of 30 minutes, instead of testing whether the time is greater in one sample than in the other? (You could do so using a t-test or, if the data is non-normal, has outliers, or shows other issues, with a Wilcoxon rank-sum test) Aug 15 '14 at 16:38

If I understand you correctly, you have a 2-by-2 contingency table, with one dimension being the cell type, and the other being contact shorter/longer than 30 minutes.

Such as (in R):

 Data <- matrix( c( 23, 140-23, 34, 126-34 ), nc = 2, byrow =TRUE )


You can then test independence by $\chi^2$-test or Fisher-exact test; in the above case they can be expected to yield very similar results.

 chisq.test( Data )
fisher.test( Data )


$p$-value is around $0.05$.