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





One solution is to use a one-sample t-test of the null hypothesis:
$$\text{H}_{0}\text{: }\mu_{1} = 4\text{, with H}_{\text{A}}\text{: }\mu_{1} \ne 4$$
If $n_1=26$, $\bar{x}_1=3.865$ and $s_{1} = .24428$, our test statistic for this null would be:
$$t = \frac{\bar{x}_{1}-4}{\frac{s_{1}}{\sqrt{n_{1}}}} = \frac{3.865-4}{\frac{.24428}{\sqrt{26}}} = -2.82$$
At the $\alpha=0.05$ level of significance we would reject the two-sided null hypothesis above, and conclude that we found evidence that Group 1 was sampled from a population with a mean different (less than) than 4.
Alternately, you might try adding a tiny amount of artificial noise to estimate a nearly, but not exactly, zero variance to Group 2 and conduct a two-sample t test assuming different variances (this will produce almost identical results to the one-sample test).
