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





This answer doesn't address the issue of why the second group has no variation (and I really do suggest you get to the bottom of that).
If you're comfortable saying the yield of group 2 is definitely known to be 4.0 you can use a one-sample t-test to compare group 1 against that value.
Update
I should clarify some things, since this answer is getting more upvotes than it deserves. First, with the two-sample test you're testing the hypothesis that group 1 differs from group 2. With the one-sample test, you're testing the hypothesis that group 1 differs from a value of 4.0. These are subtly different questions.
Second, I should stress that treating the value of 4.0 as known is an assumption, and the one-sample test is only valid if this assumption is correct. All statistical tests involve some assumptions like this, for instance assuming that sampling is not biased. It's your job as the analyst to be clear about what assumptions you're making, to decide whether you think they're justified, and to bear in mind that if the assumptions turn out to be wrong then so do your conclusions.
