One-sample and two-sample t-tests; Z-tests
One-Sample and Two-Sample t-tests; Z-tests One-Sample t-test: A one-sample t-test compares the mean of a population to a specified value. It's used to de...
One-Sample and Two-Sample t-tests; Z-tests One-Sample t-test: A one-sample t-test compares the mean of a population to a specified value. It's used to de...
One-Sample t-test:
A one-sample t-test compares the mean of a population to a specified value. It's used to determine if there's a significant difference between the two groups being compared.
Assumptions:
The population standard deviation is known.
The sample size is large enough (n > 30).
How it works:
The t-statistic is calculated as the difference between the sample mean and the population mean divided by the standard error of the difference.
The p-value is calculated by comparing the t-statistic to the distribution of t-values with n-1 degrees of freedom.
If the p-value is less than 0.05, then we reject the null hypothesis that there's no significant difference between the two groups.
Two-Sample t-test:
A two-sample t-test compares the means of two independent populations. It's used to determine if there's a significant difference between the two groups.
Assumptions:
The populations have normally distributed data.
The variances of the two populations are equal.
How it works:
The t-statistic is calculated as the difference between the sample means divided by the square root of the calculated variance ratio.
The p-value is calculated by comparing the t-statistic to the distribution of t-values with n1-n2 degrees of freedom, where n1 and n2 are the sample sizes of the two groups.
If the p-value is less than 0.05, then we reject the null hypothesis that there's no significant difference between the two groups.
Z-test:
A z-test is used when the population standard deviation is unknown or when the sample size is small.
Assumptions:
How it works:
The z-score is calculated as the difference between the sample mean and the population mean divided by the standard error of the difference.
The p-value is calculated by comparing the z-score to the distribution of z-scores.
If the p-value is less than 0.05, then we reject the null hypothesis that there's no significant difference between the two groups.
Examples:
One-sample t-test: Comparing the average height of students in a class to a national average.
Two-sample t-test: Comparing the average exam scores of students in two different schools.
Z-test: Comparing the average test score of students in a pre- and post-test to see if there's a significant difference in their academic performance