330 likes | 688 Views
Hypothesis Testing . 2 Samples. Why Hypothesis Testing? . Confirmatory type of test Using data from 2 samples to make an inference we can apply to the population Alternative hypothesis The hypothesis we are testing Null hypothesis The “nothing is happening” hypothesis.
E N D
Hypothesis Testing 2 Samples
Why Hypothesis Testing? • Confirmatory type of test • Using data from 2 samples to make an inference we can apply to the population • Alternative hypothesis • The hypothesis we are testing • Null hypothesis • The “nothing is happening” hypothesis
Why Hypothesis Testing? • When our test provides us sufficient evidence, we can: • Reject the null hypothesis • Conclude the alternative hypothesis must be true. • Otherwise, we don’t have sufficient evidence to reject the null hypothesis.
2 Samples: Independent Populations • Negative evaluation scores (self-image). 2 independent groups of women. • Normal eating habits • n = 14 x-bar = 14.14 s = 3.29 • Bulimic • n = 12 x-bar = 18.96 s = 1.92 Note: Higher score means negative self-evaluation
Assumptions • Samples come from independent populations • One does not affect the other • Samples come from normal populations • q-q plots
Comparing the 2 means • Comparing means of independent populations • Begin by creating 2 confidence intervals (.95) • Let’s estimate the difference in the means of the 2 groups
C.I Review • 1-α confidence interval on μ • σ known • In both equations, x-bar is the point estimate for μ • So, let’s use - be the point estimate for μ1 – μ2
Estimating the CI for μ1 – μ2 • A linear combination of normal random variables will give us another normal R.V. So, - will be normally distributed. • To get our confidence interval: • Point estimate ± Distribution value x S.E mean
95% Confidence Interval: Difference Between Means • Negative evaluation scores (self-image). 2 independent groups of women. Normal eating habits • n = 14 x-bar = 14.14 s = 3.29 Bulimic • n = 12 x-bar = 18.96 s = 1.92 • Estimated df = 21 • Estimate the difference in means with a 95% confidence level
95% Confidence Interval: Difference Between Means = -4.82 2.08(1.039) = -4.82 ± 2.16 Or, -2.66 to -6.98
Hypothesis Test on Difference Between Means • Null hypothesis: or
Hypothesis Test on Difference Between Means • Alternative hypothesis: or
Hypothesis Test on Difference Between Means Conclusion: Because our test statistic is more extreme than our critical value, we have sufficient evidence to reject the null hypothesis and conclude there is a higher negative evaluation scores for girls with bulimia than those with normal eating habits.
Minitab Output for Same Test Difference = mu (1) - mu (2) Estimate for difference: -4.82 95% CI for difference: (-6.98, -2.66) T-Test of difference = 0 (vs not =): T-Value = -4.64 P-Value = 0.000 DF = 21
Time to Practice One • Page 379 • Problem 11.19 Sample N Mean StDev SE Mean 1 40 165.0 21.5 3.4 2 32 172.9 31.1 5.5 Difference = mu (1) - mu (2) Estimate for difference: -7.90 90% upper bound for difference: 0.49 T-Test of difference = 0 (vs <): T-Value = -1.22 P-Value = 0.114 DF = 53
Difference Between 2 Means:Pooled Variances • If we can assume the variances of the two independent populations are equal, we can pool the variances when calculating the standard error. • When justified, this results in a better confidence interval. • Therefore, we pool variances whenever justified.
Pool Variances in Eating Disorder Problem? • Use hypothesis test:
F Distribution • Family of distributions, like normal and t • Continuous • Shape is determined by two different degrees of freedom • Used to compare variation among processes • Hypothesis test • Formulate null and alternative • Select significance level • α=.05
F Distribution • Calculate the test statistic • whichever is larger • Identify the critical value α=specified level of significance v1= df (n-1) of the sample with the larger variance v2= df (n-1) of the sample with the smaller variance
F Test: Minitab Results • Test for Equal Variances • 95% Bonferroni confidence intervals for standard deviations • Sample N Lower StDev Upper • 1 12 1.29834 1.92 3.54914 • 2 14 2.28353 3.29 5.71750 • F-Test (Normal Distribution) • Test statistic = 0.34, p-value = 0.082
Difference Between 2 Means:Pooled Variances • Standard Error: • Before • After where
Difference Between 2 Means:Pooled Variances • Confidence interval: • Test statistic: • Degrees of freedom = n1+n2 – 2
95% Confidence Interval: Pooled Variances • Negative evaluation scores (self-image). 2 independent groups of women. Normal eating habits • n = 14 x-bar = 14.14 s = 3.29 Bulimic • n = 12 x-bar = 18.96 s = 1.92 • Estimate the difference in means with a 95% confidence level
95% Confidence Interval: Pooled Variances = 2.59 to 7.05
Hypothesis Test:Pooled Variance • Test the alternative hypothesis that the mean scores for bulimics is greater than the mean score for normal eaters. • Significance level (α) = .05
Hypothesis Test:Pooled Variance • Test statistic = 4.46
2-Tail Hypothesis Test:Minitab Results • Two-Sample T-Test and CI • Sample N Mean StDev SE Mean • 1 12 18.96 1.92 0.55 • 2 14 14.14 3.29 0.88 • Difference = mu (1) - mu (2) • Estimate for difference: 4.82 • 95% CI for difference: (2.59, 7.05) • T-Test of difference = 0 (vs not =): T-Value = 4.46 P-Value = 0.000 DF = 24 • Both use Pooled StDev = 2.7482