text stringlengths 235 3.08k |
|---|
of Hispanic students at Cabrillo College and Lake Tahoe College are different. 103 a 105 Test: two independent sample proportions. Random variable: p′1 - p′2 Distribution: H0: p1 = p2 Ha: p1 ≠ p2 The proportion of e-reader users is different for the 16- to 29-year-old users from that of the 30 and older users. Graph: two-tailed Figure 10.21 p-value : 0.0033 Decision: Reject the null hypothesis. Conclusion: At the 5 percent level of significance, from the sample data, there is sufficient evidence to conclude that the proportion of e-reader users 16 to 29 years old is different from the proportion of e-reader users 30 and older. 107 Test: two independent sample proportions Random variable: p′1 − p′2 Distribution: H0: p1 = p2 Ha: p1 > p2 A higher proportion of tablet owners are aged 16 to 29 years old than are 30 years old and older. Graph: righttailed 634 Chapter 10 | Hypothesis Testing with Two Samples Figure 10.22 p-value: 0.2354 Decision: Do not reject the H0. Conclusion: At the 1 percent level of significance, from the sample data, there is not sufficient evidence to conclude that a higher proportion of tablet owners are aged 16 to 29 years old than are 30 years old and older. 109 Subscripts: 1: men; 2: women a. H0: p1 ≤ p2 b. Ha: p1 > p2 c. P′1 − P′2 is the difference between the proportions of men and women who enjoy shopping for electronic equipment. d. normal for two proportions e. test statistic: 0.22 f. p-value: 0.4133 g. Check student’s solution. h. i. Alpha: 0.05 ii. Decision: Do not reject the null hypothesis. iii. Reason for Decision: p-value > alpha iv. Conclusion: At the 5 percent significance level, there is insufficient evidence to conclude that the proportion of men who enjoy shopping for electronic equipment is more than the proportion of women. 111 a. H0: p1 = p2 b. Ha: p1 ≠ p2 c. P′1 − P′2 is the difference between the proportions of men and women that have at least one pierced ear. d. normal for two proportions e. test statistic: –4. |
82 f. p-value: zero g. Check student’s solution. h. i. Alpha: 0.05 ii. Decision: Reject the null hypothesis. iii. Reason for Decision: p-value < alpha iv. Conclusion: At the 5 percent significance level, there is sufficient evidence to conclude that the proportions of males and females with at least one pierced ear is different. 113 a. H0: µd = 0 b. Ha: µd > 0 This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 10 | Hypothesis Testing with Two Samples 635 c. The random variable Xd is the mean difference in work times on days when eating breakfast and on days when not eating breakfast. d. e. t9 test statistic: 4.8963 f. p-value: 0.0004 g. Check student’s solution. h. i. Alpha: 0.05 ii. Decision: Reject the null hypothesis. iii. Reason for Decision: p-value < alpha iv. Conclusion: At the 5 percent level of significance, there is sufficient evidence to conclude that the mean difference in work times on days when eating breakfast and on days when not eating breakfast has increased. 114 p-value = 0.1494 At the 5 percent significance level, there is insufficient evidence to conclude that the medication lowered cholesterol levels after 12 weeks. 116 b 118 c ¯ 120 Test: two matched pairs or paired samples (t-test) Random variable: X mean of the differences of new female breast cancer cases in the south between 2013 and 2012 is greater than zero. The estimate for new female breast cancer cases in the south is higher in 2013 than in 2012. Graph: right-tailed p-value: 0.0004 Distribution: t12 H0: μd = 0 Ha: μd > 0 The d Figure 10.23 Decision: Reject H0. Conclusion: At the 5 percent level of significance, from the sample data, there is sufficient evidence to conclude that there was a higher estimate of new female breast cancer cases in 2013 than in 2012. 122 Test: matched or paired samples (t-test) Difference data: {–0.9, –3.7, –3.2, –0.5, 0.6, –1.9, –0.5, 0.2, 0.6, 0.4, 1.7, – |
2.4, ¯ 1.8} Random Variable: X in the northeastern states between 2012 and 2011 is less than zero. The underemployment rate went down from 2011 to 2012. Graph: left-tailed. Distribution: H0: μd = 0 Ha: μd < 0 The mean of the differences of the rate of underemployment d Figure 10.24 636 Chapter 10 | Hypothesis Testing with Two Samples p-value: 0.1207 Decision: Do not reject H0. Conclusion: At the 5 percent level of significance, from the sample data, there is not sufficient evidence to conclude that there was a decrease in the underemployment rates of the northeastern states from 2011 to 2012. 124 e 126 d 128 f 130 e 132 f The graduate researcher will be comparing a sample proportion to a population proportion or claim. Thus, the study includes the hypothesis test of a single proportion. A two proportion hypothesis test compares two sample proportions. 134 a This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 637 11 | THE CHI-SQUARE DISTRIBUTION Figure 11.1 The chi-square distribution can be used to find relationships between two things, like grocery prices at different stores. (credit: Pete/flickr) Introduction Chapter Objectives By the end of this chapter, the student should be able to do the following: Interpret the chi-square probability distribution as the sample size changes • • Conduct and interpret chi-square goodness-of-fit hypothesis tests • Conduct and interpret chi-square test of independence hypothesis tests • Conduct and interpret chi-square homogeneity hypothesis tests • Conduct and interpret chi-square single variance hypothesis tests Have you ever wondered if lottery numbers were evenly distributed or if some numbers occurred with a greater frequency? How about if the types of movies people preferred were different across different age groups? What about if a coffee machine was dispensing approximately the same amount of coffee each time? You could answer these questions by conducting a hypothesis test. 638 Chapter 11 | The Chi-Square Distribution You will now study a new distribution, one that is used to determine the answers to such questions. This distribution is called the chi-square distribution. In this chapter, you will learn the three major applications of the chi-square distribution: • The goodness-of-fit test, which determines if data fit a particular distribution, such as |
in the lottery example • The test of independence, which determines if events are independent, such as in the movie example • The test of a single variance, which tests variability, such as in the coffee example NOTE Though the chi-square distribution depends on calculators or computers for most of the calculations, there is a table available (see Appendix G). TI-83+ and TI-84 calculator instructions are included in the text. Look in the sports section of a newspaper or on the internet for some sports data: baseball averages, basketball scores, golf tournament scores, football odds, swimming times, and the like. Plot a histogram and a boxplot using your data. See if you can determine a probability distribution that your data fits. Have a discussion with the class about your choice. 11.1 | Facts About the Chi-Square Distribution The notation for the chi-square distribution is 2 χ ∼ χd f where df = degrees of freedom, which depends on how chi-square is being used. If you want to practice calculating chisquare probabilities then use df = n – –1. The degrees of freedom for the three major uses are calculated differently. For the χ2 distribution, the population mean is μ = df, and the population standard deviation is σ = 2(d f ). The random variable is shown as χ2, but it may be any uppercase letter. The random variable for a chi-square distribution with k degrees of freedom is the sum of k independent, squared standard normal variables is χ2 = (Z1)2 + (Z2)2 +... + (Zk)2, where the following are true: • The curve is nonsymmetrical and skewed to the right. • There is a different chi-square curve for each df. Figure 11.2 • The test statistic for any test is always greater than or equal to zero. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 639 • When df > 90, the chi-square curve approximates the normal distribution. For X ~ χ1,000 2, the mean, μ = df = 1,000 and the standard deviation, σ = 2(1,000) = 44.7. Therefore, X ~ N(1,000, 44.7), approximately. • The mean, μ, is located just to the right of the |
peak. Figure 11.3 11.2 | Goodness-of-Fit Test In this type of hypothesis test, you determine whether the data fit a particular distribution. For example, you may suspect your unknown data fit a binomial distribution. You use a chi-square test, meaning the distribution for the hypothesis test is chi-square, to determine if there is a fit. The null and the alternative hypotheses for this test may be written in sentences or may be stated as equations or inequalities. The test statistic for a goodness-of-fit test is: (O − E)2 E Σ k where • O = observed values (data), • E = expected values (from theory), and • k = the number of different data cells or categories. The observed values are the data values, and the expected values are the values you would expect to get if the null hypothesis were true. There are n terms of the form (O − E)2. E The number of degrees of freedom is df = (number of categories – 1). The goodness-of-fit test is almost always right-tailed. If the observed values and the corresponding expected values are not close to each other, then the test statistic can get very large and will be way out in the right tail of the chi-square curve. NOTE The expected value for each cell needs to be at least five for you to use this test. Example 11.1 Absenteeism of college students from math classes is a major concern to math instructors because missing class appears to increase the drop rate. Suppose that a study was done to determine if the actual student absenteeism rate follows faculty perception. The faculty expected that a group of 100 students would miss class according to Table 11.1. 640 Chapter 11 | The Chi-Square Distribution Number of Absences per Term Expected Number of Students 0–2 3–5 6–8 9–11 12+ Table 11.1 50 30 12 6 2 A random survey across all mathematics courses was then done to determine the number of observed absences in a course. Table 11.2 displays the results of that survey. Number of Absences per Term Actual Number of Students 0–2 3–5 6–8 9–11 12+ Table 11.2 35 40 20 1 4 Determine the null and alternative hypotheses needed to conduct a goodness-of-fit test. H0: Student absenteeism fits faculty perception. The alternative hypothesis is the opposite of the null hypothesis. Ha: Student absenteeism does not fit faculty |
perception. a. Can you use the information as it appears in the charts to conduct the goodness-of-fit test? Solution 11.1 a. No. Notice that the expected number of absences for the 12+ entry is less than five; it is two. Combine that group with the 9–11 group to create new tables where the number of students for each entry is at least five. The new results are in Table 11.2 and Table 11.3. Number of Absences per Term Expected Number of Students 0–2 3–5 6–8 9+ Table 11.3 50 30 12 8 This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 641 Number of Absences per Term Actual Number of Students 0–2 3–5 6–8 9+ Table 11.4 35 40 20 5 b. What is the number of degrees of freedom (df)? Solution 11.1 b. There are four cells or categories in each of the new tables. df = number of cells – 1 = 4 – 1 = 3. 11.1 A factory manager needs to understand how many products are defective versus how many are produced. The number of expected defects is listed in Table 11.5. Number Produced Number Defective 0–100 101–200 201–300 301–400 401–500 Table 11.5 5 6 7 8 10 A random sample was taken to determine the actual number of defects. Table 11.6 shows the results of the survey. Number Produced Number Defective 0–100 101–200 201–300 301–400 401–500 Table 11.6 5 7 8 9 11 State the null and alternative hypotheses needed to conduct a goodness-of-fit test, and state the degrees of freedom. 642 Chapter 11 | The Chi-Square Distribution Example 11.2 Employers want to know which days of the week employees are absent in a five-day work week. Most employers would like to believe that employees are absent equally during the week. Suppose a random sample of 60 managers were asked on which day of the week they had the highest number of employee absences. The results were distributed as in Table 11.6. For the population of employees, do the days for the highest number of absences occur with equal frequencies during a five-day work week? Test at a 5 percent significance level. Monday Tuesday Wednesday Thursday Friday Number of Absences 15 12 |
9 9 15 Table 11.7 Day of the Week Employees Were Most Absent Solution 11.2 The null and alternative hypotheses are as follows: • H0: The absent days occur with equal frequencies; that is, they fit a uniform distribution. • Ha: The absent days occur with unequal frequencies; that is, they do not fit a uniform distribution. If the absent days occur with equal frequencies, then, out of 60 absent days (the total in the sample: 15 + 12 + 9 + 9 + 15 = 60) there would be 12 absences on Monday, 12 on Tuesday, 12 on Wednesday, 12 on Thursday, and 12 on Friday. These numbers are the expected (E) values. The values in the table are the observed (O) values or data. This time, calculate the χ2 test statistic by hand. Make a chart with the following headings and fill in the columns: • Expected (E) values (12, 12, 12, 12, 12) • Observed (O) values (15, 12, 9, 9, 15) • • • (O – E) (O – E)2 (O – E)2 E Now add (sum) the last column. The sum is three. This is the χ2 test statistic. To find the p-value, calculate P(χ2 > 3). This test is right-tailed. Use a computer or calculator to find the p-value. You should get p-value = 0.5578. The dfs are the number of cells – 1 = 5 – 1 = 4. Press 2nd DISTR. Arrow down to χ2cdf. Press ENTER. Enter (3,10^99,4). Rounded to four decimal places, you should see.5578, which is the p-value. Next, complete a graph like the following one with the proper labeling and shading. You should shade the right tail. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 643 Figure 11.4 The decision is not to reject the null hypothesis. Conclusion: At a 5 percent level of significance, from the sample data, there is not sufficient evidence to conclude that the absent days do not occur with equal frequencies. TI-83+ and some TI-84 calculators do not have a special program for the test statistic for the goodness-of-fit test |
. The next example, Example 11.3, has the calculator instructions. The newer TI-84 calculators have in STAT TESTS the test Chi2 GOF. To run the test, put the observed values—the data—into a first list and the expected values—the values you expect if the null hypothesis is true—into a second list. Press STAT TESTS and Chi2 GOF. Enter the list names for the Observed list and the Expected list. Enter the degrees of freedom and press Calculate or Draw. Make sure you clear any lists before you start. To Clear Lists in the calculators: Go into STAT EDIT and arrow up to the list name area of the particular list. Press CLEAR and then arrow down. The list will be cleared. Alternatively, you can press STAT and press 4 for ClrList. Enter the list name and press ENTER. 11.2 Teachers want to know which night each week their students are doing most of their homework. Most teachers think that students do homework equally throughout the week. Suppose a random sample of 56 students were asked on which night of the week they did the most homework. The results were distributed as in Table 11.8. Sunday Monday Tuesday Wednesday Thursday Friday Saturday 11 8 10 7 10 5 5 Number of Students Table 11.8 From the population of students, do the nights for the highest number of students doing the majority of their homework occur with equal frequencies during a week? What type of hypothesis test should you use? 644 Chapter 11 | The Chi-Square Distribution Example 11.3 This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 645 One study indicates that the number of televisions that American families have is distributed (this is the given distribution for the American population) as in Table 11.9. Number of Televisions Percent 0 1 2 3 4+ Table 11.9 10 16 55 11 8 The table contains expected (E) percents. A random sample of 600 families in the far western U.S. resulted in the data in Table 11.10. Number of Televisions Frequency 0 1 2 3 4+ Table 11.10 66 119 340 60 15 Total = 600 The table contains observed (O) frequency values. At the 1 percent significance level, does it appear that the distribution number of televisions of far western U.S. families is different from the distribution for the American |
population as a whole? Solution 11.3 This problem asks you to test whether the far western U.S. families distribution fits the distribution of the American families. This test is always right-tailed. The first table contains expected percentages. To get expected (E) frequencies, multiply the percentage by 600. The expected frequencies are shown in Table 11.10. Number of Televisions Percent Expected Frequency 0 1 2 3 more than 3 10 16 55 11 8 (0.10)(600) = 60 (0.16)(600) = 96 (0.55)(600) = 330 (0.11)(600) = 66 (0.08)(600) = 48 646 Chapter 11 | The Chi-Square Distribution Therefore, the expected frequencies are 60, 96, 330, 66, and 48. In the TI calculators, you can let the calculator do the math. For example, instead of 60, enter 0.10 * 600. H0: The number of televisions distribution of far western U.S. families is the same as the number of televisions distribution of the American population. Ha: The number of televisions distribution of far western U.S. families is different from the number of televisions distribution of the American population. Distribution for the test: χ4 2 where df = (the number of cells) – 1 = 5 – 1 = 4. NOTE df ≠ 600 – 1 Calculate the test statistic: χ2 = 29.65 Graph Figure 11.5 Probability statement: p-value = P(χ2 > 29.65) =.000006 Compare α and the p-value: • α =.01 • p-value = 0.000006 So, α > p-value. Make a decision: Since α > p-value, reject Ho. This means you reject the hypothesis that the distribution for the far western states is the same as that of the American population as a whole. Conclusion: At the 1 percent significance level, from the data, there is sufficient evidence to conclude that the number of televisions distribution for the far western United States is different from the number of televisions distribution for the American population as a whole. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 647 Press STAT and ENTER. Make sure to clear lists L1, L2, and L3 if they have data |
in them—see the note at the end of Example 11.2. Into L1, put the observed frequencies 66, 119, 349, 60, 15. Into L2, put the expected frequencies.10*600,.16*600,.55*600,.11*600,.08*600. Arrow over to list L3 and up to the name area L3. Enter (L1-L2)^2/L2 and ENTER. Press 2nd QUIT. Press 2nd LIST and arrow over to MATH. Press 5. You should see sum (Enter L3). Rounded to two decimal places, you should see 29.65. Press 2nd DISTR. Press 7 or Arrow down to 7:χ2cdf and press ENTER. Enter (29.65,1E99,4). Rounded to four places, you should see 5.77E-6 =.000006 (rounded to six decimal places), which is the p-value. The newer TI-84 calculators have in STAT TESTS the test Chi2 GOF. To run the test, put the observed values (the data) into a first list and the expected values—the values you expect if the null hypothesis is true—into a second list. Press STAT TESTS and Chi2 GOF. Enter the list names for the Observed list and the Expected list. Enter the degrees of freedom and press Calculate or Draw. Make sure you clear any lists before you start. 11.3 The expected percentage of the number of pets students have in their homes is distributed (this is the given distribution for the student population of the United States) as in Table 11.12. Number of Pets Percent 0 1 2 3 4+ Table 11.12 18 25 30 18 9 A random sample of 1,000 students from the eastern United States resulted in the data in Table 11.13. Number of Pets Frequency 0 1 2 3 4+ Table 11.13 210 240 320 140 90 At the 1 percent significance level, does it appear that the distribution number of pets of students in the eastern United 648 Chapter 11 | The Chi-Square Distribution States is different from the distribution for the United States student population as a whole? What is the p-value? Example 11.4 Suppose you flip two coins 100 times. The results are 20 HH, 27 HT, 30 TH, and 23 TT. Are the coins fair? Test at a 5 percent significance level. Solution |
11.4 This problem can be set up as a goodness-of-fit problem. The sample space for flipping two fair coins is {HH, HT, TH, TT}. Out of 100 flips, you would expect 25 HH, 25 HT, 25 TH, and 25 TT. This is the expected distribution. The question, “Are the coins fair?” is the same as saying, “Does the distribution of the coins (20 HH, 27 HT, 30 TH, 23 TT) fit the expected distribution?” Random variable: Let X = the number of heads in one flip of the two coins. X takes on the values 0, 1, 2. There are 0, 1, or 2 heads in the flip of two coins. Therefore, the number of cells is three. Since X = the number of heads, the observed frequencies are 20 for two heads, 57 for one head, and 23 for zero heads or both tails. The expected frequencies are 25 for two heads, 50 for one head, and 25 for zero heads or both tails. This test is right-tailed. H0: The coins are fair. Ha: The coins are not fair. Distribution for the test: χ2 Calculate the test statistic: χ2 = 2.14. 2 where df = 3 – 1 = 2. Graph Figure 11.6 Probability statement: p-value = P(χ2 > 2.14) = 0.3430. Compare α and the p-value: • α =.05 • p-value = 0.3430 α < p-value. Make a decision: Since α < p-value, do not reject H0. Conclusion: There is insufficient evidence to conclude that the coins are not fair. Press STAT and ENTER. Make sure you clear lists L1, L2, and L3 if they have data in them. Into L1, put the observed frequencies 20, 57, 23. Into L2, put the expected frequencies 25, 50, 25. Arrow over to list L3 and up to the name area L3. Enter (L1-L2)^2/L2 and ENTER. Press 2nd QUIT. Press 2nd LIST and This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 649 arrow over to MATH. Press 5. You should see sum. Enter L3. |
Rounded to two decimal places, you should see 2.14. Press 2nd DISTR. Arrow down to 7:χ2cdf—or press 7. Press ENTER. Enter 2.14,1E99,2). Rounded to four places, you should see.3430, which is the p-value. The newer TI-84 calculators have in STAT TESTS the test Chi2 GOF. To run the test, put the observed values—the data—into a first list and the expected values—the values you expect if the null hypothesis is true—into a second list. Press STAT TESTS and Chi2 GOF. Enter the list names for the Observed list and the Expected list. Enter the degrees of freedom and press Calculate or Draw. Make sure you clear any lists before you start. 11.4 Students in a social studies class hypothesize that the literacy rates around the world for every region are 82 percent. Table 11.14 shows the actual literacy rates around the world broken down by region. What are the test statistic and the degrees of freedom? MDG Region Developed regions Adult Literacy Rate (%) 99 Commonwealth of Independent States 99.5 Northern Africa Sub-Saharan Africa Latin America and the Caribbean Eastern Asia Southern Asia Southeastern Asia Western Asia Oceania Table 11.14 67.3 62.5 91 93.8 61.9 91.9 84.5 66.4 11.3 | Test of Independence Tests of independence involve using a contingency table of observed (data) values. The test statistic for a test of independence is similar to that of a goodness-of-fit test (O – E)2 E Σ (i ⋅ j) where • O = observed values, • E = expected values, • i = the number of rows in the table, and 650 Chapter 11 | The Chi-Square Distribution • j = the number of columns in the table. There are i ⋅ j terms of the form (O – E)2 E. A test of independence determines whether two factors are independent. You first encountered the term independence in Probability Topics. As a review, consider the following example. NOTE The expected value for each cell needs to be at least five for you to use this test. Example 11.5 Suppose A = a speeding violation in the last year and B = a cell phone user while driving. If A and B are independent, then P(A AND B) = P(A) |
P(B). A AND B is the event that a driver received a speeding violation last year and also used a cell phone while driving. Suppose, in a study of drivers who received speeding violations in the last year, and who used cell phones while driving, that 755 people were surveyed. Out of the 755, 70 had a speeding violation and 685 did not; 305 used cell phones while driving and 450 did not. Let y = expected number of drivers who used a cell phone while driving and received speeding violations. If A and B are independent, then P(A AND B) = P(A)P(B). By substitution, y 755 = ⎛ ⎝ 70 755 ⎞ ⎛ ⎝ ⎠ 305 755 ⎞ ⎠. Solve for y: y = (70)(305) 755 = 28.3. About 28 people from the sample are expected to use cell phones while driving and to receive speeding violations. In a test of independence, we state the null and alternative hypotheses in words. Since the contingency table consists of two factors, the null hypothesis states that the factors are independent and the alternative hypothesis states that they are not independent (dependent). If we do a test of independence using the example, then the null hypothesis is the following: H0: Being a cell phone user while driving and receiving a speeding violation are independent events. If the null hypothesis were true, we would expect about 28 people to use cell phones while driving and to receive a speeding violation. The test of independence is always right-tailed because of the calculation of the test statistic. If the expected and observed values are not close together, then the test statistic is very large and way out in the right tail of the chisquare curve, as it is in a goodness-of-fit. The number of degrees of freedom for the test of independence is df = (number of columns – 1)(number of rows – 1). The following formula calculates the expected number (E): E = (row total)(column total) total number surveyed 11.5 A sample of 300 students is taken. Of the students surveyed, 50 were music students, while 250 were not. 97 were on the honor roll, while 203 were not. If we assume being a music student and being on the honor roll are independent events, what is the expected number of music students who are also on the honor roll? This OpenStax book is available for free at http:// |
cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 651 Example 11.6 In a volunteer group, adults 21 and older volunteer from one to nine hours each week to spend time with a disabled senior citizen. The program recruits among community college students, four-year college students, and non-students. In Table 11.15 is a sample of the adult volunteers and the number of hours they volunteer per week. Type of Volunteer 1–3 Hours 4–6 Hours 7–9 Hours Row Total Community College Students 111 Four-year College Students Non-students Column Total 96 91 298 96 133 150 379 48 61 53 162 255 290 294 839 Table 11.15 Number of Hours Worked per Week by Volunteer Type (Observed) The table contains observed (O) values (data). Is the number of hours volunteered independent of the type of volunteer? Solution 11.6 The observed values and the question at the end of the problem, “Is the number of hours volunteered independent of the type of volunteer?” tell you this is a test of independence. The two factors are number of hours volunteered and type of volunteer. This test is always right-tailed. H0: The number of hours volunteered is independent of the type of volunteer. Ha: The number of hours volunteered is dependent on the type of volunteer. The expected result are in Table 11.15. Type of Volunteer 1-3 Hours 4–6 Hours 7-9 Hours Community College Students 90.57 115.19 49.24 Four-Year College Students 103 131 56 Nonstudents 104.42 132.81 56.77 Table 11.16 Number of Hours Worked per Week by Volunteer Type (Expected) The table contains expected (E) values (data). For example, the calculation for the expected frequency for the top-left cell is E = (row total)(column total) total number surveyed = (255)(298) 839 = 90.57. Calculate the test statistic: χ2 = 12.99 (calculator or computer) 2 Distribution for the test: χ4 df = (3 columns – 1)(3 rows – 1) = (2)(2) = 4 Graph 652 Chapter 11 | The Chi-Square Distribution Figure 11.7 Probability statement: p-value = P(χ2 > 12.99) = 0.0113 Compare α and the p-value: Since no α is given, |
assume α = 0.05. p-value = 0.0113. α > p-value. Make a decision: Since α > p-value, reject H0. This means that the factors are not independent. Conclusion: At a 5 percent level of significance, from the data, there is sufficient evidence to conclude that the number of hours volunteered and the type of volunteer are dependent on each other. For the example in Table 11.15, if there had been another type of volunteer, teenagers, what would the degrees of freedom be? Press the MATRX key and arrow over to EDIT. Press 1:[A]. Press 3 ENTER 3 ENTER. Enter the table values by row from Table 11.15. Press ENTER after each. Press 2nd QUIT. Press STAT and arrow over to TESTS. Arrow down to C:χ2-TEST. Press ENTER. You should see Observed:[A] and Expected:[B]. Arrow down to Calculate. Press ENTER. The test statistic is 12.9909 and the p-value =.0113. Do the procedure a second time, but arrow down to Draw instead of Calculate. 11.6 The Bureau of Labor Statistics gathers data about employment in the United States. A sample is taken to calculate the number of U.S. citizens working in one of several industry sectors over time. Table 11.17 shows the results: Industry Sector Non-agriculture Wage and Salary Goods-producing, Excluding Agriculture Services-providing Agriculture, Forestry, Fishing, and Hunting Non-agriculture Self-employed and Unpaid Family Worker Secondary Wage and Salary Jobs in Agriculture and Private Household Industries 2000 2010 2020 Total 13,243 13,044 15,018 41,305 2,457 1,771 1,950 6,178 10,786 11,273 13,068 35,127 240 931 214 894 201 972 655 2,797 14 11 11 36 Secondary Jobs as a Self-employed or Unpaid Family Worker 196 144 152 492 Table 11.17 This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 653 Industry Sector Total Table 11.17 2000 2010 2020 Total 27,867 27,351 31,372 86,590 We want to know if the change in the number of jobs is independent of the change in years. State the null and alternative hypotheses and the degrees of |
freedom. Example 11.7 De Anza College is interested in the relationship between anxiety level and the need to succeed in school. A random sample of 400 students took a test that measured anxiety level and need to succeed in school. Table 11.18 shows the results. De Anza College wants to know if anxiety level and need to succeed in school are independent events. Need to Succeed in School High Anxiety MedHigh Anxiety Medium Anxiety MedLow Anxiety Low Anxiety Row Total High Need Medium Need Low Need Column Total 35 18 4 57 42 48 5 95 53 63 11 127 15 33 15 63 10 31 17 58 155 193 52 400 Table 11.18 Need to Succeed in School vs. Anxiety Level a. How many high anxiety level students are expected to have a high need to succeed in school? Solution 11.7 a. The column total for a high anxiety level is 57. The row total for high need to succeed in school is 155. The sample size or total surveyed is 400. E = (row total)(column total) total surveyed = 155 ⋅ 57 400 = 22.09 The expected number of students who have a high anxiety level and a high need to succeed in school is about 22. b. If the two variables are independent, how many students do you expect to have a low need to succeed in school and a med-low level of anxiety? Solution 11.7 b. The column total for a med-low anxiety level is 63. The row total for a low need to succeed in school is 52. The sample size or total surveyed is 400. c. E = (row total)(column total) total surveyed = ________ 654 Chapter 11 | The Chi-Square Distribution Solution 11.7 c. E = (row total)(column total) total surveyed = 8.19 d. The expected number of students who have a med-low anxiety level and a low need to succeed in school is about ________. Solution 11.7 d. 8 11.7 Refer back to the information in Try It. How many services-providing jobs are there expected to be in 2020? How many nonagriculture wage and salary jobs are there expected to be in 2020? 11.4 | Test for Homogeneity The goodness-of-fit test can be used to decide whether a population fits a given distribution, but it will not suffice to decide whether two populations follow the same unknown distribution. A different test, called the test for homogeneity, can be used to draw a conclusion about whether two |
populations have the same distribution. To calculate the test statistic for a test for homogeneity, follow the same procedure as with the test of independence. NOTE The expected value for each cell needs to be at least five for you to use this test. Hypotheses H0: The distributions of the two populations are the same. Ha: The distributions of the two populations are not the same. Test Statistic Use a χ 2 test statistic. It is computed in the same way as the test for independence. Degrees of freedom (df) df = number of columns – 1 Requirements All values in the table must be greater than or equal to five. Common Uses Comparing two populations. For example: men vs. women, before vs. after, east vs. west. The variable is categorical with more than two possible response values. Example 11.8 Do male and female college students have the same distribution of living arrangements? Use a level of significance of 0.05. Suppose that 250 randomly selected male college students and 300 randomly selected female college students were asked about their living arrangements: dormitory, apartment, with parents, other. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 655 The results are shown in Table 11.18. Do male and female college students have the same distribution of living arrangements? Dormitory Apartment With Parents Other Males 72 Females 91 84 86 49 88 45 35 Table 11.19 Distribution of Living Arragements for College Males and College Females Solution 11.8 H0: The distribution of living arrangements for male college students is the same as the distribution of living arrangements for female college students. Ha: The distribution of living arrangements for male college students is not the same as the distribution of living arrangements for female college students. Degrees of freedom (df): df = number of columns – 1 = 4 – 1 = 3 2 Distribution for the test: χ3 Calculate the test statistic: χ2 = 10.1287 (calculator or computer) Probability statement: p-value = P(χ2 >10.1287) = 0.0175 Press the MATRX key and arrow over to EDIT. Press 1:[A]. Press 2 ENTER 4 ENTER. Enter the table values by row. Press ENTER after each. Press 2nd QUIT. Press STAT and arrow over to TESTS. Arrow down to C:χ2 |
-TEST. Press ENTER. You should see Observed:[A] and Expected:[B]. Arrow down to Calculate. Press ENTER. The test statistic is 10.1287 and the p-value = 0.0175. Do the procedure a second time but arrow down to Draw instead of Calculate. Compare α and the p-value: Since no α is given, assume α = 0.05. p-value = 0.0175. α > p-value. Make a decision: Since α > p-value, reject H0. This means that the distributions are not the same. Conclusion: At a 5 percent level of significance, from the data, there is sufficient evidence to conclude that the distributions of living arrangements for male and female college students are not the same. Notice that the conclusion is only that the distributions are not the same. We cannot use the test for homogeneity to draw any conclusions about how they differ. 11.8 Do families and singles have the same distribution of cars? Suppose that 100 randomly selected families and 200 656 Chapter 11 | The Chi-Square Distribution randomly selected singles were asked what type of car they drove: sport, sedan, hatchback, truck, van/SUV. The results are shown in Table 11.20. Do families and singles have the same distribution of cars? Test at a level of significance of 0.05. Sport Sedan Hatchback Truck Van/SUV Family 5 Single 45 Table 11.20 15 65 35 37 17 46 28 7 Example 11.9 Both before and after a recent earthquake, surveys were conducted asking voters which of the three candidates they planned on voting for in the upcoming city council election. Has there been a change since the earthquake? Use a level of significance of 0.05. Table 11.20 shows the results of the survey. Has there been a change in the distribution of voter preferences since the earthquake? Perez Chung Stevens Before 167 After 214 128 197 135 225 Table 11.21 Solution 11.9 H0: The distribution of voter preferences was the same before and after the earthquake. Ha: The distribution of voter preferences was not the same before and after the earthquake. Degrees of freedom (df): df = number of columns – 1 = 3 – 1 = 2 2 Distribution for the test: χ2 Calculate the test statistic: χ2 = 3.2603 (calculator or computer) Probability statement: p-value=P(χ2 > 3.2603) |
= 0.1959 Press the MATRX key and arrow over to EDIT. Press 1:[A]. Press 2 ENTER 3 ENTER. Enter the table values by row. Press ENTER after each. Press 2nd QUIT. Press STAT and arrow over to TESTS. Arrow down to C:χ2-TEST. Press ENTER. You should see Observed:[A] and Expected:[B]. Arrow down to Calculate. Press ENTER. The test statistic is 3.2603 and the p-value = 0.1959. Do the procedure a second time but arrow down to Draw instead of Calculate. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 657 Compare α and the p-value: α = 0.05 and the p-value = 0.1959. α < p-value. Make a decision: Since α < p-value, do not reject Ho. Conclusion: At a 5 percent level of significance, from the data, there is insufficient evidence to conclude that the distribution of voter preferences was not the same before and after the earthquake. 11.9 Ivy League schools receive many applications, but only some can be accepted. At the schools listed in Table 11.22, two types of applications are accepted: regular and early decision. Application Type Accepted Brown Columbia Cornell Dartmouth Penn Yale Regular Early Decision Table 11.22 2,115 1,792 577 627 5,306 1,228 1,734 444 2,685 1,245 1,195 761 We want to know if the number of regular applications accepted follows the same distribution as the number of early applications accepted. State the null and alternative hypotheses, the degrees of freedom and the test statistic, sketch the graph of the p-value, and draw a conclusion about the test of homogeneity. 11.5 | Comparison of the Chi-Square Tests You have seen the χ2 test statistic used in three different circumstances. The following bulleted list is a summary that will help you decide which χ2 test is the appropriate one to use. • Goodness-of-Fit: Use the goodness-of-fit test to decide whether a population with an unknown distribution fits a known distribution. In this case there will be a single qualitative survey question or a single outcome of an experiment from a single population. Goodness-of-fit is typically used to see if the population is uniform |
(all outcomes occur with equal frequency), the population is normal, or the population is the same as another population with a known distribution. The null and alternative hypotheses are as follows: H0: The population fits the given distribution. Ha: The population does not fit the given distribution. Independence: Use the test for independence to decide whether two variables (factors) are independent or dependent. In this case there will be two qualitative survey questions or experiments and a contingency table will be constructed. The goal is to see if the two variables are unrelated/independent or related/dependent. The null and alternative hypotheses are as follows: H0: The two variables (factors) are independent. Ha: The two variables (factors) are dependent. • • Homogeneity: Use the test for homogeneity to decide if two populations with unknown distributions have the same distribution. In this case there will be a single qualitative survey question or experiment given to two different populations. The null and alternative hypotheses are as follows: H0: The two populations follow the same distribution. Ha: The two populations have different distributions. 11.6 | Test of a Single Variance A test of a single variance assumes that the underlying distribution is normal. The null and alternative hypotheses are stated in terms of the population variance or population standard deviation. The test statistic is 658 where • n = the total number of data, s2 = sample variance, and • • σ2 = population variance. Chapter 11 | The Chi-Square Distribution ⎞ ⎠s2 ⎛ ⎝n - 1 σ 2 You may think of s as the random variable in this test. The number of degrees of freedom is df = n – 1. A test of a single variance may be right-tailed, left-tailed, or two-tailed. Example 11.10 will show you how to set up the null and alternative hypotheses. The null and alternative hypotheses contain statements about the population variance. Example 11.10 Math instructors are not only interested in how their students do on exams, on average, but how the exam scores vary. To many instructors, the variance, or standard deviation, may be more important than the average. Suppose a math instructor believes that the standard deviation for his final exam is five points. One of his best students thinks otherwise. The student claims that the standard deviation is more than five points. If the student were to conduct a hypothesis test, what would the null and alternative hypotheses be? Solution 11.10 Even though we |
are given the population standard deviation, we can set up the test using the population variance as follows: • H0: σ2 = 52 • Ha: σ2 > 52 11.10 A scuba instructor wants to record the collective depths each of his students dives during their checkout. He is interested in how the depths vary, even though everyone should have been at the same depth. He believes the standard deviation is three feet. His assistant thinks the standard deviation is less than three feet. If the instructor were to conduct a test, what would the null and alternative hypotheses be? Example 11.11 With individual lines at its various windows, a post office finds that the standard deviation for normally distributed waiting times for customers on Friday afternoon is 7.2 minutes. The post office experiments with a single, main waiting line and finds that for a random sample of 25 customers, the waiting times for customers have a standard deviation of 3.5 minutes. With a significance level of 5 percent, test the claim that a single line causes lower variation among waiting times (shorter waiting times) for customers. Solution 11.11 Since the claim is that a single line causes less variation, this is a test of a single variance. The parameter is the population variance, σ2, or the population standard deviation, σ. Random variable: The sample standard deviation, s, is the random variable. Let s = standard deviation for the waiting times. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 659 • H0: σ2 = 7.22 • Ha: σ2 < 7.22 The word less tells you this is a left-tailed test. Distribution for the test: χ24 2, where • n = the number of customers sampled, and • df = n – 1 = 25 – 1 = 24. Calculate the test statistic: χ 2 = (n − 1)s2 σ 2 = (25 − 1)(3.5)2 7.22 = 5.67 where n = 25, s = 3.5, and σ = 7.2. Graph Figure 11.8 Probability statement: p-value = P ( χ2 < 5.67) = 0.000042 Compare α and the p-value: α = 0.05 p-value = 0.000042 α > p-value Make a decision: Since |
α > p-value, reject H0. This means that you reject σ2 = 7.22. In other words, you do not think the variation in waiting times is 7.2 minutes; you think the variation in waiting times is less. Conclusion: At a 5 percent level of significance, from the data, there is sufficient evidence to conclude that a single line causes a lower variation among the waiting times or with a single line, the customer waiting times vary less than 7.2 minutes. In 2nd DISTR, use 7:χ2cdf. The syntax is (lower, upper, df) for the parameter list. For Example 11.11, χ2cdf(-1E99,5.67,24). The p-value = 0.000042. 11.11 The FCC conducts broadband speed tests to measure how much data per second passes between a consumer’s computer and the internet. As of August 2012, the standard deviation of internet speeds across internet service providers (ISPs) was 12.2 percent. Suppose a sample of 15 ISPs is taken, and the standard deviation is 13.2. An analyst 660 Chapter 11 | The Chi-Square Distribution claims that the standard deviation of speeds is more than what was reported. State the null and alternative hypotheses, compute the degrees of freedom, calculate the test statistic, sketch the graph of the p-value, and draw a conclusion. Test at the 1 percent significance level. 11.7 | Lab 1: Chi-Square Goodness-of-Fit This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 661 11.1 Lab 1: Chi-Square Goodness-of-Fit Student Learning Outcome • The student will evaluate data collected to determine if they fit either the uniform or exponential distributions. Collect the Data Go to your local supermarket. Ask 30 people as they leave for the total amount on their grocery receipts. Or, ask 3 cashiers for the last 10 amounts. Be sure to include the express lane, if it is open. NOTE You may need to combine two categories so that each cell has an expected value of at least five. 1. Record the values. __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ |
__________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ Table 11.23 2. Construct a histogram of the data. Make five to six intervals. Sketch the graph using a ruler and pencil. Scale the axes. Figure 11.9 3. Calculate the following: a. b. c. x¯ = ________ s = ________ s2 = ________ 662 Chapter 11 | The Chi-Square Distribution Uniform Distribution Test to see if grocery receipts follow the uniform distribution. 1. Using your lowest and highest values, X ~ U (_______, _______). 2. Divide the distribution into fifths. 3. Calculate the following: a. lowest value = _________ b. 20th percentile = _________ c. 40th percentile = _________ d. 60th percentile = _________ e. 80th percentile = _________ f. highest value = _________ 4. For each fifth, count the observed number of receipts and record it. Then determine the expected number of receipts and record that. Fifth Observed Expected 1st 2nd 3rd 4th 5th Table 11.24 5. H0: ________ 6. Ha: ________ 7. What distribution should you use for a hypothesis test? 8. Why did you choose this distribution? 9. Calculate the test statistic. 10. Find the p-value. 11. Sketch a graph of the situation. Label and scale the x-axis. Shade the area corresponding to the p-value. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 663 Figure 11.10 12. State your decision. 13. State your conclusion in a complete sentence. Exponential Distribution Test to see if grocery receipts follow the exponential distribution with decay parameter 1 ¯ x. as the decay parameter, X ~ Exp(_________). 1. Using 1 x¯ 2. Calculate the following: a. lowest value = ________ b. first quartile = ________ c. 37th percentile = ________ d. median = ________ e. 63rd percentile = ________ f. 3rd quartile = ________ g. highest value = ________ 3. For each cell, count the observed number of receipts and record it. Then |
determine the expected number of receipts and record that. Cell Observed Expected 1st 2nd 3rd 4th 5th 6th Table 11.25 4. H0: ________ 664 Chapter 11 | The Chi-Square Distribution 5. Ha: ________ 6. What distribution should you use for a hypothesis test? 7. Why did you choose this distribution? 8. Calculate the test statistic. 9. Find the p-value. 10. Sketch a graph of the situation. Label and scale the x-axis. Shade the area corresponding to the p-value. Figure 11.11 11. State your decision. 12. State your conclusion in a complete sentence. Discussion Questions 1. Did your data fit either distribution? If so, which? 2. In general, do you think it’s likely that data could fit more than one distribution? In complete sentences, explain why or why not. 11.8 | Lab 2: Chi-Square Test of Independence This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 665 11.2 Lab 2: Chi-Square Test of Independence Student Learning Outcome • The student will evaluate if there is a significant relationship between favorite type of snack and gender. Collect the Data 1. Using your class as a sample, complete the following chart. Ask one another what your favorite snack is, then total the results. NOTE You may need to combine two food categories so that each cell has an expected value of at least five. Sweets (candy & baked goods) Ice Cream Chips & Pretzels Fruits & Vegetables Total Male Female Total Table 11.26 Favorite Type of Snack 2. Looking at Table 11.26, does it appear to you that there is a dependence between gender and favorite type of snack food? Why or why not? Hypothesis Test Conduct a hypothesis test to determine if the factors are independent: 1. H0: ________ 2. Ha: ________ 3. What distribution should you use for a hypothesis test? 4. Why did you choose this distribution? 5. Calculate the test statistic. 6. Find the p value. 7. Sketch a graph of the situation. Label and scale the x axis. Shade the area corresponding to the p value. 666 Chapter 11 | The Chi-Square Distribution Figure 11.12 8. State your decision. 9. State your conclusion in a complete sentence. Discussion Questions |
1. Is the conclusion of your study the same as or different from your answer to answer to Question 2 under Collect the Data? 2. Why do you think that occurred? This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 667 KEY TERMS contingency table a table that displays sample values for two different factors that may be dependent or contingent on each other; facilitates determining conditional probabilities CHAPTER REVIEW 11.1 Facts About the Chi-Square Distribution The chi-square distribution is a useful tool for assessment in a series of problem categories. These problem categories include primarily (i) whether a data set fits a particular distribution, (ii) whether the distributions of two populations are the same, (iii) whether two events might be independent, and (iv) whether there is a different variability than expected within a population. An important parameter in a chi-square distribution is the degrees of freedom df in a given problem. The random variable in the chi-square distribution is the sum of squares of df standard normal variables, which must be independent. The key characteristics of the chi-square distribution also depend directly on the degrees of freedom. The chi-square distribution curve is skewed to the right, and its shape depends on the degrees of freedom df. For df > 90, the curve approximates the normal distribution. Test statistics based on the chi-square distribution are always greater than or equal to zero. Such application tests are almost always right-tailed tests. 11.2 Goodness-of-Fit Test To assess whether a data set fits a specific distribution, you can apply the goodness-of-fit hypothesis test that uses the chi-square distribution. The null hypothesis for this test states that the data come from the assumed distribution. The test compares observed values against the values you would expect to have if your data followed the assumed distribution. The test is almost always right-tailed. Each observation or cell category must have an expected value of at least five. 11.3 Test of Independence To assess whether two factors are independent, you can apply the test of independence that uses the chi-square distribution. The null hypothesis for this test states that the two factors are independent. The test compares observed values to expected values. The test is right-tailed. Each observation or cell category must have an expected value of at least five. 11.4 Test for Homogeneity To assess whether two data sets are derived from the same distribution, |
which need not be known, you can apply the test for homogeneity that uses the chi-square distribution. The null hypothesis for this test states that the populations of the two data sets come from the same distribution. The test compares the observed values against the expected values if the two populations followed the same distribution. The test is right-tailed. Each observation or cell category must have an expected value of at least five. 11.5 Comparison of the Chi-Square Tests The goodness-of-fit test is typically used to determine if data fits a particular distribution. The test of independence makes use of a contingency table to determine the independence of two factors. The test for homogeneity determines whether two populations come from the same distribution, even if this distribution is unknown. 11.6 Test of a Single Variance To test variability, use the chi-square test of a single variance. The test may be left-, right-, or two-tailed, and its hypotheses are always expressed in terms of the variance or standard deviation. FORMULA REVIEW 11.1 Facts About the Chi-Square Distribution χ2 = (Z1)2 + (Z2)2 +... (Zdf)2 chi-square distribution random variable μχ2 = df chi-square distribution population mean 668 Chapter 11 | The Chi-Square Distribution ⎠ chi-square distribution population standard ⎝d f ⎞ σ χ 2 = 2⎛ deviation 11.2 Goodness-of-Fit Test (O − E)2 E ∑ k goodness-of-fit test statistic where O: observed values E: expected values k: number of different data cells or categories df = k − 1 degrees of freedom 11.4 Test for Homogeneity Homogeneity test statistic where O = (O − E)2 E ∑ i ⋅ j observed values E = expected values i = number of rows in data contingency table j = number of columns in data contingency table df = (i −1)(j −1) degrees of freedom 11.6 Test of a Single Variance χ 2 = (n − 1) ⋅ s2 σ 2 Test of a single variance statistic 11.3 Test of Independence Test of Independence • The number of degrees of freedom is equal to (number of columns–1)(number of rows–1). where n: sample size s: sample standard deviation σ: population standard deviation df = n – 1 degrees of freedom (O – E |
)2 E • The test statistic is Σ (i ⋅ j) observed values, E = expected values, i = the number of rows in the table, and j = the number of columns in the table. where O = • If the null hypothesis is true, the expected number E = (row total)(column total) total surveyed. PRACTICE 11.1 Facts About the Chi-Square Distribution Test of a Single Variance • Use the test to determine variation. • The degrees of freedom is the number of samples – 1. • The test statistic is (n – 1) ⋅ s2, where n = the total σ 2 number of data, s2 = sample variance, and σ2 = population variance. • The test may be left-, right-, or two-tailed. 1. If the number of degrees of freedom for a chi-square distribution is 25, what is the population mean and standard deviation? 2. If df > 90, the distribution is _____________. If df = 15, the distribution is ________________. 3. When does the chi-square curve approximate a normal distribution? 4. Where is μ located on a chi-square curve? This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 669 5. Is it more likely the df is 90, 20, or 2 in the graph? Figure 11.13 11.2 Goodness-of-Fit Test Determine the appropriate test to be used in the next three exercises. 6. An archeologist is calculating the distribution of the frequency of the number of artifacts she finds in a dig site. Based on previous digs, the archeologist creates an expected distribution broken down by grid sections in the dig site. Once the site has been fully excavated, she compares the actual number of artifacts found in each grid section to see if her expectation was accurate. 7. An economist is deriving a model to predict outcomes on the stock market. He creates a list of expected points on the stock market index for the next two weeks. At the close of each day’s trading, he records the actual points on the index. He wants to see how well his model matched what actually happened. 8. A personal trainer is putting together a weight-lifting program for her clients. For a 90-day program, she expects each client to lift a specific maximum weight each week. As |
she goes along, she records the actual maximum weights her clients lifted. She wants to know how well her expectations met with what was observed. Use the following information to answer the next five exercises. A teacher predicts the distribution of grades on the final exam. The predictions are shown in Table 11.27. Grade Proportion A B C D 0.25 0.30 0.35 0.10 Table 11.27 The actual distribution for a class of 20 is in Table 11.28. Grade Frequency A 7 Table 11.28 670 Chapter 11 | The Chi-Square Distribution Grade Frequency B C D 7 5 1 Table 11.28 9. d f = ______ 10. State the null and alternative hypotheses. 11. χ2 test statistic = ______ 12. p-value = ______ 13. At the 5 percent significance level, what can you conclude? Use the following information to answer the next nine exercises. The cumulative number of cases of a chronic disease reported for Santa Clara County is broken down by ethnicity as in Table 11.29. Ethnicity White Hispanic Number of Cases 2,229 1,157 Black/African American 457 Asian, Pacific Islander 232 Total = 4,075 Table 11.29 The percentage of each ethnic group in Santa Clara County is as in Table 11.30. Ethnicity White Hispanic Black/African American Asian, Pacific Islander Table 11.30 % of Total County Population Number Expected (round to two decimal places) 1,748.18 42.9% 26.7% 2.6% 27.8% Total = 100% 14. If the ethnicities of patients followed the ethnicities of the total county population, fill in the expected number of cases per ethnic group. Perform a goodness-of-fit test to determine whether the occurrence of disease cases follows the ethnicities of the general population of Santa Clara County. 15. H0: _______ 16. Ha: _______ This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 671 17. Is this a right-tailed, left-tailed, or two-tailed test? 18. degrees of freedom = _______ 19. χ2 test statistic = _______ 20. p-value = _______ 21. Graph the situation. Label and scale the horizontal axis. Mark the mean and test statistic. Shade in the region corresponding to the p-value. Figure 11.14 Let α = 0 |
.05. Decision: ________________ Reason for the decision: ________________ Conclusion (write out in complete sentences): ________________ 22. Does it appear that the pattern of disease cases in Santa Clara County corresponds to the distribution of ethnic groups in this county? Why or why not? 11.3 Test of Independence Determine the appropriate test to be used in the next three exercises. 23. A pharmaceutical company is interested in the relationship between age and presentation of symptoms for a common viral infection. A random sample is taken of 500 people with the infection across different age groups. 24. The owner of a baseball team is interested in the relationship between player salaries and team winning percentage. He takes a random sample of 100 players from different organizations. 25. A marathon runner is interested in the relationship between the brand of shoes runners wear and their run times. She takes a random sample of 50 runners and records their run times and the brand of shoes they were wearing. Use the following information to answer the next seven exercises: Transit Railroads is interested in the relationship between travel distance and the ticket class purchased. A random sample of 200 passengers is taken. Table 11.31 shows the results. The railroad wants to know if a passenger’s choice in ticket class is independent of the distance the passenger must travel. Traveling Distance Third Class Second Class First Class Total 1–100 miles 101–200 miles 201–300 miles Table 11.31 21 18 16 14 16 17 6 8 15 41 42 48 672 Chapter 11 | The Chi-Square Distribution Traveling Distance Third Class Second Class First Class Total 301–400 miles 401–500 miles Total Table 11.31 12 6 73 14 6 67 21 10 60 47 22 200 26. State the hypotheses. H0: _______ Ha: _______ 27. df = _______ 28. How many passengers are expected to travel between 201 and 300 miles and purchase second-class tickets? 29. How many passengers are expected to travel between 401 and 500 miles and purchase first-class tickets? 30. What is the test statistic? 31. What is the p-value? 32. What can you conclude at the 5 percent level of significance? Use the following information to answer the next ten exercises. An article in the New England Journal of Medicine discussed a study on people who used a certain product in California and Hawaii. In one part of the report, the self-reported ethnicity and product-use levels per day were given. Of the people using the product at most 10 times per day, there were 9, |
886 African Americans, 2,745 Native Hawaiians, 12,831 Latinos, 8,378 Japanese Americans, and 7,650 whites. Of the people using the product 11 to 20 times per day, there were 6,514 African Americans, 3,062 Native Hawaiians, 4,932 Latinos, 10,680 Japanese Americans, and 9,877 whites. Of the people using the product 21 to 30 times per day, there were 1,671 African Americans, 1,419 Native Hawaiians, 1,406 Latinos, 4,715 Japanese Americans, and 6,062 whites. Of the people using the product at least 31 times per day, there were 759 African Americans, 788 Native Hawaiians, 800 Latinos, 2,305 Japanese Americans, and 3,970 whites. 33. Complete the table. Product use Per Day African American Native Hawaiian Latino Japanese American White TOTALS 1–10 11–20 21–30 31+ TOTALS Table 11.32 34. State the hypotheses. H0: _______ Ha: _______ 35. Enter expected values in Table 11.32. Round to two decimal places. Calculate the following values. 36. df = _______ 37. χ 2 test statistic = ______ 38. p-value = ______ This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 673 39. Is this a right-tailed, left-tailed, or two-tailed test? Explain why. 40. Graph the situation. Label and scale the horizontal axis. Mark the mean and test statistic. Shade in the region corresponding to the p-value. Figure 11.15 State the decision and conclusion (in a complete sentence) for the following levels of α. 41. α = 0.05 a. Decision: ___________________ b. Reason for the decision: ___________________ c. Conclusion (write out in a complete sentence): ___________________ 42. α = 0.01 a. Decision: ___________________ b. Reason for the decision: ___________________ c. Conclusion (write out in a complete sentence): ___________________ 11.4 Test for Homogeneity 43. A math teacher wants to see if two of her classes have the same distribution of test scores. What test should she use? 44. What are the null and alternative hypotheses for Exercise 11.43? 45. A market researcher wants to see if two different stores |
have the same distribution of sales throughout the year. What type of test should he use? 46. A meteorologist wants to know if East and West Australia have the same distribution of storms. What type of test should she use? 47. What condition must be met to use the test for homogeneity? Use the following information to answer the next five exercises. Do private practice doctors and hospital doctors have the same distribution of working hours? Suppose that a sample of 100 private practice doctors and 150 hospital doctors are selected at random and asked about the number of hours a week they work. The results are shown in Table 11.33. 20–30 30–40 40–50 50–60 Private Practice 16 Hospital 8 40 44 38 59 6 39 Table 11.33 48. State the null and alternative hypotheses. 49. df = _______ 50. What is the test statistic? 674 Chapter 11 | The Chi-Square Distribution 51. What is the p-value? 52. What can you conclude at the 5 percent significance level? 11.5 Comparison of the Chi-Square Tests 53. Which test do you use to decide whether an observed distribution is the same as an expected distribution? 54. What is the null hypothesis for the type of test from Exercise 11.53? 55. Which test would you use to decide whether two factors have a relationship? 56. Which test would you use to decide if two populations have the same distribution? 57. How are tests of independence similar to tests for homogeneity? 58. How are tests of independence different from tests for homogeneity? 11.6 Test of a Single Variance Use the following information to answer the next three exercises. An archer’s standard deviation for his hits is six, where the data are measured in distance from the center of the target. An observer claims the standard deviation is less than six. 59. What type of test should be used? 60. State the null and alternative hypotheses. 61. Is this a right-tailed, left-tailed, or two-tailed test? Use the following information to answer the next three exercises. The standard deviation of heights for students in a school is 0.81. A random sample of 50 students is taken, and the standard deviation of heights of the sample is 0.96. A researcher in charge of the study believes the standard deviation of heights for the school is greater than 0.81. 62. What type of test should be used? 63. State the null and alternative hypotheses. 64. df = |
________ Use the following information to answer the next four exercises: The average waiting time in a doctor’s office varies. The standard deviation of waiting times in a doctor’s office is 3.4 minutes. A random sample of 30 patients in the doctor’s office has a standard deviation of waiting times of 4.1 minutes. One doctor believes the variance of waiting times is greater than originally thought. 65. What type of test should be used? 66. What is the test statistic? 67. What is the p-value? 68. What can you conclude at the 5 percent significance level? HOMEWORK 11.1 Facts About the Chi-Square Distribution Decide whether the following statements are true or false. 69. As the number of degrees of freedom increases, the graph of the chi-square distribution looks more and more symmetrical. 70. The standard deviation of the chi-square distribution is twice the mean. 71. The mean and the median of the chi-square distribution are the same if df = 24. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 675 11.2 Goodness-of-Fit Test For each problem, use a solution sheet to solve the hypothesis test problem. Go to Appendix E for the chi-square solution sheet. Round expected frequency to two decimal places. 72. A six-sided die is rolled 120 times. Fill in the expected frequency column. Then, conduct a hypothesis test to determine if the die is fair. The data in Table 11.34 are the result of the 120 rolls. Face Value Frequency Expected Frequency 1 2 3 4 5 6 Table 11.34 15 29 16 15 30 15 73. The marital status distribution of the U.S. male population, ages 15 and older, is as shown in Table 11.35. Marital Status % Expected Frequency Never Married Married Widowed 31.3% 56.1% 2.5% Divorced/Separated 10.1% Table 11.35 Suppose that a random sample of 400 U.S. males, 18 to 24 years old, yielded the following frequency distribution. We are interested in whether this age group of males fits the distribution of the U.S. adult population. Calculate the frequency one would expect when surveying 400 people. Fill in Table 11.35, rounding to two decimal places. Marital Status Frequency Never Married |
Married Widowed 140 238 2 Divorced/Separated 20 Table 11.36 Use the following information to answer the next two exercises. The columns in Table 11.37 contain the Race/Ethnicity of U.S. Public Schools for a recent year, the percentages for the Advanced Placement Examinee Population for that class, and the Overall Student Population. Suppose the right column contains the results of a survey of 1,000 local students from that year who took an AP exam. 676 Chapter 11 | The Chi-Square Distribution Race/Ethnicity AP Examinee Population Overall Student Population Survey Frequency Asian, Asian American, or Pacific Islander Black or African American Hispanic or Latino 10.2% 8.2% 15.5% American Indian or Alaska Native 0.6% White Not Reported/Other Table 11.37 59.4% 6.1% 5.4% 14.5% 15.9% 1.2% 61.6% 1.4% 113 94 136 10 604 43 74. Perform a goodness-of-fit test to determine whether the local results follow the distribution of the U.S. overall student population based on ethnicity. 75. Perform a goodness-of-fit test to determine whether the local results follow the distribution of U.S. AP examinee population, based on ethnicity. 76. The city of South Lake Tahoe, California, has an Asian population of 1,419 out of a total population of 23,609. Suppose that a survey of 1,419 self-reported Asians in the borough of Manhattan in the New York City area yielded the data in Table 11.38. Conduct a goodness-of-fit test to determine if the self-reported subgroups of Asians in Manhattan fit that of the South Lake Tahoe area. Race South Lake Tahoe Frequency Manhattan Frequency Asian Indian 131 Chinese 118 Filipino 1,045 Japanese Korean 80 12 Vietnamese 9 Other 24 Table 11.38 174 557 518 54 29 21 66 Use the following information to answer the next two exercises. UCLA conducted a survey of more than 263,000 college freshmen from 385 colleges in fall 2005. The results of students’ expected majors by gender were reported in The Chronicle of Higher Education (2/2/2006). Suppose a survey of 5,000 graduating females and 5,000 graduating males was done as a follow-up last year to determine what their actual majors were. The results are shown in the tables for Exercise 11.77 and Exercise 11.78 |
. The second column in each table does not add to 100 percent because of rounding. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 677 77. Conduct a goodness-of-fit test to determine if the actual college majors of graduating females fit the distribution of their expected majors. Major Females—Expected Major Females—Actual Major Arts & Humanities 14% Biological Sciences 8.4% Business Education Engineering 13.1% 13% 2.6% Physical Sciences 2.6% Professional 18.9% Social Sciences Technical Other Undecided Table 11.39 13% 0.4% 5.8% 8% 670 410 685 650 145 125 975 605 15 300 420 78. Conduct a goodness-of-fit test to determine if the actual college majors of graduating males fit the distribution of their expected majors. Major Males—Expected Major Males—Actual Major Arts & Humanities 11% Biological Sciences 6.7% Business Education Engineering 22.7% 5.8% 15.6% Physical Sciences 3.6% Professional Social Sciences Technical Other Undecided Table 11.40 9.3% 7.6% 1.8% 8.2% 6.6% 600 330 1,130 305 800 175 460 370 90 400 340 Read the statement and decide whether it is true or false. 79. In a goodness-of-fit test, the expected values are the values we would expect if the null hypothesis were true. 80. In general, if the observed values and expected values of a goodness-of-fit test are not close together, then the test statistic can get very large and on a graph will be way out in the right tail. 81. Use a goodness-of-fit test to determine if high school principals believe that students are absent equally during the week. 82. The test to use to determine if a six-sided die is fair is a goodness-of-fit test. 83. In a goodness-of-fit test, if the p-value is 0.0113, in general, do not reject the null hypothesis. 678 Chapter 11 | The Chi-Square Distribution 84. A sample of 212 commercial businesses was surveyed for recycling one commodity; a commodity here means any one type of recyclable material such as plastic or aluminum. Table 11.41 shows the business categories in the survey, the sample size of each category, and |
the number of businesses in each category that recycle one commodity. Based on the study, on average half of the businesses were expected to be recycling one commodity. As a result, the last column shows the expected number of businesses in each category that recycle one commodity. At the 5 percent significance level, perform a hypothesis test to determine if the observed number of businesses that recycle one commodity follows the uniform distribution of the expected values. Business Type Office Retail/ Wholesale Food/ Restaurants Manufacturing/ Medical Hotel/Mixed Table 11.41 Number in Class Observed Number that Recycle One Commodity Expected Number that Recycle One Commodity 35 48 53 52 24 19 27 35 21 9 17.5 24 26.5 26 12 85. Table 11.42 contains information from a survey of 499 participants classified according to their age groups. The researchers making the survey wanted to find out how many people were diagnosed with a particular disease within the last year. The second column shows the percentage of people with the disease per age class among the study participants. The last column comes from a different study at the national level that shows the corresponding percentages of people with the disease in the same age classes in the United States. Perform a hypothesis test at the 5 percent significance level to determine whether the survey participants are a representative sample of the people with the disease nationwide. Age Class (years) % of People Diagnosed % of Expected U.S. Average 20–30 31–40 41–50 51–60 61–70 Table 11.42 75% 26.5% 13.6% 21.9% 21% 32.6% 32.6% 36.6% 36.6% 39.7% 11.3 Test of Independence For each problem, use a solution sheet to solve the hypothesis test problem. Go to Appendix E for the chi-square solution sheet. Round expected frequency to two decimal places. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 679 86. A recent debate about where in the U.S. skiers believe the skiing is best prompted the following survey. Test to see if the best ski area is independent of the level of the skier. U.S. Ski Area Beginner Intermediate Advanced Tahoe Utah Colorado Table 11.43 20 10 10 30 30 40 40 60 50 87. Car manufacturers are interested in whether there is a relationship between the size of car an |
individual drives and the number of people in the driver’s family—that is, whether car size and family size are independent. To test this, suppose that 800 car owners were randomly surveyed with the results in Table 11.44. Conduct a test of independence. Family Size Sub & Compact Mid-Size Full-Size Van & Truck 1 2 3–4 5+ Table 11.44 20 20 20 20 35 50 50 30 40 70 100 70 35 80 90 70 88. College students may be interested in whether their majors have any effect on starting salaries after graduation. Suppose that 300 recent graduates were surveyed as to their majors in college and their starting salaries after graduation. Table 11.45 shows the data. Conduct a test of independence. Major < $50,000 $50,000–$68,999 $69,000 + English 5 Engineering 10 Nursing Business 10 10 Psychology 20 Table 11.45 20 30 15 20 30 5 60 15 30 20 89. Some travel agents claim that honeymoon hotspots vary according to age of the bride. Suppose that 280 recent brides were interviewed as to where they spent their honeymoons. The information is given in Table 11.46. Conduct a test of independence. Location 20–29 30–39 40–49 50+ Niagara Falls 15 Poconos Europe 15 10 Virgin Islands 20 Table 11.46 25 25 25 25 25 25 15 15 20 10 5 5 680 Chapter 11 | The Chi-Square Distribution 90. A manager of a sports club keeps information concerning the main sport in which members participate and their ages. To test whether there is a relationship between the age of a member and his or her choice of sport, 643 members of the sports club are randomly selected. Conduct a test of independence. Sport 18–25 26–30 31–40 41+ Racquetball 42 Tennis Swimming 58 72 Table 11.47 58 76 60 30 38 65 46 65 33 91. A major food manufacturer is concerned that the sales for its skinny french fries have been decreasing. As a part of a feasibility study, the company conducts research into the types of fries sold across the country to determine if the type of fries sold is independent of the area of the country. The results of the study are shown in Table 11.48. Conduct a test of independence. Type of Fries Northeast South Central West Skinny Fries Curly Fries Steak Fries 70 100 20 Table 11.48 50 60 40 20 15 10 25 30 10 92. According to Dan Leonard, an independent |
insurance agent in the Buffalo, New York area, the following is a breakdown of the amount of life insurance purchased by males in the following age groups. He is interested in whether the age of the male and the amount of life insurance purchased are independent events. Conduct a test for independence. Age of Males None < $200,000 $200,000–$400,000 $401,001–$1,000,000 $1,000,001+ 20–29 30–39 40–49 50+ Table 11.49 40 35 20 40 15 5 0 30 40 20 30 15 0 20 0 15 5 10 30 10 93. Suppose that 600 thirty-year-olds were surveyed to determine whether there is a relationship between the level of education an individual has and salary. Conduct a test of independence. Annual Salary Not a High School Graduate High School Graduate College Graduate Masters or Doctorate < $30,000 15 $30,000–$40,000 20 $40,000–$50,000 10 $50,000–$60,000 5 $60,000+ 0 Table 11.50 25 40 20 10 5 10 70 40 20 10 5 30 55 60 150 This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 681 Read the statement and decide whether it is true or false. 94. The number of degrees of freedom for a test of independence is equal to the sample size minus one. 95. The test for independence uses tables of observed and expected data values. 96. The test to use when determining if the college or university a student chooses to attend is related to his or her socioeconomic status is a test for independence. 97. In a test of independence, the expected number is equal to the row total multiplied by the column total divided by the total surveyed. 98. An ice cream maker performs a nationwide survey about favorite flavors of ice cream in different geographic areas of the United States. Based on Table 11.51, do the numbers suggest that geographic location is independent of favorite ice cream flavors? Test at the 5 percent significance level. U.S. Region/ Flavor West Midwest East South Column Total Table 11.51 Strawberry Chocolate Vanilla Rocky Road Mint Chocolate Chip Pistachio Row Total 12 10 8 15 45 21 32 31 28 22 22 27 30 112 101 19 11 8 8 46 15 15 15 15 60 8 6 7 6 27 97 96 96 102 391 99. Table |
11.52 provides results of a recent survey of the youngest online entrepreneurs whose net worth is estimated at one million dollars or more. Their ages range from 17 to 30. Each cell in the table illustrates the number of entrepreneurs who correspond to the specific age group and their net worth. Are the ages and net worth independent? Perform a test of independence at the 5 percent significance level. Age Group/Net Worth Value (in millions of U.S. dollars) 1–5 6–24 ≥25 Row Total 17–25 26–30 Column Total Table 11.52 8 6 7 5 14 12 5 9 14 20 20 40 100. A 2013 poll in California surveyed people about a new tax. The results are presented in Table 11.53 and are classified by ethnic group and response type. Are the poll responses independent of the participants’ ethnic group? Conduct a test of independence at the 5 percent significance level. Opinion/ Ethnicity Asian American White/NonHispanic African American Against Tax In Favor of Tax No Opinion 48 54 16 Column Total 118 Table 11.53 433 234 43 710 41 24 16 81 Latino 160 147 19 326 Row Total 682 459 94 1,235 682 Chapter 11 | The Chi-Square Distribution 11.4 Test for Homogeneity For each word problem, use a solution sheet to solve the hypothesis test problem. Go to Appendix E for the chi-square solution sheet. Round expected frequency to two decimal places. 101. A psychologist is interested in testing whether there is a difference in the distribution of personality types for business majors and social science majors. The results of the study are shown in Table 11.54. Conduct a test of homogeneity. Test at a 5 percent level of significance. Open Conscientious Extrovert Agreeable Neurotic Business 41 Social Science 72 52 75 46 63 61 80 58 65 Table 11.54 102. Do men and women select different breakfasts? The breakfasts ordered by randomly selected men and women at a popular breakfast place are shown in Table 11.55. Conduct a test for homogeneity at a 5 percent level of significance. French Toast Pancakes Waffles Omelettes Men 47 Women 65 Table 11.55 35 59 28 55 53 60 103. A fisherman is interested in whether the distribution of fish caught in Green Valley Lake is the same as the distribution of fish caught in Echo Lake. Of the 191 randomly selected fish caught in Green Valley Lake, 105 were rainbow trout, 27 were other trout, 35 were bass, and 24 were catfish. |
Of the 293 randomly selected fish caught in Echo Lake, 115 were rainbow trout, 58 were other trout, 67 were bass, and 53 were catfish. Perform a test for homogeneity at a 5 percent level of significance. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 683 104. In 2007, the United States had 1.5 million homeschooled students, according to the U.S. National Center for Education Statistics. In Table 11.56, you can see that parents decide to homeschool their children for different reasons, and some reasons are ranked by parents as more important than others. According to the survey results shown in the table, is the distribution of applicable reasons the same as the distribution of the most important reason? Provide your assessment at the 5 percent significance level. Did you expect the result you obtained? Applicable Reason (in thousands of respondents) Most Important Reason (in thousands of respondents) Reasons for Homeschooling Concern About the Environment of Other Schools Dissatisfaction with Academic Instruction at Other Schools To Provide Religious or Moral Instruction Child Has Special Needs, Other Than Physical or Mental Nontraditional Approach to Child’s Education Other Reasons (e.g., finances, travel, family time, etc.) 1,321 1,096 1,257 315 984 485 Column Total 5,458 Table 11.56 Row Total 1,630 1,354 1,797 370 1,083 701 6,935 309 258 540 55 99 216 1,477 105. When looking at energy consumption, we are often interested in detecting trends over time and how they correlate among different countries. The information in Table 11.57 shows the average energy use in units of kg of oil equivalent per capita in the United States and the joint European Union countries (EU) for the six-year period 2005 to 2010. Do the energy use values in these two areas come from the same distribution? Perform the analysis at the 5 percent significance level. European Union United States Row Total Year 2010 2009 2008 2007 2006 2005 3,413 3,302 3,505 3,537 3,595 3,613 7,164 7,057 7,488 7,758 7,697 7,847 Column Total 20,965 45,011 Table 11.57 10,557 10,359 10,993 11,295 11,292 11,460 65,976 684 Chapter 11 | The |
Chi-Square Distribution 106. The Insurance Institute for Highway Safety collects safety information about all types of cars every year and publishes a report of top safety picks among all cars, makes, and models. Table 11.58 presents the number of top safety picks in six car categories for the two years 2009 and 2013. Analyze the table data to conclude whether the distribution of cars that earned the top safety picks safety award has remained the same between 2009 and 2013. Derive your results at the 5 percent significance level. Year/Car Type 2009 2013 Column Total Table 11.58 Small 12 31 43 MidSize 22 30 52 Large Small SUV Mid-Size SUV Large SUV 10 19 29 10 11 21 27 29 56 6 4 10 Row Total 87 124 211 11.5 Comparison of the Chi-Square Tests For each word problem, use a solution sheet to solve the hypothesis test problem. Go to Appendix E for the chi-square solution sheet. Round expected frequency to two decimal places. 107. Is there a difference between the distribution of community college statistics students and the distribution of university statistics students in what technology they use on their homework? Of some randomly selected community college students, 43 used a computer, 102 used a calculator with built-in statistics functions, and 65 used a table from the textbook. Of some randomly selected university students, 28 used a computer, 33 used a calculator with built-in statistics functions, and 40 used a table from the textbook. Conduct an appropriate hypothesis test using a 0.05 level of significance. Read the statement and decide whether it is true or false. 108. If df = 2, the chi-square distribution has a shape that reminds us of the exponential. 11.6 Test of a Single Variance Use the following information to answer the next 12 exercises. Suppose an airline claims that its flights are consistently on time with an average delay of at most 15 minutes. It claims that the average delay is so consistent that the variance is no more than 150 minutes. Doubting the consistency part of the claim, a disgruntled traveler calculates the delays for his next 25 flights. The average delay for those 25 flights is 22 minutes with a standard deviation of 15 minutes. 109. Is the traveler disputing the claim about the average or about the variance? 110. A sample standard deviation of 15 minutes is the same as a sample variance of __________ minutes. 111. Is this a right-tailed, left-tailed, or two-tailed test? 112. H0: __________ 113. df = ________ 114 |
. chi-square test statistic = ________ 115. p-value = ________ 116. Graph the situation. Label and scale the horizontal axis. Mark the mean and test statistic. Shade the p-value. 117. Let α = 0.05 Decision: ________ Conclusion (write out in a complete sentence): ________ 118. How did you know to test the variance instead of the mean? 119. If an additional test were done on the claim of the average delay, which distribution would you use? 120. If an additional test were done on the claim of the average delay, but 45 flights were surveyed, which distribution would you use? For each word problem, use a solution sheet to solve the hypothesis test problem. Go to Appendix E for the chi-square solution sheet. Round expected frequency to two decimal places. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 685 121. A plant manager is concerned her equipment may need recalibrating. It seems that the actual weight of the 15-ounce cereal boxes it fills has been fluctuating. The standard deviation should be at most 0.5 ounces. To determine if the machine needs to be recalibrated, 84 randomly selected boxes of cereal from the next day’s production were weighed. The standard deviation of the 84 boxes was 0.54. Does the machine need to be recalibrated? 122. Consumers may be interested in whether the cost of a particular calculator varies from store to store. Based on surveying 43 stores, which yielded a sample mean of $84 and a sample standard deviation of $12, test the claim that the standard deviation is greater than $15. 123. Isabella, an accomplished Bay-to-Breakers runner, claims that the standard deviation for her time to run the 7.5 mile race is at most 3 minutes. To test her claim, Isabella looks up five of her race times. They are 55 minutes, 61 minutes, 58 minutes, 63 minutes, and 57 minutes. 124. Airline companies are interested in the consistency of the number of babies on each flight so that they have adequate safety equipment. They are also interested in the variation of the number of babies. Suppose that an airline executive believes the average number of babies on flights is six with a variance of nine at most. The airline conducts a survey. The results of the 18 flights surveyed give a sample average of 6.4 |
with a sample standard deviation of 3.9. Conduct a hypothesis test of the airline executive’s belief. 125. The number of births per woman in China is 1.6, down from 5.91 in 1966. This fertility rate has been attributed to the law passed in 1979 restricting births to one per woman. Suppose that a group of students studied whether the standard deviation of births per woman was greater than 0.75. They asked 50 women across China the number of births they had. The results are shown in Table 11.59. Does the students’ survey indicate that the standard deviation is greater than 0.75? # of Births Frequency 0 1 2 3 Table 11.59 5 30 10 5 126. According to an avid aquarist, the average number of fish in a 20-gallon tank is 10, with a standard deviation of two. His friend, also an aquarist, does not believe that the standard deviation is two. She counts the number of fish in 15 other 20-gallon tanks. Based on the results that follow, do you think that the standard deviation is different from two? Data: 11; 10; 9; 10; 10; 11; 11; 10; 12; 9; 7; 9; 11; 10; and 11. 127. The manager of Frenchies is concerned that patrons are not consistently receiving the same amount of French fries with each order. The chef claims that the standard deviation for a 10-ounce order of fries is at most 1.5 ounces, but the manager thinks that it may be higher. He randomly weighs 49 orders of fries, which yields a mean of 11 ounces and a standard deviation of 2 ounces. 128. You want to buy a specific computer. A sales representative of the manufacturer claims that retail stores sell this computer at an average price of $1,249 with a very narrow standard deviation of $25. You find a website that has a price comparison for the same computer at a series of stores as follows: $1,299; $1,229.99; $1,193.08; $1,279; $1,224.95; $1,229.99; $1,269.95; and $1,249. Can you argue that pricing has a larger standard deviation than claimed by the manufacturer? Use the 5 percent significance level. As a potential buyer, what would be the practical conclusion from your analysis? 129. A company packages apples by weight. One of the weight grades is Class A |
apples. Class A apples have a mean weight of 150 grams, and there is a maximum allowed weight tolerance of 5 percent above or below the mean for apples in the same consumer package. A batch of apples is selected to be included in a Class A apple package. Given the following apple weights of the batch, does the fruit comply with the Class A grade weight tolerance requirements? Conduct an appropriate hypothesis test. (a) At the 5 percent significance level (b) At the 1 percent significance level Weights in selected apple batch (in grams): 158; 167; 149; 169; 164; 139; 154; 150; 157; 171; 152; 161; 141; 166; and 172. 686 Chapter 11 | The Chi-Square Distribution BRINGING IT TOGETHER: HOMEWORK 130. a. Explain why a goodness-of-fit test and a test of independence are generally right-tailed tests. b. If you did a left-tailed test, what would you be testing? REFERENCES 11.1 Facts About the Chi-Square Distribution Parade Magazine. (n.d.). Retrieved from https://parade.com/ Santa Clara County Public Health Department. (2011, May). HIV/AIDS epidemiology Santa Clara County. Retrieved from http://sccgov.iqm2.com/Citizens/FileOpen.aspx?Type=4&ID=32762 11.2 Goodness-of-Fit Test College Board. (n.d.). Retrieved from http://www.collegeboard.com Ma, Y., et al. (2003). Association between eating patterns and obesity in a free-living US adult population. American Journal of Epidemiology 158(1), 85–92. Ogden, C. L., et al. (2012, January). Prevalence of obesity in the United States, 2009–2010 (NCHS Data Brief No. 82). Hyattsville, MD: National Center for Health Statistics. Retrieved from http://www.cdc.gov/nchs/data/databriefs/db82.pdf Stevens, B. J. (n.d.). Multi-family and commercial solid waste and recycling survey. Arlington County, VA. Retrieved from http://www.arlingtonva.us/departments/EnvironmentalServices/SW/file84429.pdf U.S. Census Bureau. (n.d.). Current population reports. Retrieved from https://www.census.gov/main/www |
/cprs.html U.S. Census Bureau. (n.d). Retrieved from https://www.census.gov/ 11.3 Test of Independence Harris Interactive. (n.d.). Retrieved from http://www.statisticbrain.com/favorite-flavor-of-ice-cream/ Statistics Brain. (2016, June 29). Youngest online entrepreneurs list. Retrieved from http://www.statisticbrain.com/ youngest-online-entrepreneur-list 11.4 Test for Homogeneity Bielick, S. (2008, December). 1.5 million homeschooled students in the United States in 2007 (NCES 2009030). Washington, DC: National Center pubsinfo.asp?pubid=2009030 for Education Statistics. Retrieved from http://nces.ed.gov/pubsearch/ Bielick, S. (2008, December). 1.5 million homeschooled students in the United States in 2007—supplemental tables (NCES 2009030). Washington, DC: National Center for Education Statistics. Retrieved from http://nces.ed.gov/pubs2009/ 2009030_sup.pdf Insurance Institute for Highway Safety. (n.d.). Ratings. Retrieved from www.iihs.org/iihs/ratings World Bank Group. (2014). Energy use (kg of oil equivalent per capita). Retrieved from http://data.worldbank.org/indicator/ EG.USE.PCAP.KG.OE/countries 11.6 Test of a Single Variance Apple Insider. (n.d.). Retrieved from http://appleinsider.com/mac_price_guide World Bank. (n.d.). Retrieved from http://www.worldbank.org/ This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 687 SOLUTIONS 1 mean = 25 and standard deviation = 7.0711 3 when the number of degrees of freedom is greater than 90 5 df = 2 7 a goodness-of-fit test 9 3 11 2.04 13 We decline to reject the null hypothesis. There is not enough evidence to suggest that the observed test scores are significantly different from the expected test scores. 15 H0: the distribution of disease cases follows the ethnicities of the general population of Santa Clara County. 17 right-tailed 19 2016.136 21 Graph: Check student’ |
s solution. Decision: Reject the null hypothesis. Reason for decision: p-value < alpha Conclusion: The make-up of cases does not fit the ethnicities of the general population of Santa Clara County. 23 a test of independence 25 a test of independence 27 8 29 6.6 31 0.0435 33 Product-use Per Day African American Native Hawaiian Latino Japanese Americans 9,886 6,514 1,671 759 18,830 2,745 3,062 1,419 788 8,014 12,831 8,378 4,932 1,406 800 10,680 4,715 2,305 19,969 26,078 27,559 10,0450 White Totals 7,650 9,877 6,062 3,970 41,490 35,065 15,273 8,622 African American 7,777.57 6,573.16 Native Hawaiian 3,310.11 2797.52 Latino Japanese Americans 8,248.02 10,771.29 6970.76 9,103.29 White 11,383.01 9,620.27 1–10 11–20 21–30 31+ Totals Table 11.60 35 Product Use Per Day 1-10 11-20 Table 11.61 688 Chapter 11 | The Chi-Square Distribution African American 2,863.02 1,616.25 Native Hawaiian 1,218.49 687.87 Latino Japanese Americans 3,036.20 3,965.05 1,714.01 2,238.37 White 4,190.23 2,365.49 Product Use Per Day 21-30 31+ Table 11.61 37 10,301.8 39 right-tailed 41 a. Reject the null hypothesis. b. p-value < alpha c. There is sufficient evidence to conclude that product use is dependent on ethnic group. 43 test for homogeneity 45 test for homogeneity 47 All values in the table must be greater than or equal to five. 49 3 51 0.00005 53 a goodness-of-fit test 55 a test for independence 57 Answers will vary. Sample answer: Tests of independence and tests for homogeneity both calculate the test statistic the same way ∑ (i j) (O - E)2 E. In addition, all values must be greater than or equal to five. 59 a test of a single variance 61 a left-tailed test 63 H0: σ2 = 0.812; |
Ha: σ2 > 0.812 65 a test of a single variance 67 0.0542 69 true 71 false 73 Marital Status % Expected Frequency Never Married 31.3% 125.2 Married Widowed 56.1% 224.4 2.5% 10 Divorced/Separated 10.1% 40.4 Table 11.62 a. The data fit the distribution. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 689 b. The data do not fit the distribution. c. 3 d. chi-square distribution with df = 3 e. 19.27 f. 0.0002 g. Check student’s solution. h. i. Alpha = 0.05 ii. Decision: Reject null hypothesis. iii. Reason for decision: p-value < alpha iv. Conclusion: Data do not fit the distribution. 75 a. H0: The local results follow the distribution of the U.S. AP examinee population. b. Ha: The local results do not follow the distribution of the U.S. AP examinee population. c. df = 5 d. chi-square distribution with df = 5 e. chi-square test statistic = 13.4 f. p-value = 0.0199 g. Check student’s solution. h. i. Alpha = 0.05 ii. Decision: Reject null when a = 0.05. iii. Reason for decision: p-value < alpha iv. Conclusion: Local data do not fit the AP examinee distribution. v. Decision: Do not reject null when a = 0.01 vi. Conclusion: There is insufficient evidence to conclude that local data do not follow the distribution of the U.S. AP examinee distribution. 77 a. H0: The actual college majors of graduating females fit the distribution of their expected majors. b. Ha: The actual college majors of graduating females do not fit the distribution of their expected majors. c. df = 10 d. chi-square distribution with df = 10 e. test statistic = 11.48 f. p-value = 0.3211 g. Check student’s solution. h. i. Alpha = 0.05 ii. Decision: Do not reject null hypothesis when a = 0.05 and a = 0.01. iii. Reason for decision: p-value > |
alpha iv. Conclusion: There is insufficient evidence to conclude that the distribution of actual college majors of graduating females do not fit the distribution of their expected majors. 79 true 81 true 83 false Chapter 11 | The Chi-Square Distribution 690 85 a. H0: Surveyed individuals fit the distribution of expected patients. b. Ha: The surveyed individuals do not fit the distribution of patients. c. df = 4 d. chi-square distribution with df = 4 e. test statistic = 54.01 f. p-value = 0 g. Check student’s solution. h. i. Alpha: 0.05 ii. Decision: Reject the null hypothesis. iii. Reason for decision: p-value < alpha iv. Conclusion: At the 5 percent level of significance from the data, there is sufficient evidence to conclude that the surveyed patients with the disease do not fit the distribution of expected patients. 87 a. H0: Car size is independent of family size. b. Ha: Car size is dependent on family size. c. df = 9 d. chi-square distribution with df = 9 e. test statistic = 15.8284 f. p-value = 0.0706 g. Check student’s solution. h. i. Alpha: 0.05 ii. Decision: Do not reject the null hypothesis. iii. Reason for decision: p-value > alpha iv. Conclusion: At the 5 percent significance level, there is insufficient evidence to conclude that car size and family size are dependent. 89 a. H0: Honeymoon locations are independent of bride’s age. b. Ha: Honeymoon locations are dependent on bride’s age. c. df = 9 d. chi-square distribution with df = 9 e. test statistic = 15.7027 f. p-value = 0.0734 g. Check student’s solution. h. i. Alpha: 0.05 ii. Decision: Do not reject the null hypothesis. iii. Reason for decision: p-value > alpha iv. Conclusion: At the 5 percent significance level, there is insufficient evidence to conclude that honeymoon location and bride age are dependent. 91 a. H0: The types of fries sold are independent of the location. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 691 b. Ha: The types of fries sold are dependent on the |
location. c. df = 6 d. chi-square distribution with df = 6 e. test statistic =18.8369 f. p-value = 0.0044 g. Check student’s solution. h. i. Alpha: 0.05 ii. Decision: Reject the null hypothesis. iii. Reason for decision: p-value < alpha iv. Conclusion: At the 5 percent significance level, there is sufficient evidence that types of fries and location are dependent. 93 a. H0: Salary is independent of level of education. b. Ha: Salary is dependent on level of education. c. df = 12 d. chi-square distribution with df = 12 e. test statistic = 255.7704 f. p-value = 0 g. Check student’s solution. h. Alpha: 0.05 Decision: Reject the null hypothesis. Reason for decision: p-value < alpha Conclusion: At the 5 percent significance level, there is sufficient evidence to conclude that salary and level of education are dependent. 95 true 97 true 99 a. H0: Age is independent of the youngest online entrepreneurs’ net worth. b. Ha: Age is dependent on the net worth of the youngest online entrepreneurs. c. df = 2 d. chi-square distribution with df = 2 e. test statistic = 1.76 f. p-value = 0.4144 g. Check student’s solution. h. i. Alpha: 0.05 ii. Decision: Do not reject the null hypothesis. iii. Reason for decision: p-value > alpha iv. Conclusion: At the 5 percent significance level, there is insufficient evidence to conclude that age and net worth for the youngest online entrepreneurs are dependent. 101 a. H0: The distribution for personality types is the same for both majors. 692 Chapter 11 | The Chi-Square Distribution b. Ha: The distribution for personality types is not the same for both majors. c. df = 4 d. chi-square with df = 4 e. test statistic = 3.01 f. p-value = 0.5568 g. Check student’s solution. h. i. Alpha: 0.05 ii. Decision: Do not reject the null hypothesis. iii. Reason for decision: p-value > alpha iv. Conclusion: There is insufficient evidence to conclude that the distribution of personality types is different for business and social science majors. 103 a. H0: The distribution for fish caught is the |
same in Green Valley Lake and in Echo Lake. b. Ha: The distribution for fish caught is not the same in Green Valley Lake and in Echo Lake. c. 3 d. chi-square with df = 3 e. 11.75 f. p-value = 0.0083 g. Check student’s solution. h. i. Alpha: 0.05 ii. Decision: Reject the null hypothesis. iii. Reason for decision: p-value < alpha iv. Conclusion: There is evidence to conclude that the distribution of fish caught is different in Green Valley Lake and in Echo Lake. 105 a. H0: The distribution of average energy use in the United States is the same as in Europe between 2005 and 2010. b. Ha: The distribution of average energy use in the United States is not the same as in Europe between 2005 and 2010. c. df = 4 d. chi-square with df = 4 e. test statistic = 2.7434 f. p-value = 0.7395 g. Check student’s solution. h. i. Alpha: 0.05 ii. Decision: Do not reject the null hypothesis. iii. Reason for decision: p-value > alpha iv. Conclusion: At the 5 percent significance level, there is insufficient evidence to conclude that the average energy use values in the United States and EU are not derived from different distributions for the period from 2005 to 2010. 107 a. H0: The distribution for technology use is the same for community college students and university students. b. Ha: The distribution for technology use is not the same for community college students and university students. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 11 | The Chi-Square Distribution 693 c. 2 d. chi-square with df = 2 e. 7.05 f. p value = 0.0294 g. Check student’s solution. h. i. Alpha: 0.05 ii. Decision: Reject the null hypothesis. iii. Reason for decision: p value < alpha iv. Conclusion: There is sufficient evidence to conclude that the distribution of technology use for statistics homework is not the same for statistics students at community colleges and at universities. 110 225 112 H0: σ2 ≤ 150 114 36 116 Check student’s solution. 118 The claim is that the variance is no more than 150 minutes. 120 a student's t or normal |
distribution 122 a. H0: σ = 15 b. Ha: σ > 15 c. df = 42 d. chi-square with df = 42 e. test statistic = 26.88 f. p-value = 0.9663 g. Check student’s solution. h. i. Alpha = 0.05 ii. Decision: Do not reject null hypothesis. iii. Reason for decision: p-value > alpha iv. Conclusion: There is insufficient evidence to conclude that the standard deviation is greater than 15. 124 a. H0: σ ≤ 3 b. Ha: σ > 3 c. df = 17 d. chi-square distribution with df = 17 e. test statistic = 28.73 f. p-value = 0.0371 g. Check student’s solution. h. i. Alpha: 0.05 ii. Decision: Reject the null hypothesis. iii. Reason for decision: p-value < alpha iv. Conclusion: There is sufficient evidence to conclude that the standard deviation is greater than three. Chapter 11 | The Chi-Square Distribution 694 126 a. H0: σ = 2 b. Ha: σ ≠ 2 c. df = 14 d. chi-square distiribution with df = 14 e. chi-square test statistic = 5.2094 f. p-value = 0.0346 g. Check student’s solution. h. i. Alpha = 0.05 ii. Decision: Reject the null hypothesis iii. Reason for decision: p-value < alpha iv. Conclusion: There is sufficient evidence to conclude that the standard deviation is different than two. 128 The sample standard deviation is $34.29. H0 : σ2 = 252 Ha : σ2 > 252 df = n – 1 = 7 Test statistic: x2 = x7 2 = (n – 1)s2 252 ⎛ ⎞ ⎝x7 ⎠ = 1 – P = (8 – 1)(34.29)2 252 ⎞ ⎠ =.0681 = 13.169 ; 2 > 13.169 2 ≤ 13.169 ⎛ p-value: P ⎝x7 Alpha: 0.05 Decision: Do not reject the null hypothesis. Reason for decision: p-value > alpha Conclusion: At the 5 percent level, there is insufficient evidence to conclude that the variance is more than 625. 130 a. |
The test statistic is always positive and if the expected and observed values are not close together, the test statistic is large and the null hypothesis will be rejected. b. Testing to see if the data fits the distribution too well or is too perfect. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 695 12 | LINEAR REGRESSION AND CORRELATION Figure 12.1 Linear regression and correlation can help you determine whether an auto mechanic’s salary is related to his work experience. (credit: Joshua Rothhaas) Introduction Chapter Objectives By the end of this chapter, the student should be able to do the following: • Discuss basic ideas of linear regression and correlation • Create and interpret a line of best fit • Calculate and interpret the correlation coefficient • Calculate and interpret outliers Professionals often want to know how two or more numeric variables are related. For example, is there a relationship between the grade on the second math exam a student takes and the grade on the final exam? If there is a relationship, what is the relationship, and how strong is it? In another example, your income may be determined by your education, your profession, your years of experience, and your ability. The amount you pay a repair person for labor is often determined by an initial amount plus an hourly fee. 696 Chapter 12 | Linear Regression and Correlation The type of data described in the examples is bivariate data—bi—for two variables. In reality, statisticians use multivariate data, meaning many variables. In this chapter, you will study the simplest form of regression—linear regression—with one independent variable (x). This involves data that fit a line in two dimensions. You will also study correlation, which measures the strength of a relationship. 12.1 | Linear Equations Linear regression for two variables is based on a linear equation with one independent variable. The equation has the form y = a + bx where a and b are constant numbers. The variable x is the independent variable; y is the dependent variable. Typically, you choose a value to substitute for the independent variable and then solve for the dependent variable. Example 12.1 The following examples are linear equations. y = 3 + 2x y = –0.01 + 1.2x 12.1 Is the following an example of a linear equation? y = –0.125 – 3.5 |
x The graph of a linear equation of the form y = a + bx is a straight line. Any line that is not vertical can be described by this equation. Example 12.2 Graph the equation y = –1 + 2x. Figure 12.2 This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 697 12.2 Is the following an example of a linear equation? Why or why not? Figure 12.3 Example 12.3 Aaron’s Word Processing Service does word processing. The rate for services is $32 per hour plus a $31.50 onetime charge. The total cost to a customer depends on the number of hours it takes to complete the job. Find the equation that expresses the total cost in terms of the number of hours required to complete the job. Solution 12.3 Let x = the number of hours it takes to get the job done. Let y = the total cost to the customer. The $31.50 is a fixed cost. If it takes x hours to complete the job, then (32)(x) is the cost of the word processing only. The total cost is y = 31.50 + 32x. 12.3 Emma’s Extreme Sports hires hang-gliding instructors and pays them a fee of $50 per class, as well as $20 per student in the class. The total cost Emma pays depends on the number of students in a class. Find the equation that expresses the total cost in terms of the number of students in a class. Slope and y-interceptof a Linear Equation For the linear equation y = a + bx, b = slope and a = y-inttercept. From algebra, recall that the slope is a number that describes the steepness of a line; the y-intercept is the y-coordinate of the point (0, a), where the line crosses the y-axis. Please note that in previous courses you learned y = mx + b was the slope-intercept form of the equation, where m represented the slope and b represented the y-intercept. In this text, the form y = a + bx is used, where a is the y-intercept and b is the slope. The key is remembering the coefficient of x is the slope, and the constant number is the y-intercept. 698 Chapter 12 | |
Linear Regression and Correlation Figure 12.4 Three possible graphs of y = a + bx. (a) If b > 0, the line slopes upward to the right. (b) If b = 0, the line is horizontal. (c) If b < 0, the line slopes downward to the right. Example 12.4 Svetlana tutors to make extra money for college. For each tutoring session, she charges a one-time fee of $25 plus $15 per hour of tutoring. A linear equation that expresses the total amount of money Svetlana earns for each session she tutors is y = 25 + 15x. What are the independent and dependent variables? What is the y-intercept, and what is the slope? Interpret them using complete sentences. Solution 12.4 The independent variable (x) is the number of hours Svetlana tutors each session. The dependent variable (y) is the amount, in dollars, Svetlana earns for each session. The y-intercept is 25 (a = 25). At the start of the tutoring session, Svetlana charges a one-time fee of $25 (this is when x = 0). The slope is 15 (b = 15). For each session, Svetlana earns $15 for each hour she tutors. 12.4 Ethan repairs household appliances such as dishwashers and refrigerators. For each visit, he charges $25 plus $20 per hour of work. A linear equation that expresses the total amount of money Ethan earns per visit is y = 25 + 20x. What are the independent and dependent variables? What is the y-intercept, and what is the slope? Interpret them using complete sentences. 12.2 | The Regression Equation Data rarely fit a straight line exactly. Usually, you must be satisfied with rough predictions. Typically, you have a set of data with a scatter plot that appear to fit a straight line. This is called a line of best fit or least-squares regression line. If you know a person’s pinky (smallest) finger length, do you think you could predict that person’s height? Collect data from your class (pinky finger length, in inches). The independent variable, x, is pinky finger length and the dependent variable, y, is height. For each set of data, plot the points on graph paper. Make your graph big enough and use a |
ruler. Then, by eye, draw a line that appears to fit the data. For your line, pick two convenient points and use them to find the slope of the line. Find the y-intercept of the line by extending your line so it crosses the y-axis. Using the slopes and the y-intercepts, write your equation of best fit. Do you think everyone will have the same equation? Why or why not? According to your equation, what is the predicted height for a pinky length of 2.5 inches? This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 699 Example 12.5 A random sample of 11 statistics students produced the data in Table 12.1, where x is the third exam score out of 80 and y is the final exam score out of 200. Can you predict the final exam score of a random student if you know the third exam score? x (third exam score) y (final exam score) 65 67 71 71 66 75 67 70 71 69 69 Table 12.1 175 133 185 163 126 198 153 163 159 151 159 Figure 12.5 Using the x- and y-coordinates in the table, we plot the points on a graph to create the scatter plot showing the scores on the final exam based on scores from the third exam. 12.5 SCUBA divers have maximum dive times they cannot exceed when going to different depths. The data in Table 12.2 show different depths in feet, with the maximum dive times in minutes. Use your calculator to find the least squares regression line and predict the maximum dive time for 110 feet. 700 Chapter 12 | Linear Regression and Correlation x (depth) y (maximum dive time) 50 60 70 80 90 100 Table 12.2 80 55 45 35 25 22 The third exam score, x, is the independent variable, and the final exam score, y, is the dependent variable. We will plot a regression line that best fits the data. If each of you were to fit a line by eye, you would draw different lines. We can obtain a line of best fit using either the median-–median line approach or by calculating the least-squares regression line. Let'’s first find the line of best fit for the relationship between the third exam score and the final exam score using the median-median line approach. Remember that this is the data |
from Example 12.5 after the ordered pairs have been listed by ordering x values. If multiple data points have the same y values, then they are listed in order from least to greatest y (see data values where x = 71). We first divide our scores into three groups of approximately equal numbers of x values per group. The first and third groups have the same number of x values. We must remember first to put the x values in ascending order. The corresponding y values are then recorded. However, to find the median, we first must rearrange the y values in each group from the least value to the greatest value. Table 12.3 shows the correct ordering of the x values but does not show a reordering of the y values. x (third exam score) y (final exam score) 65 66 67 67 69 69 70 71 71 71 75 Table 12.3 175 126 133 153 151 159 163 159 163 185 198 With this set of data, the first and last groups each have four x values and four corresponding y values. The second group has three x values and three corresponding y values. We need to organize the x and y values per group and find the median x and y values for each group. Let’s now write out our y values for each group in ascending order. For group 1, the y values in order are 126, 133, 153, and 175. For group 2, the y values are already in order. For group 3, the y values are also already in order. We can represent these data as shown in Table 12.4, but notice that we have broken the ordered pairs; (65, 126) is not a data point in our original set: This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 701 Group x (third exam score) y (final exam score) Median x value Median y value 65 66 67 67 69 69 70 71 71 71 75 1 2 3 Table 12.4 126 133 153 175 151 159 163 159 163 185 198 66.5 143 69 71 159 174 When this is completed, we can write the ordered pairs for the median values. This allows us to find the slope and y-intercept of the –median-median line. The ordered pairs are (66.5, 143), (69, 159), and (71, 174). The slope can be calculated using the formula m − y2 − y |
1 x2 − x1. Substituting the median x and y values from the first and third groups gives m = 174 − 143 71 − 66.5, which simplifies to m ≈ 6.9. The y-intercept may be found using the formula b = Σy − mΣx 3, which means the quantity of the sum of the median y values minus the slope times the sum of the median x values divided by three. The sum of the median x values is 206.5, and the sum of the median y values is 476. Substituting these sums and the slope into the formula gives b = 476 − 6.9(206.5) 3, which simplifies to b ≈ − 316.3. The line of best fit is represented as y = mx + b. Thus, the equation can be written as y = 6.9x − 316.3. The median–median line may also be found using your graphing calculator. You can enter the x and y values into two separate lists; choose Stat, Calc, Med-Med, and press Enter. The slope, a, and y-intercept, b, will be provided. The calculator shows a slight deviation from the previous manual calculation as a result of rounding. Rounding to the nearest tenth, the calculator gives the –median-median line of y = 6.9x − 315.5. Each point of data is of the the form (x, y), and each point of the line of best fit using least-squares linear regression has the form (x, ŷ). The ŷ is read y hat and is the estimated value of y. It is the value of y obtained using the regression line. It is not generally equal to y from data, but it is still important because it can help make predictions for other values. Figure 12.6 702 Chapter 12 | Linear Regression and Correlation The term y0 – ŷ0 = ε0 is called the error or residual. It is not an error in the sense of a mistake. The absolute value of a residual measures the vertical distance between the actual value of y and the estimated value of y. In other words, it measures the vertical distance between the actual data point and the predicted point on the line, or it measures how far the estimate is from the actual data value. If the observed data point lies above the line, the residual is positive and the |
line underestimates the actual data value for y. If the observed data point lies below the line, the residual is negative and the line overestimates that actual data value for y. In Figure 12.6, y0 – ŷ0 = ε0 is the residual for the point shown. Here the point lies above the line and the residual is positive. ε = the Greek letter epsilon For each data point, you can calculate the residuals or errors, yi – ŷi = εi for i = 1, 2, 3,..., 11. Each |ε| is a vertical distance. For the example about the third exam scores and the final exam scores for the 11 statistics students, there are 11 data points. Therefore, there are 11 ε values. If you square each ε and add them, you get the sum of ε squared from i = 1 to i = 11, as shown below. 11 (ε1)2 + (ε2)2 +... + (ε11)2 = Σ i = 1 ε2. This is called the sum of squared errors (SSE). Using calculus, you can determine the values of a and b that make the SSE a minimum. When you make the SSE a minimum, you have determined the points that are on the line of best fit. It turns out that the line of best fit has the equation ŷ = a + bx where a = y¯ − b x¯ and b = ∑ ⎝y − y¯ ⎞ ⎛ ⎝x − x¯ ⎞ ⎛ ⎠ ⎠ 2 ⎝x − x¯ ⎞ ⎛ ⎠ ∑. The sample means of the x values and the y values are x¯ and y¯, respectively. The best-fit line always passes through the point ( x¯, y¯ ). The slope (b) can be written as b = r ⎛ ⎝ s y s x ⎞ ⎠ where sy = the standard deviation of the y values and sx = the standard deviation of the x values. r is the correlation coefficient, which shows the relationship between the x and y values. This will be discussed in more detail in the next section. Least-Squares Criteria for Best Fit The process of fitting the best-fit line is called linear regression. We assume that |
the data are scattered about a straight line. To find that line, we minimize the sum of the squared errors (SSE), or make it as small as possible. Any other line you might choose would have a higher SSE than the best-fit line. This best-fit line is called the least-squares regression line. NOTE Computer spreadsheets, statistical software, and many calculators can quickly calculate the best-fit line and create the graphs. The calculations tend to be tedious if done by hand. Instructions to use the TI-83, TI-83+, and TI-84+ calculators to find the best-fit line and create a scatter plot are shown at the end of this section. Third Exam vs. Final Exam Example The graph of the line of best fit for the third exam/final exam example is as follows: This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 703 Figure 12.7 The least-squares regression line (best-fit line) for the third exam/final exam example has the equation Understanding and Interpreting the y-intercept ŷ = −173.51 + 4.83x. The y-intercept, a, of the line describes where the plot line crosses the y-axis. The y-intercept of the best-fit line tells us the best value of the relationship when x is zero. In some cases, it does not make sense to figure out what y is when x = 0. For example, in the third exam vs. final exam example, the y-intercept occurs when the third exam score, or x, is zero. Since all the scores are grouped around a passing grade, there is no need to figure out what the final exam score, or y, would be when the third exam was zero. However, the y-intercept is very useful in many cases. For many examples in science, the y-intercept gives the baseline reading when the experimental conditions aren’'t applied to an experimental system. This baseline indicates how much the experimental condition affects the system. It could also be used to ensure that equipment and measurements are calibrated properly before starting the experiment. In biology, the concentration of proteins in a sample can be measured using a chemical assay that changes color depending on how much protein is present. The more protein present, the darker the color. The amount of color can be |
measured by the absorbance reading. Table 12.5 shows the expected absorbance readings at different protein concentrations. This is called a standard curve for the assay. Concentration (mM) Absorbance (mAU) 125 250 500 750 1,000 1,500 2,000 Table 12.5 0.021 0.023 0.068 0.086 0.105 0.124 0.146 The scatter plot Figure 12.8 includes the line of best fit. 704 Chapter 12 | Linear Regression and Correlation Figure 12.8 The y-intercept of this line occurs at 0.0226 mAU. This means the assay gives a reading of 0.0226 mAU when there is no protein present. That is, it is the baseline reading that can be attributed to something else, which, in this case, is some other non-protein chemicals that are absorbing light. We can tell that this line of best fit is reasonable because the y-intercept is small, close to zero. When there is no protein present in the sample, we expect the absorbance to be very small, or close to zero, as well. Understanding Slope The slope of the line, b, describes how changes in the variables are related. It is important to interpret the slope of the line in the context of the situation represented by the data. You should be able to write a sentence interpreting the slope in plain English. Interpretation of the Slope: The slope of the best-fit line tells us how the dependent variable (y) changes for every one unit increase in the independent (x) variable, on average. Third Exam vs. Final Exam Example Slope: The slope of the line is b = 4.83. Interpretation: For a 1-point increase in the score on the third exam, the final exam score increases by 4.83 points, on average. Using the Linear Regression T Test: LinRegTTest 1. In the STAT list editor, enter the x data in list L1 and the y data in list L2, paired so that the corresponding (x, y) values are next to each other in the lists. (If a particular pair of values is repeated, enter it as many times as it appears in the data.) 2. On the STAT TESTS menu, scroll down and select LinRegTTest. (Be careful to select LinRegTTest. Some calculators may also have a different item called LinRegTInt.) |
3. On the LinRegTTest input screen, enter Xlist: L1, Ylist: L2, and Freq: 1. 4. On the next line, at the prompt β or ρ, highlight ≠ 0 and press ENTER. 5. Leave the line for RegEQ: blank. 6. Highlight Calculate and press ENTER. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 705 Figure 12.9 The output screen contains a lot of information. For now, let’s focus on a few items from the output and return to the other items later. The second line says y = a + bx. Scroll down to find the values a = –173.513 and b = 4.8273. The equation of the best-fit line is ŷ = –173.51 + 4.83x. The two items at the bottom are r2 =.43969 and r =.663. For now, just note where to find these values; we examine them in the next two sections. Graphing the Scatter Plot and Regression Line 1. We are assuming the x data are already entered in list L1 and the y data are in list L2. 2. Press 2nd STATPLOT ENTER to use Plot 1. 3. On the input screen for PLOT 1, highlight On, and press ENTER. 4. For TYPE, highlight the first icon, which is the scatter plot, and press ENTER. 5. Indicate Xlist: L1 and Ylist: L2. 6. For Mark, it does not matter which symbol you highlight. 7. Press the ZOOM key and then the number 9 (for menu item ZoomStat); the calculator fits the window to the data. 8. To graph the best-fit line, press the Y= key and type the equation –173.5 + 4.83X into equation Y1. (The X key is immediately left of the STAT key.) Press ZOOM 9 again to graph it. 9. Optional: If you want to change the viewing window, press the WINDOW key. Enter your desired window using Xmin, Xmax, Ymin, and Ymax. NOTE Another way to graph the line after you create a scatter plot is to use LinRegTTest. 1. Make sure you have done the scatter plot |
. Check it on your screen. 2. Go to LinRegTTest and enter the lists. 3. At RegEq, press VARS and arrow over to Y-VARS. Press 1 for 1:Function. Press 1 for 1:Y1. Then, arrow down to Calculate and do the calculation for the line of best fit. 4. Press Y= (you will see the regression equation). 5. Press GRAPH, and the line will be drawn. 706 Chapter 12 | Linear Regression and Correlation The Correlation Coefficient r Besides looking at the scatter plot and seeing that a line seems reasonable, how can you determine whether the line is a good predictor? Use the correlation coefficient as another indicator (besides the scatter plot) of the strength of the relationship between x and y. The correlation coefficient, r, developed by Karl Pearson during the early 1900s, is numeric and provides a measure of the strength and direction of the linear association between the independent variable x and the dependent variable y. If you suspect a linear relationship between x and y, then r can measure the strength of the linear relationship. What the Value of r Tells Us • The value of r is always between –1 and +1. In other words, –1 ≤ r ≤ 1. • The size of the correlation r indicates the strength of the linear relationship between x and y. Values of r close to –1 or to +1 indicate a stronger linear relationship between x and y. • • If r = 0, there is absolutely no linear relationship between x and y (no linear correlation). If r = 1, there is perfect positive correlation. If r = –1, there is perfect negative correlation. In both these cases, all the original data points lie on a straight line. Of course, in the real world, this does not generally happen. What the Sign of r Tells Us • A positive value of r means that when x increases, y tends to increase and when x decreases, y tends to decrease (positive correlation). • A negative value of r means that when x increases, y tends to decrease and when x decreases, y tends to increase (negative correlation). • The sign of r is the same as the sign of the slope, b, of the best-fit line. NOTE A strong correlation does not suggest that x causes y or y causes x. We say correlation does not imply causation. The correlation coefficient is calculated as the quantity of data points times the sum of the quantity |
of the x-coordinates times the y-coordinates, minus the quantity of the sum of the x-coordinates times the sum of the y-coordinates, all divided by the square root of the quantity of data points times the sum of the x-coordinates squared minus the square of the sum of the x-coordinates, times the number of data points times the sum of the y-coordinates squared minus the square of the sum of the y-coordinates. It can be summarized by the following equation: r = nΣ(xy) − (Σx)(Σy) ⎣nΣy2 − (Σy)2⎤ ⎡ ⎣nΣx2 − (Σx)2⎤ ⎡ ⎦ ⎦ where n is the number of data points. Figure 12.10 (a) A scatter plot showing data with a positive correlation: 0 < r < 1. (b) A scatter plot showing data with a negative correlation: –1 < r < 0. (c) A scatter plot showing data with zero correlation: r = 0. The formula for r looks formidable. However, computer spreadsheets, statistical software, and many calculators can calculate r quickly. The correlation coefficient, r, is the bottom item in the output screens for the LinRegTTest on the TI-83, TI-83+, or TI-84+ calculator (see previous section for instructions). The Coefficient of Determination The variable r2 is called the coefficient of determination and it is the square of the correlation coefficient, but it is usually stated as a percentage, rather than in decimal form. It has an interpretation in the context of the data: This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 707 • r 2, when expressed as a percent, represents the percentage of variation in the dependent (predicted) variable y that can be explained by variation in the independent (explanatory) variable x using the regression (best-fit) line. • 1 – r 2, when expressed as a percentage, represents the percentage of variation in y that is not explained by variation in x using the regression line. This can be seen as the scattering of the observed data points about the regression line. Consider the third exam/final exam example introduced in the previous section |
. • The line of best fit is: ŷ = –173.51 + 4.83x. • The correlation coefficient is r =.6631. • The coefficient of determination is r2 =.66312 =.4397. Interpret r2 in the context of this example. • Approximately 44 percent of the variation (0.4397 is approximately 0.44) in the final exam grades can be explained by the variation in the grades on the third exam, using the best-fit regression line. • Therefore, the rest of the variation (1 – 0.44 = 0.56 or 56 percent) in the final exam grades cannot be explained by the variation of the grades on the third exam with the best-fit regression line. These are the variation of the points that are not as close to the regression line as others. 12.3 | Testing the Significance of the Correlation Coefficient (Optional) The correlation coefficient, r, tells us about the strength and direction of the linear relationship between x and y. However, the reliability of the linear model also depends on how many observed data points are in the sample. We need to look at both the correlation coefficient r and the sample size n, together. We perform a hypothesis test of the significance of the correlation coefficient to decide whether the linear relationship in the sample data is strong enough to use to model the relationship in the population. The sample data are used to compute r, the correlation coefficient for the sample. If we had data for the entire population, we could find the population correlation coefficient. But, because we have only sample data, we cannot calculate the population correlation coefficient. The sample correlation coefficient, r, is our estimate of the unknown population correlation coefficient. The symbol for the population correlation coefficient is ρ, the Greek letter rho. ρ = population correlation coefficient (unknown). r = sample correlation coefficient (known; calculated from sample data). The hypothesis test lets us decide whether the value of the population correlation coefficient ρ is close to zero or significantly different from zero. We decide this based on the sample correlation coefficient r and the sample size n. If the test concludes the correlation coefficient is significantly different from zero, we say the correlation coefficient is significant. • Conclusion: There is sufficient evidence to conclude there is a significant linear relationship between x and y because the correlation coefficient is significantly different from zero. • What the conclusion means: There is a significant linear relationship between x and y. We can use the regression line to model the linear |
relationship between x and y in the population. If the test concludes the correlation coefficient is not significantly different from zero (it is close to zero), we say the correlation coefficient is not significant. • Conclusion: There is insufficient evidence to conclude there is a significant linear relationship between x and y because the correlation coefficient is not significantly different from zero. • What the conclusion means: There is not a significant linear relationship between x and y. Therefore, we cannot use the regression line to model a linear relationship between x and y in the population. NOTE • If r is significant and the scatter plot shows a linear trend, the line can be used to predict the value of y for values of x that are within the domain of observed x values. 708 • • Chapter 12 | Linear Regression and Correlation If r is not significant or if the scatter plot does not show a linear trend, the line should not be used for prediction. If r is significant and the scatter plot shows a linear trend, the line may not be appropriate or reliable for prediction outside the domain of observed x values in the data. Performing the Hypothesis Test • Null hypothesis: H0: ρ = 0. • Alternate hypothesis: Ha: ρ ≠ 0. What the Hypothesis Means in Words: • Null hypothesis H0: The population correlation coefficient is not significantly different from zero. There is not a significant linear relationship (correlation) between x and y in the population. • Alternate hypothesis Ha: The population correlation coefficient is significantly different from zero. There is a significant linear relationship (correlation) between x and y in the population. Drawing a Conclusion: There are two methods to make a conclusion. The two methods are equivalent and give the same result. • Method 1: Use the p-value. • Method 2: Use a table of critical values. In this chapter, we will always use a significance level of 5 percent, α = 0.05. NOTE Using the p-value method, you could choose any appropriate significance level you want; you are not limited to using α = 0.05. But, the table of critical values provided in this textbook assumes we are using a significance level of 5 percent, α = 0.05. If we wanted to use a significance level different from 5 percent with the critical value method, we would need different tables of critical values that are not provided in this textbook. METHOD 1: Using a p-value to Make a Decision To calculate the p-value using LinRegTTEST |
: 1. Complete the same steps as the LinRegTTest performed previously in this chapter, making sure on the line prompt for β or σ, ≠ 0 is highlighted. 2. When looking at the output screen, the p-value is on the line that reads p =. If the p-value is less than the significance level (α = 0.05): • Decision: Reject the null hypothesis. • Conclusion: There is sufficient evidence to conclude there is a significant linear relationship between x and y because the correlation coefficient is significantly different from zero. If the p-value is not less than the significance level (α = 0.05): • Decision: Do not reject the null hypothesis. • Conclusion: There is insufficient evidence to conclude there is a significant linear relationship between x and y because the correlation coefficient is not significantly different from zero. You will use technology to calculate the p-value, but it is useful to know that the p-value is calculated using a t distribution with n – 2 degrees of freedom and that the p-value is the combined area in both tails. An alternative way to calculate the p-value (p) given by LinRegTTest is the command 2*tcdf(abs(t),10^99, n–2) in 2nd DISTR. Third Exam vs. Final Exam Example: p-value Method • Consider the third exam/final exam example. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 709 • The line of best fit is ŷ = –173.51 + 4.83x, with r = 0.6631, and there are n = 11 data points. • Can the regression line be used for prediction? Given a third exam score (x value), can we use the line to predict the final exam score (predicted y value)? H0: ρ = 0 Ha: ρ ≠ 0 α = 0.05 • The p-value is 0.026 (from LinRegTTest on a calculator or from computer software). • The p-value, 0.026, is less than the significance level of α = 0.05. • Decision: Reject the null hypothesis H0. • Conclusion: There is sufficient evidence to conclude there is a significant linear relationship between the third exam score (x) and the final exam score (y) because the correlation coefficient is significantly |
different from zero. Because r is significant and the scatter plot shows a linear trend, the regression line can be used to predict final exam scores. METHOD 2: Using a Table of Critical Values to Make a Decision The 95 Percent Critical Values of the Sample Correlation Coefficient Table (Table 12.9) can be used to give you a good idea of whether the computed value of r is significant. Use it to find the critical values using the degrees of freedom, df = n – 2. The table has already been calculated with α = 0.05. The table tells you the positive critical value, but you should also make that number negative to have two critical values. If r is not between the positive and negative critical values, then the correlation coefficient is significant. If r is significant, then you may use the line for prediction. If r is not significant (between the critical values), you should not use the line to make predictions. Example 12.6 Suppose you computed r = 0.801 using n = 10 data points. The degrees of freedom would be 8 (df = n – 2 = 10 – 2 = 8). Using Table 12.9 with df = 8, we find that the critical value is 0.632. This means the critical values are really ±0.632. Since r = 0.801 and 0.801 > 0.632, r is significant and the line may be used for prediction. If you view this example on a number line, it will help you to see that r is not between the two critical values. Figure 12.11 r is not between –0.632 and 0.632, so r is significant. 12.6 For a given line of best fit, you computed that r = 0.6501 using n = 12 data points, and the critical value found on the table is 0.576. Can the line be used for prediction? Why or why not? Example 12.7 Suppose you computed r = –0.624 with 14 data points, where df = 14 – 2 = 12. The critical values are –0.532 and 0.532. Since –0.624 < –0.532, r is significant and the line can be used for prediction. 710 Chapter 12 | Linear Regression and Correlation Figure 12.12 r = –0.624 and –0.624 < –0.532. Therefore, r is significant. 12.7 For a given line |
of best fit, you compute that r = 0.5204 using n = 9 data points, and the critical values are ±0.666. Can the line be used for prediction? Why or why not? Example 12.8 Suppose you computed r = 0.776 and n = 6, with df = 6 -– 2 = 4. The critical values are – 0.811 and 0.811. Since 0.776 is between the two critical values, r is not significant. The line should not be used for prediction. Figure 12.13 –0.811 < r = 0.776 < 0.811. Therefore, r is not significant. 12.8 For a given line of best fit, you compute that r = –0.7204 using n = 8 data points, and the critical value is 0.707. Can the line be used for prediction? Why or why not? Third Exam vs. Final Exam Example: Critical Value Method Consider the third exam/final exam example. The line of best fit is: ŷ = –173.51 + 4.83x, with r =.6631, and there are n = 11 data points. Can the regression line be used for prediction? Given a third exam score (x value), can we use the line to predict the final exam score (predicted y value)? H0: ρ = 0 Ha: ρ ≠ 0 α = 0.05 • Use the 95 Percent Critical Values table for r with df = n – 2 = 11 – 2 = 9. • Using the table with df = 9, we find that the critical value listed is 0.602. Therefore, the critical values are ±0.602. • Since 0.6631 > 0.602, r is significant. • Decision: Reject the null hypothesis. • Conclusion: There is sufficient evidence to conclude there is a significant linear relationship between the third exam score (x) and the final exam score (y) because the correlation coefficient is significantly different from zero. Because r is significant and the scatter plot shows a linear trend, the regression line can be used to predict final exam scores. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 711 Example 12.9 Suppose you computed the following correlation coefficients. Using the table at the end of the chapter, determine whether r is significant and whether the line |
of best fit associated with each correlation coefficient can be used to predict a y value. If it helps, draw a number line. a. r = –0.567 and the sample size, n, is 19. To solve this problem, first find the degrees of freedom. df = n - 2 = 17. Then, using the table, the critical values are ±0.456. –0.567 < –0.456, or you may say that –0.567 is not between the two critical values. r is significant and may be used for predictions. b. r = 0.708 and the sample size, n, is 9. df = n - 2 = 7 The critical values are ±0.666. 0.708 > 0.666. r is significant and may be used for predictions. c. r = 0.134 and the sample size, n, is 14. df = 14 –- 2 = 12. The critical values are ±0.532. 0.134 is between –0.532 and 0.532. r is not significant and may not be used for predictions. d. r = 0 and the sample size, n, is 5. It doesn’'t matter what the degrees of freedom are because r = 0 will always be between the two critical values, so r is not significant and may not be used for predictions. 12.9 For a given line of best fit, you compute that r = 0 using n = 100 data points. Can the line be used for prediction? Why or why not? Assumptions in Testing the Significance of the Correlation Coefficient Testing the significance of the correlation coefficient requires that certain assumptions about the data be satisfied. The premise of this test is that the data are a sample of observed points taken from a larger population. We have not examined the entire population because it is not possible or feasible to do so. We are examining the sample to draw a conclusion about whether the linear relationship that we see between x and y in the sample data provides strong enough evidence that we can conclude there is a linear relationship between x and y in the population. The regression line equation that we calculate from the sample data gives the best-fit line for our particular sample. We want to use this best-fit line for the sample as an estimate of the best-fit line for the population. Examining the scatter plot and testing the significance of the correlation coefficient helps us determine whether it is appropriate to do |
this. The assumptions underlying the test of significance are as follows: • There is a linear relationship in the population that models the sample data. Our regression line from the sample is our best estimate of this line in the population. • The y values for any particular x value are normally distributed about the line. This implies there are more y values scattered closer to the line than are scattered farther away. Assumption 1 implies that these normal distributions are centered on the line; the means of these normal distributions of y values lie on the line. • Normal distributions of all the y values have the same shape and spread about the line. • The residual errors are mutually independent (no pattern). 712 Chapter 12 | Linear Regression and Correlation • The data are produced from a well-designed, random sample or randomized experiment. Figure 12.14 The y values for each x value are normally distributed about the line with the same standard deviation. For each x value, the mean of the y values lies on the regression line. More y values lie near the line than are scattered farther away from the line. 12.4 | Prediction (Optional) Recall the third exam/final exam example. We found the equation of the best-fit line for the final exam grade as a function of the grade on the third exam. We can now use the least-squares regression line for prediction. Suppose you want to estimate, or predict, the mean final exam score of statistics students who received a 73 on the third exam. The exam scores (x values) range from 65 to 75. Since 73 is between the x values 65 and 75, substitute x = 73 into the equation. Then, We predict that statistics students who earn a grade of 73 on the third exam will earn a grade of 179.08 on the final exam, on average. ^ y = − 173.51 + 4.83(73) = 179.08. Example 12.10 Recall the third exam/final exam example. a. What would you predict the final exam score to be for a student who scored a 66 on the third exam? Solution 12.10 a. 145.27 b. What would you predict the final exam score to be for a student who scored a 90 on the third exam? Solution 12.10 b. The x values in the data are between 65 and 75. 90 is outside the domain of the observed x values in the data (independent variable), so you cannot reliably predict the final exam score for this student. Even though it is possible to |
enter 90 into the equation for x and calculate a corresponding y value, the y value that you get will not be reliable. To understand how unreliable the prediction can be outside the x values observed in the data, make the substitution x = 90 into the equation: ŷ = –173.51 + 4.83⎛ ⎝90⎞ ⎠ = 261.19. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 713 The final exam score is predicted to be 261.19. The most points that can be awarded for the final exam are 200. 12.10 Data are collected on the relationship between the number of hours per week practicing a musical instrument and scores on a math test. The line of best fit is as follows: ŷ = 72.5 + 2.8x. What would you predict the score on a math test will be for a student who practices a musical instrument for five hours a week? 12.5 | Outliers In some data sets, there are values (observed data points) called outliers. Outliers are observed data points that are far from the least-squares line. They have large errors, where the error or residual is not very close to the best-fit line. Outliers need to be examined closely. Sometimes, they should not be included in the analysis of the data, like if it is possible that an outlier is a result of incorrect data. Other times, an outlier may hold valuable information about the population under study and should remain included in the data. The key is to examine carefully what causes a data point to be an outlier. Besides outliers, a sample may contain one or a few points that are called influential points. Influential points are observed data points that are far from the other observed data points in the horizontal direction. These points may have a big effect on the slope of the regression line. To begin to identify an influential point, you can remove it from the data set and determine whether the slope of the regression line is changed significantly. You also want to examine how the correlation coefficient, r, has changed. Sometimes, it is difficult to discern a significant change in slope, so you need to look at how the strength of the linear relationship has changed. Computers and many calculators can be used to identify outliers and influential points. Regression analysis |
can determine if an outlier is, indeed, an influential point. The new regression will show how omitting the outlier will affect the correlation among the variables, as well as the fit of the line. A graph showing both regression lines helps determine how removing an outlier affects the fit of the model. Identifying Outliers We could guess at outliers by looking at a graph of the scatter plot and best-fit line. However, we would like some guideline regarding how far away a point needs to be to be considered an outlier. As a rough rule of thumb, we can flag as an outlier any point that is located farther than two standard deviations above or below the best-fit line. The standard deviation used is the standard deviation of the residuals or errors. We can do this visually in the scatter plot by drawing an extra pair of lines that are two standard deviations above and below the best-fit line. Any data points outside this extra pair of lines are flagged as potential outliers. Or, we can do this numerically by calculating each residual and comparing it with twice the standard deviation. With regard to the TI-83, 83+, or 84+ calculators, the graphical approach is easier. The graphical procedure is shown first, followed by the numerical calculations. You would generally need to use only one of these methods. Example 12.11 In the third exam/final exam example, you can determine whether there is an outlier. If there is an outlier, as an exercise, delete it and fit the remaining data to a new line. For this example, the new line ought to fit the remaining data better. This means the SSE (sum of the squared errors) should be smaller and the correlation coefficient ought to be closer to 1 or –1. Solution 12.11 714 Chapter 12 | Linear Regression and Correlation Graphical Identification of Outliers With the TI-83, 83+, or 84+ graphing calculators, it is easy to identify the outliers graphically and visually. If we were to measure the vertical distance from any data point to the corresponding point on the line of best fit and that distance were equal to 2s or more, then we would consider the data point to be too far from the line of best fit. We need to find and graph the lines that are two standard deviations below and above the regression line. Any points that are outside these two lines are outliers. Let’s call these lines Y2 and Y3. As |
we did with the equation of the regression line and the correlation coefficient, we will use technology to calculate this standard deviation for us. Using the LinRegTTest with these data, scroll down through the output screens to find s = 16.412. Line Y2 = –173.5 + 4.83x – 2(16.4), and line Y3 = –173.5 + 4.83x + 2(16.4), where ŷ = –173.5 + 4.83x is the line of best fit. Y2 and Y3 have the same slope as the line of best fit. Graph the scatter plot with the best-fit line in equation Y1, then enter the two extra lines as Y2 and Y3 in the Y= equation editor. Press ZOOM-9 to get a good view. You will see that the only point that is not between Y2 and Y3 is the point (65, 175). On the calculator screen, it is barely outside these lines, but it is considered an outlier because it is more than two standard deviations away from the best-fit line. The outlier is the student who had a grade of 65 on the third exam and 175 on the final exam. Sometimes a point is so close to the lines used to flag outliers on the graph that it is difficult to tell whether the point is between or outside the lines. On a computer, enlarging the graph may help; on a small calculator screen, zooming in may make the graph clearer. Note that when the graph does not give a clear enough picture, you can use the numerical comparisons to identify outliers. Figure 12.15 12.11 Identify the potential outlier in the scatter plot. The standard deviation of the residuals, or errors, is approximately 8.6. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 715 Figure 12.16 Numerical Identification of Outliers In Table 12.6, the first two columns include the third exam and final exam data. The third column shows the predicted ŷ values calculated from the line of best fit: ŷ = –173.5 + 4.83x. The residuals, or errors, that were mentioned in Section 3 of this chapter have been calculated in the fourth column of the table: Observed y value – predicted y value = y – ŷ |
. s is the standard deviation of all the y – ŷ = ε values, where n is the total number of data points. If each residual is calculated and squared, and the results are added, we get the SSE. The standard deviation of the residuals is calculated from the SSE as NOTE We divide by (n – 2) because the regression model involves two estimates. s = SSE n − 2. Rather than calculate the value of s ourselves, we can find s using a computer or calculator. For this example, the calculator function LinRegTTest found s = 16.4 as the standard deviation of the residuals 35; –17; 16; –6; –19; 9; 3; –1; –10; –9; –1. x y ŷ y – ŷ 65 175 140 175 – 140 = 35 67 133 150 133 – 150= –17 71 185 169 185 – 169 = 16 71 163 169 163 – 169 = –6 66 126 145 126 – 145 = –19 75 198 189 198 – 189 = 9 67 153 150 153 – 150 = 3 70 163 164 163 – 164 = –1 Table 12.6 716 Chapter 12 | Linear Regression and Correlation x y ŷ y – ŷ 71 159 169 159 – 169 = –10 69 151 160 151 – 160 = –9 69 159 160 159 – 160 = –1 Table 12.6 We are looking for all data points for which the residual is greater than 2s = 2(16.4) = 32.8 or less than –32.8. Compare these values with the residuals in column four of the table. The only such data point is the student who had a grade of 65 on the third exam and 175 on the final exam; the residual for this student is 35. How Does the Outlier Affect the Best-Fit Line? Numerically and graphically, we have identified point (65, 175) as an outlier. Recall that recalculation of the least-squares regression line and summary statistics, following deletion of an outlier, may be used to determine whether an outlier is also an influential point. This process also allows you to compare the strength of the correlation of the variables and possible changes in the slope both before and after the omission of any outliers. Compute a new best-fit line and correlation coefficient using the 10 remaining points. On the TI-83, TI-83+, or TI-84+ calculators, delete |
the outlier from L1 and L2. Using the LinRegTTest, found under Stat and Tests, the new line of best fit and correlation coefficient are the following: ŷ = − 355.19 + 7.39x and r = 0.9121. The slope is now 7.39, compared to the previous slope of 4.83. This seems significant, but we need to look at the change in r-values as well. The new line shows r = 0.9121, which indicates a stronger correlation than the original line, with r = 0.6631, since r = 0.9121 is closer to 1. This means the new line is a better fit to the data values. The line can better predict the final exam score given the third exam score. It also means the outlier of (65, 175) was an influential point, since there is a sizeable difference in r-values. We must now decide whether to delete the outlier. If the outlier was recorded erroneously, it should certainly be deleted. Because it produces such a profound effect on the correlation, the new line of best fit allows for better prediction and an overall stronger model. You may use Excel to graph the two least-squares regression lines and compare the slopes and fit of the lines to the data, as shown in Figure 12.17. Figure 12.17 You can see that the second graph shows less deviation from the line of best fit. It is clear that omission of the influential point produced a line of best fit that more closely models the data. Numerical Identification of Outliers: Calculating s and Finding Outliers Manually If you do not have the function LinRegTTest on your calculator, then you must calculate the outlier in the first example by doing the following. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 717 First, square each |y – ŷ|. The squares are 352; 172; 162; 62; 192; 92; 32; 12; 102; 92; 12. Then, add (sum) all the |y – ŷ| squared terms using the formula 11⎛ ⎝|yi − ŷi|⎞ Σ Σ i = 1 i = 1 = 352 + 172 + 162 + 62 + 192 + 92 + 32 + 12 + 102 + 92 |
+ 12 11εi 2 (Recall that yi – ŷi = εi). 2 = ⎠ = 2,440 = SSE. The result, SSE, is the sum of squared errors. Next, calculate s, the standard deviation of all the y – ŷ = ε-values where n = the total number of data points. The calculation is s = SSE n – 2. For the third exam/final exam example, s = 2440 11 – 2 = 16.47. Next, multiply s by 2: (2)(16.47) = 32.94 32.94 is two standard deviations away from the mean of the y – ŷ values. If we were to measure the vertical distance from any data point to the corresponding point on the line of best fit and that distance is at least 2s, then we would consider the data point to be too far from the line of best fit. We call that point a potential outlier. For the example, if any of the |y – ŷ| values are at least 32.94, the corresponding (x, y) data point is a potential outlier. For the third exam/final exam example, all the |y – ŷ| values are less than 31.29 except for the first one, which is 35: 35 > 31.29. That is, |y – ŷ| ≥ (2)(s). The point that corresponds to |y – ŷ| = 35 is (65, 175). Therefore, the data point (65, 175) is a potential outlier. For this example, we will delete it. (Remember, we do not always delete an outlier.) NOTE When outliers are deleted, the researcher should either record that data were deleted, and why, or the researcher should provide results both with and without the deleted data. If data are erroneous and the correct values are known (e.g., student 1 actually scored a 70 instead of a 65), then this correction can be made to the data. The next step is to compute a new best-fit line using the 10 remaining points. The new line of best fit and the correlation coefficient are ŷ = –355.19 + 7.39x and r =.9121. Example 12.12 Using this new line of best fit (based on the remaining 10 data points in the third exam/final exam example), what would a student who receives a 73 on the third exam expect |
to receive on the final exam? Is this the same as the prediction made using the original line? Solution 12.12 Using the new line of best fit, ŷ = –355.19 + 7.39(73) = 184.28. A student who scored 73 points on the third exam would expect to earn 184 points on the final exam. The original line predicted that ŷ = –173.51 + 4.83(73) = 179.08, so the prediction using the new line with the 718 Chapter 12 | Linear Regression and Correlation outlier eliminated differs from the original prediction. 12.12 The data points for the graph from the third exam/final exam example are as follows: (1, 5), (2, 7), (2, 6), (3, 9), (4, 12), (4, 13), (5, 18), (6, 19), (7, 12), and (7, 21). Remove the outlier and recalculate the line of best fit. Find the value of ŷ when x = 10. Example 12.13 The consumer price index (CPI) measures the average change over time in prices paid by urban consumers for consumer goods and services. The CPI affects nearly all Americans because of the many ways it is used. One of its biggest uses is as a measure of inflation. By providing information about price changes in the nation’s economy to government, businesses, and labor forces, the CPI helps them make economic decisions. The president, U.S. Congress, and the Federal Reserve Board use CPI trends to form monetary and fiscal policies. In the following table, x is the year and y is the CPI. x y x y 1915 10.1 1969 36.7 1926 17.7 1975 49.3 1935 13.7 1979 72.6 1940 14.7 1980 82.4 1947 24.1 1986 109.6 1952 26.5 1991 130.7 1964 31.0 1999 166.6 Table 12.7 a. Draw a scatter plot of the data. b. Calculate the least-squares line. Write the equation in the form ŷ = a + bx. c. Draw the line on a scatter plot. d. Find the correlation coefficient. Is it significant? e. What is the average CPI for the year 1990? Solution 12.13 a. See Figure 12.17. b. Using our calculator, ŷ = –3204 + 1.662x is the |
equation of the line of best fit. c. See Figure 12.17. d. r = 0.8694. The number of data points is n = 14. Use the 95 Percent Critical Values of the Sample Correlation Coefficient table at the end of Chapter 12: In this case, df = 12. The corresponding critical values from the table are ±0.532. Since 0.8694 > 0.532, r is significant. We can use the predicted regression line we found above to make the prediction for x = 1990. e. ŷ = –3204 + 1.662(1990) = 103.4 CPI. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 719 Figure 12.18 NOTE In the example, notice the pattern of the points compared with the line. Although the correlation coefficient is significant, the pattern in the scatter plot indicates that a curve would be a more appropriate model to use than a line. In this example, a statistician would prefer to use other methods to fit a curve to these data, rather than model the data with the line we found. In addition to doing the calculations, it is always important to look at the scatter plot when deciding whether a linear model is appropriate. If you are interested in seeing more years of data, visit the Bureau of Labor Statistics CPI website (ftp://ftp.bls.gov/pub/special.requests/cpi/cpiai.txt). Our data are taken from the column Annual Avg. (third column from the right). For example, you could add more current years of data. Try adding the more recent years: 2004, CPI = 188.9; 2008, CPI = 215.3; and 2011, CPI = 224.9. See how this affects the model. (Check: ŷ = –4436 + 2.295x; r = 0.9018. Is r significant? Is the fit better with the addition of the new points?) 12.13 The following table shows economic development measured in per capita income (PCINC). Year PCINC Year PCINC 1870 1880 1890 1900 1910 340 499 592 757 927 Table 12.8 1920 1,050 1930 1,170 1940 1,364 1950 1,836 1960 2,132 a. What are the independent and dependent variables? b. Draw a scatter plot. c. |
Use regression to find the line of best fit and the correlation coefficient. d. e. Interpret the significance of the correlation coefficient. Is there a linear relationship between the variables? 720 Chapter 12 | Linear Regression and Correlation f. Find the coefficient of determination and interpret it. g. What is the slope of the regression equation? What does it mean? h. Use the line of best fit to estimate PCINC for 1900 and for 2000. i. Determine whether there are any outliers. 95 Percent Critical Values of the Sample Correlation Coefficient Table Degrees of Freedom: n – 2 Critical Values: + and – 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 0.997 0.950 0.878 0.811 0.754 0.707 0.666 0.632 0.602 0.576 0.555 0.532 0.514 0.497 0.482 0.468 0.456 0.444 0.433 0.423 0.413 0.404 0.396 0.388 0.381 0.374 0.367 0.361 0.355 Table 12.9 This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 721 Degrees of Freedom: n – 2 Critical Values: + and – 30 40 50 60 70 80 90 100 Table 12.9 0.349 0.304 0.273 0.250 0.232 0.217 0.205 0.195 12.6 | Regression (Distance from School) (Optional) 722 Chapter 12 | Linear Regression and Correlation 12.1 Regression (Distance From School) Student Learning Outcomes • The student will calculate and construct the line of best fit between two variables. • The student will evaluate the relationship between two variables to determine whether that relationship is significant. Collect the Data Use eight members of your class for the sample. Collect bivariate data (distance an individual lives from school, the cost of supplies for the current term). 1. Complete the table. Distance from School Cost of Supplies This Term Table 12.10 2. Which variable should be the dependent variable and which should be the independent variable? Why? 3. Graph distance vs. cost. Plot the points on the graph. Label both axes with words. Scale both axes. Figure 12. |
19 Analyze the Data This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 723 Enter your data into a calculator or computer. Write the linear equation, rounding to four decimal places. 1. Calculate the following: a. a = ______ b. b = ______ c. correlation = ______ d. n = ______ e. equation: ŷ = ______ f. Is the correlation significant? Why or why not? (Answer in one to three complete sentences.) 2. Supply an answer for the following scenarios: a. For a person who lives eight miles from campus, predict the total cost of supplies this term. b. For a person who lives 80 miles from campus, predict the total cost of supplies this term. 3. Obtain the graph on a calculator or computer. Sketch the regression line. Figure 12.20 Discussion Questions 1. Answer each question in complete sentences. a. Does the line seem to fit the data? Why? b. What does the correlation imply about the relationship between distance and cost? 2. Are there any outliers? If so, which point is an outlier? 3. Should the outlier, if it exists, be removed? Why or why not? 12.7 | Regression (Textbook Cost) (Optional) 724 Chapter 12 | Linear Regression and Correlation 12.2 Regression (Textbook Cost) Student Learning Outcomes • The student will calculate and construct the line of best fit between two variables. • The student will evaluate the relationship between two variables to determine whether that relationship is significant. Collect the Data Survey 10 textbooks. Collect bivariate data (number of pages in a textbook, the cost of the textbook). 1. Complete the table. Number of Pages Cost of Textbook Table 12.11 2. Which variable should be the dependent variable and which should be the independent variable? Why? 3. Graph pages vs. cost. Plot the points on the graph in Analyze the Data. Label both axes with words. Scale both axes. Analyze the Data Enter your data into a calculator or computer. Write the linear equation, rounding to four decimal places. 1. Calculate the following: a. a = ______ b. b = ______ c. correlation = ______ d. n = ______ e. equation: y = ______ f. Is the correlation significant? Why or why not? (Answer in complete sentences.) 2. Supply an |
answer for the following scenarios: a. For a textbook with 400 pages, predict the cost. b. For a textbook with 600 pages, predict the cost. 3. Obtain the graph on a calculator or computer. Sketch the regression line. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 725 Figure 12.21 Discussion Questions 1. Answer each question in complete sentences. a. Does the line seem to fit the data? Why? b. What does the correlation imply about the relationship between the number of pages and the cost? 2. Are there any outliers? If so, which point is an outlier? 3. Should the outlier, if it exists, be removed? Why or why not? 12.8 | Regression (Fuel Efficiency) (Optional) 726 Chapter 12 | Linear Regression and Correlation 12.3 Regression (Fuel Efficiency) Student Learning Outcomes • The student will calculate and construct the line of best fit between two variables. • The student will evaluate the relationship between two variables to determine whether that relationship is significant. Collect the Data Find a reputable source that provides information on total fuel efficiency (in miles per gallon) and weight (in pounds) of new cars with an automatic transmission. You will use these data to determine the relationship, if any, between the fuel efficiency of a car and its weight. 1. Using your random-number generator, select 20 cars randomly from the list and record their weight and fuel efficiency into Table 12.12. Weight Fuel Efficiency Table 12.12 2. Which variable is the dependent variable and which is the independent variable? Why? 3. By hand, draw a scatter plot of weight vs. fuel efficiency. Plot the points on graph paper. Label both axes with words. Scale both axes accurately. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 727 Figure 12.22 Analyze the Data Enter your data into a calculator or computer. Write the linear equation, rounding to four decimal places. 1. Calculate the following: a. a = ______ b. b = ______ c. correlation = ______ d. n = ______ e. equation: ŷ = ______ 2. Obtain a graph of the regression line on a calculator. Sketch the regression line on the same axes as |
your scatter plot. Discussion Questions 1. Is the correlation significant? Explain how you determined this in complete sentences. 2. 3. Is the relationship a positive one or a negative one? Explain how you can tell and what this means in terms of weight and fuel efficiency. In one or two complete sentences, what is the practical interpretation of the slope of the least-squares line in terms of fuel efficiency and weight? 4. For a car that weighs 4,000 pounds, predict its fuel efficiency. Include units. 5. Can we predict the fuel efficiency of a car that weighs 10,000 pounds using the least-squares line? Explain why or why not. 6. Answer each question in complete sentences. a. Does the line seem to fit the data? Why or why not? b. What does the correlation imply about the relationship between fuel efficiency and weight of a car? Is this what you expected? 7. Are there any outliers? If so, which point is an outlier? 728 Chapter 12 | Linear Regression and Correlation KEY TERMS coefficient of correlation a measure developed by Karl Pearson during the early 1900s that gives the strength of association between the independent variable and the dependent variable; r = n∑ xy − [∑ x][∑ y] 2 (n∑ x2 − [∑ x] )(n∑ y2 − [∑ y] 2 ) where n is the number of data points The coefficient cannot be more than 1 and less than –1. The closer the coefficient is to ±1, the stronger the evidence of a significant linear relationship between x and y. outlier an observation that does not fit the rest of the data CHAPTER REVIEW 12.1 Linear Equations The most basic type of association is a linear association. This type of relationship can be defined algebraically by the equations used (numerically with actual or predicted data values) or graphically from a plotted curve. Lines are classified as straight curves. Algebraically, a linear equation typically takes the form y = mx + b, where m and b are constants, x is the independent variable, and y is the dependent variable. In a statistical context, a linear equation is written in the form y = a + bx, where a and b are the constants. This form is used to help you distinguish the statistical context from the algebraic context. In the equation y = a + bx, the constant b that multiplies the x variable ( |
b is called a coefficient) is called the slope. The slope describes the rate of change between the independent and dependent variables; in other words, the rate of change describes the change that occurs in the dependent variable as the independent variable is changed. In the equation y = a + bx, the constant a is called the y-intercept. Graphically, the y-intercept is the y-coordinate of the point where the graph of the line crosses the y-axis. At this point, x = 0. The slope of a line is a value that describes the rate of change between the independent and dependent variables. The slope tells us how the dependent variable (y) changes for every one-unit increase in the independent (x) variable, on average. The y-intercept is used to describe the dependent variable when the independent variable equals zero. Graphically, the slope is represented by three line types in elementary statistics. 12.2 The Regression Equation A regression line, or a line of best fit, can be drawn on a scatter plot and used to predict outcomes for the x and y variables in a given data set or sample data. There are several ways to find a regression line, but usually the least-squares regression line is used because it creates a uniform line. Residuals, also called errors, measure the distance from the actual value of y and the estimated value of y. The sum of squared errors, or SSE, when set to its minimum, calculates the points on the line of best fit. Regression lines can be used to predict values within the given set of data but should not be used to make predictions for values outside the set of data. The correlation coefficient, r, measures the strength of the linear association between x and y. The variable r has to be between –1 and +1. When r is positive, x and y tend to increase and decrease together. When r is negative, x increases and y decreases, or the opposite occurs: x decreases and y increases. The coefficient of determination, r2, is equal to the square of the correlation coefficient. When expressed as a percentage, r2 represents the percentage of variation in the dependent variable, y, that can be explained by variation in the independent variable, x, using the regression line. 12.3 Testing the Significance of the Correlation Coefficient (Optional) Linear regression is a procedure for fitting a straight line of the form ŷ = a + bx to data. |
The conditions for regression are as follows: • Linear: In the population, there is a linear relationship that models the average value of y for different values of x. • Independent: The residuals are assumed to be independent. • Normal: The y values are distributed normally for any value of x. • Equal variance: The standard deviation of the y values is equal for each x value. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 729 • Random: The data are produced from a well-designed random sample or a randomized experiment. The slope b and intercept a of the least-squares line estimate the slope β and intercept α of the population (true) regression line. To estimate the population standard deviation of y (σ) use the standard deviation of the residuals: s = SSE n − 2. The variable ρ (rho) is the population correlation coefficient. To test the null hypothesis, H0: ρ = hypothesized value, use a linear regression t-test. The most common null hypothesis is H0: ρ = 0, which indicates there is no linear relationship between x and y in the population. The TI-83, 83+, 84, 84+ calculator function LinRegTTest can perform this test (STATS, TESTS, LinRegTTest). 12.4 Prediction (Optional) After determining the presence of a strong correlation coefficient and calculating the line of best fit, you can use the leastsquares regression line to make predictions about your data. 12.5 Outliers To determine whether a point is an outlier, do one of the following: 1. Input the following equations into the TI 83, 83+, 84, or 84+ calculator: y1 = a + bx y2 = a + bx + 2s y3 = a + bx – 2s where s is the standard deviation of the residuals. If any point is above y2 or below y3, then the point is considered to be an outlier. 2. Use the residuals and compare their absolute values to 2s, where s is the standard deviation of the residuals. If the absolute value of any residual is greater than or equal to 2s, then the corresponding point is an outlier. 3. Note: The calculator function LinRegTTest (STATS, TESTS, LinRegTTest) calculates s |
. FORMULA REVIEW 12.1 Linear Equations where a is the y-intercept and b is the slope. Standard Deviation of the Residuals: y = a + bx, where a is the y-intercept and b is the slope. The variable x is the independent variable and y is the dependent variable. s = SSE n − 2, where SSE = sum of squared errors, and n = the number of data points. 12.3 Testing the Significance of the Correlation Coefficient (Optional) Least-Squares Line or Line of Best Fit: ŷ = a + bx, PRACTICE 12.1 Linear Equations Use the following information to answer the next three exercises. A vacation resort rents scuba equipment to certified divers. The resort charges an up-front fee of $25 and another fee of $12.50 an hour. 1. What are the dependent and independent variables? 2. Find the equation that expresses the total fee in terms of the number of hours the equipment is rented. 730 Chapter 12 | Linear Regression and Correlation 3. Graph the equation from Exercise 12.2. Use the following information to answer the next two exercises. A credit card company charges $10 when a payment is late and $5 a day each day the payment remains unpaid. 4. Find the equation that expresses the total fee in terms of the number of days the payment is late. 5. Graph the equation from Exercise 12.4. 6. Is the equation y = 10 + 5x – 3x2 linear? Why or why not? 7. Which of the following equations are linear? a. y = 6x + 8 b. y + 7 = 3x c. y – x = 8x2 d. 4y = 8 8. Does the graph in Figure 12.23 show a linear equation? Why or why not? Figure 12.23 Use the following information to answer the next exercise. Table 12.13 contains real data for the first two decades of flu reporting. Year Number of Flu Cases Diagnosed Number of Flu Deaths Pre-1981 91 1981 1982 1983 1984 1985 1986 1987 1988 1989 319 1,170 3,076 6,240 11,776 19,032 28,564 35,447 42,674 Table 12.13 29 121 453 1,482 3,466 6,878 11,987 16,162 20,868 27,591 This OpenStax book is available |
for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 731 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 48,634 59,660 78,530 78,834 71,874 68,505 59,347 47,149 38,393 25,174 25,522 25,643 26,464 31,335 36,560 41,055 44,730 49,095 49,456 38,510 20,736 19,005 18,454 17,347 17,402 16,371 Total 802,118 489,093 Table 12.13 9. Use the columns Year and Number of Flu Cases Diagnosed. Why is year the independent variable and number of flu cases diagnosed the dependent variable (instead of the reverse)? Use the following information to answer the next two exercises. A specialty cleaning company charges an equipment fee and an hourly labor fee. A linear equation that expresses the total amount of the fee the company charges for each session is y = 50 + 100x. 10. What are the independent and dependent variables? 11. What is the y-intercept, and what is the slope? Interpret them using complete sentences. Use the following information to answer the next three questions. As a result of erosion, a river shoreline is losing several thousand pounds of soil each year. A linear equation that expresses the total amount of soil lost per year is y = 12,000x. 12. What are the independent and dependent variables? 13. How many pounds of soil does the shoreline lose in a year? 14. What is the y-intercept? Interpret its meaning. Use the following information to answer the next two exercises. The price of a single issue of stock can fluctuate throughout the day. A linear equation that represents the price of stock for Shipment Express is y = 15 – 1.5x, where x is the number of hours passed in an eight-hour day of trading. 15. What are the slope and y-intercept? Interpret their meaning. 16. If you owned this stock, would you want a positive or negative slope? Why? 732 Chapter 12 | Linear Regression and Correlation 12.2 The Regression Equation 17. Table 12.16 below represents the relationship between the number of hours spent studying and final exam grades. x (number of hours spent studying) y (final exam grades) 3 5 1 2 6 8 4 7 |
Table 12.14 50 72 45 51 80 96 65 90 Fill in the following chart as a first step in finding the line of best fit, using the median–median approach. Group x (no. of hours spent studying) y (final exam grades) Median x Value Median y Value 1 2 3 Table 12.15 Use the following information to answer the next five exercises. A random sample of 10 professional athletes produced the following data, where x is the number of endorsements the player has and y is the amount of money made, in millions of dollars 12 9 9 3 13 4 10 Table 12.16 18. Draw a scatter plot of the data. 19. Use regression to find the equation for the line of best fit. 20. Draw the line of best fit on the scatter plot. 21. What is the slope of the line of best fit? What does it represent? 22. What is the y-intercept of the line of best fit? What does it represent? 23. What does an r value of zero mean? This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 733 24. When n = 2 and r = 1, are the data significant? Explain. 25. When n = 100 and r = –0.89, is there a significant correlation? Explain. 12.3 Testing the Significance of the Correlation Coefficient (Optional) 26. When testing the significance of the correlation coefficient, what is the null hypothesis? 27. When testing the significance of the correlation coefficient, what is the alternative hypothesis? 28. If the level of significance is 0.05 and the p-value is 0.04, what conclusion can you draw? 12.4 Prediction (Optional) Use the following information to answer the next two exercises. An electronics retailer used regression to find a simple model to predict sales growth in the first quarter of the new year (January through March). The model is good for 90 days, where x is the day. The model can be written as ŷ = 101.32 + 2.48x, where ŷ is in thousands of dollars. 29. What would you predict the sales to be on day 60? 30. What would you predict the sales to be on day 90? Use the following information to answer the next three exercises. A landscaping company is hired to mow the grass for several large properties. The total area of |
the properties is 1,345 acres. The rate at which one person can mow is ŷ = 1350 – 1.2x, where x is the number of hours and ŷ represents the number of acres left to mow. 31. How many acres are left to mow after 20 hours of work? 32. How many acres are left to mow after 100 hours of work? 33. How many hours does it take to mow all the lawns, or when is ŷ = 0? Use the following information to answer the next 14 exercises. Table 12.17 contains real data for the first two decades of flu reporting. Year Number of Flu Cases Diagnosed Number of Flu Deaths Pre-1981 91 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 319 1,170 3,076 6,240 11,776 19,032 28,564 35,447 42,674 48,634 59,660 78,530 78,834 71,874 68,505 59,347 29 121 453 1,482 3,466 6,878 11,987 16,162 20,868 27,591 31,335 36,560 41,055 44,730 49,095 49,456 38,510 Table 12.17 Adults and Adolescents Only, United States 734 Chapter 12 | Linear Regression and Correlation 1997 1998 1999 2000 2001 2002 47,149 38,393 25,174 25,522 25,643 26,464 Total 802,118 20,736 19,005 18,454 17,347 17,402 16,371 489,093 Table 12.17 Adults and Adolescents Only, United States 34. Graph year versus number of flu cases diagnosed (plot the scatter plot). Do not include pre-1981 data. 35. Perform a linear regression. What is the linear equation? Round to the nearest whole number. Find the following: Write the equations: • Linear equation: __________ • a = ________ • b = ________ • r = ________ • n = ________ 36. Solve. a. When x = 1985, ŷ = _____. b. When x = 1990, ŷ = _____. c. When x = 1970, ŷ = _____. Why doesn’t this answer make sense? 37. Does the line seem to fit the data? Why or why not? 38. What does the correlation imply about the relationship between |
time (years) and the number of diagnosed flu cases reported in the United States? 39. Plot the two points on the graph. Then, connect the two points to form the regression line. 40. Write the equation: ŷ = ____________. 41. Hand-draw a smooth curve on the graph that shows the flow of the data. 42. Does the line seem to fit the data? Why or why not? 43. Do you think a linear fit is best? Why or why not? 44. What does the correlation imply about the relationship between time (years) and the number of diagnosed flu cases reported in the United States? 45. Graph year vs. number flu cases diagnosed. Do not include pre-1981. Label both axes with words. Scale both axes. 46. Enter your data into your calculator or computer. The pre-1981 data should not be included. Why is that so? Write the linear equation, rounding to four decimal places. 47. Calculate the following: • a = _____ • b = _____ • correlation = _____ • n = _____ 12.5 Outliers 48. Marcus states that all outliers are influential points. Is he correct? Explain. Use the following information to answer the next four exercises. The scatter plot shows the relationship between hours spent studying and exam scores. The line shown is the calculated line of best fit. The correlation coefficient is 0.69. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 735 Figure 12.24 49. Do there appear to be any outliers? 50. A point is removed and the line of best fit is recalculated. The new correlation coefficient is 0.98. Does the point appear to have been an outlier? Why? 51. What effect did the potential outlier have on the line of best fit? 52. Are you more or less confident in the predictive ability of the new line of best fit? 53. The sum of squared errors (SSE) for a data set of 18 numbers is 49. What is the standard deviation? 54. The standard deviation for the SSE for a data set is 9.8. What is the cutoff for the vertical distance that a point can be from the line of best fit to be considered an outlier? HOMEWORK 12.1 Linear Equations 55. For each of the following situations, state the independent |
variable and the dependent variable. a. A study is done to determine whether elderly drivers are involved in more motor vehicle fatalities than other drivers. The number of fatalities per 100,000 drivers is compared with the age of drivers. Insurance companies base life insurance premiums partially on the age of the applicant. b. A study is done to determine whether the weekly grocery bill changes based on the number of family members. c. d. Utility bills vary according to power consumption. e. A study is done to determine whether a higher education reduces the crime rate in a population. 736 Chapter 12 | Linear Regression and Correlation 56. Piece-rate systems are widely debated incentive payment plans. In a recent study of loan officer effectiveness, the following piece-rate system was examined: % of goal reached < 80 80 100 120 Incentive n/ a $4,000, with an additional $125 added per percentage point from 81% to 99% $6,500, with an additional $125 added per percentage point from 101% to 119% $9,500, with an additional $125 added per percentage point starting at 121% Table 12.18 If a loan officer makes 95 percent of his or her goal, write the linear function that applies based on the incentive plan table. In context, explain the y-intercept and slope. 12.2 The Regression Equation 57. What is the process through which we can calculate a line that goes through a scatter plot with a linear pattern? 58. Explain what it means when a correlation has an r2 value of.72. 59. Can a coefficient of determination be negative? Why or why not? 60. The table below represents the relationship between SAT scores on the math portion of the test and high school grade point averages (GPAs). Use the median–-median line approach to find the equation for the line of best fit. x (SAT math scores) y (GPAs) 624 544 363 373 350 741 262 587 327 364 261 Table 12.19 90 86 70 71 65 98 60 87 62 67 50 This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 737 12.4 Prediction (Optional) 61. Recently, the annual numbers of driver deaths per 100,000 people for the selected age groups are as follows: Age (years) Number of Driver Deaths (per 100,000 people) 16–19 20 |
–24 25–34 35–54 55–74 75+ Table 12.20 38 36 24 20 18 28 a. For each age group, pick the midpoint of the interval for the x value. For the 75+ group, use 80. b. Using age as the independent variable and number of driver deaths per 100,000 people as the dependent variable, make a scatter plot of the data. c. Calculate the least-squares (best–fit) line. Put the equation in the form ŷ = a + bx. d. Find the correlation coefficient. Is it significant? e. Predict the number of deaths for ages 40 years and 60 years. f. Based on the given data, is there a linear relationship between age of a driver and driver fatality rate? g. What is the slope of the least-squares (best-fit) line? Interpret the slope. 62. Table 12.21 shows the life expectancy for an individual born in the United States in certain years. Year of Birth Life Expectancy in years 1930 1940 1950 1965 1973 1982 1987 1992 2010 Table 12.21 59.7 62.9 70.2 69.7 71.4 74.5 75 75.7 78.7 a. Decide which variable should be the independent variable and which should be the dependent variable. b. Draw a scatter plot of the ordered pairs. c. Calculate the least-squares line. Put the equation in the form ŷ = a + bx. d. Find the correlation coefficient. Is it significant? e. Find the estimated life expectancy for an individual born in 1950 and for one born in 1982. f. Why aren’t the answers to Part E the same as the values in Table 12.21 that correspond to those years? g. Use the two points in Part E to plot the least-squares line on your graph from Part B. h. Based on the data, is there a linear relationship between the year of birth and life expectancy? i. Are there any outliers in the data? j. Using the least-squares line, find the estimated life expectancy for an individual born in 1850. Does the least- squares line give an accurate estimate for that year? Explain why or why not. k. What is the slope of the least-squares (best-fit) line? Interpret the slope. 738 Chapter 12 | Linear Regression and Correlation 63. The maximum discount value of the Entertainment® card for |
the Fine Dining section, 10th edition, for various pages is given in Table 12.22. Page Number Maximum Value ($) 4 14 25 32 43 57 72 85 90 Table 12.22 16 19 15 17 19 15 16 15 17 a. Decide which variable should be the independent variable and which should be the dependent variable. b. Draw a scatter plot of the ordered pairs. c. Calculate the least-squares line. Put the equation in the form ŷ = a + bx. d. Find the correlation coefficient. Is it significant? e. Find the estimated maximum values for the restaurants on page 10 and on page 70. f. Does it appear that the restaurants giving the maximum value are placed in the beginning of the Fine Dining section? How did you arrive at your answer? g. Suppose there are 200 pages of restaurants. What do you estimate to be the maximum value for a restaurant listed on page 200? Is the least-squares line valid for page 200? Why or why not? h. i. What is the slope of the least-squares (best-fit) line? Interpret the slope. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 739 64. Table 12.23 gives the gold medal times for every other Summer Olympics for the women’s 100-meter freestyle in swimming. Year Time in seconds 1912 1924 1932 1952 1960 1968 1976 1984 1992 2000 2008 Table 12.23 82.2 72.4 66.8 66.8 61.2 60.0 55.65 55.92 54.64 53.8 53.1 a. Decide which variable should be the independent variable and which should be the dependent variable. b. Draw a scatter plot of the data. c. Does it appear from inspection that there is a relationship between the variables? Why or why not? d. Calculate the least-squares line. Put the equation in the form ŷ = a + bx. e. Find the correlation coefficient. Is the decrease in times significant? f. Find the estimated gold medal time for 1932. Find the estimated time for 1984. g. Why are the answers from Part F different from the chart values? h. Does it appear that a line is the best way to fit the data? Why or why not? i. Use the least-squares line to estimate the gold medal time |
for the next Summer Olympics. Do you think your answer is reasonable? Why or why not? 740 65. State Alabama Colorado Hawaii Iowa Maryland Missouri 7 8 6 4 8 8 New Jersey 9 Ohio South Carolina Utah Wisconsin Table 12.24 4 13 4 9 Chapter 12 | Linear Regression and Correlation No. of Letters in Name Year Entered the Union Rank for Entering the Union Area in square miles 1819 1876 1959 1846 1788 1821 1787 1803 1788 1896 1848 22 38 50 29 7 24 3 17 8 45 30 52,423 104,100 10,932 56,276 12,407 69,709 8,722 44,828 32,008 84,904 65,499 We are interested in whether the number of letters in a state name depends on the year the state entered the Union. a. Decide which variable should be the independent variable and which should be the dependent variable. b. Draw a scatter plot of the data. c. Does it appear from inspection that there is a relationship between the variables? Why or why not? d. Calculate the least-squares line. Put the equation in the form ŷ = a + bx. e. Find the correlation coefficient. What does it imply about the significance of the relationship? f. Find the estimated number of letters (to the nearest integer) a state name would have if it entered the Union in 1900. Find the estimated number of letters a state name would have if it entered the Union in 1940. g. Does it appear that a line is the best way to fit the data? Why or why not? h. Use the least-squares line to estimate the number of letters for a new state that enters the Union this year. Can the least-squares line be used to predict it? Why or why not? This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 741 12.5 Outliers 66. Given the information in Table 12.30, which represents the relationship between final exam math grades and final exam history grades, decide whether point (56, 95) is an influential point. Explain how you arrived at your decision. Show all work. x (final exam math grades) y (final exam history grades) 54 56 77 74 63 51 88 72 69 56 Table 12.25 60 68 82 78 69 55 97 77 78 95 742 |
Chapter 12 | Linear Regression and Correlation 67. In Table 12.31, the height (sidewalk to roof) of notable tall buildings in America is compared with the number of stories of the building (beginning at street level). Height (in feet) Stories 1,050 428 362 529 790 401 380 1,454 1,127 700 Table 12.26 57 28 26 40 60 22 38 110 100 46 a. Using stories as the independent variable and height as the dependent variable, make a scatter plot of the data. b. Does it appear from inspection that there is a relationship between the variables? c. Calculate the least-squares line. Put the equation in the form ŷ = a + bx. d. Find the correlation coefficient. Is it significant? e. Find the estimated heights for a building that has 32 stories and for a building that has 94 stories. f. Based on the data in Table 12.26, is there a linear relationship between the number of stories in tall buildings and the height of the buildings? g. Are there any outliers in the data? If so, which point(s)? h. What is the estimated height of a building with six stories? Does the least-squares line give an accurate estimate of height? Explain why or why not. i. Based on the least-squares line, adding an extra story is predicted to add about how many feet to a building? j. What is the slope of the least-squares (best-fit) line? Interpret the slope. 68. Ornithologists (scientists who study birds) tag sparrow hawks in 13 different colonies to study their population. They gather data for the percentage of new sparrow hawks in each colony and the percentage of those that have returned from migration. Percent return: 74, 66, 81, 52, 73, 62, 52, 45, 62, 46, 60, 46, 38 Percent new: 5, 6, 8, 11, 12, 15, 16, 17, 18, 18, 19, 20, 20 a. Enter the data into a calculator and make a scatter plot. b. Use the calculator’s regression function to find the equation of the least-squares regression line. Add this to your scatter plot from Part A. c. Explain what the slope and y-intercept of the regression line tell us. d. How well does the regression line fit the data? Explain your response. e. Which |
point has the largest residual? Explain what the residual means in context. Is this point an outlier? An influential point? Explain. f. An ecologist wants to predict how many birds will join another colony of sparrow hawks to which 70 percent of the adults from the previous year have returned. What is the prediction? This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 743 69. The following table shows data on average per capita coffee consumption and death rate from heart disease in a random sample of 10 countries. Yearly Coffee Consumption (liters) 2.5 3.9 2.9 2.4 2.9 0.8 9.1 2.7 0.8 0.7 No. of Deaths from Heart Disease 221 167 131 191 220 297 71 172 211 300 Table 12.27 a. Enter the data into a calculator and make a scatter plot. b. Use the calculator’s regression function to find the equation of the least-squares regression line. Add this to your scatter plot from Part A. c. Explain what the slope and y-intercept of the regression line tell us. d. How well does the regression line fit the data? Explain your response. e. Which point has the largest residual? Explain what the residual means in context. Is this point an outlier? An influential point? Explain. f. Do the data provide convincing evidence that there is a linear relationship between the amount of coffee consumed and the heart disease death rate? Carry out an appropriate test at a significance level of 0.05 to help answer this question. 70. The following table consists of one student athlete’s time (in minutes) to swim 2,000 yards and the student’s heart rate (beats per minute) after swimming on a random sample of 10 days. Swim Time Heart Rate 34.12 35.72 34.72 34.05 34.13 35.73 36.17 35.57 35.37 35.57 Table 12.28 144 152 124 140 152 146 128 136 144 148 a. Enter the data into a calculator and make a scatter plot. b. Use the calculator’s regression function to find the equation of the least-squares regression line. Add this to your scatter plot from Part A. c. Explain what the slope and y-intercept of the regression line tell us. d |
. How well does the regression line fit the data? Explain your response. e. Which point has the largest residual? Explain what the residual means in context. Is this point an outlier? An influential point? Explain. 744 Chapter 12 | Linear Regression and Correlation 71. A researcher is investigating whether population impacts homicide rate. He uses demographic data from Detroit, Michigan, to compare homicide rates and the population. Population Size Homicide Rate per 100,000 People 558,724 538,584 519,171 500,457 482,418 465,029 448,267 432,109 416,533 401,518 387,046 373,095 359,647 Table 12.29 8.6 8.9 8.52 8.89 13.07 14.57 21.36 28.03 31.49 37.39 46.26 47.24 52.33 a. Use a calculator to construct a scatter plot of the data. What is the independent variable? Why? b. Use the calculator’s regression function to find the equation of the least-squares regression line. Add this to your scatter plot. c. Discuss what the following mean in context: i. The slope of the regression equation ii. The y-intercept of the regression equation iii. The correlation coefficient, r iv. The coefficient of determination, r2 d. Do the data provide convincing evidence that there is a linear relationship between population size and homicide rate? Carry out an appropriate test at a significance level of 0.05 to help answer this question. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 745 72. School Princeton Harvey Mudd CalTech U.S. Naval Academy West Point MIT Lehigh University NYU-Poly Babson College Stanford Table 12.30 Mid-Career Salary (in thousands of U.S. dollars) Yearly Tuition (in U.S. dollars) 137 135 127 122 120 118 118 117 117 114 28,540 40,133 39,900 0 0 42,050 43,220 39,565 40,400 54,506 Use the data in the Table 12.35 to determine the linear regression line equation with the outliers removed. Is there a linear correlation for the data set with outliers removed? Justify your answer. REFERENCES 12.1 Linear Equations Centers for Disease Control and Prevention. ( |
n.d.). Retrieved from https://www.cdc.gov/ National Center for HIV/AIDS, Viral Hepatitis, STD, and TB Prevention. (n.d.). Centers for Disease Control and Prevention. Retrieved from https://www.cdc.gov/nchhstp/default.htm 12.4 Prediction (Optional) Centers for Disease Control and Prevention. (n.d.). Retrieved from https://www.cdc.gov/ National Center for HIV/AIDS, Viral Hepatitis, STD, and TB Prevention. (n.d.). Centers for Disease Control and Prevention. Retrieved from https://www.cdc.gov/nchhstp/default.htm National Center https://www.cdc.gov/nchs/index.htm for Health Statistics. (n.d.). Centers for Disease Control and Prevention. Retrieved from Census U.S. Bureau. motor_vehicle_accidents_and_fatalities.html (n.d.). Retrieved from http://www.census.gov/compendia/statab/cats/transportation/ 12.5 Outliers Committee on Ways and Means, U.S. House of Representatives. (n.d.). Washington, DC: U.S. Department of Health and Human Services. Microsoft Bookshelf. (n.d.). Physician’s Desk Reference Staff. (1990). Physician’s desk reference. Ohio: Medical Economics Company. U.S. Bureau of Labor Statistics. (n.d.). Retrieved from https://www.bls.gov/ 746 Chapter 12 | Linear Regression and Correlation BRINGING IT TOGETHER: HOMEWORK 73. The average number of people in a family who attended college for various years is given in Table 12.31. Year No. of Family Members Attending College 1969 1973 1975 1979 1983 1988 1991 Table 12.31 4.0 3.6 3.2 3.0 3.0 3.0 2.9 a. Using year as the independent variable and number of family members attending college as the dependent variable, draw a scatter plot of the data. b. Calculate the least-squares line. Put the equation in the form ŷ = a + bx. c. Does the y-intercept, a, have any meaning here? d. Find the correlation coefficient. Is it significant? e. Pick two years between 1969 and 1991 |
and find the estimated number of family members attending college. f. Based on the data in Table 12.31, is there a linear relationship between the year and the average number of family members attending college? g. Using the least-squares line, estimate the number of family members attending college for 1960 and 1995. Does the least-squares line give an accurate estimate for those years? Explain why or why not. h. Are there any outliers in the data? i. What is the estimated average number of family members attending college for 1986? Does the least-squares line give an accurate estimate for that year? Explain why or why not. j. What is the slope of the least-squares (best-fit) line? Interpret the slope. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 747 74. The percent of female wage and salary workers who are paid hourly rates is given in Table 12.32 for the years 1979 to 1992. Year Percent of Workers Paid Hourly Rates 1979 1980 1981 1982 1983 1984 1985 1986 1987 1990 1992 Table 12.32 61.2 60.7 61.3 61.3 61.8 61.7 61.8 62.0 62.7 62.8 62.9 a. Using year as the independent variable and percent of workers paid hourly rates as the dependent variable, draw a scatter plot of the data. b. Does it appear from inspection that there is a relationship between the variables? Why or why not? c. Does the y-intercept, a, have any meaning here? d. Calculate the least-squares line. Put the equation in the form ŷ = a + bx. e. Find the correlation coefficient. Is it significant? f. Find the estimated percentages for 1991 and 1988. g. Based on the data, is there a linear relationship between the year and the percentage of female wage and salary earners who are paid hourly rates? h. Are there any outliers in the data? i. What is the estimated percentage for the year 2050? Does the least-squares line give an accurate estimate for that year? Explain why or why not. j. What is the slope of the least-squares (best-fit) line? Interpret the slope. Use the following information to answer the next two exercises. The cost of a leading liquid laundry detergent in different sizes is given |
in Table 12.33. Size (ounces) Cost ($) Cost per Ounce 16 32 64 200 Table 12.33 3.99 4.99 5.99 10.99 748 75. 76. Chapter 12 | Linear Regression and Correlation a. Using size as the independent variable and cost as the dependent variable, draw a scatter plot. b. Does it appear from inspection that there is a relationship between the variables? Why or why not? c. Calculate the least-squares line. Put the equation in the form ŷ = a + bx. d. Find the correlation coefficient. Is it significant? e. f. g. Does it appear that a line is the best way to fit the data? Why or why not? h. Are there any outliers in the given data? i. If the laundry detergent were sold in a 40 oz. size, what is the estimated cost? If the laundry detergent were sold in a 90 oz. size, what is the estimated cost? Is the least-squares line valid for predicting what a 300 oz. size of the laundry detergent would cost? Why or why not? j. What is the slope of the least-squares (best-fit) line? Interpret the slope. a. Complete Table 12.33 for the cost per ounce of the different sizes of laundry detergent. b. Using size as the independent variable and cost per ounce as the dependent variable, draw a scatter plot of the data. c. Does it appear from inspection that there is a relationship between the variables? Why or why not? d. Calculate the least-squares line. Put the equation in the form ŷ = a + bx. e. Find the correlation coefficient. Is it significant? f. g. h. Does it appear that a line is the best way to fit the data? Why or why not? i. Are there any outliers in the the data? j. If the laundry detergent were sold in a 40 oz. size, what is the estimated cost per ounce? If the laundry detergent were sold in a 90 oz. size, what is the estimated cost per ounce? Is the least-squares line valid for predicting what a 300 oz. size of the laundry detergent would cost per ounce? Why or why not? k. What is the slope of the least-squares (best-fit) line? Interpret the slope. 77. According to a flyer published by Pr |
udential Insurance Company, the costs of approximate probate fees and taxes for selected net taxable estates are as follows: Net Taxable Estate ($) Approximate Probate Fees and Taxes ($) 600,000 750,000 1,000,000 1,500,000 2,000,000 2,500,000 3,000,000 Table 12.34 30,000 92,500 203,000 438,000 688,000 1,037,000 1,350,000 a. Decide which variable should be the independent variable and which should be the dependent variable. b. Draw a scatter plot of the data. c. Does it appear from inspection that there is a relationship between the variables? Why or why not? d. Calculate the least-squares line. Put the equation in the form ŷ = a + bx. e. Find the correlation coefficient. Is it significant? f. Find the estimated total cost for a net taxable estate of $1,000,000. Find the cost for $2,500,000. g. Does it appear that a line is the best way to fit the data? Why or why not? h. Are there any outliers in the data? i. Based on these results, what would be the probate fees and taxes for an estate that does not have any assets? j. What is the slope of the least-squares (best-fit) line? Interpret the slope. This OpenStax book is available for free at http://cnx.org/content/col30309/1.8 Chapter 12 | Linear Regression and Correlation 749 78. The following are advertised sale prices of color televisions at Anderson’s: Size (inches) Sale Price ($) 9 20 27 31 35 40 60 Table 12.35 147 197 297 447 1,177 2,177 2,497 a. Decide which variable should be the independent variable and which should be the dependent variable. b. Draw a scatter plot of the data. c. Does it appear from inspection that there is a relationship between the variables? Why or why not? d. Calculate the least-squares line. Put the equation in the form ŷ = a + bx. e. Find the correlation coefficient. Is it significant? f. Find the estimated sale price for a 32-inch television. Find the cost for a 50-inch television. g. Does it appear that a line is the best way to fit |
the data? Why or why not? h. Are there any outliers in the data? i. What is the slope of the least-squares (best-fit) line? Interpret the slope. 79. Table 12.36 shows the average heights for American boys in 1990. Age (years) Height (centimeters) Birth 2 3 5 7 10 14 Table 12.36 50.8 83.8 91.4 106.6 119.3 137.1 157.5 a. Decide which variable should be the independent variable and which should be the dependent variable. b. Draw a scatter plot of the data. c. Does it appear from inspection that there is a relationship between the variables? Why or why not? d. Calculate the least-squares line. Put the equation in the form ŷ = a + bx. e. Find the correlation coefficient. Is it significant? f. Find the estimated average height for a 1-year-old. Find the estimated average height for an 11-year-old. g. Does it appear that a line is the best way to fit the data? Why or why not? h. Are there any outliers in the data? i. Use the least-squares line to estimate the average height for a 62-year-old man. Do you think that your answer is reasonable? Why or why not? j. What is the slope of the least-squares (best-fit) line? Interpret the slope. 750 80. State Alabama Colorado Hawaii Iowa Maryland Missouri 7 8 6 4 8 8 New Jersey 9 Ohio South Carolina Utah Wisconsin Table 12.37 4 13 4 9 Chapter 12 | Linear Regression and Correlation No. of Letters in Name Year Entered the Union Rank for Entering the Union Area (square miles) 1819 1876 1959 1846 1788 1821 1787 1803 1788 1896 1848 22 38 50 29 7 24 3 17 8 45 30 52,423 104,100 10,932 56,276 12,407 69,709 8,722 44,828 32,008 84,904 65,499 We are interested in whether there is a relationship between the ranking of a state and the area of the state. a. What are the independent and dependent variables? b. What do you think the scatter plot will look like? Make a scatter plot of the data. c. Does it appear from inspection that there is a relationship between the variables? Why or why not? d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.