Solved – Does t test only work for continuous random variable

discrete datahypothesis testingt-test

When using t test normally we would assume the original data follows normal distribution, but if the sample size is large enough, this assumption can be ignored due to Central Limit Theory.

I thought since normal distribution is for continuous random variable, even if the data does not have normality, it at least must be continuous random variable in order to use the t test. However in practice, I found that the t test is widely used even for discrete random variable such as hospital length of stay (LOS) in days (which is integer and thus discrete random variable).

So my question is, is it a common practice to apply t test on discrete random variable? If not, when we want to compare the mean of two groups consisting of discrete random variable, except for Wilcoxon Signed Rank Test, what other tests can I use?

Best Answer

Remember the Central Limit Theorem is talking about the asymptotic distribution of the standardised mean of iid random variables. So even if your random variables are discrete, as you accumulate more and more of them, once you take their mean (and then standardise it), you'll end up with a random variable which acts more and more like a continuous random variable.

For example, if you have 100 Bernoulli random variables (each either 0 or 1), then the possible means are $0.00, 0.01, 0.02, \dots , 1.00$. If you have 1000 then the possible means are $0.000, 0.001, 0.002, \dots , 1.000$.

So even if you have discrete random variables, their mean can still be asymptotically normal.