Fundamentals of Statistics contains material of various lectures and courses of H. Lohninger on statistics, data analysis and here for more.

Comparing means

When we compare means, we have to distinguish between two cases: (1) comparing the mean to a predefined fixed value, and (2) comparing two means. The two test procedures are similar. The only difference coming from the test statistic, which is normally distributed in the first case, and distributed according to a t-distribution in the second case. The reason for the two different distributions lies in the fact that in the first case the unknown mean (which is a normally distributed estimate of the true mean) is compared to a fixed number, whereas in the second case two estimates of the true means are compared with each other.

A second distinction has to be made with respect to the sample size. Given a large (>30) sample size, we can assume the estimate of the standard deviation is fairly accurate. In the case of fewer samples, this assumption is not valid and we have to use the t-distribution. However, one could also use the t-distribution for a large number of samples, since the t-distribution approaches the normal distribution with an infinite number of values.

Depending on what is to be compared, there are several choices: