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:
- d<em>i=x</em>i−yi 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: dˉ
- Standard deviation of differences: sd
- Unknown standard deviation ext{} for normal distribution of differences.
- Null Hypothesis (H0): No mean difference between populations.
- Form: H<em>0:dˉ=d</em>0, where typically d0=0 for equal means.
- Test Statistics:
- TS=(s</em>d/n)(dˉ−d<em>0)
- Compute p-Value:
- Left-sided test: H<em>1:H</em>0; p-value = P(T < TS) = tCDF(-E99, TS, df) .
- Right-sided test: H<em>1:>d</em>0; p-value = P(T > TS) = tCDF(TS, E99, df) .
- Two-sided test: H<em>1:H</em>0; p−value is twice the probability of the appropriate one-sided hypothesis.
- Decision Making:
- If p-value < \alpha , then reject H<em>0; if p−value>α, fail to reject H</em>0.
- Important to note that one cannot "accept" H0; a hypothesis test does not prove conventional wisdom.
- Interpretation:
- If H<em>0 is rejected, evidence supports the research hypothesis H</em>1.
- If H<em>0 is not rejected, insufficient evidence to support H</em>1.
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.=nextSumofDifferences=nΣdi.
- Margin of Error (MOE):
- MOE=t<em>α/2ns</em>d.
- Confidence Interval:
- CI: ar{d} MOE ; thus, the interval is: ar{d} 0 MOE .
- Interpretation:
- We are 100*(1-α)% confident that the mean difference dˉ lies in the interval (dˉ−MOE,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: 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:
- H<em>0:M</em>d=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: df<em>1=n</em>1−1
- Denominator df: df<em>2=n</em>2−1
- Theorem 8.3: Hypothesis Test of Equality of Variances - Bartlett's Test
- General Form: H<em>0:σ</em>12=σ<em>22 vs. H</em>1:σ<em>12=σ</em>22.
- Test statistic configuration:
- TS=S</em>22S<em>12.
- 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.