t-test Mathematically
The task of the t-test is to determine whether the difference between the two samples' means is significant. What should you take into consideration to perform it?
Obviously, you should consider the difference between the means itself.
As shown in the image below, the variance matters too.
Also, the size of each sample should be taken into consideration.
To account for the difference between the means, simply calculate that difference:
The situation becomes more complex when it comes to variance. The t-test assumes that the variance is equal for both samples. This will be explored further in the t-test assumptions chapter. To estimate the variance from two samples, the pooled variance formula is applied.
And to account for the size, it needs sample sizes:
Put it all together into t-statistic.
Sample sizes may not always be used in the most intuitive manner. However, this approach ensures that t follows the t-distribution, which will be explored in the next chapter.
Tak for dine kommentarer!