Download presentation
Presentation is loading. Please wait.
Published byColeen Rodgers Modified over 8 years ago
1
1 Chapter 9 Inferences from Two Samples 9.2 Inferences About Two Proportions 9.3 Inferences About Two Means (Independent) 9.4 Inferences About Two Means (Matched Pairs) 9.5 Comparing Variation in Two Samples
2
2 Compare the parameters of two populations using two samples from each population. Use Confidence Intervals and Hypothesis Tests For the first population use index 1 For the second population use index 2 9.2Compare p 1, p 2 9.3Compare µ 1, µ 2 (Independent) 9.4Compare µ 1, µ 2 (Matched Pairs) 9.5Compare σ 1 2, σ 2 2 Objective
3
3 Compare the proportions of two populations using two samples from each population. Hypothesis Tests and Confidence Intervals of two proportions use the z-distribution Section 9.2 Inferences About Two Proportions
4
4 Notation p 1 First population proportion n 1 First sample size x 1 Number of successes in first sample p 1 First sample proportion First Population
5
5 p 2 Second population proportion n 2 Second sample size x 2 Number of successes in second sample p 2 Second sample proportion Second Population Notation
6
6 The pooled sample proportion p = p n 1 + n 2 x 1 + x 2 Definition q = 1 – p
7
7 (1) Have two independent random samples (2) For each sample: The number of successes is at least 5 The number of failures is at least 5 Requirements Both requirements must be satisfied to make a Hypothesis Test or to find a Confidence Interval
8
8 Tests for Two Proportions The goal is to compare the two proportions H 0 : p 1 = p 2 H 1 : p 1 p 2 Two tailed H 0 : p 1 = p 2 H 1 : p 1 < p 2 Left tailed H 0 : p 1 = p 2 H 1 : p 1 > p 2 Right tailed Note: We only test the relation between p 1 and p 2 (not the actual numerical values)
9
9 Finding the Test Statistic + z =z = ( p 1 – p 2 ) – ( p 1 – p 2 ) ^ ^ n1n1 pq n2n2 Note: p 1 – p 2 =0 according to H 0 This equation is an altered form of the test statistic for a single proportion (see Ch. 8-3)
10
10 Test Statistic Note: Hypothesis Tests are done in same way as in Ch.8 (but with different test statistics)
11
11 Steps for Performing a Hypothesis Test on Two Proportions Write what we know State H 0 and H 1 Draw a diagram Calculate the sample and pooled proportions Find the Test Statistic Find the Critical Value(s) State the Initial Conclusion and Final Conclusion Note: Same process as in Chapter 8
12
12 The table below lists results from a simple random sample of front-seat occupants involved in car crashes. Use a 0.05 significance level to test the claim that the fatality rate of occupants is lower for those in cars equipped with airbags. Example 1 What we know: x 1 = 41 x 2 = 52α = 0.05 n 1 = 11541 n 2 = 9853Claim: p 1 < p 2 p 1 : Proportion of fatalities with airbags p 2 : Proportion of fatalities with no airbags Claim p 1 < p 2 Note: Each sample has more than 5 successes and failures, thus fulfilling the requirements
13
13 H 0 : p 1 = p 2 H 1 : p 1 < p 2 Example 1 Left-Tailed H 1 = Claim Pooled Proportion Given: x 1 = 41x 2 = 52 α = 0.05 n 1 = 11541n 2 = 9853 Claim: p 1 < p 2 Sample Proportions z = –1.9116 –z α = –1.645 z-dist. Test Statistic Critical Value Diagram Initial Conclusion: Since z is in the critical region, reject H 0 Final Conclusion: We Accept the claim the fatality rate of occupants is lower for those who wear seatbelts (Using StatCrunch)
14
14 H 0 : p 1 = p 2 H 1 : p 1 < p 2 Example 1 Left-Tailed H 1 = Claim Given: x 1 = 41x 2 = 52 α = 0.05 n 1 = 11541n 2 = 9853 Claim: p 1 < p 2 z = –1.9116 –z α = –1.645 z-dist. Diagram Initial Conclusion: Since P-value is less than α (with α = 0.05), reject H 0 Final Conclusion: We Accept the claim the fatality rate of occupants is lower for those who wear seatbelts Stat → Proportions → Two sample → With summary Null: prop. diff.= Alternative Sample 1: Number of successes:. Number of observations: Sample 2: Number of successes:. Number of observations: ● Hypothesis Test P-value = 0.028 41 52 11541 9853 0 < Using StatCrunch
15
15 Confidence Interval Estimate We can observe how the two proportions relate by looking at the Confidence Interval Estimate of p 1 –p 2 CI = ( (p 1 –p 2 ) – E, (p 1 –p 2 ) + E ) Where
16
16 Use the same sample data in Example 1 to construct a 90% Confidence Interval Estimate of the difference between the two population proportions ( p 1 –p 2 ) Example 2 x 1 = 41x 2 = 52p 1 = 0.003553 n 1 = 11541n 2 = 9853p 2 = 0.005278 CI = (-0.003232, -0.000218 ) Note:CI negative implies p 1 –p 2 is negative. This implies p 1 <p 2
17
17 Use the same sample data in Example 1 to construct a 90% Confidence Interval Estimate of the difference between the two population proportions ( p 1 –p 2 ) Example 2 x 1 = 41x 2 = 52p 1 = 0.003553 n 1 = 11541n 2 = 9853p 2 = 0.005278 Note:CI negative implies p 1 –p 2 is negative. This implies p 1 <p 2 CI = (-0.003232, -0.000218 )
18
18 Stat → Proportions → Two sample → With summary Level Sample 1: Number of successes:. Number of observations: Sample 2: Number of successes:. Number of observations: ● Confidence Interval 41 52 11541 9853 0.9 Using StatCrunch Use the same sample data in Example 1 to construct a 90% Confidence Interval Estimate of the difference between the two population proportions ( p 1 –p 2 ) Example 2 Note:CI negative implies p 1 –p 2 is negative. This implies p 1 <p 2 CI = (-0.003232, -0.000218 ) x 1 = 41x 2 = 52 n 1 = 11541n 2 = 9853
19
19 If a confidence interval limits does not contain 0, it implies there is a significant difference between the two proportions (i.e. p 1 ≠ p 2 ). Thus, we can interpret a relation between the two proportions from the confidence interval. In general: If p 1 = p 2 then the CI should contain 0 If p 1 > p 2 then the CI should be mostly positive If p 1 > p 2 then the CI should be mostly negative Interpreting Confidence Intervals
20
20 Drug Clinical Trial Chantix is a drug used as an aid to stop smoking. The number of subjects experiencing insomnia for each of two treatment groups in a clinical trial of the drug Chantix are given below: (a)Use a 0.01 significance level to test the claim proportions of subjects experiencing insomnia is the same for both groups. (b)Find the 99% confidence level estimate of the difference of the two proportions. Does it support the result of the test? What we know:x 1 = 41x 2 = 52α = 0.01 n 1 = 129n 2 = 9853Claim: p 1 = p 2 Note: Each sample has more than 5 successes and failures, thus fulfilling the requirements Number in group Number experiencing insomnia Chantix Treatment 129 19 Placebo 805 13 Example 3
21
21 H 0 : p 1 = p 2 H 1 : p 1 ≠ p 2 Two-Tailed H 0 = Claim Pooled Proportion Given: x 1 = 19 x 2 = 13 α = 0.01 n 1 = 129 n 2 = 805 Claim: p 1 = p 2 Sample Proportions z = 7.602 z α/2 = 2.576 z-dist. Test Statistic Critical Value Diagram Initial Conclusion: Since z is in the critical region, reject H 0 Final Conclusion: We Reject the claim the proportions of the subjects experiencing insomnia is the same in both groups. (Using StatCrunch) -z α/2 = -2.576 Example 3a
22
22 Using StatCrunch Stat → Proportions → Two sample → With summary Null: prop. diff.= Alternative Sample 1: Number of successes:. Number of observations: Sample 2: Number of successes:. Number of observations: ● Hypothesis Test P-value < 0.0001 19 13 129 805 0 ≠ H 0 : p 1 = p 2 H 1 : p 1 ≠ p 2 Two-Tailed H 0 = Claim Given: x 1 = 19 x 2 = 13 α = 0.01 n 1 = 129 n 2 = 805 Claim: p 1 = p 2 z-dist. Diagram Initial Conclusion: Since the P-value is less than α (0.01), reject H 0 Final Conclusion: We Reject the claim the proportions of the subjects experiencing insomnia is the same in both groups. i.e. the P-value is very small Example 3a
23
23 Example 3b x 1 = 19x 2 = 13p 1 = 0.14729 n 1 = 129n 2 = 805p 2 = 0.01615 Note: CI does not contain 0 implies p 1 and p 2 have significant difference. Use the same sample data in Example 3 to construct a 99% Confidence Interval Estimate of the difference between the two population proportions ( p 1 –p 2 ) CI = (0.0500, 0.2123 )
24
24 Stat → Proportions → Two sample → With summary Level Sample 1: Number of successes:. Number of observations: Sample 2: Number of successes:. Number of observations: ● Confidence Interval 19 13 129 805 0.9 Using StatCrunch Use the same sample data in Example 3 to construct a 99% Confidence Interval Estimate of the difference between the two population proportions ( p 1 –p 2 ) CI = (0.0500, 0.2123 ) x 1 = 19x 2 = 13 n 1 = 129n 2 = 805 Example 3b Note: CI does not contain 0 implies p 1 and p 2 have significant difference.
25
25
26
26 Objective Compare the proportions of two independent means using two samples from each population. Hypothesis Tests and Confidence Intervals of two proportions use the t-distribution Section 9.3 Inferences About Two Means (Independent)
27
27 Definitions Two samples are independent if the sample values selected from one population are not related to or somehow paired or matched with the sample values from the other population Examples: Flipping two coins (Independent) Drawing two cards (not independent)
28
28 Notation μ 1 First population mean σ 1 First population standard deviation n 1 First sample size x 1 First sample mean s 1 First sample standard deviation First Population
29
29 Notation μ 2 Second population mean σ 2 Second population standard deviation n 2 Second sample size x 2 Second sample mean s 2 Second sample standard deviation Second Population
30
30 (1)Have two independent random samples (2)σ 1 and σ 2 are unknown and no assumption is made about their equality (3)Either or both the following holds: Both sample sizes are large (n 1 >30, n 2 >30) or Both populations have normal distributions Requirements All requirements must be satisfied to make a Hypothesis Test or to find a Confidence Interval
31
31 Tests for Two Independent Means The goal is to compare the two Means H 0 : μ 1 = μ 2 H 1 : μ 1 ≠ μ 2 Two tailedLeft tailedRight tailed Note: We only test the relation between μ 1 and μ 2 (not the actual numerical values) H 0 : μ 1 = μ 2 H 1 : μ 1 < μ 2 H 0 : μ 1 = μ 2 H 1 : μ 1 > μ 2
32
32 Note: 1 – 2 =0 according to H 0 Degrees of freedom: df = smaller of n 1 – 1 and n 2 – 1. Finding the Test Statistic This equation is an altered form of the test statistic for a single mean when σ unknown (see Ch. 8-5)
33
33 Test Statistic Note: Hypothesis Tests are done in same way as in Ch.8 (but with different test statistics) Degrees of freedom df = min(n 1 – 1, n 2 – 1)
34
34 Steps for Performing a Hypothesis Test on Two Independent Means Write what we know State H 0 and H 1 Draw a diagram Find the Test Statistic Find the Degrees of Freedom Find the Critical Value(s) State the Initial Conclusion and Final Conclusion Note: Same process as in Chapter 8
35
35 A headline in USA Today proclaimed that “Men, women are equal talkers.” That headline referred to a study of the numbers of words that men and women spoke in a day. Use a 0.05 significance level to test the claim that men and women speak the same mean number of words in a day. Example 1
36
36 H 0 : µ 1 = µ 2 H 1 : µ 1 ≠ µ 2 Two-Tailed H 0 = Claim t = 7.602 t α/2 = 1.97 t-dist. df = 185 Test Statistic Critical Value Initial Conclusion: Since t is not in the critical region, accept H 0 Final Conclusion: We accept the claim that men and women speak the same average number of words a day. -t α/2 = -1.97 Example 1 n 1 = 186 n 2 = 210 α = 0.05 x 1 = 15668.5 x 2 = 16215.0 Claim: μ 1 = μ 2 s 1 = 8632.5 s 2 = 7301.2 Degrees of Freedom df = min(n 1 – 1, n 2 – 1) = min(185, 209) = 185 t α/2 = t 0.025 = 1.97 (Using StatCrunch)
37
37 H 0 : µ 1 = µ 2 H 1 : µ 1 ≠ µ 2 Two-Tailed H 0 = Claim Initial Conclusion: Since P-value > α (0.05), accept H 0 Final Conclusion: We accept the claim that men and women speak the same average number of words a day. Example 1 n 1 = 186 n 2 = 210 α = 0.05 x 1 = 15668.5 x 2 = 16215.0 Claim: μ 1 = μ 2 s 1 = 8632.5 s 2 = 7301.2 Stat → T statistics → Two sample → With summary Null: prop. diff.= Alternative Sample 1: Mean Std. Dev. Size Sample 2: Mean Std. Dev. Size ● Hypothesis Test P-value = 0.4998 15668.5 0 ≠ Using StatCrunch 8632.5 186 16215.0 7301.2 210 (No pooled variance) (Be sure to not use pooled variance)
38
38 Confidence Interval Estimate We can observe how the two proportions relate by looking at the Confidence Interval Estimate of μ 1 –μ 2 CI = ( (x 1 –x 2 ) – E, (x 1 –x 2 ) + E ) Where df = min(n 1 –1, n 2 –1) 22
39
39 df = min(n 1 –1, n 2 –1) = min(185, 210) = 185 t α/2 = t 0.1/2 = t 0.05 = 1.973 x 1 - x 2 = 15668.5 – 16215.0 = -546.5 (x 1 - x 2 ) + E = -546.5 + 1596.17 = 1049.67 (x 1 - x 2 ) – E = -546.5 – 1596.17 = -2142.67 Use the same sample data in Example 1 to construct a 95% Confidence Interval Estimate of the difference between the two population proportions ( µ 1 –µ 2 ) Example 2 n 1 = 186 n 2 = 210 x 1 = 15668.5 x 2 = 16215.0 s 1 = 8632.5 s 2 = 7301.2 df = min(n 1 –1, n 2 –1) = min(185, 210) = 185 t α/2 = t 0.05/2 = t 0.025 = 1.973 x 1 - x 2 = 15668.5 – 16215.0 = -546.5 CI = (-2142.7, 1049.7)
40
40 Use the same sample data in Example 1 to construct a 95% Confidence Interval Estimate of the difference between the two population proportions ( µ 1 –µ 2 ) Example 2 CI = (-2137.4, 1044.4) n 1 = 186 n 2 = 210 x 1 = 15668.5 x 2 = 16215.0 s 1 = 8632.5 s 2 = 7301.2 Stat → T statistics → Two sample → With summary Level: Sample 1: Mean Std. Dev. Size Sample 2: Mean Std. Dev. Size ● Confidence Interval 15668.5 0.95 Using StatCrunch 8632.5 186 16215.0 7301.2 210 Note: slightly different because of rounding errors (No pooled variance)
41
41 Consider two different classes. The students in the first class are thought to generally be older than those in the second. The students’ ages for this semester are summed as follows: (a) Use a 0.1 significance level to test the claim that the average age of students in the first class is greater than the average age of students in the second class. (b) Construct a 90% confidence interval estimate of the difference in average ages. Example 3 n 1 = 93 n 2 = 67 x 1 = 21.2 x 2 = 19.8 s 1 = 2.42 s 2 = 4.77
42
42 t = 7.602t α/2 = 1.668 Test Statistic Critical Value Degrees of Freedom df = min(n 1 – 1, n 2 – 1) = min(92, 66) = 66 t α/2 = t 0.05 = 1.668 (Using StatCrunch) H 0 : µ 1 = µ 2 H 1 : µ 1 > µ 2 Right-Tailed H 1 = Claim n 1 = 93 n 2 = 67α = 0.1 x 1 = 21.2 x 2 = 19.8Claim: µ 1 > µ 2 s 1 = 2.42 s 2 = 4.77 t-dist. df = 66 Example 3a Initial Conclusion: Since t is in the critical region, reject H 0 Final Conclusion: We accept the claim that the average age of students in the first class is greater than that in the second.
43
43 H 0 : µ 1 = µ 2 H 1 : µ 1 > µ 2 Right-Tailed H 1 = Claim Example 3a n 1 = 93 n 2 = 67α = 0.1 x 1 = 21.2 x 2 = 19.8Claim: µ 1 > µ 2 s 1 = 2.42 s 2 = 4.77 Stat → T statistics → Two sample → With summary Null: prop. diff.= Alternative Sample 1: Mean Std. Dev. Size Sample 2: Mean Std. Dev. Size ● Hypothesis Test P-value = 0.0299 21.2 0 ≠ 2.42 93 19.8 4.77 67 (No pooled variance) Using StatCrunch (Be sure to not use pooled variance) Initial Conclusion: Since P-value < α (0.1), reject H 0 Final Conclusion: We accept the claim that the average age of students in the first class is greater than that in the second.
44
44 df = min(n 1 –1, n 2 –1) = min(92, 66) = 66 t α/2 = t 0.1/2 = t 0.05 = 1.668 x 1 - x 2 = 21.2 – 19.8 = 1.4 (x 1 - x 2 ) + E = 1.4 + 1.058 = 2.458 (x 1 - x 2 ) – E = 1.4 – 1.058 = 0.342 CI = (0.34, 2.46) n 1 = 93 n 2 = 67α = 0.1 x 1 = 21.2 x 2 = 19.8 s 1 = 2.42 s 2 = 4.77 Example 3b mp (90% Confidence Interval)
45
45 Example 3b Stat → T statistics → Two sample → With summary Null: prop. diff.= Alternative Sample 1: Mean Std. Dev. Size Sample 2: Mean Std. Dev. Size ● Hypothesis Test 21.2 0 ≠ 2.42 93 19.8 4.77 67 (No pooled variance) Using StatCrunch (Be sure to not use pooled variance) CI = (0.35, 2.45) n 1 = 93 n 2 = 67α = 0.1 x 1 = 21.2 x 2 = 19.8 s 1 = 2.42 s 2 = 4.77 (90% Confidence Interval)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.