one-sample t-test on zero variance sample I have to compare many gene-expression values between a group of 3 patients and a control patient. I choose to apply the one sample t-test (ttest_1samp from python scipy package) to obtain a list of significant differential expressed genes.
The problem is that in many cases I have that the gene in exam is not expressed in any of the 3 study patients, while it is expressed in the control patient. In this case the test produce an infinite t-statistic and a null p-value because the variance of the reference population is:
$$ V\{0,0,0\}=0 $$
and so the probability to observe a value different from the mean (0) is:
$$ P(x\neq0|t(\nu, 0, 0))=0 $$
I think that, under this condition, the one-sample t-test is not the best choice. Is there an alternative statistical test that I can perform?
Any advice is welcome.

*

*You have a tiny sample. With 3 samples your tests would be underpowered even if your data would not be constant. To convince yourself, here's an example that uses a one-sample $t$-test with $H_1$ that $\mu > 0$ for three samples drawn from Gaussian distribution with $\mu=1$
> mean(replicate(5000, t.test(rnorm(3, 1), alternative="greater")$p.value) < 0.05)
[1] 0.3182

As you can see, the test was non-significant (at 0.05 level) in 70% of cases.


*The test to work needs to have a notion of the variability of your data. It learns it from the data. If your sample is constant, there are two possibilities, either the variance is zero and in such case the answer is trivial, or it can be anything higher than zero, but we have no way of knowing. Unless you would know what the variability is, statistical methods could fail.


*If you have three samples, honestly the best you can do is a descriptive summary "all the three observations were zeros" and let the readers decide what they take from it. For a statistical solution, you need more data.


*Finally, if you can come up with a reasonable, informative prior, you could use a Bayesian approach where the prior would drag the estimate for the variance away from zero. But again, you have only three samples, a descriptive summary probably makes more sense. With the Bayesian approach, here the result would tell more about your choice of the prior than the data. (So it boils down to if you know the variance.)
