Two-sample t-Tests
Let's learn about two-sample t-tests.
Two-sample t-test under scenario 1
This is often referred to as the two-sample pooled t-test. If we have two independent samples from two normal distributions with equal variances ( = = ), the test statistic for the null hypothesis is as follows:
Above, is the pooled sample standard deviation, computed as follows:
The test statistic follows a t-distribution, with a degree of freedom ( + − 2). So, the computed t-statistic, together with the degree of freedom, will allow us to identify the value from the t probability distribution table. If the value is larger than 0.05 or 5%, the null hypothesis won’t be rejected. If the value is smaller than 0.05 or 5%, the null hypothesis will be rejected. The R code for the test is as follows:
Get hands-on with 1400+ tech skills courses.