I have two samples and I want to test the null hypothesis that the means of the two samples are the same at a 95% level of confidence interval.
When I use a t-test my p value is 0.023 and so I reject the null hypothesis that the means are the same, and conclude there is a significant difference between the means.
However when I calculate the 95% confidence intervals of each sample individually the confidence intervals overlap, which suggests to me that we do not have enough evidence to reject the null hypothesis and conclude that the means are different.
Is it possible to get different conclusions using these two methods, and if so which one should I trust more? Or have I done something wrong somewhere?
Thanks in advance
The reason was I was assuming equal variance in the t test, whereas the confidence intervals each used their own variance (one of which was larger than the other because of a smaller sample size).
Running a Welch two sample t-test (not assuming different variance) agreed with the conclusion that there is not enough evidence to reject the null hypothesis