T-test
1. Pair-difference t test (Dependent t test)
Purpose: This test compares the means of a single group under two different conditions. It’s used when the data are paired or related, such as before and after treatment measurements on the same individuals.
Assumptions:
- The differences between paired observations (e.g., before and after) are normally distributed.
- The pairs are independent of each other.
Calculation:
- Degrees of Freedom (df): df = n−1, where n is the number of pairs.
- Compute the mean difference Dˉ and the standard deviation of the differences sD.
- Calculate the t statistic: t=D−SD/n
Example: Comparing the effectiveness of a new drug by measuring patients’ blood pressure before and after treatment.
2. t test for Independent Samples
Purpose: This test compares the means of two independent groups to determine if there is a significant difference between their population means.
a. Equal Variance (Pooled-variance t-test)
Assumptions:
- Data in both groups are independent.
- Population variances are equal (homogeneity of variances assumption).
Calculation:
- Degrees of Freedom (df): df = n1+n2 − 2, where n1 and n2 are sample sizes of the two groups.
- Calculate the pooled standard deviation sp.
- Calculate the t statistic: t=X1−-X2−SP1n1+1n2
- Example: Comparing the average test scores between students in two different teaching methods assuming equal variances.
b. Unequal Variance (Separate-variance t test)
Assumptions:
- Data in both groups are independent.
- Population variances are unequal.
Calculation:
- Degrees of Freedom (df): Approximated as min (n1,n2) −1.
- Calculate the standard error of the difference: SEdiff.
- Calculate the t statistic: t=X1−-X2−SEdiff.
Example: Comparing the effectiveness of two different drugs on patients where the variances of their responses differ.
How to Decide Which Test to Use
- Dependent t test: Use when comparing paired data or repeated measures within the same group.
- Independent t test (Equal Variance): Use when comparing means of two independent groups assuming equal population variances or when sample sizes are the same.
- Independent t test (Unequal Variance): Use when comparing means of two independent groups with unequal variances or different sample sizes.
Each type of t-test is used to address specific research questions and data structures, ensuring statistical comparisons are appropriately matched to the nature of the data collected.
⭐F-Test
Purpose: The F-test is a statistical method used to compare variances between two populations or to assess the fit of different statistical models to a dataset.
Assumptions:
- Normality: Populations should follow a normal distribution.
- Independence: Samples must be independent.
- Equal Variance in ANOVA: Assumes equal population variances in ANOVA scenarios.
Calculation:
- Compute Variances: Square standard deviations to obtain variances.
- Calculate F-Value: F=s1s2, where s1 and s2 are variances of the two samples.
- Degrees of Freedom: df1=n−1 and df2=n−1, where n is sample size.
Examples:
- Testing Variances: Comparing variability in test scores between two schools.
- Model Comparison: Assessing differences in mean test scores between different teaching methods.
⭐Z-Test
1. One-Sample Z-Test
Purpose: Determines if a sample mean differs significantly from a known population mean, when the population standard deviation is known or for large sample sizes.
Assumptions:
- Normality: Data should be normally distributed, or for large samples (typically n≥30), the central limit theorem applies.
- Known Population Standard Deviation: Population standard deviation (or variance) must be known.
Calculation:
- Compute Z-Score: Z=X−-μσn is the sample mean, μ is the population mean, σ is the population standard deviation, and n is the sample size.
- Compare with Critical Value: Critical Z-values (approximately ±1.96 for a 95% confidence level). Reject the null hypothesis if the calculated Z-score falls outside this range.
Examples:
- One-Sample Z-Test: Testing if average daily returns of a stock differ significantly from 0%.
- Two-Sample Z-Test: Comparing average heights of males and females when population standard deviations are known.
Key Differences:
- Application: F-tests compare variances or model fits, while Z-tests compare means to a known value or between groups.
- Assumptions: F-tests assume normality and sometimes equal variances, while Z-tests assume normality and a known population standard deviation.
Both tests are fundamental in statistical analysis, aiding in hypothesis testing and decision-making based on data characteristics and assumptions.