Biostats Notes on Two Sample Tests of Hypotheses
8 Inferences Based on Two Sample Tests of Hypotheses
8.1 Paired Samples versus Independent Samples
- Definition 8.1: Two samples are classified based on the relationship of their respective data points:
- Independent Samples:
- Definition: One sample is not related to the other.
- Characteristics: Summary measures from each group are calculated and then compared. Sample sizes do not need to be equal.
- Example: Men vs. women if they are not related.
- Dependent Samples (Paired Samples):
- Definition: Each member of one sample corresponds to a member of the other sample.
- Characteristics: Each data point in one sample is matched with a unique data point in the other sample.
- Characteristics: The two samples must have the same number of observations (n₁ = n₂).
- Example Scenarios:
- Follow-up measurements on the same person (before/after).
- Measurements on two populations that are very similar (e.g., husband and wife).
Matched Pairs Analysis
- Notation: If sample one data points are labeled as x1, x2, …, xn and sample two as y1, y2, …, yn, the analysis considers the differences:
- di = xi - y_i for i = 1, 2, …, n.
Example 8.1: Identifying Dependent or Independent Samples
- A: 300 registered voters responded to a questionnaire before and after watching a video.
- Answer: Dependent Samples
- B: 30 dogs trained with different methods (reward vs. reward-punishment).
- Answer: Independent Samples
- C: Systolic blood pressures of 30 adult females vs. 30 adult males.
- Answer: Independent Samples
- D: Weights of 65 college students before and after their freshman year.
- Answer: Dependent Samples
8.2 Analysis of Paired Samples
- Theorem 8.1: Hypothesis Test of Paired Samples
- Assumptions:
- Data comes from an approximately normal distribution.
- Random sample of differences from the population of all possible differences.
- Notation:
- Mean of differences: ar{d}
- Standard deviation of differences: s_d
- Unknown standard deviation ext{} for normal distribution of differences.
- Null Hypothesis (H0): No mean difference between populations.
- Form: H0: ar{d} = d0 , where typically d_0 = 0 for equal means.
- Test Statistics:
- TS = rac{(ar{d} - d0)}{(sd/\sqrt{n})}
- Compute p-Value:
- Left-sided test: H1: H0 ; p-value = P(T < TS) = tCDF(-E99, TS, df) .
- Right-sided test: H1: > d0 ; p-value = P(T > TS) = tCDF(TS, E99, df) .
- Two-sided test: H1: H0 ; p-value is twice the probability of the appropriate one-sided hypothesis.
- Decision Making:
- If p-value < \alpha , then reject H0 ; if p-value > \alpha , fail to reject H0 .
- Important to note that one cannot "accept" H_0 ; a hypothesis test does not prove conventional wisdom.
- Interpretation:
- If H0 is rejected, evidence supports the research hypothesis H1 .
- If H0 is not rejected, insufficient evidence to support H1 .
Theorem 8.2: Confidence Interval for Paired Samples
- Assumptions/Considerations:
- Same as Hypothesis testing:
- Data is from approximately normal distribution.
- Normality is less critical if the sample size n 30 .
- Point Estimate:
- P.E. = rac{ ext{Sum of Differences}}{n} = rac{Σd_i}{n} .
- Margin of Error (MOE):
- MOE = t{α/2} rac{sd}{\sqrt{n}} .
- Confidence Interval:
- CI: ar{d} MOE ; thus, the interval is: ar{d} 0 MOE .
- Interpretation:
- We are 100*(1-α)% confident that the mean difference ar{d} lies in the interval (ar{d}- MOE, ar{d}+ MOE) .
Example 8.2: Testing Effectiveness of Educational Video
- Research on children diagnosed with asthma using a test before and after watching a video:
- Test Scores Before: 67, 62, 54, 93, 60, 89, 41, 67, 62, 57
- After viewing the video, differences tracked.
- Point Estimate: ar{d} = 4.5 .
- Margin of Error Computation:
- Letting n = 10 , compute using sample values.
- Construct the confidence interval: e.g., for 95%, yields results for pre-and post-assessment scores between intervals (0.833, 8.167).
Hypothesis Testing After Viewing Video
- Restating Hypotheses:
- H0: Md = 0 vs. H1: Md > 0 (mean score after video exceeds prior):
- Follow another step-wise testing method yielding its accepted conclusions.
8.3 Testing the Variances of Two Populations - Bartlett F-Test
- Example 8.6: Variances across two groups assessed with Bartlett's test.
- Definition of F-distribution:
- A family of distributions that is right skewed. Total area under the curve equals 1. Random variable values are non-negative.
- Degrees of Freedom (df):
- Numerator df: df1 = n1 - 1
- Denominator df: df2 = n2 - 1
- Theorem 8.3: Hypothesis Test of Equality of Variances - Bartlett's Test
- General Form: H0: σ1^2 = σ2^2 vs. H1: σ1^2 ≠ σ2^2 .
- Test statistic configuration:
- TS = rac{S1^2}{S2^2} .
- Determine p-value based on the directed test:
- e.g., for a right-sided test - based on larger sample variance observed.
- Decision framework for results yields conclusions that affect supplies for variances across experimental groups.
Interpretation of Results:
- If rejected, strong evidence that variances differ. If not rejected, proceed assuming equal variances until further information indicates otherwise.