t-test where one sample has zero variance? I'm very rusty on statistics, so go easy on me haha.
I'm trying to compare two sample sets of values to see if there is any significance difference between the two means. From memory, an unpaired t-test should be able to do this? The issue is that one set has zero variance, so do I use an equal variance test or an unequal?
If there's a better test for this then feel free to let me know :)




Group 1
Group 2




3.97
4.00


3.63
4.00


3.63
4.00


4.00
4.00


4.29
4.00


3.95
4.00


3.63
4.00


3.63
4.00


3.63
4.00


3.96
4.00


3.63



4.00



3.63



3.63



3.93



3.97



4.00



3.63



4.00



3.92



4.26



4.08



3.43



4.26



4.17



3.63





It requires a bit of explaining how or why this second sample is so "precise" so to speak. Is this rounding error, or are there accidental replications? There is a lot of science going on, not explained, that would inform which option(s) would or would not work. However, it's not a dead-end. Here are 3 suggestions (non-exhaustive) in order of difficulty depending on your chops and software at hand.

*

*Fit a T-test with an equal variance assumption: even if the assumption is clearly violated, you can argue that the test will be conservative. Similarly, you could jitter the response to within a rounding range - i.e. add random noise.


*Use a resampling based test: the permutation test is a powerful and flexible means to assess the test of mean difference under the assumption the two samples (under the null) come from the same distribution - note that that distribution would be approximately normal with a "point mass" at X=4.00.


*Use a Bayesian approach similar to option 2, it's just a convenient way to calculate the sampling distribution of the mean difference, and make inference correspondingly.


*Use expectation maximization: OK so you rounded all the variability out of one sample - generally not a good idea. When you report the result as 4.00 - appreciably we all expect that the result must not be 3.99 or 4.01, so for God's sake, use significant figures, you! Anyway, most of the tests above involve collecting the sample into a single group and assuming that follows some kind of normal distribution - the distribution under the null. Clearly that's not the case, if a value of 4.00 is really 4 and could in fact be 3.50 up to 4.49, then you have to integrate up whatever area of the normal curve of the assumed parametric framework at that iteration to find the true likelihood contribution at that time point. This is a somewhat standard, and most correct, approach to measurement error - which is the specific problem you have here - but is sadly the most technically difficult to implement.
