Goodness-of-Fit Test In this type of hypothesis test, you determine whether the data "fit" a particular distribution or not. 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 or not. 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: Σ k ( O − E ) 2 E where: O = observed values (data) E = expected values (from theory) 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 number of expected values inside each cell needs to be at least five in order to use this test. 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 . Number of absences per term Expected number of students 0–2 50 3–5 30 6–8 12 9–11 6 12+ 2 A random survey across all mathematics courses was then done to determine the actual number (observed) of absences in a course. The chart in displays the results of that survey. Number of absences per term Actual number of students 0–2 35 3–5 40 6–8 20 9–11 1 12+ 4 Determine the null and alternative hypotheses needed to conduct a goodness-of-fit test. H 0 : Student absenteeism fits faculty perception. The alternative hypothesis is the opposite of the null hypothesis. H a : 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? 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 are at least five. The new results are in and . Number of absences per term Expected number of students 0–2 50 3–5 30 6–8 12 9+ 8 Number of absences per term Actual number of students 0–2 35 3–5 40 6–8 20 9+ 5 b. What is the number of degrees of freedom ( df )? b. There are four "cells" or categories in each of the new tables. df = number of cells – 1 = 4 – 1 = 3 Try It A factory manager needs to understand how many products are defective versus how many are produced. The number of expected defects is listed in . Number produced Number defective 0–100 5 101–200 6 201–300 7 301–400 8 401–500 10 A random sample was taken to determine the actual number of defects. shows the results of the survey. Number produced Number defective 0–100 5 101–200 7 201–300 8 301–400 9 401–500 11 State the null and alternative hypotheses needed to conduct a goodness-of-fit test, and state the degrees of freedom. H 0 :The number of defaults fits expectations. H a :The number of defaults does not fit expectations. df = 4 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 . 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% significance level. Day of the Week Employees were Most Absent Monday Tuesday Wednesday Thursday Friday Number of absences 15 12 9 9 15 The null and alternative hypotheses are: H 0 : The absent days occur with equal frequencies, that is, they fit a uniform distribution. H a : 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. The calculated test statistics is 3 and the critical value of the χ 2 distribution at 4 degrees of freedom the 0.05 level of confidence is 9.48. This value is found in the χ 2 table at the 0.05 column on the degrees of freedom row 4. The degrees of freedom are the number of cells – 1 = 5 – 1 = 4 Next, complete a graph like the following one with the proper labeling and shading. (You should shade the right tail.) χ c 2 = Σ k ( O − E ) 2 E = 3 The decision is not to reject the null hypothesis because the calculated value of the test statistic is not in the tail of the distribution. Conclusion: At a 5% level of significance, from the sample data, there is not sufficient evidence to conclude that the absent days do not occur with equal frequencies. Try It 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 . Sunday Monday Tuesday Wednesday Thursday Friday Saturday Number of students 11 8 10 7 10 5 5 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? df = 6 p -value = 0.6093 We decline to reject the null hypothesis. There is not enough evidence to support that students do not do the majority of their homework equally throughout the week. One study indicates that the number of streaming services that American families have is distributed (this is the given distribution for the American population) as in . Number of Streaming Services Percent 0 10 1 16 2 55 3 11 4+ 8 The table contains expected ( E ) percents. A random sample of 600 families in the far western United States resulted in the data in . Number of Streaming Services Frequency 0 66 1 119 2 340 3 60 4+ 15 Total = 600 The table contains observed ( O ) frequency values. At the 1% significance level, does it appear that the distribution "number of streaming services" of far western United States families is different from the distribution for the American population as a whole? This problem asks you to test whether the far western United States 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 . Number of Streaming Services Percent Expected frequency 0 10 (0.10)(600) = 60 1 16 (0.16)(600) = 96 2 55 (0.55)(600) = 330 3 11 (0.11)(600) = 66 over 3 8 (0.08)(600) = 48 Therefore, the expected frequencies are 60, 96, 330, 66, and 48. H 0 : The "number of streaming services" distribution of far western United States families is the same as the "number of streaming services" distribution of the American population. H a : The "number of streaming services" distribution of far western United States families is different from the "number of streaming services" distribution of the American population. Distribution for the test: χ 4 2 where df = (the number of cells) – 1 = 5 – 1 = 4. Calculate the test statistic: χ 2 = 29.65 Graph: The graph of the Chi-square shows the distribution and marks the critical value with four degrees of freedom at 99% level of confidence, α = .01, 13.277. The graph also marks the calculated chi squared test statistic of 29.65. Comparing the test statistic with the critical value, as we have done with all other hypothesis tests, we reach the conclusion. Make a decision: Because the test statistic is in the tail of the distribution we cannot accept the null hypothesis. This means you reject the belief that the distribution for the far western states is the same as that of the American population as a whole. Conclusion: At the 1% significance level, from the data, there is sufficient evidence to conclude that the "number of streaming services" distribution for the far western United States is different from the "number of streaming services" distribution for the American population as a whole. Try It 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 . Number of pets Percent 0 18 1 25 2 30 3 18 4+ 9 A random sample of 1,000 students from the Eastern United States resulted in the data in . Number of pets Frequency 0 210 1 240 2 320 3 140 4+ 90 At the 1% significance level, does it appear that the distribution “number of pets” of students in the Eastern United States is different from the distribution for the United States student population as a whole? p -value = 0.0036 We reject the null hypothesis that the distributions are the same. There is sufficient evidence to conclude that the distribution “number of pets” of students in the Eastern United States is different from the distribution for the United States student population as a whole. 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% significance level. 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 from the binomial probability 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. H 0 : The coins are fair. H a : The coins are not fair. Distribution for the test: χ 2 2 where df = 3 – 1 = 2. Calculate the test statistic: χ 2 = 2.14 Graph: The graph of the Chi-square shows the distribution and marks the critical value with two degrees of freedom at 95% level of confidence, α = 0.05, 5.991. The graph also marks the calculated χ 2 test statistic of 2.14. Comparing the test statistic with the critical value, as we have done with all other hypothesis tests, we reach the conclusion. Conclusion: There is insufficient evidence to conclude that the coins are not fair: we cannot reject the null hypothesis that the coins are fair. Try It Students in a social studies class hypothesize that the literacy rates across the world for every region are 82%. shows the actual literacy rates across the world broken down by region. What are the test statistic and the degrees of freedom? MDG Region Adult Literacy Rate (%) Developed Regions 99.0 Commonwealth of Independent States 99.5 Northern Africa 67.3 Sub-Saharan Africa 62.5 Latin America and the Caribbean 91.0 Eastern Asia 93.8 Southern Asia 61.9 South-Eastern Asia 91.9 Western Asia 84.5 Oceania 66.4 References Data from the U.S. Census Bureau Data from the College Board. Available online at http://www.collegeboard.com. Data from the U.S. Census Bureau, Current Population Reports. Ma, Y., E.R. Bertone, E.J. Stanek III, G.W. Reed, J.R. Hebert, N.L. Cohen, P.A. Merriam, I.S. Ockene, “Association between Eating Patterns and Obesity in a Free-living US Adult Population.” American Journal of Epidemiology volume 158, no. 1, pages 85-92. Ogden, Cynthia L., Margaret D. Carroll, Brian K. Kit, Katherine M. Flegal, “Prevalence of Obesity in the United States, 2009–2010.” NCHS Data Brief no. 82, January 2012. Available online at http://www.cdc.gov/nchs/data/databriefs/db82.pdf (accessed May 24, 2013). Stevens, Barbara J., “Multi-family and Commercial Solid Waste and Recycling Survey.” Arlington Count, VA. Available online at http://www.arlingtonva.us/departments/EnvironmentalServices/SW/file84429.pdf (accessed May 24,2013). Chapter Review 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. Formula Review ∑ k ( O − E ) 2 E 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 Determine the appropriate test to be used in the next three exercises. An archaeologist is calculating the distribution of the frequency of the number of artifacts they find in a dig site. Based on previous digs, the archaeologist creates an expected distribution broken down by grid sections in the dig site. Once the site has been fully excavated, the archeologist compares the actual number of artifacts found in each grid section to see if their expectation was accurate. An economist is deriving a model to predict outcomes on the stock market. They create a list of expected points on the stock market index for the next two weeks. At the close of each day’s trading, the economist records the actual points on the index. They want to see how well the model matched what actually happened. a goodness-of-fit test A personal trainer is putting together a weight-lifting program for clients. For a 90-day program, the trainer expects each client to lift a specific maximum weight each week. As the program goes along, the trainer records the actual maximum weights her clients lifted. They want to know how well their expectations met with what was observed. Use the following information to answer the next five exercises: A teacher predicts that the distribution of grades on the final exam will be and they are recorded in . Grade Proportion A 0.25 B 0.30 C 0.35 D 0.10 The actual distribution for a class of 20 is in . Grade Frequency A 7 B 7 C 5 D 1 d f = ______ 3 State the null and alternative hypotheses. χ 2 test statistic = ______ 2.04 At the 5% significance level, what can you conclude? 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. Use the following information to answer the next eight exercises: The cumulative number of COVID-19 related cases reported for Santa Clara County for a certain time period is broken down by ethnicity as in . Ethnicity Number of cases White 2,229 Hispanic/Latino 1,157 Black/African-American 457 Asian, Pacific Islander 232 Total = 4,075 The percentage of each ethnic group in Santa Clara County is as in . Ethnicity Percentage of total county population Number expected (round to two decimal places) White 42.9% 1748.18 Hispanic/Latino 26.7% Black/African-American 2.6% Asian, Pacific Islander 27.8% Total = 100% If the ethnicities of COVID-19 related cases 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 COVID-19 cases follows the ethnicities of the general population of Santa Clara County. H 0 : _______ H 0 : the distribution of COVID-19 cases follows the ethnicities of the general population of Santa Clara County. H a : _______ Is this a right-tailed, left-tailed, or two-tailed test? right-tailed degrees of freedom = _______ χ 2 test statistic = _______ 2016.136 Graph the situation. Label and scale the horizontal axis. Mark the mean and test statistic. Shade in the region corresponding to the confidence level. Let α = 0.05 Decision: ________________ Reason for the Decision: ________________ Conclusion (write out in complete sentences): ________________ Graph: Answers may vary. Decision: Cannot accept the null hypothesis. Reason for the Decision: Calculated value of test statistics is either in or out of the tail of the distribution. Conclusion (write out in complete sentences): The make-up of COVID-19 cases does not fit the ethnicities of the general population of Santa Clara County. Does it appear that the pattern of COVID-19 cases in Santa Clara County corresponds to the distribution of ethnic groups in this county? Why or why not? Homework 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 are the result of the 120 rolls. Face value Frequency Expected frequency 1 15 2 29 3 16 4 15 5 30 6 15 The marital status distribution of the U.S. male population, ages 15 and older, is as shown in . Marital status Percent Expected frequency Never married 31.3 Married 56.1 Widowed 2.5 Divorced/Separated 10.1 Suppose that a random sample of 400 U.S. young adult men, 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 , rounding to two decimal places. Marital status Frequency Never married 140 Married 238 Widowed 2 Divorced/Separated 20 Marital status Percent Expected frequency Never married 31.3 125.2 Married 56.1 224.4 Widowed 2.5 10 Divorced/Separated 10.1 40.4 The data fits the distribution. The data does not fit the distribution. 3 chi-square distribution with df = 3 19.27 0.0002 Answers may vary. Alpha = 0.05 Decision: Cannot accept null hypothesis at the 5% level of significance Reason for decision: Calculated value of test statistics is either in or out of the tail of the distribution. Conclusion: Data does not fit the distribution. Use the following information to answer the next two exercises: The columns in contain the Race/Ethnicity of U.S. Public Schools for a recent year, the percentages for students using mass transit to get to school, and the Overall Student Population. Suppose the right column contains the result of a survey of 1,000 local students from that year who used mass transit to get to school. Race/Ethnicity Percentage Who Use Mass Transit to Get to School Overall student population Survey frequency Asian, Asian American, or Pacific Islander 10.2% 5.4% 113 Black or African-American 8.2% 14.5% 94 Hispanic or Latino 15.5% 15.9% 136 American Indian or Alaska Native 0.6% 1.2% 10 White 59.4% 61.6% 604 Not reported/other 6.1% 1.4% 43 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. Perform a goodness-of-fit test to determine whether the local results follow the distribution of those who use mass transit, based on ethnicity. H 0 : The local results follow the distribution of the percentage of students who use mass transit to get to school H a : The local results do not follow the distribution of the percentage of students who use mass transit to get to school df = 5 chi-square distribution with df = 5 chi-square test statistic = 13.4 Answers may vary. Alpha = 0.05 Decision: Cannot accept null when a = 0.05 Reason for Decision: Calculated value of test statistics is either in or out of the tail of the distribution. Conclusion: Local data do not fit the mass transit Distribution. Decision: Do not reject null when a = 0.01 Conclusion: There is insufficient evidence to conclude that local data do not follow the distribution of students who use mass transit distribution. The City of South Lake Tahoe, CA, has an Asian population of 1,419 people, out of a total population of 23,609. Suppose that a survey of 1,419 self-reported Asians in the Manhattan, NY, area yielded the data in . Conduct a goodness-of-fit test to determine if the self-reported sub-groups of Asians in the Manhattan area fit that of the Lake Tahoe area. Race Lake Tahoe frequency Manhattan frequency Asian Indian 131 174 Chinese 118 557 Filipino 1,045 518 Japanese 80 54 Korean 12 29 Vietnamese 9 21 Other 24 66 Use the following information to answer the next two exercises: UCLA conducted a survey of more than 263,000 first-year students from 385 colleges in a certain year. Suppose a survey of 5,000 graduating women and 5,000 graduating men was done as a follow-up last year to determine what their actual majors were. The results are shown in the tables for and . The second column in each table does not add to 100% because of rounding. Conduct a goodness-of-fit test to determine if the actual college majors of graduating women fit the distribution of their expected majors. Major Women - expected major Women - actual major Arts & Humanities 14.0% 670 Biological Sciences 8.4% 410 Business 13.1% 685 Education 13.0% 650 Engineering 2.6% 145 Physical Sciences 2.6% 125 Professional 18.9% 975 Social Sciences 13.0% 605 Technical 0.4% 15 Other 5.8% 300 Undecided 8.0% 420 H 0 : The actual college majors of graduating women fit the distribution of their expected majors H a : The actual college majors of graduating women do not fit the distribution of their expected majors df = 10 chi-square distribution with df = 10 test statistic = 11.48 Answers may vary. Alpha = 0.05 Decision: Cannot reject null when a = 0.05 and a = 0.01 Reason for decision: Calculated value of test statistics is either in or out of the tail of the distribution. Conclusion: There is insufficient evidence to conclude that the distribution of actual college majors of graduating women fits the distribution of their expected majors. Conduct a goodness-of-fit test to determine if the actual college majors of graduating men fit the distribution of their expected majors. Major Men - expected major Men - actual major Arts & Humanities 11.0% 600 Biological Sciences 6.7% 330 Business 22.7% 1130 Education 5.8% 305 Engineering 15.6% 800 Physical Sciences 3.6% 175 Professional 9.3% 460 Social Sciences 7.6% 370 Technical 1.8% 90 Other 8.2% 400 Undecided 6.6% 340 Read the statement and decide whether it is true or false. 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. Use a goodness-of-fit test to determine if high school principals believe that students are absent equally during the week or not. true The test to use to determine if a six-sided die is fair is a goodness-of-fit test. In a goodness-of fit test, if the p -value is 0.0113, in general, do not reject the null hypothesis. false 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. 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% 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 Number in class Observed number that recycle one commodity Expected number that recycle one commodity Office 35 19 17.5 Retail/Wholesale 48 27 24 Food/Restaurants 53 35 26.5 Manufacturing/Medical 52 21 26 Hotel/Mixed 24 9 12 contains information from a survey among 499 participants classified according to their age groups. The second column shows the percentage of obese people 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 obese people in the same age classes in the USA. Perform a hypothesis test at the 5% significance level to determine whether the survey participants are a representative sample of the USA obese population. Age class (years) Obese (percentage) Expected USA average (percentage) 20–30 15.0 32.6 31–40 26.5 32.6 41–50 13.6 36.6 51–60 21.9 36.6 61–70 21.0 39.7 The hypotheses for the goodness-of-fit test are: H 0 : Surveyed obese fit the distribution of expected obese H a : Surveyed obese do not fit the distribution of expected obese Use a chi-square distribution with df = 4 to evaluate the data. The test statistic is X 2 = 9.85 The P -value = 0.0431 At 5% significance level, α = 0.05. For this data, P < α. Reject the null hypothesis. At the 5% level of significance, from the data, there is sufficient evidence to conclude that the surveyed obese do not fit the distribution of expected obese. Goodness-of-Fit a hypothesis test that compares expected and observed values in order to look for significant differences within one non-parametric variable. The degrees of freedom used equals the (number of categories – 1).

Business


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: Σ ( i ⋅ j ) ( O – E ) 2 E where: O = observed values E = expected values i = the number of rows in the table 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 or not. You first encountered the term independence in Independent and Mutually Exclusive Events earlier. As a review, consider the following example. NOTE The expected value inside each cell needs to be at least five in order for you to use this test. 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 ∩ B ) = P ( A ) P ( B ). A ∩ 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 phone 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 ∩ 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: H 0 : Being a cell phone user while driving and receiving a speeding violation are independent events; in other words, they have no effect on each other. 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 chi-square 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 Try It A sample of 300 students is taken. Of the students surveyed, 50 were music students, while 250 were not. Ninety-seven of the 300 surveyed 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? About 16 students are expected to be music students and on the honor roll. A volunteer group, provides from one to nine hours each week with disabled senior citizens. The program recruits among community college students, four-year college students, and nonstudents. In is a sample of the adult volunteers and the number of hours they volunteer per week. Number of Hours Worked Per Week by Volunteer Type (Observed) Type of volunteer 1–3 Hours 4–6 Hours 7–9 Hours Row total Community college students 111 96 48 255 Four-year college students 96 133 61 290 Nonstudents 91 150 53 294 Column total 298 379 162 839 The table contains observed (O) values (data). Is the number of hours volunteered independent of the type of volunteer? The observed table 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. H 0 : The number of hours volunteered is independent of the type of volunteer. H a : The number of hours volunteered is dependent on the type of volunteer. The expected results are in . Number of Hours Worked Per Week by Volunteer Type (Expected) 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.00 131.00 56.00 Nonstudents 104.42 132.81 56.77 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) Distribution for the test: χ 4 2 df = (3 columns – 1)(3 rows – 1) = (2)(2) = 4 Graph: The graph of the Chi-square shows the distribution and marks the critical value with four degrees of freedom at 95% level of confidence, α = 0.05, 9.488. The graph also marks the calculated χ c 2 test statistic of 12.99. Comparing the test statistic with the critical value, as we have done with all other hypothesis tests, we reach the conclusion. Make a decision: Because the calculated test statistic is in the tail we cannot accept H 0 . This means that the factors are not independent. Conclusion: At a 5% 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 one another. For the example in , if there had been another type of volunteer, teenagers, what would the degrees of freedom be? Try It 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. shows the results: Industry sector 2000 2010 2020 Total Nonagriculture wage and salary 13,243 13,044 15,018 41,305 Goods-producing, excluding agriculture 2,457 1,771 1,950 6,178 Services-providing 10,786 11,273 13,068 35,127 Agriculture, forestry, fishing, and hunting 240 214 201 655 Nonagriculture self-employed and unpaid family worker 931 894 972 2,797 Secondary wage and salary jobs in agriculture and private household industries 14 11 11 36 Secondary jobs as a self-employed or unpaid family worker 196 144 152 492 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. H 0 : The number of jobs is independent of the year. H a : The number of jobs is dependent on the year. df = 12 Press the MATRX key and arrow over to EDIT . Press 1:[A] . Press 3 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 227.73 and the p −value = 5.90E - 42 = 0. Do the procedure a second time but arrow down to Draw instead of calculate . 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. 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 vs. Anxiety Level Need to Succeed in School High Anxiety Med-high Anxiety Medium Anxiety Med-low Anxiety Low Anxiety Row Total High Need 35 42 53 15 10 155 Medium Need 18 48 63 33 31 193 Low Need 4 5 11 15 17 52 Column Total 57 95 127 63 58 400 a. How many high anxiety level students are expected to have a high need to succeed in school? 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? 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. E = (row total)(column total) total surveyed = 8.19 The expected number of students who have a low need to succeed in school and a med-low level of anxiety is 8. Try It Refer back to the information in . How many service providing jobs are there expected to be in 2020? How many nonagriculture wage and salary jobs are there expected to be in 2020? References DiCamilo, Mark, Mervin Field, “Most Californians See a Direct Linkage between Obesity and Sugary Sodas. Two in Three Voters Support Taxing Sugar-Sweetened Beverages If Proceeds are Tied to Improving School Nutrition and Physical Activity Programs.” The Field Poll, released Feb. 14, 2013. Available online at http://field.com/fieldpollonline/subscribers/Rls2436.pdf (accessed May 24, 2013). Harris Interactive, “Favorite Flavor of Ice Cream.” Available online at http://www.statisticbrain.com/favorite-flavor-of-ice-cream (accessed May 24, 2013) “Youngest Online Entrepreneurs List.” Available online at http://www.statisticbrain.com/youngest-online-entrepreneur-list (accessed May 24, 2013). Chapter Review To assess whether two factors are independent or not, 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 5. Formula Review Test of Independence The number of degrees of freedom is equal to (number of columns - 1)(number of rows - 1). The test statistic is ∑ i ⋅ j ( O − E ) 2 E where O = observed values, E = expected values, i = the number of rows in the table, and j = the number of columns in the table. If the null hypothesis is true, the expected number E = (row total)(column total) total surveyed . Determine the appropriate test to be used in the next three exercises. 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. a test of independence The owner of a baseball team is interested in the relationship between player salaries and team winning percentage. They take a random sample of 100 players from different organizations. A marathon runner is interested in the relationship between the brand of shoes runners wear and their run times. They take a random sample of 50 runners and records their run times as well as the brand of shoes they were wearing. a test of independence 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. shows the results. The railroad wants to know if a passenger’s choice in ticket class is independent of the distance they must travel. Traveling distance Third class Second class First class Total 1–100 miles 21 14 6 41 101–200 miles 18 16 8 42 201–300 miles 16 17 15 48 301–400 miles 12 14 21 47 401–500 miles 6 6 10 22 Total 73 67 60 200 State the hypotheses. H 0 : _______ H a : _______ df = _______ 8 How many passengers are expected to travel between 201 and 300 miles and purchase second-class tickets? How many passengers are expected to travel between 401 and 500 miles and purchase first-class tickets? 6.6 What is the test statistic? What can you conclude at the 5% level of significance? Use the following information to answer the next eight exercises: An article in the New England Journal of Medicine, discussed a study on smokers in California and Hawaii. In one part of the report, the self-reported ethnicity and smoking levels per day were given. Of the people smoking at most ten cigarettes per day, there were 9,886 Black people, 2,745 Native Hawaiian people, 12,831 Hispanic/Latino people, 8,378 Japanese American people and 7,650 White people. Of the people smoking 11 to 20 cigarettes per day, there were 6,514 Black people, 3,062 Native Hawaiian people, 4,932 Hispanic/Latino people, 10,680 Japanese American people, and 9,877 White people. Of the people smoking 21 to 30 cigarettes per day, there were 1,671 Black people, 1,419 Native Hawaiian people, 1,406 Hispanic/Latino people, 4,715 Japanese American people, and 6,062 White people. Of the people smoking at least 31 cigarettes per day, there were 759 Black people, 788 Native Hawaiian people, 800 Hispanic/Latino people, 2,305 Japanese American people, and 3,970 White people. Complete the table. Smoking Levels by Ethnicity (Observed) Smoking level per day Black Native Hawaiian Hispanic/Latinos Japanese American White Totals 1-10 11-20 21-30 31+ Totals Smoking level per day Black Native Hawaiian Hispanic/Latino Japanese Americans White Totals 1-10 9,886 2,745 12,831 8,378 7,650 41,490 11-20 6,514 3,062 4,932 10,680 9,877 35,065 21-30 1,671 1,419 1,406 4,715 6,062 15,273 31+ 759 788 800 2,305 3,970 8,622 Totals 18,830 8,014 19,969 26,078 27,559 10,0450 State the hypotheses. H 0 : _______ H a : _______ Enter expected values in . Round to two decimal places. Calculate the following values: Smoking level per day Black Native Hawaiian Hispanic/Latino Japanese Americans White 1-10 7777.57 3310.11 8248.02 10771.29 11383.01 11-20 6573.16 2797.52 6970.76 9103.29 9620.27 21-30 2863.02 1218.49 3036.20 3965.05 4190.23 31+ 1616.25 687.87 1714.01 2238.37 2365.49 df = _______ χ 2 test statistic = ______ 10,301.8 Is this a right-tailed, left-tailed, or two-tailed test? Explain why. right Graph the situation. Label and scale the horizontal axis. Mark the mean and test statistic. Shade in the region corresponding to the confidence level. State the decision and conclusion (in a complete sentence) for the following preconceived levels of α . α = 0.05 Decision: ___________________ Reason for the decision: ___________________ Conclusion (write out in a complete sentence): ___________________ Cannot accept the null hypothesis. Calculated value of test statistics is either in or out of the tail of the distribution. There is sufficient evidence to conclude that smoking level is dependent on ethnic group. α = 0.01 Decision: ___________________ Reason for the decision: ___________________ Conclusion (write out in a complete sentence): ___________________ Homework A recent debate about where in the United States 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 20 30 40 Utah 10 30 60 Colorado 10 40 50 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 . Conduct a test of independence. Family Size Sub & Compact Mid-size Full-size Van & Truck 1 20 35 40 35 2 20 50 70 80 3–4 20 50 100 90 5+ 20 30 70 70 H 0 : Car size is independent of family size. H a : Car size is dependent on family size. df = 9 chi-square distribution with df = 9 test statistic = 15.8284 Answers may vary. Alpha: 0.05 Decision: Cannot reject the null hypothesis. Reason for decision: Calculated value of test statistics is either in or out of the tail of the distribution. Conclusion: At the 5% significance level, there is insufficient evidence to conclude that car size and family size are dependent. College students may be interested in whether or not 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. shows the data. Conduct a test of independence. Major < $50,000 $50,000 – $68,999 $69,000 + English 5 20 5 Engineering 10 30 60 Nursing 10 15 15 Business 10 20 30 Psychology 20 30 20 Some travel agents claim that honeymoon hot spots 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 . Conduct a test of independence. Location 20–29 30–39 40–49 50 and over Niagara Falls 15 25 25 20 Poconos 15 25 25 10 Europe 10 25 15 5 Virgin Islands 20 25 15 5 H 0 : Honeymoon locations are independent of bride’s age. H a : Honeymoon locations are dependent on bride’s age. df = 9 chi-square distribution with df = 9 test statistic = 15.7027 Answers may vary. Alpha: 0.05 Decision: Cannot reject the null hypothesis. Reason for decision: Calculated value of test statistics is either in or out of the tail of the distribution. Conclusion: At the 5% significance level, there is insufficient evidence to conclude that honeymoon location and bride age are dependent. 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 their 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 and over Racquetball 42 58 30 46 Tennis 58 76 38 65 Swimming 72 60 65 33 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 . Conduct a test of independence. Type of Fries Northeast South Central West Skinny fries 70 50 20 25 Curly fries 100 60 15 30 Steak fries 20 40 10 10 H 0 : The types of fries sold are independent of the location. H a : The types of fries sold are dependent on the location. df = 6 chi-square distribution with df = 6 test statistic =18.8369 Answers may vary. Alpha: 0.05 Decision: Cannot accept the null hypothesis. Reason for decision: Calculated value of test statistics is either in or out of the tail of the distribution. Conclusion: At the 5% significance level, There is sufficient evidence that types of fries and location are dependent. According to Dan Lenard, an independent insurance agent in the Buffalo, N.Y. area, the following is a breakdown of the amount of life insurance purchased by men in the following age groups. He is interested in whether the age of the man and the amount of life insurance purchased are independent events. Conduct a test for independence. Age of Men None < $200,000 $200,000–$400,000 $401,001–$1,000,000 $1,000,001+ 20–29 40 15 40 0 5 30–39 35 5 20 20 10 40–49 20 0 30 0 30 50+ 40 30 15 15 10 Suppose that 600 thirty-year-olds were surveyed to determine whether or not 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 25 10 5 $30,000–$40,000 20 40 70 30 $40,000–$50,000 10 20 40 55 $50,000–$60,000 5 10 20 60 $60,000+ 0 5 10 150 H 0 : Salary is independent of level of education. H a : Salary is dependent on level of education. df = 12 chi-square distribution with df = 12 test statistic = 255.7704 Answers may vary. Alpha: 0.05 Decision: Cannot accept the null hypothesis. Reason for decision: Calculated value of test statistics is either in or out of the tail of the distribution. Conclusion: At the 5% significance level, there is sufficient evidence to conclude that salary and level of education are dependent. Read the statement and decide whether it is true or false. The number of degrees of freedom for a test of independence is equal to the sample size minus one. The test for independence uses tables of observed and expected data values. true The test to use when determining if the college or university a student chooses to attend is related to their socioeconomic status is a test for independence. In a test of independence, the expected number is equal to the row total multiplied by the column total divided by the total surveyed. true An ice cream maker performs a nationwide survey about favorite flavors of ice cream in different geographic areas of the U.S. Based on , do the numbers suggest that geographic location is independent of favorite ice cream flavors? Test at the 5% significance level. U.S. region/Flavor Strawberry Chocolate Vanilla Rocky road Mint chocolate chip Pistachio Row total West 12 21 22 19 15 8 97 Midwest 10 32 22 11 15 6 96 East 8 31 27 8 15 7 96 South 15 28 30 8 15 6 102 Column total 45 112 101 46 60 27 391 provides 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% significance level. Age group\ Net worth value (in millions of US dollars) 1–5 6–24 ≥25 Row total 17–25 8 7 5 20 26–30 6 5 9 20 Column total 14 12 14 40 H 0 : Age is independent of the youngest online entrepreneurs’ net worth. H a : Age is dependent on the net worth of the youngest online entrepreneurs. df = 2 chi-square distribution with df = 2 test statistic = 1.76 Answers may vary. Alpha: 0.05 Decision: Cannot reject the null hypothesis. Reason for decision: Calculated value of test statistics is either in or out of the tail of the distribution. Conclusion: At the 5% significance level, there is insufficient evidence to conclude that age and net worth for the youngest online entrepreneurs are dependent. A poll in California surveyed people about taxing sugar-sweetened beverages. The results are presented in , 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% significance level. Opinion/Ethnicity Asian-American White/Non-Hispanic Black Hispanic/Latino Row total Against tax 48 433 41 160 682 In favor of tax 54 234 24 147 459 No opinion 16 43 16 19 94 Column total 118 710 81 326 1235 Contingency Table a table that displays sample values for two different factors that may be dependent or contingent on one another; it facilitates determining conditional probabilities. Test of Independence a hypothesis test that compares expected and observed values for contingency tables in order to test for independence between two variables. The degrees of freedom used equals the (number of columns – 1) multiplied by the (number of rows – 1).

Business


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 inside each cell needs to be at least five in order for you to use this test. Hypotheses H 0 : The distributions of the two populations are the same. H a : 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. Do men and women college students have the same distribution of living arrangements? Use a level of significance of 0.05. Suppose that 250 randomly selected men college students and 300 randomly selected women college students were asked about their living arrangements: dormitory, apartment, with parents, other. The results are shown in . Do men and women college students have the same distribution of living arrangements? Distribution of living arrangements for college men and college women Dormitory Apartment With Parents Other Men 72 84 49 45 Women 91 86 88 35 H 0 : The distribution of living arrangements for men college students is the same as the distribution of living arrangements for women college students. H a : The distribution of living arrangements for men college students is not the same as the distribution of living arrangements for women college students. Degrees of Freedom ( df ): df = number of columns – 1 = 4 – 1 = 3 Distribution for the test: χ 3 2 Calculate the test statistic: χ c 2 = 10.129 The graph of the Chi-square shows the distribution and marks the critical value with three degrees of freedom at 95% level of confidence, α = 0.05, 7.815. The graph also marks the calculated χ 2 test statistic of 10.129. Comparing the test statistic with the critical value, as we have done with all other hypothesis tests, we reach the conclusion. Make a decision: Because the calculated test statistic is in the tail we cannot accept H 0 . This means that the distributions are not the same. Conclusion: At a 5% level of significance, from the data, there is sufficient evidence to conclude that the distributions of living arrangements for men and women 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. Try It Do families and singles have the same distribution of cars? Use a level of significance of 0.05. Suppose that 100 randomly selected families and 200 randomly selected singles were asked what type of car they drove: sport, sedan, hatchback, truck, van/SUV. The results are shown in . 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 15 35 17 28 Single 45 65 37 46 7 Ivy League schools receive many applications, but only some can be accepted. At the schools listed in , two types of applications are accepted: regular and early decision. Application type accepted Brown Columbia Cornell Dartmouth Penn Yale Regular 2,115 1,792 5,306 1,734 2,685 1,245 Early decision 577 627 1,228 444 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 χ 2 distribution and show the critical value and the calculated value of the test statistic, and draw a conclusion about the test of homogeneity. With a p -value of almost zero, we reject the null hypothesis. The data show that the distribution of cars is not the same for families and singles. H 0 : The distribution of regular applications accepted is the same as the distribution of early applications accepted. H a : The distribution of regular applications accepted is not the same as the distribution of early applications accepted. df = 5 χ 2 test statistic = 430.06 Press the MATRX key and arrow over to EDIT . Press 1:[A] . Press 3 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 430.06 and the p -value = 9.80E-91. Do the procedure a second time but arrow down to Draw instead of calculate . References Data from the Insurance Institute for Highway Safety, 2013. Available online at www.iihs.org/iihs/ratings (accessed May 24, 2013). “Energy use (kg of oil equivalent per capita).” The World Bank, 2013. Available online at http://data.worldbank.org/indicator/EG.USE.PCAP.KG.OE/countries (accessed May 24, 2013). “Parent and Family Involvement Survey of 2007 National Household Education Survey Program (NHES),” U.S. Department of Education, National Center for Education Statistics. Available online at http://nces.ed.gov/pubsearch/pubsinfo.asp?pubid=2009030 (accessed May 24, 2013). “Parent and Family Involvement Survey of 2007 National Household Education Survey Program (NHES),” U.S. Department of Education, National Center for Education Statistics. Available online at http://nces.ed.gov/pubs2009/2009030_sup.pdf (accessed May 24, 2013). Chapter Review 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. Formula Review ∑ i ⋅ j ( O − E ) 2 E Homogeneity test statistic where: O = 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 A math teacher wants to see if two of their classes have the same distribution of test scores. What test should they use? test for homogeneity What are the null and alternative hypotheses for ? A market researcher wants to see if two different stores have the same distribution of sales throughout the year. What type of test should they use? test for homogeneity A meteorologist wants to know if East and West Australia have the same distribution of storms. What type of test should they use? What condition must be met to use the test for homogeneity? All values in the table must be greater than or equal to five. 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 . 20–30 30–40 40–50 50–60 Private practice 16 40 38 6 Hospital 8 44 59 39 State the null and alternative hypotheses. df = _______ 3 What is the test statistic? What can you conclude at the 5% significance level? Homework 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 . Conduct a test of homogeneity. Test at a 5% level of significance. Open Conscientious Extrovert Agreeable Neurotic Business 41 52 46 61 58 Social Science 72 75 63 80 65 H 0 : The distribution for personality types is the same for both majors H a : The distribution for personality types is not the same for both majors df = 4 chi-square with df = 4 test statistic = 3.01 Answers may vary. Alpha: 0.05 Decision: Cannot reject the null hypothesis. Reason for decision: Calculated value of test statistics is either in or out of the tail of the distribution. Conclusion: There is insufficient evidence to conclude that the distribution of personality types is different for business and social science majors. Do men and women select different breakfasts? The breakfasts ordered by randomly selected men and women at a popular breakfast place is shown in . Conduct a test for homogeneity at a 5% level of significance. French toast Pancakes Waffles Omelettes Men 47 35 28 53 Women 65 59 55 60 A fish and wildlife technician 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% level of significance. H 0 : The distribution for fish caught is the same in Green Valley Lake and in Echo Lake. H a : The distribution for fish caught is not the same in Green Valley Lake and in Echo Lake. 3 chi-square with df = 3 11.75 Answers may vary. Alpha: 0.05 Decision: Cannot accept the null hypothesis. Reason for decision: Calculated value of test statistics is either in or out of the tail of the distribution. Conclusion: There is evidence to conclude that the distribution of fish caught is different in Green Valley Lake and in Echo Lake In a recent year, the United States had 1.5 million homeschooled students, according to the U.S. National Center for Education Statistics. In 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% significance level. Did you expect the result you obtained? Reasons for Homeschooling Applicable reason (in thousands of respondents) Most important reason (in thousands of respondents) Row total Concern about the environment of other schools 1,321 309 1,630 Dissatisfaction with academic instruction at other schools 1,096 258 1,354 To provide religious or moral instruction 1,257 540 1,797 Child has special needs, other than physical or mental 315 55 370 Nontraditional approach to child’s education 984 99 1,083 Other reasons (e.g., finances, travel, family time, etc.) 485 216 701 Column total 5,458 1,477 6,935 When looking at energy consumption, we are often interested in detecting trends over time and how they correlate among different countries. The information in shows the average energy use (in units of kg of oil equivalent per capita) in the USA and the joint European Union countries (EU) for a specific six-year period. Do the energy use values in these two areas come from the same distribution? Perform the analysis at the 5% significance level. Year European Union United States Row total 6 3,413 7,164 10,557 5 3,302 7,057 10,359 4 3,505 7,488 10,993 3 3,537 7,758 11,295 2 3,595 7,697 11,292 1 3,613 7,847 11,460 Column total 20,965 45,011 65,976 H 0 : The distribution of average energy use in the USA is the same as in Europe between Year 1 and Year 6. H a : The distribution of average energy use in the USA is not the same as in Europe between Year 1 and Year 6. df = 4 chi-square with df = 4 test statistic = 2.7434 Answers may vary. Alpha: 0.05 Decision: Cannot reject the null hypothesis. Reason for decision: Calculated value of test statistics is either in or out of the tail of the distribution. Conclusion: At the 5% significance level, there is insufficient evidence to conclude that the average energy use values in the US and EU are not derived from different distributions for the period from Year 1 to Year 6. 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. presents the number of Top Safety Picks in six car categories for specific two years. Analyze the table data to conclude whether the distribution of cars that earned the Top Safety Picks safety award has remained the same between Year 1 and Year 2. Derive your results at the 5% significance level. Year \ Car type Small Mid-size Large Small SUV Mid-size SUV Large SUV Row total Year 1 12 22 10 10 27 6 87 Year 2 31 30 19 11 29 4 124 Column total 43 52 29 21 56 10 211 Test for Homogeneity a test used to draw a conclusion about whether two populations have the same distribution. The degrees of freedom used equals the (number of columns – 1).

Business


Comparison of the Chi-Square Tests Above the χ 2 test statistic was used in three different circumstances. The following bulleted list is a summary of which χ 2 test is the appropriate one to use in different circumstances. 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: H 0 : The population fits the given distribution. H a : 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: H 0 : The two variables (factors) are independent. H a : The two variables (factors) are dependent. Homogeneity: Use the test for homogeneity to decide if two populations with unknown distributions have the same distribution as each other. In this case there will be a single qualitative survey question or experiment given to two different populations. The null and alternative hypotheses are: H 0 : The two populations follow the same distribution. H a : The two populations have different distributions. Chapter Review 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. Which test do you use to decide whether an observed distribution is the same as an expected distribution? a goodness-of-fit test What is the null hypothesis for the type of test from ? Which test would you use to decide whether two factors have a relationship? a test for independence Which test would you use to decide if two populations have the same distribution? How are tests of independence similar to tests for homogeneity? 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. How are tests of independence different from tests for homogeneity? Homework 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. H 0 : The distribution for technology use is the same for community college students and university students. H a : The distribution for technology use is not the same for community college students and university students. 2 chi-square with df = 2 7.05 p -value = 0.0294 Answers may vary. Alpha: 0.05 Decision: Cannot accept the null hypothesis. Reason for decision: p -value < alpha 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. Read the statement and decide whether it is true or false. If df = 2, the chi-square distribution has a shape that reminds us of the exponential. Bringing It Together Explain why a goodness-of-fit test and a test of independence are generally right-tailed tests. If you did a left-tailed test, what would you be testing? 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. Testing to see if the data fits the distribution “too well” or is too perfect.

Business


Introduction One-way ANOVA is used to measure information from several groups. (credit: modification of work “Magazine Stack” by thebittenword.com/ Flickr, CC BY 2.0) Many statistical applications in psychology, social science, business administration, and the natural sciences involve several groups. For example, an environmentalist is interested in knowing if the average amount of pollution varies in several bodies of water. A sociologist is interested in knowing if the amount of income a person earns varies according to their upbringing. A consumer looking for a new car might compare the average gas mileage of several models. For hypothesis tests comparing averages among more than two groups, statisticians have developed a method called " Analysis of Variance " (abbreviated ANOVA). In this chapter, you will study the simplest form of ANOVA called single factor or one-way ANOVA . You will also study the F distribution, used for one-way ANOVA, and the test for differences between two variances. This is just a very brief overview of one-way ANOVA. One-Way ANOVA, as it is presented here, relies heavily on a calculator or computer.

Business


Test of Two Variances This chapter introduces a new probability density function, the F distribution. This distribution is used for many applications including ANOVA and for testing equality across multiple means. We begin with the F distribution and the test of hypothesis of differences in variances. It is often desirable to compare two variances rather than two averages. For instance, college administrators would like two college professors grading exams to have the same variation in their grading. In order for a lid to fit a container, the variation in the lid and the container should be approximately the same. A supermarket might be interested in the variability of check-out times for two checkers. In finance, the variance is a measure of risk and thus an interesting question would be to test the hypothesis that two different investment portfolios have the same variance, the volatility. In order to perform a F test of two variances, it is important that the following are true: The populations from which the two samples are drawn are approximately normally distributed. The two populations are independent of each other. Unlike most other hypothesis tests in this book, the F test for equality of two variances is very sensitive to deviations from normality. If the two distributions are not normal, or close, the test can give a biased result for the test statistic. Suppose we sample randomly from two independent normal populations. Let σ 1 2 and σ 2 2 be the unknown population variances and s 1 2 and s 2 2 be the sample variances. Let the sample sizes be n 1 and n 2 . Since we are interested in comparing the two sample variances, we use the F ratio: F = [ s 1 2 σ 1 2 ] [ s 2 2 σ 2 2 ] F has the distribution F ~ F ( n 1 – 1, n 2 – 1) where n 1 – 1 are the degrees of freedom for the numerator and n 2 – 1 are the degrees of freedom for the denominator. If the null hypothesis is σ 1 2 = σ 2 2 , then the F Ratio, test statistic, becomes F c = [ s 1 2 σ 1 2 ] [ s 2 2 σ 2 2 ] = s 1 2 s 2 2 H 0 : σ 1 2 σ 2 2 = δ 0 H a : σ 1 2 σ 2 2 ≠ δ 0 if δ 0 =1 then H 0 : σ 1 2 = σ 2 2 H a : σ 1 2 ≠ σ 2 Test statistic is : F c = S 1 2 S 2 2 The various forms of the hypotheses tested are: Two-Tailed Test One-Tailed Test One-Tailed Test H 0 : σ 1 2 = σ 2 2 H 0 : σ 1 2 ≤ σ 2 2 H 0 : σ 1 2 ≥ σ 2 2 H 1 : σ 1 2 ≠ σ 2 2 H 1 : σ 1 2 > σ 2 2 H 1 : σ 1 2 < σ 2 2 A more general form of the null and alternative hypothesis for a two tailed test would be : H 0 : σ 1 2 σ 2 2 = δ 0 H a : σ 1 2 σ 2 2 ≠ δ 0 Where if δ 0 = 1 it is a simple test of the hypothesis that the two variances are equal. This form of the hypothesis does have the benefit of allowing for tests that are more than for simple differences and can accommodate tests for specific differences as we did for differences in means and differences in proportions. This form of the hypothesis also shows the relationship between the F distribution and the χ 2 : the F is a ratio of two chi squared distributions a distribution we saw in the The Chi-Square Distribution . This is helpful in determining the degrees of freedom of the resultant F distribution. If the two populations have equal variances, then s 1 2 and s 2 2 are close in value and the test statistic, F c = s 1 2 s 2 2 is close to one. But if the two population variances are very different, s 1 2 and s 2 2 tend to be very different, too. Choosing s 1 2 as the larger sample variance causes the ratio s 1 2 s 2 2 to be greater than one. If s 1 2 and s 2 2 are far apart, then F c = s 1 2 s 2 2 is a large number. Therefore, if F is close to one, the evidence favors the null hypothesis (the two population variances are equal). But if F is much larger than one, then the evidence is against the null hypothesis. In essence, we are asking if the calculated F statistic, test statistic, is significantly different from one. To determine the critical points we have to find F α , df1 , df2 . See Appendix A for the F table. This F table has values for various levels of significance from 0.1 to 0.001 designated as "p" in the first column. To find the critical value choose the desired significance level and follow down and across to find the critical value at the intersection of the two different degrees of freedom. The F distribution has two different degrees of freedom, one associated with the numerator, df1 , and one associated with the denominator, df2 and to complicate matters the F distribution is not symmetrical and changes the degree of skewness as the degrees of freedom change. The degrees of freedom in the numerator is n 1 -1, where n 1 is the sample size for group 1, and the degrees of freedom in the denominator is n 2 -1, where n 2 is the sample size for group 2. F α , df1 , df2 will give the critical value on the upper end of the F distribution. To find the critical value for the lower end of the distribution, reverse the degrees of freedom and divide the F-value from the table into one. Upper tail critical value : F α , df1 , df2 Lower tail critical value : 1/F α , df2 , df1 When the calculated value of F is between the critical values, not in the tail, we cannot reject the null hypothesis that the two variances came from a population with the same variance. If the calculated F-value is in either tail we cannot accept the null hypothesis just as we have been doing for all of the previous tests of hypothesis. An alternative way of finding the critical values of the F distribution makes the use of the F-table easier. We note in the F-table that all the values of F are greater than one therefore the critical F value for the left hand tail will always be less than one because to find the critical value on the left tail we divide an F value into the number one as shown above. We also note that if the sample variance in the numerator of the test statistic is larger than the sample variance in the denominator, the resulting F value will be greater than one. The shorthand method for this test is thus to be sure that the larger of the two sample variances is placed in the numerator to calculate the test statistic. This will mean that only the right hand tail critical value will have to be found in the F-table. Two college instructors are interested in whether or not there is any variation in the way they grade math exams. They each grade the same set of 10 exams. The first instructor's grades have a variance of 52.3. The second instructor's grades have a variance of 89.9. Test the claim that the first instructor's variance is smaller. (In most colleges, it is desirable for the variances of exam grades to be nearly the same among instructors.) The level of significance is 1%. Let 1 and 2 be the subscripts that indicate the first and second instructor, respectively. n 1 = n 2 = 10. H 0 : σ 1 2 ≥ σ 2 2 and H a : σ 1 2 < σ 2 2 Calculate the test statistic: By the null hypothesis ( σ 1 2 ≥ σ 2 2 ) , the F statistic is: F c = s 2 2 s 1 2 = 89.9 52.3 = 1.719 Critical value for the test: F 9,9 = 5.35 where n 1 – 1 = 9 and n 2 – 1 = 9. Make a decision: Since the calculated F value is not in the tail we cannot reject H 0 . Conclusion: With a 1% level of significance, from the data, there is insufficient evidence to conclude that the variance in grades for the first instructor is smaller. Try It The New York Choral Society divides male singers up into four categories from highest voices to lowest: Tenor1, Tenor2, Bass1, Bass2. In the table are heights of the men in the Tenor1 and Bass2 groups. One suspects that taller men will have lower voices, and that the variance of height may go up with the lower voices as well. Do we have good evidence that the variance of the heights of singers in each of these two groups (Tenor1 and Bass2) are different? Tenor1 Bass 2 Tenor 1 Bass 2 Tenor 1 Bass 2 69 72 67 72 68 67 72 75 70 74 67 70 71 67 65 70 64 70 66 75 72 66 69 76 74 70 68 72 74 72 68 75 71 71 72 64 68 74 66 74 73 70 75 68 72 66 72 The histograms are not as normal as one might like. Plot them to verify. However, we proceed with the test in any case. Subscripts: T1= tenor1 and B2 = bass 2 The standard deviations of the samples are s T 1 = 3.3302 and s B 2 = 2.7208. The hypotheses are H 0 : σ T 1 2 = σ B 2 2 and H 0 : σ T 1 2 ≠ σ B 2 2 (two tailed test) The F statistic is 1.4894 with 20 and 25 degrees of freedom. The p -value is 0.3430. If we assume alpha is 0.05, then we cannot reject the null hypothesis. We have no good evidence from the data that the heights of Tenor1 and Bass2 singers have different variances (despite there being a significant difference in mean heights of about 2.5 inches.) References “MLB Vs. Division Standings – 2012.” Available online at http://espn.go.com/mlb/standings/_/year/2012/type/vs-division/order/true. Chapter Review The F test for the equality of two variances rests heavily on the assumption of normal distributions. The test is unreliable if this assumption is not met. If both distributions are normal, then the ratio of the two sample variances is distributed as an F statistic, with numerator and denominator degrees of freedom that are one less than the samples sizes of the corresponding two groups. A test of two variances hypothesis test determines if two variances are the same. The distribution for the hypothesis test is the F distribution with two different degrees of freedom. Assumptions: The populations from which the two samples are drawn are normally distributed. The two populations are independent of each other. Use the following information to answer the next two exercises. There are two assumptions that must be true in order to perform an F test of two variances. Name one assumption that must be true. The populations from which the two samples are drawn are normally distributed. What is the other assumption that must be true? Use the following information to answer the next five exercises. Two coworkers commute from the same building. They are interested in whether or not there is any variation in the time it takes them to drive to work. They each record their times for 20 commutes. The first worker’s times have a variance of 12.1. The second worker’s times have a variance of 16.9. The first worker thinks that he is more consistent with his commute times. Test the claim at the 10% level. Assume that commute times are normally distributed. State the null and alternative hypotheses. H 0 : σ 1 = σ 2 H a : σ 1 < σ 2 or H 0 : σ 1 2 = σ 2 2 H a : σ 1 2 < σ 2 2 What is s 1 in this problem? What is s 2 in this problem? 4.11 What is n ? What is the F statistic? 0.7159 What is the critical value? Is the claim accurate? No, at the 10% level of significance, we cannot reject the null hypothesis and state that the data do not show that the variation in drive times for the first worker is less than the variation in drive times for the second worker. Use the following information to answer the next four exercises. Two students are interested in whether or not there is variation in their test scores for math class. There are 15 total math tests they have taken so far. The first student’s grades have a standard deviation of 38.1. The second student’s grades have a standard deviation of 22.5. The second student thinks his scores are more consistent. State the null and alternative hypotheses. What is the F Statistic? 2.8674 What is the critical value? At the 5% significance level, do we reject the null hypothesis? Cannot accept the null hypothesis. There is enough evidence to say that the variance of the grades for the first student is higher than the variance in the grades for the second student. Use the following information to answer the next three exercises. Two cyclists are comparing the variances of their overall paces going uphill. Each cyclist records their speeds going up 35 hills. The first cyclist has a variance of 23.8 and the second cyclist has a variance of 32.1. The cyclists want to see if their variances are the same or different. Assume that commute times are normally distributed. State the null and alternative hypotheses. What is the F Statistic? 0.7414 At the 5% significance level, what can we say about the cyclists’ variances? Homework Three students, Linda, Tuan, and Javier, are given five laboratory rats each for a nutritional experiment. Each rat’s weight is recorded in grams. Linda feeds her rats Formula A, Tuan feeds his rats Formula B, and Javier feeds his rats Formula C. At the end of a specified time period, each rat is weighed again and the net gain in grams is recorded. Linda's rats Tuan's rats Javier's rats 43.5 47.0 51.2 39.4 40.5 40.9 41.3 38.9 37.9 46.0 46.3 45.0 38.2 44.2 48.6 Determine whether or not the variance in weight gain is statistically the same among Javier’s and Linda’s rats. Test at a significance level of 10%. H 0 : σ 1 2 = σ 2 2 H a : σ 1 2 ≠ σ 1 2 df ( num ) = 4; df ( denom ) = 4 F 4, 4 3.00 Answers may vary. Decision: Cannot reject the null hypothesis; Conclusion: There is insufficient evidence to conclude that the variances are different. A grassroots group opposed to a proposed increase in the gas tax claimed that the increase would hurt working-class people the most, since they commute the farthest to work. Suppose that the group randomly surveyed 24 individuals and asked them their daily one-way commuting mileage. The results are as follows. Working-class Professional (middle incomes) Professional (wealthy) 17.8 16.5 8.5 26.7 17.4 6.3 49.4 22.0 4.6 9.4 7.4 12.6 65.4 9.4 11.0 47.1 2.1 28.6 19.5 6.4 15.4 51.2 13.9 9.3 Determine whether or not the variance in mileage driven is statistically the same among the working class and professional (middle income) groups. Use a 5% significance level. Use the following information to answer the next two exercises. The following table lists the number of pages in four different types of magazines. Home decorating News Health Computer 172 87 82 104 286 94 153 136 163 123 87 98 205 106 103 207 197 101 96 146 Which two magazine types do you think have the same variance in length? Which two magazine types do you think have different variances in length? The answers may vary. Sample answer: Home decorating magazines and news magazines have different variances. Is the variance for the amount of money, in dollars, that shoppers spend on Saturdays at the mall the same as the variance for the amount of money that shoppers spend on Sundays at the mall? Suppose that the shows the results of a study. Saturday Sunday Saturday Sunday 75 44 62 137 18 58 0 82 150 61 124 39 94 19 50 127 62 99 31 141 73 60 118 73 89 Are the variances for incomes on the East Coast and the West Coast the same? Suppose that shows the results of a study. Income is shown in thousands of dollars. Assume that both distributions are normal. Use a level of significance of 0.05. East West 38 71 47 126 30 42 82 51 75 44 52 90 115 88 67 H 0 : = σ 1 2 = σ 2 2 H a : σ 1 2 ≠ σ 1 2 df ( n ) = 7, df ( d ) = 6 F 7,6 0.8117 0.7825 Answers may vary. Alpha: 0.05 Decision: Cannot reject the null hypothesis. Reason for decision: calculated test statistics is not in the tail of the distribution Conclusion: There is not sufficient evidence to conclude that the variances are different. Thirty college students were taught a method of finger tapping. They were randomly assigned to three groups of ten, with each receiving one of three doses of caffeine: 0 mg, 100 mg, 200 mg. This is approximately the amount in no, one, or two cups of coffee. Two hours after ingesting the caffeine, the students had the rate of finger tapping per minute recorded. The experiment was double blind, so neither the recorders nor the students knew which group they were in. Does caffeine affect the rate of tapping, and if so how? Here are the data: 0 mg 100 mg 200 mg 0 mg 100 mg 200 mg 242 248 246 245 246 248 244 245 250 248 247 252 247 248 248 248 250 250 242 247 246 244 246 248 246 243 245 242 244 250 King Manuel I, Komnenus ruled the Byzantine Empire from Constantinople (Istanbul) during the years 1145 to 1180 A.D. The empire was very powerful during his reign, but declined significantly afterwards. Coins minted during his era were found in Cyprus, an island in the eastern Mediterranean Sea. Nine coins were from his first coinage, seven from the second, four from the third, and seven from a fourth. These spanned most of his reign. We have data on the silver content of the coins: First coinage Second coinage Third coinage Fourth coinage 5.9 6.9 4.9 5.3 6.8 9.0 5.5 5.6 6.4 6.6 4.6 5.5 7.0 8.1 4.5 5.1 6.6 9.3 6.2 7.7 9.2 5.8 7.2 8.6 5.8 6.9 6.2 Did the silver content of the coins change over the course of Manuel’s reign? Here are the means and variances of each coinage. The data are unbalanced. First Second Third Fourth Mean 6.7444 8.2429 4.875 5.6143 Variance 0.2953 1.2095 0.2025 0.1314 Here is a strip chart of the silver content of the coins: While there are differences in spread, it is not unreasonable to use ANOVA techniques. Here is the completed ANOVA table: Source of variation Sum of squares ( SS ) Degrees of freedom ( df ) Mean square ( MS ) F Factor (Between) 37.748 4 – 1 = 3 12.5825 26.272 Error (Within) 11.015 27 – 4 = 23 0.4789 Total 48.763 27 – 1 = 26 P ( F > 26.272) = 0; Cannot accept the null hypothesis for any alpha. There is sufficient evidence to conclude that the mean silver content among the four coinages are different. From the strip chart, it appears that the first and second coinages had higher silver contents than the third and fourth. The American League and the National League of Major League Baseball are each divided into three divisions: East, Central, and West. Many years, fans talk about some divisions being stronger (having better teams) than other divisions. This may have consequences for the postseason. For instance, in a certain year Tampa Bay won 90 games and did not play in the postseason, while Detroit won only 88 and did play in the postseason. This may have been an oddity, but is there good evidence that in this specific season, the American League divisions were significantly different in overall records? Use the following data to test whether the mean number of wins per team in the three American League divisions were the same or not. Note that the data are not balanced, as two divisions had five teams, while one had only four. Division Team Wins East NY Yankees 95 East Baltimore 93 East Tampa Bay 90 East Toronto 73 East Boston 69 Division Team Wins Central Detroit 88 Central Chicago Sox 85 Central Kansas City 72 Central Cleveland 68 Central Minnesota 66 Division Team Wins West Oakland 94 West Texas 93 West LA Angels 89 West Seattle 75 Here is a stripchart of the number of wins for the 14 teams in the AL for a specific season. While the spread seems similar, there may be some question about the normality of the data, given the wide gaps in the middle near the 0.500 mark of 82 games (teams play 162 games each season in MLB). However, one-way ANOVA is robust. Here is the ANOVA table for the data: Source of variation Sum of squares ( SS ) Degrees of freedom ( df ) Mean square ( MS ) F Factor (Between) 344.16 3 – 1 = 2 172.08 Error (Within) 1,219.55 14 – 3 = 11 110.87 1.5521 Total 1,563.71 14 – 1 = 13 P ( F > 1.5521) = 0.2548 Since the p -value is so large, there is not good evidence against the null hypothesis of equal means. We cannot reject the null hypothesis. Thus, for this specific season, there is not any have any good evidence of a significant difference in mean number of wins between the divisions of the American League.

Business


One-Way ANOVA The purpose of a one-way ANOVA test is to determine the existence of a statistically significant difference among several group means. The test actually uses variances to help determine if the means are equal or not. In order to perform a one-way ANOVA test, there are five basic assumptions to be fulfilled: Each population from which a sample is taken is assumed to be normal. All samples are randomly selected and independent. The populations are assumed to have equal standard deviations (or variances) . The factor is a categorical variable. The response is a numerical variable. The Null and Alternative Hypotheses The null hypothesis is simply that all the group population means are the same. The alternative hypothesis is that at least one pair of means is different. For example, if there are k groups: H 0 : μ 1 = μ 2 = μ 3 = . . . μ k H a : At least two of the group means μ 1 , μ 2 , μ 3 , . . . , μ k are not equal. That is, μ i ≠ μ j for some i ≠ j . The graphs, a set of box plots representing the distribution of values with the group means indicated by a horizontal line through the box, help in the understanding of the hypothesis test. In the first graph (blue box plots), H 0 : μ 1 = μ 2 = μ 3 and the three populations have the same distribution if the null hypothesis is true. The variance of the combined data is approximately the same as the variance of each of the populations. If the null hypothesis is false, then the variance of the combined data is larger which is caused by the different means as shown in the second graph (green box plots). (a) H 0 is true. All means are the same; the differences are due to random variation. (b) H 0 is not true. The means are not all the same; the differences are too large to be due to random variation. Chapter Review Analysis of variance extends the comparison of two groups to several, each a level of a categorical variable (factor). Samples from each group are independent, and must be randomly selected from normal populations with equal variances. We test the null hypothesis of equal means of the response in every group versus the alternative hypothesis of one or more group means being different from the others. A one-way ANOVA hypothesis test determines if several population means are equal. The distribution for the test is the F distribution with two different degrees of freedom. Assumptions: Each population from which a sample is taken is assumed to be normal. All samples are randomly selected and independent. The populations are assumed to have equal standard deviations (or variances). Use the following information to answer the next five exercises. There are five basic assumptions that must be fulfilled in order to perform a one-way ANOVA test. What are they? Write one assumption. Each population from which a sample is taken is assumed to be normal. Write another assumption. Write a third assumption. The populations are assumed to have equal standard deviations (or variances). Write a fourth assumption. Homework Three different traffic routes are tested for mean driving time. The entries in the are the driving times in minutes on the three different routes. Route 1 Route 2 Route 3 30 27 16 32 29 41 27 28 22 35 36 31 State SS between , SS within , and the F statistic. SS between = 26 SS within = 441 F = 0.2653 Suppose a group is interested in determining whether teenagers obtain their drivers licenses at approximately the same average age across the country. Suppose that the following data are randomly collected from five teenagers in each region of the country. The numbers represent the age at which teenagers obtained their drivers licenses. Northeast South West Central East 16.3 16.9 16.4 16.2 17.1 16.1 16.5 16.5 16.6 17.2 16.4 16.4 16.6 16.5 16.6 16.5 16.2 16.1 16.4 16.8 x – = ________ ________ ________ ________ ________ s 2 = ________ ________ ________ ________ ________ State the hypotheses. H 0 : ____________ H a : ____________ Analysis of Variance also referred to as ANOVA, is a method of testing whether or not the means of three or more populations are equal. The method is applicable if: all populations of interest are normally distributed. the populations have equal standard deviations. samples (not necessarily of the same size) are randomly and independently selected from each population. there is one independent variable and one dependent variable. The test statistic for analysis of variance is the F -ratio. One-Way ANOVA a method of testing whether or not the means of three or more populations are equal; the method is applicable if: all populations of interest are normally distributed. the populations have equal standard deviations. samples (not necessarily of the same size) are randomly and independently selected from each population. The test statistic for analysis of variance is the F -ratio. Variance mean of the squared deviations from the mean; the square of the standard deviation. For a set of data, a deviation can be represented as x – x – where x is a value of the data and x – is the sample mean. The sample variance is equal to the sum of the squares of the deviations divided by the difference of the sample size and one.

Business