Statway TM A statistics pathway for college students Module 1: Statistical Studies and Overview of the Data Analysis Process Module 2: Summarizing Data Graphically and Numerically Module 3: Reasoning About Bivariate Numerical Data—Linear Relationships Module 4: Modeling Nonlinear Relationships Module 5: Reasoning About Bivariate Categorical Data and Introduction to Probability Module 6: Formalizing Probability and Probability Distributions Module 7: Linking Probability to Statistical Inference Module 8: Inference for One Proportion Module 9: Inference for Two Proportions Module 10: Inference for Means Module 11: Chi-Squared Tests Module 12: Other Mathematical Content Version 1.0 A resource from The Charles A. Dana Center at The University of Texas at Austin July 2011 Frontmatter Statway—Full Version 1.0, July 2011 Unless otherwise indicated, the materials found in this resource are Copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin Outside the license described below, no part of this resource shall be reproduced, stored in a retrieval system, or transmitted by any means—electronically, mechanically, or via photocopying, recording, or otherwise, including via methods yet to be invented—without express written permission from the Foundation and the University. The original version of this work was created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching. STATWAYTM / StatwayTM is a trademark of the Carnegie Foundation for the Advancement of Teaching. *** This copyright notice is intended to prohibit unlicensed commercial use of the Statway materials. License for use Statway Version 1.0, developed by the Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported license. To view the details of this license, see creativecommons.org/licenses/by-nc-sa/3.0. In general, under this license You are free: to Share—to copy, distribute, and transmit the work to Remix—to adapt the work Under the following conditions: Attribution—You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). We request you attribute the work thus: The original version of this work was developed by the Charles A. Dana Center at the University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching. This work is used (or adapted) under the Creative Commons Attribution-NonCommercialShareAlike 3.0 Unported (CC BY-NC-SA 3.0) license: creativecommons.org/licenses/by-nc-sa/3.0. For more information about Carnegie’s work on Statway, see www.carnegiefoundation.org/statway; for information on the Dana Center’s work on The New Mathways Project, see www.utdanacenter.org/mathways. Noncommercial—You may not use this work for commercial purposes. Share Alike—If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one. The Charles A. Dana Center at the University of Texas at Austin, as well as the authors and editors, assume no liability for any loss or damage resulting from the use of this resource. We have made extensive efforts to ensure the accuracy of the information in this resource, to provide proper acknowledgement of original sources, and to otherwise comply with copyright law. If you find an error or you believe we have failed to provide proper acknowledgment, please contact us at dana-txshop@utlists.utexas.edu. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. ii Frontmatter The Charles A. Dana Center The University of Texas at Austin 1616 Guadalupe Street, Suite 3.206 Austin, TX 78701-1222 Fax: 512-232-1855 dana-txshop@utlists.utexas.edu www.utdanacenter.org Statway—Full Version 1.0, July 2011 The Carnegie Foundation for the Advancement of Teaching 51 Vista Lane Stanford, California, 94305 Phone: 650-566-5110 pathways@carnegiefoundation.org www.carnegiefoundation.org About the development of this resource The content for this full version of Statway was developed under a November 30, 2010, agreement by a team of faculty authors and reviewers contracted and managed by the Charles A. Dana Center at the University of Texas at Austin with funding from the Carnegie Foundation for the Advancement of Teaching. This resource was produced in Microsoft Word 2008 and 2011 for the Mac. The content of these 12 modules was developed and produced (that is, written, reviewed, edited, and laid out) by the Charles A. Dana Center at The University of Texas at Austin and delivered by the Dana Center to the Carnegie Foundation for the Advancement of Teaching on June 30, 2011. Some issues to be aware of: • PDF files need to be viewed with Adobe Acrobat for full functionality. If viewed through Preview, which is the default on some computers, the URLs may not be correct. • The file names indicate the lesson number and whether the document is the instructor or student version or the out-of-class experience. The Dana Center is engaged in a process of revising and improving these materials to create the Dana Center Statistics Pathway. We welcome feedback from the community as part of our course revision process. If you would like to discuss these materials or learn more about the Dana Center’s plans for this course, contact us at mathways@austin.utexas.edu. About the Charles A. Dana Center at The University of Texas at Austin The Dana Center collaborates with local and national entities to improve education systems so that they foster opportunity for all students, particularly in mathematics and science. We are dedicated to nurturing students’ intellectual passions and ensuring that every student leaves school prepared for success in postsecondary education and the contemporary workplace—and for active participation in our modern democracy. The Center was founded in 1991 in the College of Natural Sciences at The University of Texas at Austin. Our original purpose—which continues in our work today—was to raise student achievement in K–16 mathematics and science, especially for historically underserved populations. We carry out our work by supporting high standards and building system capacity; collaborating with key state and national organizations to address emerging issues; creating and delivering professional supports for educators and education leaders; and writing and publishing education resources, including student supports. Our staff of more than 80 researchers and education professionals has worked intensively with dozens of school systems in nearly 20 states and with 90 percent of Texas’s more than 1,000 school districts. As one of the College’s largest research units, the Dana Center works to further the university’s mission of achieving excellence in education, research, and public service. We are committed to ensuring that the accident of where a student attends school does not limit the academic opportunities he or she can pursue. For more information about the Dana Center and our programs and resources, see our homepage at www.utdanacenter.org. To access our resources (many of them free) please see our products index at www.utdanacenter.org/products. To learn about Dana Center professional development sessions, see our professional development site at www.utdanacenter.org/pd. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. iii Frontmatter Statway—Full Version 1.0, July 2011 Acknowledgments The original version of this work was created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching. Carnegie Corporation of New York, The Bill & Melinda Gates Foundation, The William and Flora Hewlett Foundation, Lumina Foundation, and The Kresge Foundation joined in partnership with the Carnegie Foundation for the Advancement of Teaching in this work. Leadership—Charles A. Dana Center at the University of Texas at Austin Uri Treisman, director Susan Hudson Hull, program director of mathematics national initiatives Leadership—Carnegie Foundation for the Advancement of Teaching Anthony S. Bryk, president Bernadine Chuck Fong, senior managing partner Louis Gomez, senior fellow Paul LeMahieu, senior fellow James Stigler, senior fellow Uri Treisman, senior fellow Guadalupe Valdés, senior fellow Statway Project Leads Kristen Bishop, former team lead for the New Mathways Project, the Charles A. Dana Center at the University of Texas at Austin Thomas J. Connolly, project lead, Statway, the Charles A. Dana Center at the University of Texas at Austin Karon Klipple, director of Statway, the Carnegie Foundation for the Advancement of Teaching Jane Muhich, director of Quantway, the Carnegie Foundation for the Advancement of Teaching Project Staff—Charles A. Dana Center at the University of Texas at Austin Richard Blount, advisor Kathi Cook, project director, online services team Jenna Cullinane, research associate Steve Engler, lead editor and production editor Amy Getz, team lead for the New Mathways Project Susan Hudson Hull, program director of mathematics national initiatives Joseph Hunt, graduate research assistant Rachel Jenkins, consulting editor Erica Moreno, program coordinator Carol Robinson, administrative associate Cathy Seeley, senior fellow Rachele Seifert, administrative associate Lilly Soto, senior administrative associate Phil Swann, senior designer Laura Torres, graduate research assistant Thomas Wiegel, freelance formatter and proofreader The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. iv Frontmatter Statway—Full Version 1.0, July 2011 Authors Contracted by the Dana Center Roxy Peck, professor emerita of statistics, California Polytechnic State University, San Luis Obispo, California Beth Chance, professor of statistics, California Polytechnic State University, San Luis Obispo, California Robert C. delMas, associate professor of educational psychology, University of Minnesota, Minneapolis, Minnesota Scott Guth, professor of mathematics, Mt. San Antonio College, Walnut, California Rebekah Isaak, graduate research student, University of Minnesota, Minneapolis, Minnesota Leah McGuire, assistant professor, University of Minnesota, Minneapolis, Minnesota Jiyoon Park, graduate research student, University of Minnesota, Minneapolis, Minnesota Brian Kotz, associate professor of mathematics, Montgomery College, Germantown, Maryland Chris Olsen, assistant professor of mathematics and statistics, Grinnell College, Grinnell, Iowa Mary Parker, professor of mathematics, Austin Community College, Austin, Texas Michael A. Posner, associate professor of statistics, Villanova University, Villanova, Pennsylvania Thomas H. Short, professor, John Carroll University, University Heights, Ohio Penny Smeltzer, teacher of statistics, Westwood High School, Austin, Texas Myra Snell, professor of mathematics, Los Medanos College, Pittsburg, California Laura Ziegler, graduate research student, University of Minnesota, Minneapolis, Minnesota Reviewers Contracted by the Dana Center Michelle Brock, American River College, Sacramento, California Thomas J. Connolly, the Charles A. Dana Center at the University of Texas at Austin Andre Freeman, Capital Community College, Hartford, Connecticut Karon Klipple, the Carnegie Foundation for the Advancement of Teaching Roxy Peck, professor emerita of statistics, California Polytechnic State University, San Luis Obispo, California Jim Smart, Tallahassee Community College, Tallahassee, Florida Myra Snell, Los Medanos College, Pittsburg, California Committee for Statistics Learning Outcomes Rose Asera, formerly of the Carnegie Foundation for the Advancement of Teaching Kristen Bishop, formerly of the Charles A. Dana Center at the University of Texas at Austin Richelle (Rikki) Blair, American Mathematical Association of Two-Year Colleges (AMATYC); Lakeland Community College, Ohio David Bressoud, Mathematical Association of America (MAA); Macalester College, Minnesota John Climent, American Mathematical Association of Two-Year Colleges (AMATYC); Cecil College, Maryland Peg Crider, Lone Star College, Tomball, Texas Jenna Cullinane, the Charles A. Dana Center at the University of Texas at Austin Robert C. delMas, Consortium for the Advancement of Undergraduate Statistics Education (CAUSE); University of Minnesota, Minneapolis, Minnesota Bernadine Chuck Fong, the Carnegie Foundation for the Advancement of Teaching Karen Givvin, the University of California, Los Angeles Larry Gray, American Mathematical Society (AMS); University of Minnesota Susan Hudson Hull, the Charles A. Dana Center at the University of Texas at Austin Rob Kimball, American Mathematical Association of Two-Year Colleges (AMATYC); Wake Technical Community College, North Carolina Dennis Pearl, Consortium for the Advancement of Undergraduate Statistics Education (CAUSE); The Ohio State University Roxy Peck, American Statistical Association (ASA); Consortium for the Advancement of Undergraduate Statistics Education (CAUSE); California Polytechnic State University, San Luis Obispo, California The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. v Frontmatter Statway—Full Version 1.0, July 2011 Myra Snell, American Mathematical Association of Two-Year Colleges (AMATYC); Los Medanos College, Pittsburg, California Jim Stigler, the Carnegie Foundation for the Advancement of Teaching; the University of California, Los Angeles Daniel Teague, Mathematical Association of America (MAA); North Carolina School of Science and Mathematics, Durham Uri Treisman, the Carnegie Foundation for the Advancement of Teaching; the Charles A. Dana Center at the University of Texas at Austin Version 1.0 of Statway was developed in collaboration with faculty from the following colleges, the “Collaboratory,” who advised on the development of the course. These Collaboratory colleges are: Florida Miami Dade College, Miami, Florida Tallahassee Community College, Tallahassee, Florida Valencia Community College, Orlando, Florida California American River College, Sacramento, California Foothill College, Los Altos Hills, California Mt. San Antonio College, Walnut, California Pierce College, Woodland Hills, California San Diego City College, San Diego, California California State University System Texas CSU Northridge Sacramento State University San Jose State University Austin Community College, Austin, Texas El Paso Community College, El Paso, Texas Houston Community College, Houston, Texas Northwest Vista College, San Antonio, Texas Richland College, Dallas, Texas Connecticut Washington Capital Community College, Hartford, Connecticut Gateway Community College, New Haven, Connecticut Housatonic Community College, Bridgeport, Connecticut Naugatuck Valley Community College, Waterbury, Connecticut Seattle Central Community College, Seattle, Washington Tacoma Community College, Tacoma, Washington The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. vi Frontmatter Statway—Full Version 1.0, July 2011 Statway, Full Version 1.0, July 2011 Table of Contents Module 1: Statistical Studies and Overview of the Data Analysis Process Lesson 1.1.1: The Statistical Analysis Process Lesson 1.1.2: Types of Statistical Studies and Scope of Conclusions Lesson 1.2.1: Collecting Data by Sampling Lesson 1.2.2: Random Sampling Lesson 1.2.3: Other Sampling Strategies Lesson 1.2.4: Sources of Bias in Sampling Lesson 1.3.1: Collecting Data by Conducting an Experiment Lesson 1.3.2: Other Design Considerations—Blinding, Control Groups, and Placebos Lesson 1.4.1: Drawing Conclusions from Statistical Studies Module 2: Summarizing Data Graphically and Numerically Lesson 2.1.1: Dotplots, Histograms, and Distributions for Quantitative Data Lesson 2.1.2: Constructing Histograms for Quantitative Data Lesson 2.1.3: Comparing Distributions of Quantitative Data in Two Independent Samples Lesson 2.2.1: Quantifying the Center of a Distribution—Sample Mean and Sample Median Lesson 2.2.2: Constructing Histograms for Quantitative Data Lesson 2.3.1: Quantifying Variability Relative to the Median Lesson 2.4.1: Quantifying Variability Relative to the Mean Lesson 2.4.2: The Sample Variance Module 3: Reasoning About Bivariate Numerical Data—Linear Relationships Lesson 3.1.1: Introduction to Scatterplots and Bivariate Relationships Lesson 3.1.2: Developing an Intuitive Sense of Form, Direction, and Strength of the Relationship Between Two Measurements Lesson 3.1.3: Introduction to the Correlation Coefficient and Its Properties Lesson 3.1.4: Correlation Formula Lesson 3.1.5: Correlation Is Not Causation Lesson 3.2.1: Using Lines to Make Predictions Lesson 3.2.2: Least Squares Regression Line as Line of Best Fit The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. vii Frontmatter Statway—Full Version 1.0, July 2011 Lesson 3.2.3: Investigating the Meaning of Numbers in the Equation of a Line Lesson 3.2.4: Special Properties of the Least Squares Regression Line Lesson 3.3.1: Using Residuals to Determine If a Line Is a Good Fit Lesson 3.3.2: Using Residuals to Determine If a Line Is an Appropriate Model Module 4: Modeling Nonlinear Relationships Lesson 4.1.1: Investigating Patterns in Data Lesson 4.1.2: Exponential Models Lesson 4.1.3: Assessing How Well a Model Fits the Data Module 5: Reasoning About Bivariate Categorical Data and Introduction to Probability Lesson 5.1.1: Reasoning About Risk and Chance Lesson 5.1.2: Defining Risk Lesson 5.1.3: Interpreting Risk Lesson 5.1.4: Comparing Risks Lesson 5.1.5: More on Conditional Risks Module 6: Formalizing Probability and Probability Distributions Lesson 6.1.1: Probability Lesson 6.1.2: Probability Rules Lesson 6.1.3: Simulation, Discrete Random Variables, and Probability Distributions Lesson 6.2.1: Probability Distributions of Continuous Random Variables Lesson 6.2.2: Z-Scores and Normal Distributions Lesson 6.2.3: Using Normal Distributions to Find Probabilities and Critical Values Module 7: Linking Probability to Statistical Inference Lesson 7.1.1: Predicting an Election—Statistics and Sampling Variability Lesson 7.1.2: Sampling from a Population Lesson 7.1.3: Testing Statistical Hypotheses Lesson 7.2.1: Two Types of Inferential Procedures—Estimation and Hypothesis Testing Lesson 7.2.2: Connecting Sampling Distributions and Confidence Intervals Lesson 7.2.3: Connecting Sampling Distributions and Hypothesis Testing The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. viii Frontmatter Statway—Full Version 1.0, July 2011 Module 8: Inference for One Proportion Lesson 8.1.1: Sampling Distribution of One Proportion Lesson 8.1.2: Sampling Distribution of One Proportion Lesson 8.2.1: Estimation of One Proportion Lesson 8.2.2: Estimation of One Proportion Lesson 8.3.1: Estimation of One Proportion Lesson 8.3.2: Hypothesis Testing for One Proportion Module 9: Inference for Two Proportions Lesson 9.1.1: Sampling Distribution of Differences of Two Proportions Lesson 9.1.2: Using Technology to Explore the Sampling Distribution of the Differences in Two Proportions Lesson 9.2.1: Confidence Intervals for the Difference in Two Population Proportions Lesson 9.2.2: Computing and Interpreting Confidence Intervals for the Difference in Two Population Proportions Lesson 9.3.1: A Statistical Test for the Difference in Two Population Proportions Lesson 9.3.2: A Statistical Test for the Difference in Two Population Proportions Lesson 9.3.3: Conducting a Statistical Test for the Difference in Two Population Proportions Module 10: Inference for Means Lesson 10.1.1: The Sampling Distribution of the Sample Mean Lesson 10.1.2: Using an Applet to Explore the Sampling Distribution of the Mean with Focus on Shape Lesson 10.2.1: Estimating a Population Mean Lesson 10.2.2: T-Statistics and T-Distributions Lesson 10.2.3: The Confidence Interval for a Population Mean Lesson 10.3.1: Testing Hypotheses About a Population Mean Lesson 10.3.2: Test Statistic and P-Values, One-Sample T-Test Lesson 10.4.1: Inferences About the Difference Between Two Population Means Lesson 10.4.2: Inference for Paired Data Lesson 10.4.3: Two-Sample T-Test The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. ix Frontmatter Statway—Full Version 1.0, July 2011 Module 11: Chi-Squared Tests Lesson 11.1.1: Introduction to Chi-Square Tests for One-Way Tables Lesson 11.1.2: Executing the Chi-Square Test for One-Way Tables (Goodness-of-Fit) Lesson 11.1.3: The Chi-Square Distribution and Degrees of Freedom Lesson 11.2.1: Introduction to Chi-Square Tests for Two-Way Tables Lesson 11.2.2: Executing the Chi-Square Test for Independence in Two-Way Tables Lesson 11.2.3: Executing the Chi-Square Test for Homogeneity in Two-Way Tables Module 12: Other Mathematical Content Lesson 12.1.1: Statistical Linear Relationships and Mathematical Models of Linear Relationships Lesson 12.1.2: Mathematical Linear Models Lesson 12.1.3: Contrasting Mathematical and Statistical Linear Relationships Lesson 12.1.4: Proportional Models Lesson 12.2.1: Multiple Representations of Exponential Models Lesson 12.2.2: Linear Models—Answering Various Types of Questions Algebraically Lesson 12.2.3: Power Models Lesson 12.2.4: Solving Inequalities The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. x Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables Estimated number of 50-­‐minute class sessions: 2 Learning Goals and Concept Flow S.3. Statistical Evidence Goal: Students will demonstrate an ability to use appropriate statistical evidence to reason about population characteristics and about experimental treatment effects. The series of tasks in this lesson introduces the concept of a chi-­‐square test statistic as a means of measuring the extent to which the distribution of proportions observed in a sample differs from the expected distribution of proportions based on hypothesized population parameters. Later, lessons reference these tasks while developing a formal framework for testing hypotheses concerning the distribution of multiple proportions in a population. Students will begin to understand that • • • larger chi-­‐square values give greater cause to question an initial claim about a variable’s distribution. categories with the greatest “observed–expected” differences relative to the expected count contribute the most to the chi-­‐square statistic’s value. the default claim (null hypothesis) is that the variable is distributed as expected; the alternative is that there are departures from the expectation. Students will begin to be able to • • • recognize hypothesis testing situations where a chi-­‐square goodness-­‐of-­‐fit test can be used to answer a question of interest. choose appropriate null and alternative hypotheses for a chi-­‐square goodness-­‐of-­‐fit test given a claim about the distribution of a categorical variable. compute the value of the test statistic in a chi-­‐square goodness-­‐of-­‐fit test. In this series of tasks, you are not formally developing the full framework for executing a chi-­‐square goodness-­‐of-­‐fit test. Rather, one categorical variable’s population distribution is stated (as percentages), and students are asked to compute expected counts for each category of a hypothetical sample of 1,000 items based on the variable’s stated population distribution. Using other hypothetical samples, students then consider the following: a. how different an observed count must be from an expected count in order to be judged a cause for concern, and b. if it matters how these discrepancies between observed and expected counts are spread out (i.e., Does it matter if just two categories are off by quite a bit? Is it worse if all categories are off but only by a small amount?). Students are asked to initially conjecture as to whether the distribution of a given hypothetical sample challenges the initial claim about how the population is distributed. Toward the end, students are introduced to the formula for the chi-­‐square statistic and asked to perform complete-­‐the-­‐table exercises to compute the chi-­‐square statistic for the hypothetical samples. Final activities ask students to conjecture about characteristics of a chi-­‐square statistic, including the relationship between the size of a chi-­‐square statistic and the strength of evidence that the corresponding sample provided against the original population distribution claim. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 1 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables Part I: Rich Task Introduce the Task Remind students that in a previous module, they were tasked with designing a children’s cereal that struck an effective balance of taste and nutrition in order to receive a favorable rating from Consumer Reports. Consider showing a box of a multicolored cereal where the cereal pieces are fairly identical except for their colors. Pour out some of the contents if you wish. Have students envision what the cereal would look like if it were entirely composed of just one of the colors or if one color were considerably more (or less) dominant. Explain that presentation of the cereal is potentially very important in terms of its marketability (i.e., even if the cereal is healthy or tastes good, children may not be interested in an unappealing looking cereal). Using the introductory material that is part of the student handout (also given below), have students imagine what a bowl of cereal with the desired characteristics may look like. If needed, consider mixing appropriate proportions of red, white, and blue poker chips (or other objects) in a bowl to simulate. As in previous modules, have students work on the task alone for a few minutes and then in small groups for slightly longer. Task [Student Handout] In a previous lesson, you were asked to design a children’s cereal that struck an effective balance of taste and nutrition in order to receive a favorable rating from Consumer Reports. In this lesson, you will discuss some aspects of effectively marketing the cereal to consumers. While it is nice to have a high-­‐rated children’s cereal, it is also important to develop and present the cereal in such a way that it will be well-­‐received by children and their families. Due to manufacturing costs and concerns, the cereal that you are developing will be manufactured in such a way that all cereal pieces will be identical in terms of size, shape, and weight. However, suppose that research suggests that presenting the cereal with color is important. In other words, while the cereal could be manufactured as dull, uniformly colorless pieces, studies show that children are typically more likely to eat the cereal if the cereal pieces contain color. Suppose that the research also shows that certain colors and certain distributions of colors are more appealing to consumers and are relatively inexpensive to produce. Assume that the desired color distribution for the cereal is 20% red, 35% white, and 45% blue. You want to check each day to make sure that your cereal manufacturing process is adhering to these proportions. To do so, you take a simple random sample of 1,000 cereal pieces and count how many of each color are present in the sample. Strong evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue implies that something may be wrong with the production process! (1) How many pieces of each color would you expect in your sample of 1,000 pieces if the true population proportions were in fact 20% red, 35% white, and 45% blue? (Note: These three expected counts should add up to 1,000 since you have 1,000 pieces in your sample.) The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 2 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables (2) If you obtained a sample of 1,000 pieces that exactly matched the three counts you computed in Question 1, it would not suggest that there are any problems in the manufacturing process since your actual counts were the same as your expected counts. However, given that you have discussed sampling variability in a previous module, you know that it is unusual to obtain a sample with the exact counts you just computed in Question 1. (a) For a sample of 1,000 pieces, give another example of counts for red, white, and blue pieces that would not suggest that there are any problems in the manufacturing process. Red White Blue (b) For a sample of 1000 pieces, give an example of counts for red, white, and blue pieces that would suggest that there are some problems in the manufacturing process. Red White Blue (3) Following are the distributions of four random samples of size 1,000 taken from four different production days. For each sample, examine the distribution of the actual counts obtained from the sample and determine whether you think the sample provides strong evidence, moderate evidence, or weak evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue. Then list the characteristics of the sample that led you to your decision. Sample: Day 1 Red 210 White 360 Blue 430 It appears that the Day 1 sample provides (circle one) strong moderate weak evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue because … Sample: Day 2 !"# !"" $%&'" #!$ ()*" %&$ It appears that the Day 2 sample provides (circle one) strong moderate weak evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue because … The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 3 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables Sample: Day 3 Red 180 White 360 Blue 460 It appears that the Day 3 sample provides (circle one) strong moderate weak evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue because … Sample: Day 4 !"# !"# $%&'" "## ()*" $%& It appears that the Day 4 sample provides (circle one) strong moderate weak evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue because … (4) Based on your work in Question 3, which sample gives the strongest evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue? What characteristics of the sample were most important in your decision? (5) How large of a difference are you willing to accept for each color count before you become concerned that the production process is not conforming to the desired distribution of 20% red, 35% white, and 45% blue? Would you be concerned if an actual sample count differed from its expected count by about 10 pieces? By about 50 pieces? By 100 pieces? Why? Explain your reasoning. (6) It would be useful to have a statistical measure of deviation to determine how much the distribution of a sample (such as those shown previously) deviates from what is expected. Create a method (and/or a statistic) to measure which sample deviates the most from the ideal expected distribution. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 4 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables Part I Wrap-­‐Up/Transition to Part II As has been the case in previous lessons, the previous task should provide students the opportunity to struggle with the important ideas—in this case, what are the expected counts for a sample of size 1,000 based on the original claim and how much deviation from those expected counts is reasonable. Students may have considered formal sampling distribution logic from previous modules in determining how much of a deviation is reasonable from an expected count, but that is not required. In Part II, you will address any errors in student reasoning and computation. Consider polling the class on its responses to Question 4 (consider even using a categorical variable graph covered earlier in the course to chart the responses). Also consider allowing students to discuss as a group the sample characteristics that influenced their decisions in Question 4 and their reasoning in Question 5. Encourage comparisons of the deviations and examination of the deviations relative to the corresponding expected counts, particularly in light of Question 6. Have students share some of their inventions and ideas regarding Question 6, mindful that some methods may not work well (e.g., just adding up the deviations will not work; they always add to 0). Also, bring up the fact that in Samples 1 and 3 the sum of the squares of the deviations (also the sum of the absolute value of the deviations) are the same, but the sample on the right deviates more from the ideal because a deviation of 20 from an expected count of 200 (red) is a bigger deal than a deviation of 20 from a larger expected count 450 (blue). This also serves as preparation for Question 11. If appropriate, consider reminding students that when similar deviation measures were discussed earlier in the course, squaring was often employed (e.g., deviations are squared as a step in computing standard deviation, least-­‐squares regression). Part II: Quantifying the Strength of the Evidence [Scaffolded Tasks] Introduction Tell students that they are now going to develop a way of more carefully quantifying some of the previous concepts. For the following problems where the final chi-­‐square value is provided, encourage students to seek assistance (if needed) until they obtain calculations that are consistent with the presented values. Answer any questions and address any issues that come up regarding the calculation of differences, squares, quotients, and sums and/or general order or operations. Questions and Tasks [Student Handout] Recall that strong evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue implies that something may be wrong with the production process. For each sample, you can compute a chi-­‐square statistic (chi is pronounced ki as in kite) that is useful in assessing the strength of your evidence that something might be wrong with the production process. (In later lessons, you will use this statistic in a way that is similar to how you used Z-­‐scores and T-­‐scores for testing hypotheses in previous modules.) Generally speaking, the chi-­‐square statistic relies on the comparison of how different an observed count in a given category is from the count that was expected for that given category. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 5 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables 2 The steps for computing a chi-­‐square value (written as χ ) are as follows: 1. For each category, compute the difference between the actual count for that category (obtained from the sample) and the expected count for that category: Observed Count – Expected Count 2. For each category, compute the square of this difference obtained in Step 1: (Observed Count – Expected Count)2 3. For each category, divide the squared difference obtained in Step 2 by the expected count for the category: (Observed Count – Expected Count)2/Expected Count 4. Add up the Step 3 calculation results from each category; this is the chi-­‐square value. Example Using the Day 1 sample data set as an example: Observed Count (from sample) Expected Count (based on desired population distribution) Step 1: Observed Count -­‐ Expected Count Step 2: (Observed Count -­‐ Expected Count)2 2 Step 3: (Observed Count -­‐ Expected Count) /Expected Count Red 210 200 10 White 360 350 10 Blue 430 450 -­‐20 100 100 400 0.5 0.286 0.889 Step 4: 0.5 + 0.286 + 0.889 = 1.675 For the Day 1 sample, the chi-­‐square value generated is 1.675. (7) Compute the chi-­‐square values for the other samples (Days 2–4) by filling in the tables below. Compute the Step 3 calculations to three decimal places as shown in the previous example. Day 2 !"#$%&$'()*+,-(./%*0(#1023$4 ;<2$=-$'()*+,-(."1#$'(*,('$#>%$'(2*2+31->*,('>#-%>"+->*,4 ?-$2(@A(!"#$%&$'()*+,-(B(;<2$=-$'()*+,?-$2(5A(.!"#$%&$'()*+,-(B(;<2$=-$'()*+,-45 ?-$2(9A(.!"#$%&$'()*+,-(B(;<2$=-$'()*+,-45D;<2$=-$'()*+,- !"# 566 566 6 $%&'" 758 986 :8 ()*" 9:8 786 B:8 6 8C58 8C58 6 @CE6:@ @5E866 Step 4: 0 + 0 .28 6 + 0. 642 = 28.571 For the Day 2 sample, the chi-­‐square value generated is 28.571. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 6 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables Day 3 Observed Count (from sample) Expected Count (based on desired population distribution) Step 1: Observed Count -­‐ Expected Count Step 2: (Observed Count -­‐ Expected Count)2 2 Step 3: (Observed Count -­‐ Expected Count) /Expected Count Red 180 200 -­‐20 White 360 350 10 Blue 460 450 10 400 100 100 2 0.286 0.222 Step 4: + 0. 286 + 2 = .173 For the Day 3 sample, the chi-­‐square value generated is _____________. Day 4 !"# 567 5:: 67 $%&'" 677 67: 7 ()*" 89: 87: A8: !"#$%&$'()*+,-(./%*0(#1023$4 ;<2$=-$'()*+,-(."1#$'(*,('$#>%$'(2*2+31->*,('>#-%>"+->*,4 ?-$2(9@(!"#$%&$'()*+,-(A(;<2$=-$'()*+,?-$2(5@(.!"#$%&$'()*+,-(A(;<2$=-$'()*+,-45 9557 57 9B:: ?-$2(6@(.!"#$%&$'()*+,-(A(;<2$=-$'()*+,-45C;<2$=-$'()*+,- BD957 :D:E9 6D77B Step 4: +0.2 86 + .6 42 = 9.752 For the Day 4 sample, the chi-­‐square value generated is 9.752. (8) Which of the daily samples had the highest chi-­‐square value? Does the size of the chi-­‐square values generated by these four samples appear to correspond in any way to the initial strength-­‐of-­‐evidence statements that you made in Question 3 regarding the claim that the population proportions of the cereal pieces are 20% red, 35% white, and 45% blue? (9) For a hypothetical sample, if one category has an observed count and expected count that are exactly the same, is it possible to still have a large chi-­‐square value generated by that sample? If so, make up a sample that illustrates how this could happen. Did any of the samples in Question 7 exhibit this behavior? (10) If no category in a sample has a case where the observed count and expected count are exactly the same, is it still possible to have a small chi-­‐square value generated by that sample? If so, make up a sample that illustrates how this could happen. Did any of the samples in Question 7 exhibit this behavior? (11) In the Day 2 data set, the white and blue category counts had an actual count that differed from the expected count by 75 pieces. Which category’s difference made a larger contribution to the size of the chi-­‐square value: the difference of size 75 relative to an expected count of 350 (white) or the difference of size 75 relative to an expected count of 450 (blue)? Does it seem reasonable that a difference of 75 may be a bigger deal for a The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 7 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables category with an expected count of 350 than it would be for a category with an expected count of 450? Explain your reasoning. Wrap-­‐Up Questions/Direct Instruction About Statistical Concepts Although expected counts are provided in the fill-­‐in-­‐the-­‐table cases, make sure that students see that the expected counts are the hypothesized proportions multiplied by the sample size. Monitor for any difficulty with the calculation of differences, squares, quotients, and sums and/or general order or operations. Encourage students to examine how the size of a chi-­‐square statistic might be related to the strength of evidence against the claim that the population is distributed as expected. Also consider having students discuss in class their responses to the more conceptual questions (Questions 9–11). See the commentary and solutions at the end of the document for additional guidance. Homework [Student Handout] (1) Based on your work today, answer the following questions: (a) Which seems to provide greater evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue: a high chi-­‐square value (such as you computed for Days 2 and 4) or a low chi-­‐square value (such as you computed for Days 1 and 3)? (b) Recall that strong evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue implies that something may be wrong with the production process. Based on your answer above, would a high chi-­‐square value or a low chi-­‐square value give stronger evidence that something may be wrong with the production process? (c) Is it possible to obtain a negative chi-­‐square statistic? If so, explain how. If not, explain why not. (2) On Day 5, the following sample was collected: !"# !"# $%&'" $%& ()*" &'# Compute the chi-­‐square value, and determine if this value provides strong evidence against the claim that the population proportions for the cereal pieces are 20% red, 35% white, and 45% blue. (Note: For reasons that will be explained in a future lesson, in a case such as this where the categorical variable contains three categories, consider a chi-­‐square value of 5.99 or greater to be statistically significant evidence against the claim that the population proportions of cereal pieces are 20% red, 35% white, and 45% blue.) The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 8 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables Commentary and Solutions for the Tasks/Questions Part I Question 1: The expected count of red should be 0.20 • 1,000 = 200; white: 0.35 • 1,000 = 350; blue: 0.45 • 1,000 = 450. The formula is formally mentioned in the next lesson, and these counts appear in the example that precedes Question 7. Students should realize that these three expected counts should add up to 1,000 since there are 1,000 pieces in the sample. Question 2: The expectation for Question 2a is that students come up with a sample that is not very different from red = 200, white = 350, and blue = 400 (i.e., differences between observed and expected counts are small). For Question 2b, the expectation is that students come up with a sample that is very different from red = 200, white = 350, blue = 400 (i.e., differences between observed and expected counts are large). Question 3: The first and third samples have small differences between observed and expected counts and thus provide weak or no evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue. (These samples generate small chi-­‐square values in later questions, but this has not been covered at this point.) On the other hand, the second and fourth samples have large differences between observed and expected counts and thus provide strong evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue. (These samples generate large chi-­‐square values in later questions.) Even in Sample 2 where the red category’s observed and expected count are the same value (200), there is such a large difference in the other colors’ respective observed and expected counts that there is cause for concern. Question 4: Sample 2 gives the strongest evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue due to the fact that the white and blue categories represent such large discrepancies between the expected and observed.(This sample generate the highest chi-­‐square value of the four samples in a later exercise.) Students should select either Sample 2 or Sample 4 as their answer/speculation for this question as those samples have much larger observed versus expected count differences than those that occur in Samples 1 and 3. See the Part I Wrap-­‐Up for some suggestions for discussion and recording responses. Questions 5 and 6: See the Part I Wrap-­‐Up for some suggestions for discussion and recording responses. Encourage students to share their reasoning requested in Question 5 and some creative ideas developed in addressing Question 6. Keep in mind that Part II is where you address any errors in student reasoning and computation. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 9 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables Part II Question 7: Day 2 Observed Count (from sample) Expected Count (based on desired population distribution) Step 1: Observed Count -­‐ Expected Count Step 2: (Observed Count -­‐ Expected Count)2 Step 3: (Observed Count -­‐ Expected Count)2/Expected Count Day 3 Observed Count (from sample) Expected Count (based on desired population distribution) Step 1: Observed Count -­‐ Expected Count Step 2: (Observed Count -­‐ Expected Count)2 Step 3: (Observed Count -­‐ Expected Count)2/Expected Count Day 4 Red 200 200 0 White 425 350 75 Blue 375 450 -­‐75 0 5625 5625 0 16.071 12.500 Red 180 200 -­‐20 White 360 350 10 Blue 460 450 10 400 100 100 2 0.286 0.222 Red 235 200 35 White 355 350 5 Blue 410 450 -­‐40 Observed Count (from sample) Expected Count (based on desired population distribution) Step 1: Observed Count -­‐ Expected Count Step 2: (Observed Count -­‐ Expected Count)2 1225 25 1600 Step 3: (Observed Count -­‐ Expected Count)2/Expected Count 6.125 0.071 3.556 chi-­‐square 28.571 chi-­‐square 2.508 chi-­‐square 9.752 Question 8: Sample 2 had the highest chi-­‐square value. Students should notice that the size of the chi-­‐square value generated by each of these four samples corresponds to strength-­‐of-­‐evidence statements from Question 3 (or at least to the appropriate strength-­‐of-­‐evidence statements listed in the previous commentary/solutions for Question 3). Specifically, they should begin to see that higher chi-­‐square values are stronger evidence against the claim that the population proportions of the cereal pieces are 20% red, 35% white, and 45% blue. Question 9: Yes, it is possible that if one category has an observed count and expected count that are exactly the same, a large chi-­‐square value is still possible for that sample. Sample 2 is an example. Question 10: Yes, it is possible. See Samples 1 and 3. Question 11: The difference of size 75 relative to the expected count of 350 (white) had a bigger effect on the chi-­‐square statistic (its contribution was 16.071) than the difference of size 75 relative to the expected count of 450 (blue—its contribution was 12.5). The difference of 75 was a bigger deal for a category with an expected count of 350 (a smaller expected count) than it was for a category with an expected count of 450 (a larger expected count). Ideally, observations such as this one and those made in Questions 9 and 10 in conjunction with the work performed for Questions 5 and 6 will help students to begin to understand/appreciate why the chi-­‐square measure is constructed as it is. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 10 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables Homework Question 1: A higher chi-­‐square value (such as those computed for Days 2 and 4) provides greater evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue. Thus, a high chi-­‐square value gives stronger evidence that something may be wrong with the production process. It is not possible to obtain a negative chi-­‐square statistic. Expected counts cannot be negative, and the square of an observed–expected difference cannot be negative either. So, in Step 3 of computing the chi-­‐square statistic, the value for (Observed Count – Expected Count)2/Expected Count must be positive since it is a positive value divided by a positive value. Because Step 4 computes the chi-­‐square statistic as the sum of these (Observed Count – Expected Count)2/Expected Count quantities (all of which are positive), the chi-­‐square statistic must be positive. Question 2: Day 5 Observed Count (from sample) Expected Count (based on desired population distribution) Step 1: Observed Count -­‐ Expected Count Step 2: (Observed Count -­‐ Expected Count)2 2 Step 3: (Observed Count -­‐ Expected Count) /Expected Count Red 178 200 -­‐22 White 364 350 14 Blue 458 450 8 484 196 64 2.42 0.560 0.142 chi-­‐square This value does not provide strong evidence against the claim that the population proportions for the cereal pieces are 20% red, 35% white, and 45% blue. It is a small chi-­‐square value (such as those seen in Samples 1 and 3), and it is less than the critical chi-­‐square value of 5.99 mentioned in the comment that accompanies the question. (The P-­‐value here is about 0.21.) The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 11 3.122 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables Part I In a previous lesson, you were asked to design a children’s cereal that struck an effective balance of taste and nutrition in order to receive a favorable rating from Consumer Reports. In this lesson, you will discuss some aspects of effectively marketing the cereal to consumers. While it is nice to have a high-­‐ rated children’s cereal, it is also important to develop and present the cereal in such a way that it will be well-­‐received by children and their families. Due to manufacturing costs and concerns, the cereal that you are developing will be manufactured in such a way that all cereal pieces will be identical in terms of size, shape, and weight. However, suppose that research suggests that presenting the cereal with color is important. In other words, while the cereal could be manufactured as dull, uniformly colorless pieces, studies show that children are typically more likely to eat the cereal if the cereal pieces contain color. Suppose that the research also shows that certain colors and certain distributions of colors are more appealing to consumers and are relatively inexpensive to produce. Assume that the desired color distribution for the cereal is 20% red, 35% white, and 45% blue. You want to check each day to make sure that your cereal manufacturing process is adhering to these proportions. To do so, you take a simple random sample of 1,000 cereal pieces and count how many of each color are present in the sample. Strong evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue implies that something may be wrong with the production process! (1) How many pieces of each color would you expect in your sample of 1,000 pieces if the true population proportions were in fact 20% red, 35% white, and 45% blue? (Note: These three expected counts should add up to 1,000 since you have 1,000 pieces in your sample.) (2) If you obtained a sample of 1,000 pieces that exactly matched the three counts you computed in Question 1, it would not suggest that there are any problems in the manufacturing process since your actual counts were the same as your expected counts. However, given that you have discussed sampling variability in a previous module, you know that it is unusual to obtain a sample with the exact counts you just computed in Question 1. (a) For a sample of 1,000 pieces, give another example of counts for red, white, and blue pieces that would not suggest that there are any problems in the manufacturing process. Red White Blue (b) For a sample of 1000 pieces, give an example of counts for red, white, and blue pieces that would suggest that there are some problems in the manufacturing process. Red White Blue The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 1 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables (3) Following are the distributions of four random samples of size 1,000 taken from four different production days. For each sample, examine the distribution of the actual counts obtained from the sample and determine whether you think the sample provides strong evidence, moderate evidence, or weak evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue. Then list the characteristics of the sample that led you to your decision. Sample: Day 1 Red 210 White 360 Blue 430 It appears that the Day 1 sample provides (circle one) strong moderate weak evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue because … Sample: Day 2 !"# !"" $%&'" #!$ ()*" %&$ It appears that the Day 2 sample provides (circle one) strong moderate weak evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue because … Sample: Day 3 Red 180 White 360 Blue 460 It appears that the Day 3 sample provides (circle one) strong moderate weak evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue because … Sample: Day 4 !"# !"# $%&'" "## ()*" $%& It appears that the Day 4 sample provides (circle one) strong moderate weak evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue because … The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 2 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables (4) Based on your work in Question 3, which sample gives the strongest evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue? What characteristics of the sample were most important in your decision? (5) How large of a difference are you willing to accept for each color count before you become concerned that the production process is not conforming to the desired distribution of 20% red, 35% white, and 45% blue? Would you be concerned if an actual sample count differed from its expected count by about 10 pieces? By about 50 pieces? By 100 pieces? Why? Explain your reasoning. (6) It would be useful to have a statistical measure of deviation to determine how much the distribution of a sample (such as those shown previously) deviates from what is expected. Create a method (and/or a statistic) to measure which sample deviates the most from the ideal expected distribution. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 3 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables Part II: Quantifying the Strength of the Evidence Recall that strong evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue implies that something may be wrong with the production process. For each sample, you can compute a chi-­‐square statistic (chi is pronounced ki as in kite) that is useful in assessing the strength of your evidence that something might be wrong with the production process. (In later lessons, you will use this statistic in a way that is similar to how you used Z-­‐scores and T-­‐scores for testing hypotheses in previous modules.) Generally speaking, the chi-­‐square statistic relies on the comparison of how different an observed count in a given category is from the count that was expected for that given category. The steps for computing a chi-­‐square value (written as χ2) are as follows: 1. For each category, compute the difference between the actual count for that category (obtained from the sample) and the expected count for that category: Observed Count – Expected Count 2. For each category, compute the square of this difference obtained in Step 1: (Observed Count – Expected Count)2 3. For each category, divide the squared difference obtained in Step 2 by the expected count for the category: (Observed Count – Expected Count)2/Expected Count 4. Add up the Step 3 calculation results from each category; this is the chi-­‐square value. Example Using the Day 1 sample data set as an example: Observed Count (from sample) Expected Count (based on desired population distribution) Step 1: Observed Count -­‐ Expected Count Step 2: (Observed Count -­‐ Expected Count)2 2 Step 3: (Observed Count -­‐ Expected Count) /Expected Count Red 210 200 10 White 360 350 10 Blue 430 450 -­‐20 100 100 400 0.5 0.286 0.889 Step 4: 0.5 + 0.286 + 0.889 = 1.675 For the Day 1 sample, the chi-­‐square value generated is 1.675. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 4 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables (7) Compute the chi-­‐square values for the other samples (Days 2–4) by filling in the tables below. Compute the Step 3 calculations to three decimal places as shown in the previous example. Day 2 !"#$%&$'()*+,-(./%*0(#1023$4 ;<2$=-$'()*+,-(."1#$'(*,('$#>%$'(2*2+31->*,('>#-%>"+->*,4 ?-$2(@A(!"#$%&$'()*+,-(B(;<2$=-$'()*+,?-$2(5A(.!"#$%&$'()*+,-(B(;<2$=-$'()*+,-45 !"# 566 566 6 $%&'" 758 986 :8 ()*" 9:8 786 B:8 6 8C58 8C58 6 @CE6:@ @5E866 5 ?-$2(9A(.!"#$%&$'()*+,-(B(;<2$=-$'()*+,-4 D;<2$=-$'()*+,- Step 4: 0 + 0 .28 6 + 0. 642 = 28.571 For the Day 2 sample, the chi-­‐square value generated is 28.571. Day 3 Observed Count (from sample) Expected Count (based on desired population distribution) Step 1: Observed Count -­‐ Expected Count Step 2: (Observed Count -­‐ Expected Count)2 Step 3: (Observed Count -­‐ Expected Count)2/Expected Count Red 180 200 -­‐20 White 360 350 10 Blue 460 450 10 400 100 100 2 0.286 0.222 Step 4: + 0. 286 + 2 = .173 For the Day 3 sample, the chi-­‐square value generated is _____________. Day 4 !"#$%&$'()*+,-(./%*0(#1023$4 ;<2$=-$'()*+,-(."1#$'(*,('$#>%$'(2*2+31->*,('>#-%>"+->*,4 ?-$2(9@(!"#$%&$'()*+,-(A(;<2$=-$'()*+,?-$2(5@(.!"#$%&$'()*+,-(A(;<2$=-$'()*+,-45 5 ?-$2(6@(.!"#$%&$'()*+,-(A(;<2$=-$'()*+,-4 C;<2$=-$'()*+,- !"# 567 5:: 67 $%&'" 677 67: 7 ()*" 89: 87: A8: 9557 57 9B:: BD957 :D:E9 6D77B Step 4: +0.2 86 + .6 42 = 9.752 For the Day 4 sample, the chi-­‐square value generated is 9.752. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 5 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables (8) Which of the daily samples had the highest chi-­‐square value? Does the size of the chi-­‐square values generated by these four samples appear to correspond in any way to the initial strength-­‐of-­‐evidence statements that you made in Question 3 regarding the claim that the population proportions of the cereal pieces are 20% red, 35% white, and 45% blue? (9) For a hypothetical sample, if one category has an observed count and expected count that are exactly the same, is it possible to still have a large chi-­‐square value generated by that sample? If so, make up a sample that illustrates how this could happen. Did any of the samples in Question 7 exhibit this behavior? (10) If no category in a sample has a case where the observed count and expected count are exactly the same, is it still possible to have a small chi-­‐square value generated by that sample? If so, make up a sample that illustrates how this could happen. Did any of the samples in Question 7 exhibit this behavior? (11) In the Day 2 data set, the white and blue category counts had an actual count that differed from the expected count by 75 pieces. Which category’s difference made a larger contribution to the size of the chi-­‐square value: the difference of size 75 relative to an expected count of 350 (white) or the difference of size 75 relative to an expected count of 450 (blue)? Does it seem reasonable that a difference of 75 may be a bigger deal for a category with an expected count of 350 than it would be for a category with an expected count of 450? Explain your reasoning. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 6 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.1.1: Introduction to Chi-­‐Square Tests for One-­‐Way Tables Homework (1) Based on your work today, answer the following questions: (a) Which seems to provide greater evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue: a high chi-­‐square value (such as you computed for Days 2 and 4) or a low chi-­‐square value (such as you computed for Days 1 and 3)? (b) Recall that strong evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue implies that something may be wrong with the production process. Based on your answer above, would a high chi-­‐square value or a low chi-­‐square value give stronger evidence that something may be wrong with the production process? (c) Is it possible to obtain a negative chi-­‐square statistic? If so, explain how. If not, explain why not. (2) On Day 5, the following sample was collected: !"# !"# $%&'" $%& ()*" &'# Compute the chi-­‐square value, and determine if this value provides strong evidence against the claim that the population proportions for the cereal pieces are 20% red, 35% white, and 45% blue. (Note: For reasons that will be explained in a future lesson, in a case such as this where the categorical variable contains three categories, consider a chi-­‐square value of 5.99 or greater to be statistically significant evidence against the claim that the population proportions of cereal pieces are 20% red, 35% white, and 45% blue.) The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 7 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.2: Executing the Chi-­‐Square Test for One-­‐Way Tables (Goodness-­‐of-­‐Fit) Estimated number of 50-­‐minute class sessions: 2 Learning Goals Students will understand that • • the logic, steps, and the need to check conditions in a chi-­‐square test for goodness-­‐of-­‐fit are similar to hypothesis testing procedures encountered in previous modules. the conditions needed for a chi-­‐square procedure are different from conditions discussed in previous modules. Students will begin to be able to • • • • • given a claim about the distribution of a categorical variable, choose appropriate null and alternative hypotheses for a chi-­‐square goodness-­‐of-­‐fit test. given sample data, state and check the conditions needed for the chi-­‐square goodness-­‐of-­‐fit test to be appropriate. compute the value of the test statistic in a chi-­‐square goodness-­‐of-­‐fit test. use the P-­‐value and the chosen significance level to reach a decision. carry out a chi-­‐square goodness-­‐of-­‐fit test and interpret the conclusion in context. Introduction In this supporting lesson, students are provided with another case where the goodness-­‐of-­‐fit test is employed. Students develop hypotheses for these examples under the framework that the null hypothesis is that all categories fit and that the alternative hypothesis is that at least two categories do not fit. (Note: Specify that the chi-­‐square goodness-­‐of-­‐fit test is not for examining a single category’s proportion. Rather, the test is for examining whether every proportion claim regarding the distribution seems plausible. The conditions for the procedure are introduced, and students verify that conditions are met (or not met) in the examples provided (reinforcing expected count computations). Students compute the chi-­‐ square statistic as seen in the Rich Task in Lesson 11.1.1. Given that chi-­‐square distributions, degrees of freedom, and the P-­‐values associated with them have not yet been presented, students are provided with the P-­‐value as needed. They are then asked to make a decision based on the P-­‐value (and a given significance level) and to communicate a decision in nontechnical language regarding the original hypotheses. Homework activities reinforce these steps. Tasks [Student Handout] Recall from Lesson 11.1.1 that it is important to cereal manufacturers to have a product that will be well received by children and their families. Suppose a market research company conducts a feedback survey regarding your cereal where a randomly selected group of consumers is asked, “Based on your family’s experience with this box of cereal, would you be likely to purchase this cereal again: yes, no, maybe?” Assume that the company has determined through other research that the ideal distribution of responses in the population of consumers would be the following: The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 1 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.2: Executing the Chi-­‐Square Test for One-­‐Way Tables (Goodness-­‐of-­‐Fit) 65%—Yes, I would likely purchase this cereal again. 25%—No, I would not likely purchase this cereal again. 10%—Maybe, I am not sure if I would purchase this cereal again. The company would care about any significant deviation from this ideal population distribution because such deviations imply that better marketing, some product adjustment, or less expensive advertising methods may be necessary. In other words, if the population distribution differs from these desired proportions in a statistically significant manner, you and the marketing company handling your cereal sales need to take action. Analysis Method: Chi-­‐Square Goodness-­‐of-­‐Fit Test [Student Handout] The analysis of some categorical variables requires inference techniques that have not been discussed in previous modules. One of these is the chi-­‐square goodness-­‐of-­‐fit test. The mechanics of the test are very similar to previous hypothesis tests you have covered. Null Hypotheses For a chi-­‐square goodness-­‐of-­‐fit test, the null hypothesis (HO) is that the categorical variable’s population is distributed as expected. In other words, the null hypothesis is that the population proportion for the first category will equal a specific desired value, and the population proportion for the second category will equal a specific desired value, and so on. The null hypothesis is typically written as HO: π1 = a hypothesized proportion for the first category (such as 0.65); π2 = a hypothesized proportion for the second category; and so on. Alternative Hypothesis The alternative hypothesis (HA) is that the categorical variable’s population is not distributed as expected. The alternative hypothesis is typically stated in words as one of the following: • • • HA: HO is not true. HA: The population is not distributed as stated in HO. HA: At least two statements in HO are not true. (1) Using the notation of πyes to represent the population proportion of consumers who would say, “Yes, I would likely purchase this cereal again,” and then using πno and πmaybe accordingly, what is your null hypothesis for the case introduced at the beginning of this lesson? HO: πyes = πno = πmaybe = (2) What is your alternative hypothesis for this case? HA: Keep in mind that the chi-­‐square goodness-­‐of-­‐fit test does not examine a single category’s proportion. Rather, the test examines whether every proportion claim regarding the distribution seems plausible. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 2 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.2: Executing the Chi-­‐Square Test for One-­‐Way Tables (Goodness-­‐of-­‐Fit) Conditions To conduct a chi-­‐square goodness-­‐of-­‐fit test, the sample must be a random sample, and each expected count must be five or greater. As you saw in the previous lesson, in a chi-­‐square goodness-­‐of-­‐fit test, the expected count for a given category is the desired population proportion for that category (πi) multiplied by the sample size (n). In other words, the expected count for Category 1 is nπ1, the expected count for Category 2 is nπ2, and so on. When calculating expected counts, it is okay if the expected counts are noninteger values (i.e., they do not have to be whole numbers), and you should generally not round expected counts to whole numbers. As a check of your counts, the sum of your expected counts should equal your sample size. (3) In the case of the cereal consumer feedback survey previously described, would a random sample of 205 (n = 205) consumers satisfy the conditions for executing a chi-­‐square goodness-­‐ of-­‐fit test? Why or why not? (4) For the same survey, would a random sample of 46 consumers satisfy the conditions for executing a chi-­‐square goodness-­‐of-­‐fit test? Why or why not? Computing the Chi-­‐Square Test Statistic For a chi-­‐square goodness-­‐of-­‐fit test, compute the chi-­‐square test statistic in the same manner as shown in the previous lesson. (5) Suppose that a random sample of 558 consumers responds to the survey as follows: 382 say Yes, 128 say No, and 48 say Maybe. Compute the chi-­‐square test statistic by filling in the table below. Compute the Step 3 calculations to three decimal places as before. !"#$%&$'()*+,-(./%*0(#1023$4 :;2$<-$'()*+,-(."1#$'(*,('$#=%$'(2*2+31-=*,('=#-%="+-=*,4 C-$2(8D(!"#$%&$'()*+,-(E(:;2$<-$'()*+,C-$2(7D(.!"#$%&$'()*+,-(E(:;2$<-$'()*+,-47 7 C-$2(5D(.!"#$%&$'()*+,-(E(:;2$<-$'()*+,-4 G:;2$<-$'()*+,- !"#$ 567 5>7?@ 8A?5 %& 876 85A?B E88?B '()*" 96 BB?6 E@?6 5@7?9A 857?7B >F?69 8?F7@ F?A96 8?FAF Step 4: + 0. 286 + 0. 642 = 3.065 The chi-­‐square test statistic value is 3.065. Computing (or Approximating) the P-­‐Value Instead of using a Z-­‐score or T-­‐score test statistic as in previous hypothesis tests, for a chi-­‐square goodness-­‐of-­‐fit test, you use the chi-­‐square test statistic to calculate your P-­‐value. The methods for estimating and computing the P-­‐value from a chi-­‐square distribution are discussed in detail in Lesson 11.1.3. (6) Review: Which provides stronger evidence against a null hypothesis: a small P-­‐value or a large P-­‐value? The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 3 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.2: Executing the Chi-­‐Square Test for One-­‐Way Tables (Goodness-­‐of-­‐Fit) (7) In the previous lesson, you saw that larger chi-­‐square values provided stronger evidence against the claim that a population is distributed as expected or desired. Do you think that a relatively large chi-­‐square test statistic will correspond to a large P-­‐value or a small P-­‐value? Explain your reasoning. (8) The chi-­‐square test statistic value of 3.065 (computed previously) is not considered a large chi-­‐ square value. Do you think that this chi-­‐square test statistic value of 3.065 will correspond to a large P-­‐value or a small P-­‐value? Deciding and Concluding The rule for determining whether to reject the null hypothesis in a chi-­‐square goodness-­‐of-­‐fit test is the same as for other hypothesis tests: Reject HO if P-­‐value ≤ α (where α is the significance level). (9) The P-­‐value associated with a chi-­‐square test statistic value of 3.065 based on a categorical variable with three categories (such as in your cereal survey case here) is fairly large (more than 0.20). At a 5% level of significance, would you reject the null hypothesis? (10) Recall that in Questions 1 and 2 of this lesson, you recorded the null and alternative hypotheses for this cereal survey case. In addition, recall that if the population distribution differed from the desired proportions of 65% Yes, 25% No, and 10% Maybe in a statistically significant manner, you and the marketing company handling your cereal sales need to take action. Based on the random sample introduced in Question 5 and the decision you made in Question 9, do you think that action is needed? Homework [Student Handout] (1) Suppose instead that the cereal feedback survey of the random sample of 558 consumers yielded the following results: !"#$ !"" %& #"$ '()*" %% Using a 5% significance level, perform a chi-­‐square goodness-­‐of-­‐fit test to examine the claim that the population distribution of responses differs from the desired proportions of 65% Yes, 25% No, and 10% Maybe. Execute all steps of the test as shown in this lesson and make sure to state your final conclusion in context. In this case, a chi-­‐square test statistic value of 5.99 or more corresponds to P-­‐value of 5% or less. (2) Recall in Lesson 11.1.1 that the desired color distribution for the cereal you are manufacturing is 20% red, 35% white, and 45% blue. Strong evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue would imply that something may be wrong with the production process. The Day 3 sample yielded the following results: !"# !!" $%&'" #$% ()*" $#" The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 4 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.2: Executing the Chi-­‐Square Test for One-­‐Way Tables (Goodness-­‐of-­‐Fit) Using a 5% significance level, perform a chi-­‐square goodness-­‐of-­‐fit test to examine the claim that the population proportions of cereal pieces differ from the desired 20% red, 35% white, and 45% blue distribution. Execute all steps of the test as shown in this lesson and make sure to state your final conclusion in context. In this case as well, a chi-­‐square test statistic value of 5.99 or more corresponds to P-­‐value of 5% or less. Do your results imply that something may be wrong with the production process? Wrap-­‐Up Questions/Direct Instruction About Statistical Concepts Via discussion or lecture, highlight the following: • • • • • • The logic, steps, and the need to check conditions in a chi-­‐square test for goodness-­‐of-­‐fit are similar to hypothesis testing procedures encountered in previous modules. The conditions needed for a chi-­‐square procedure are different from conditions discussed n previous modules. The null hypothesis is that all categories fit the desired or expected distribution of population proportions. The alternative hypothesis is that at least two categories do not fit. The chi-­‐square goodness-­‐of-­‐fit test is not for examining a single category’s proportion. Rather, the test examines whether every proportion claim regarding the distribution seems plausible. Larger chi-­‐square values appear to correspond to smaller P-­‐values and stronger evidence against the null hypothesis. Similarly, smaller chi-­‐square values appear to correspond to larger P-­‐values and weaker evidence against the null hypothesis. As mentioned in previous inference discussions, state your findings in context. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 5 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.2: Executing the Chi-­‐Square Test for One-­‐Way Tables (Goodness-­‐of-­‐Fit) Recall from Lesson 11.1.1 that it is important to cereal manufacturers to have a product that will be well received by children and their families. Suppose a market research company conducts a feedback survey regarding your cereal where a randomly selected group of consumers is asked, “Based on your family’s experience with this box of cereal, would you be likely to purchase this cereal again: yes, no, maybe?” Assume that the company has determined through other research that the ideal distribution of responses in the population of consumers would be the following: 65%—Yes, I would likely purchase this cereal again. 25%—No, I would not likely purchase this cereal again. 10%—Maybe, I am not sure if I would purchase this cereal again. The company would care about any significant deviation from this ideal population distribution because such deviations imply that better marketing, some product adjustment, or less expensive advertising methods may be necessary. In other words, if the population distribution differs from these desired proportions in a statistically significant manner, you and the marketing company handling your cereal sales need to take action. Analysis Method: Chi-­‐Square Goodness-­‐of-­‐Fit Test The analysis of some categorical variables requires inference techniques that have not been discussed in previous modules. One of these is the chi-­‐square goodness-­‐of-­‐fit test. The mechanics of the test are very similar to previous hypothesis tests you have covered. Null Hypotheses For a chi-­‐square goodness-­‐of-­‐fit test, the null hypothesis (HO) is that the categorical variable’s population is distributed as expected. In other words, the null hypothesis is that the population proportion for the first category will equal a specific desired value, and the population proportion for the second category will equal a specific desired value, and so on. The null hypothesis is typically written as HO: π1 = a hypothesized proportion for the first category (such as 0.65); π2 = a hypothesized proportion for the second category; and so on. Alternative Hypothesis The alternative hypothesis (HA) is that the categorical variable’s population is not distributed as expected. The alternative hypothesis is typically stated in words as one of the following: • • • HA: HO is not true. HA: The population is not distributed as stated in HO. HA: At least two statements in HO are not true. (1) Using the notation of πyes to represent the population proportion of consumers who would say, “Yes, I would likely purchase this cereal again,” and then using πno and πmaybe accordingly, what is your null hypothesis for the case introduced at the beginning of this lesson? HO: πyes = πno = πmaybe = The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 1 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.2: Executing the Chi-­‐Square Test for One-­‐Way Tables (Goodness-­‐of-­‐Fit) (2) What is your alternative hypothesis for this case? HA: Keep in mind that the chi-­‐square goodness-­‐of-­‐fit test does not examine a single category’s proportion. Rather, the test examines whether every proportion claim regarding the distribution seems plausible. Conditions To conduct a chi-­‐square goodness-­‐of-­‐fit test, the sample must be a random sample, and each expected count must be five or greater. As you saw in the previous lesson, in a chi-­‐square goodness-­‐of-­‐fit test, the expected count for a given category is the desired population proportion for that category (πi) multiplied by the sample size (n). In other words, the expected count for Category 1 is nπ1, the expected count for Category 2 is nπ2, and so on. When calculating expected counts, it is okay if the expected counts are noninteger values (i.e., they do not have to be whole numbers), and you should generally not round expected counts to whole numbers. As a check of your counts, the sum of your expected counts should equal your sample size. (3) In the case of the cereal consumer feedback survey previously described, would a random sample of 205 (n = 205) consumers satisfy the conditions for executing a chi-­‐square goodness-­‐of-­‐fit test? Why or why not? (4) For the same survey, would a random sample of 46 consumers satisfy the conditions for executing a chi-­‐square goodness-­‐of-­‐fit test? Why or why not? The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 2 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.2: Executing the Chi-­‐Square Test for One-­‐Way Tables (Goodness-­‐of-­‐Fit) Computing the Chi-­‐Square Test Statistic For a chi-­‐square goodness-­‐of-­‐fit test, compute the chi-­‐square test statistic in the same manner as shown in the previous lesson. (5) Suppose that a random sample of 558 consumers responds to the survey as follows: 382 say Yes, 128 say No, and 48 say Maybe. Compute the chi-­‐square test statistic by filling in the table below. Compute the Step 3 calculations to three decimal places as before. !"#$ %& '()*" !"#$%&$'()*+,-(./%*0(#1023$4 567 876 96 :;2$<-$'()*+,-(."1#$'(*,('$#=%$'(2*2+31-=*,('=#-%="+-=*,4 5>7?@ 85A?B BB?6 C-$2(8D(!"#$%&$'()*+,-(E(:;2$<-$'()*+,8A?5 E88?B E@?6 7 C-$2(7D(.!"#$%&$'()*+,-(E(:;2$<-$'()*+,-4 5@7?9A 857?7B >F?69 7 C-$2(5D(.!"#$%&$'()*+,-(E(:;2$<-$'()*+,-4 G:;2$<-$'()*+,8?F7@ F?A96 8?FAF Step 4: + 0. 286 + 0. 642 = 3.065 The chi-­‐square test statistic value is 3.065. Computing (or Approximating) the P-­‐Value Instead of using a Z-­‐score or T-­‐score test statistic as in previous hypothesis tests, for a chi-­‐square goodness-­‐of-­‐fit test, you use the chi-­‐square test statistic to calculate your P-­‐value. The methods for estimating and computing the P-­‐value from a chi-­‐square distribution are discussed in detail in Lesson 11.1.3. (6) Review: Which provides stronger evidence against a null hypothesis: a small P-­‐value or a large P-­‐value? (7) In the previous lesson, you saw that larger chi-­‐square values provided stronger evidence against the claim that a population is distributed as expected or desired. Do you think that a relatively large chi-­‐ square test statistic will correspond to a large P-­‐value or a small P-­‐value? Explain your reasoning. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 3 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.2: Executing the Chi-­‐Square Test for One-­‐Way Tables (Goodness-­‐of-­‐Fit) (8) The chi-­‐square test statistic value of 3.065 (computed previously) is not considered a large chi-­‐ square value. Do you think that this chi-­‐square test statistic value of 3.065 will correspond to a large P-­‐value or a small P-­‐value? Deciding and Concluding The rule for determining whether to reject the null hypothesis in a chi-­‐square goodness-­‐of-­‐fit test is the same as for other hypothesis tests: Reject HO if P-­‐value ≤ α (where α is the significance level). (9) The P-­‐value associated with a chi-­‐square test statistic value of 3.065 based on a categorical variable with three categories (such as in your cereal survey case here) is fairly large (more than 0.20). At a 5% level of significance, would you reject the null hypothesis? (10) Recall that in Questions 1 and 2 of this lesson, you recorded the null and alternative hypotheses for this cereal survey case. In addition, recall that if the population distribution differed from the desired proportions of 65% Yes, 25% No, and 10% Maybe in a statistically significant manner, you and the marketing company handling your cereal sales need to take action. Based on the random sample introduced in Question 5 and the decision you made in Question 9, do you think that action is needed? The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 4 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.2: Executing the Chi-­‐Square Test for One-­‐Way Tables (Goodness-­‐of-­‐Fit) Homework (1) Suppose instead that the cereal feedback survey of the random sample of 558 consumers yielded the following results: !"#$ !"" %& #"$ '()*" %% Using a 5% significance level, perform a chi-­‐square goodness-­‐of-­‐fit test to examine the claim that the population distribution of responses differs from the desired proportions of 65% Yes, 25% No, and 10% Maybe. Execute all steps of the test as shown in this lesson and make sure to state your final conclusion in context. In this case, a chi-­‐square test statistic value of 5.99 or more corresponds to P-­‐value of 5% or less. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 5 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.2: Executing the Chi-­‐Square Test for One-­‐Way Tables (Goodness-­‐of-­‐Fit) (2) Recall in Lesson 11.1.1 that the desired color distribution for the cereal you are manufacturing is 20% red, 35% white, and 45% blue. Strong evidence against the claim that the population proportions are 20% red, 35% white, and 45% blue would imply that something may be wrong with the production process. The Day 3 sample yielded the following results: !"# !!" $%&'" #$% ()*" $#" Using a 5% significance level, perform a chi-­‐square goodness-­‐of-­‐fit test to examine the claim that the population proportions of cereal pieces differ from the desired 20% red, 35% white, and 45% blue distribution. Execute all steps of the test as shown in this lesson and make sure to state your final conclusion in context. In this case as well, a chi-­‐square test statistic value of 5.99 or more corresponds to P-­‐value of 5% or less. Do your results imply that something may be wrong with the production process? The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 6 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.3: The Chi-­‐Square Distribution and Degrees of Freedom Estimated number of 50-­‐minute class sessions: 1 Learning Goals Students will understand that • • • the chi-­‐square distribution is a skewed distribution whose shape is related to degrees of freedom. a categorical variable with K-­‐categories yields a chi-­‐square goodness-­‐of-­‐fit test with K – 1 degrees of freedom. since chi-­‐square values are always positive and since larger chi-­‐square values imply greater deviation from what was expected (from the Initiating Task), larger chi-­‐square values yield smaller P-­‐values and greater evidence against HO. Students will be able to • • • compute the value of the chi-­‐square test statistic and estimate (via table) or find (via technology) the associated P-­‐value in a chi-­‐square goodness-­‐of-­‐fit test.1 use the P-­‐value and the chosen significance level to reach a decision. carry out a chi-­‐square goodness-­‐of-­‐fit test and interpret the conclusion in context. Introduction In this supporting lesson, students are introduced to degrees of freedom for a chi-­‐square goodness-­‐of-­‐fit test and to characteristics of a chi-­‐square distribution. They also undertake tasks designed to reinforce earlier concepts regarding how larger chi-­‐square values yield smaller P-­‐values and greater evidence against HO. Using cases from the Lesson 11.1.1 and the chi-­‐square statistics computed there, students compute/ approximate a P-­‐value for a reject HO case and a do not reject HO case. Students then write nontechnical, context-­‐based answers to the questions posed. An additional homework activity is a complete task where students are provided with data from an appropriate survey and then asked to determine if the claim involving the categorical variable’s distribution should be challenged. Tasks [Student Handout] In the previous lesson, you executed a chi-­‐square goodness-­‐of-­‐fit test where an approximate P-­‐value was provided. In this lesson, you will learn how the P-­‐value is calculated for a chi-­‐square test statistic based on a chi-­‐square distribution. Degrees of Freedom The P-­‐value calculation for a chi-­‐square goodness-­‐of-­‐fit test is based upon a chi-­‐square distribution. Like the T-­‐distribution that you have seen in previous modules, the shape characteristics of a chi-­‐square distribution are determined by degrees of freedom. 1 The specific methods of estimating/computing a P-­‐value are left to the instructor’s discretion. The expectation is that outside of this lesson you will provide the minimal materials and demonstration needed regarding students’ use of preferred tables, technologies, etc. as warranted. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 1 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.3: The Chi-­‐Square Distribution and Degrees of Freedom For a chi-­‐square goodness-­‐of-­‐fit test, the degrees of freedom (df) equal the number of categories for the categorical variable of interest minus 1. In other words, if K = the number of categories in the categorical variable of interest (df = K – 1). (1) In an attempt to ascertain the ownership status of residencies in the United States, a question on the 2010 U.S. Census form (www.census.gov/schools/pdf/2010form_info.pdf) asked respondents to choose from four possible responses to complete the statement, “Is this house, apartment, or mobile home—“ The four response choices were • • • • Owned by you or someone in this household with a mortgage or loan? Include home equity loans. Owned by you or someone in this household free and clear (without a mortgage or loan)? Rented? Occupied without payment of rent? If you were to conduct a chi-­‐square goodness-­‐of-­‐fit test regarding the distribution of the population proportions for these four categories of responses, how many degrees of freedom would the test have? (2) Suppose the two categories of Owned by you or someone in this household with a mortgage or loan? Include home equity loans and Owned by you or someone in this household free and clear (without a mortgage or loan)? were combined into a single category called Owned?. If you conducted a chi-­‐square goodness-­‐of-­‐fit test regarding the distribution of the population proportions for the three categories of Owned, Rented, and Occupied without payment of rent, how many degrees of freedom would the test have? The Chi-­‐Square Distribution As stated previously, the shape characteristics of a chi-­‐square distribution are determined by degrees of freedom. The chi-­‐square distribution is a severely skewed-­‐to-­‐the-­‐right distribution for small degrees of freedom. However, for larger degrees of freedom, the distribution’s shape becomes less skewed. The following three chi-­‐square distribution graphs for 2, 6, and 10 degrees of freedom, respectively, are each presented with the same scale. Chi-Square Distribution Plot df=6 Chi-Square Distribution Plot df=2 0.5 0.5 0.4 0.3 Density Density 0.4 0.2 0.2 0.1 0.1 0.0 0.3 0 5 10 15 X 20 0.0 25 0 5 10 15 X 20 25 The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 2 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.3: The Chi-­‐Square Distribution and Degrees of Freedom Chi-Square Distribution Plot df=10 0.5 Density 0.4 0.3 0.2 0.1 0.0 0 5 10 15 20 25 X Unlike a T-­‐distribution, which is symmetric and always centered at 0, a chi-­‐square distribution is not symmetric, and the mean of a chi-­‐square distribution is related to its degrees of freedom. Specifically, the mean of a chi-­‐square distribution is equal to its degrees of freedom, and the standard deviation of a chi-­‐square distribution equals the square root of the value 2 × df. For the picture above of the chi-­‐square distribution with 6 degrees of freedom, the mean of the distribution is 6 and the standard deviation is the square root of 2 × 6 = the square root of 12, or about 3.464. (3) What are the mean and standard deviation of a chi-­‐square distribution with 8 degrees of freedom? (4) Based on your answer to Question 3, and given the previous graphs for the chi-­‐square distributions with df = 6 and df = 10, which of the graphs below do you think is for a chi-­‐square distribution with df = 8? Ch-Square Distribution Plot 0.5 0.4 0.4 0.3 0.3 Density Density Chi-Square Distribution Plot 0.5 0.2 0.1 0.0 0.2 0.1 0 5 10 15 20 0.0 25 X 0 5 10 15 X 20 25 The P-­‐Value for a Chi-­‐Square Goodness-­‐of-­‐Fit Test Recall that a P-­‐value is the probability of obtaining a test statistic value that is at least as extreme as the test statistic value you obtain through your sampling if in fact the null hypothesis is true. Since a chi-­‐square test statistic can never be negative, and since larger chi-­‐square values imply a greater discrepancy between observed and expected counts, the P-­‐value for your chi-­‐square goodness-­‐of-­‐fit test is the probability of obtaining a chi-­‐square statistic value that is greater than or equal to the chi-­‐square test statistic value you obtained through your sampling (again under the assumption that the null hypothesis is true). The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 3 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.3: The Chi-­‐Square Distribution and Degrees of Freedom The following graph shows the P-­‐value (shaded) for a chi-­‐square goodness-­‐of-­‐fit test with 2 degrees of freedom (based on three categories) and a chi-­‐square statistic value of 3.91. Chi-Square Distribution Plot df=2 0.5 Density 0.4 0.3 0.2 0.1 P-value = 0.142 0.0 0 3.91 X This graph shows the P-­‐value (shaded) for a chi-­‐square goodness-­‐of-­‐fit test with 2 degrees of freedom (based on three categories) and a chi-­‐square statistic value of 5.99. Chi-Square Distribution Plot df=2 0.5 Density 0.4 0.3 0.2 0.1 0.0 P-value = 0.05 0 5.99 X While technology is often used to compute the P-­‐value associated with a chi-­‐square test statistic value for a specific degrees of freedom, tables are also available to roughly approximate the P-­‐value. For a chi-­‐square distribution with 2 degrees of freedom, a chi-­‐square value of 5.99 has an associated P-­‐value of 0.05 and a chi-­‐square value of 9.21 has an associated P-­‐value of 0.01, (5) Based on the previous information, for a chi-­‐square goodness-­‐of-­‐fit test with 2 degrees of freedom, do you think that a chi-­‐square test statistic of 7.23 would have a P-­‐value that is greater than 5%, between 5% and 1%, or less than 1%? Explain your reasoning. (6) Based on the previous information, for a chi-­‐square goodness-­‐of-­‐fit test with 2 degrees of freedom, do you think that a chi-­‐square test statistic of 10.73 would have a P-­‐value that is greater than 5%, between 5% and 1%, or less than 1%? Explain your reasoning. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 4 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.3: The Chi-­‐Square Distribution and Degrees of Freedom (7) Based on the previous information, for a chi-­‐square goodness-­‐of-­‐fit test with 2 degrees of freedom, do you think that a chi-­‐square test statistic of 4.62 would have a P-­‐value that is greater than 5%, between 5% and 1%, or less than 1%? Explain your reasoning. Recall that the rule for determining whether to reject the null hypothesis in a chi-­‐square goodness-­‐of-­‐fit test is the same as for other hypothesis tests: Reject HO if P-­‐value ≤ α (where α is the significance level). Culminating Analyses In Lesson 11.1.1, you drew a daily simple random sample of 1000 cereal pieces from your cereal’s production process to examine whether there was sufficient evidence against the claim that the distribution of population proportions for the cereal was 20% red, 35% white, and 45% blue. (8) Using the Day 1 sample data and a 1% significance level, perform a complete chi-­‐square goodness-­‐of-­‐fit test examining the claim that the distribution of population proportions for your cereal are 20% red, 35% white, and 45% blue. The sample data for Day 1 were as follows: Red 207 White 360 Blue 433 Also recall from the previous lesson that a complete chi-­‐square goodness-­‐of-­‐fit test requires the following: • • • • • State the null and alternative hypotheses. State the conditions (and examine if they are met). Compute the chi-­‐square test statistic. Compute (or approximate) the P-­‐value. Decide and conclude (using the rule “Reject HO if P-­‐value ≤ α” and then stating your final conclusion in context). (9) Using the Day 4 sample data and a 1% significance level, perform a complete chi-­‐square goodness-­‐of-­‐fit test examining the claim that the distribution of population proportions for your cereal are 20% red, 35% white, and 45% blue. The sample data for Day 4 were as follows: Red 235 White 355 Blue 410 Note the steps of a complete chi-­‐square goodness-­‐of-­‐fit test listed in Question 8. Homework [Student Handout] (1) Prior to the November 2, 2010 election for Maryland governor, the Washington Post conducted a poll (September 22–26, 2010) asking respondents, “If the election for Maryland governor were held today, for whom would you vote?” An article summarizing the results stated, “A total of 1,448 randomly selected adults in Maryland were interviewed, including … 730 voters likely to cast ballots.” The article summarized the The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 5 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.3: The Chi-­‐Square Distribution and Degrees of Freedom responses of the likely voters by the following categories: Governor Martin O’Malley, Bob Ehrlich, and Other, no opinion. The sample was intended to represent the population of likely Maryland voters for that time period.2 Although the exact counts for each response were not listed in the article, based on summary information in the article, the following represents a reasonable tally for the sample of 730 likely voters: Governor Martin O'Malley 382 responses Bob Ehrlich 302 responses 46 responses Other, no opinion Assume that previous polling information suggested that the distribution of responses for the population of likely Maryland voters for this time period would be 48% for O’Malley, 46% for Ehrlich, and 6% Other, no opinion. Using a 3% significance level, perform a complete chi-­‐square goodness-­‐of-­‐fit test to examine if there was sufficient evidence to challenge that claim regarding the distribution of responses for the population of likely Maryland voters for that time period. Wrap-­‐Up Questions/Direct Instruction About Statistical Concepts Via discussion or lecture, highlight the following: • • • • The chi-­‐square distribution is a skewed distribution whose shape is related to degrees of freedom. A categorical variable with K-­‐categories yields a chi-­‐square goodness-­‐of-­‐fit test with K – 1 degrees of freedom. Since chi-­‐square values are always positive and since larger chi-­‐square values imply greater deviation from what was expected (from the Initiating Task), larger chi-­‐square values yield smaller P-­‐values and greater evidence against HO. The logic, steps, and the need to check conditions in a chi-­‐square test for goodness-­‐of-­‐fit are similar to hypothesis testing procedures encountered in previous modules. As before, always state your conclusion in context—answer the original question posed by the situation. 2 Davis, A. C., Wagner, J., & Cohen, J. (2010, September 28). O'Malley gains ground over Ehrlich in Maryland governor's race, poll shows. The Washington Post. Retrieved from www.washingtonpost.com/wp-­‐dyn/content/article/2010/09/28/ AR2010092806130.html?sid=ST2010100700082 The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 6 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.3: The Chi-­‐Square Distribution and Degrees of Freedom In the previous lesson, you executed a chi-­‐square goodness-­‐of-­‐fit test where an approximate P-­‐value was provided. In this lesson, you will learn how the P-­‐value is calculated for a chi-­‐square test statistic based on a chi-­‐square distribution. Degrees of Freedom The P-­‐value calculation for a chi-­‐square goodness-­‐of-­‐fit test is based upon a chi-­‐square distribution. Like the T-­‐distribution that you have seen in previous modules, the shape characteristics of a chi-­‐square distribution are determined by degrees of freedom. For a chi-­‐square goodness-­‐of-­‐fit test, the degrees of freedom (df) equal the number of categories for the categorical variable of interest minus 1. In other words, if K = the number of categories in the categorical variable of interest (df = K – 1). (1) In an attempt to ascertain the ownership status of residencies in the United States, a question on the 2010 U.S. Census form (www.census.gov/schools/pdf/2010form_info.pdf) asked respondents to choose from four possible responses to complete the statement, “Is this house, apartment, or mobile home—“ The four response choices were • • • • Owned by you or someone in this household with a mortgage or loan? Include home equity loans. Owned by you or someone in this household free and clear (without a mortgage or loan)? Rented? Occupied without payment of rent? If you were to conduct a chi-­‐square goodness-­‐of-­‐fit test regarding the distribution of the population proportions for these four categories of responses, how many degrees of freedom would the test have? (2) Suppose the two categories of Owned by you or someone in this household with a mortgage or loan? Include home equity loans and Owned by you or someone in this household free and clear (without a mortgage or loan)? were combined into a single category called Owned?. If you conducted a chi-­‐ square goodness-­‐of-­‐fit test regarding the distribution of the population proportions for the three categories of Owned, Rented, and Occupied without payment of rent, how many degrees of freedom would the test have? The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 1 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.3: The Chi-­‐Square Distribution and Degrees of Freedom The Chi-­‐Square Distribution As stated previously, the shape characteristics of a chi-­‐square distribution are determined by degrees of freedom. The chi-­‐square distribution is a severely skewed-­‐to-­‐the-­‐right distribution for small degrees of freedom. However, for larger degrees of freedom, the distribution’s shape becomes less skewed. The following three chi-­‐square distribution graphs for 2, 6, and 10 degrees of freedom, respectively, are each presented with the same scale. Chi-Square Distribution Plot df=6 Chi-Square Distribution Plot df=2 0.5 0.5 0.4 0.3 Density Density 0.4 0.2 0.2 0.1 0.1 0.0 0.3 0 5 10 15 20 0.0 25 0 5 10 15 X X 20 25 Chi-Square Distribution Plot df=10 0.5 Density 0.4 0.3 0.2 0.1 0.0 0 5 10 15 X 20 25 Unlike a T-­‐distribution, which is symmetric and always centered at 0, a chi-­‐square distribution is not symmetric, and the mean of a chi-­‐square distribution is related to its degrees of freedom. Specifically, the mean of a chi-­‐square distribution is equal to its degrees of freedom, and the standard deviation of a chi-­‐square distribution equals the square root of the value 2 × df. For the picture above of the chi-­‐ square distribution with 6 degrees of freedom, the mean of the distribution is 6 and the standard deviation is the square root of 2 × 6 = the square root of 12, or about 3.464. (3) What are the mean and standard deviation of a chi-­‐square distribution with 8 degrees of freedom? The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 2 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.3: The Chi-­‐Square Distribution and Degrees of Freedom (4) Based on your answer to Question 3, and given the previous graphs for the chi-­‐square distributions with df = 6 and df = 10, which of the graphs below do you think is for a chi-­‐square distribution with df = 8? Ch-Square Distribution Plot 0.5 0.4 0.4 0.3 0.3 Density Density Chi-Square Distribution Plot 0.5 0.2 0.1 0.0 0.2 0.1 0 5 10 15 20 0.0 25 X 0 5 10 15 20 25 X The P-­‐Value for a Chi-­‐Square Goodness-­‐of-­‐Fit Test Recall that a P-­‐value is the probability of obtaining a test statistic value that is at least as extreme as the test statistic value you obtain through your sampling if in fact the null hypothesis is true. Since a chi-­‐ square test statistic can never be negative, and since larger chi-­‐square values imply a greater discrepancy between observed and expected counts, the P-­‐value for your chi-­‐square goodness-­‐of-­‐fit test is the probability of obtaining a chi-­‐square statistic value that is greater than or equal to the chi-­‐square test statistic value you obtained through your sampling (again under the assumption that the null hypothesis is true). The following graph shows the P-­‐value (shaded) for a chi-­‐square goodness-­‐of-­‐fit test with 2 degrees of freedom (based on three categories) and a chi-­‐square statistic value of 3.91. Chi-Square Distribution Plot df=2 0.5 Density 0.4 0.3 0.2 0.1 P-value = 0.142 0.0 0 3.91 X The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 3 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.3: The Chi-­‐Square Distribution and Degrees of Freedom This graph shows the P-­‐value (shaded) for a chi-­‐square goodness-­‐of-­‐fit test with 2 degrees of freedom (based on three categories) and a chi-­‐square statistic value of 5.99. Chi-Square Distribution Plot df=2 0.5 Density 0.4 0.3 0.2 0.1 0.0 P-value = 0.05 0 5.99 X While technology is often used to compute the P-­‐value associated with a chi-­‐square test statistic value for a specific degrees of freedom, tables are also available to roughly approximate the P-­‐value. For a chi-­‐square distribution with 2 degrees of freedom, a chi-­‐square value of 5.99 has an associated P-­‐value of 0.05 and a chi-­‐square value of 9.21 has an associated P-­‐value of 0.01, (5) Based on the previous information, for a chi-­‐square goodness-­‐of-­‐fit test with 2 degrees of freedom, do you think that a chi-­‐square test statistic of 7.23 would have a P-­‐value that is greater than 5%, between 5% and 1%, or less than 1%? Explain your reasoning. (6) Based on the previous information, for a chi-­‐square goodness-­‐of-­‐fit test with 2 degrees of freedom, do you think that a chi-­‐square test statistic of 10.73 would have a P-­‐value that is greater than 5%, between 5% and 1%, or less than 1%? Explain your reasoning. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 4 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.3: The Chi-­‐Square Distribution and Degrees of Freedom (7) Based on the previous information, for a chi-­‐square goodness-­‐of-­‐fit test with 2 degrees of freedom, do you think that a chi-­‐square test statistic of 4.62 would have a P-­‐value that is greater than 5%, between 5% and 1%, or less than 1%? Explain your reasoning. Recall that the rule for determining whether to reject the null hypothesis in a chi-­‐square goodness-­‐of-­‐fit test is the same as for other hypothesis tests: Reject HO if P-­‐value ≤ α (where α is the significance level). Culminating Analyses In Lesson 11.1.1, you drew a daily simple random sample of 1000 cereal pieces from your cereal’s production process to examine whether there was sufficient evidence against the claim that the distribution of population proportions for the cereal was 20% red, 35% white, and 45% blue. (8) Using the Day 1 sample data and a 1% significance level, perform a complete chi-­‐square goodness-­‐ of-­‐fit test examining the claim that the distribution of population proportions for your cereal are 20% red, 35% white, and 45% blue. The sample data for Day 1 were as follows: Red 207 Blue 433 Also recall from the previous lesson that a complete chi-­‐square goodness-­‐of-­‐fit test requires the following: • • • • • White 360 State the null and alternative hypotheses. State the conditions (and examine if they are met). Compute the chi-­‐square test statistic. Compute (or approximate) the P-­‐value. Decide and conclude (using the rule “Reject HO if P-­‐value ≤ α” and then stating your final conclusion in context). The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 5 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.3: The Chi-­‐Square Distribution and Degrees of Freedom (9) Using the Day 4 sample data and a 1% significance level, perform a complete chi-­‐square goodness-­‐ of-­‐fit test examining the claim that the distribution of population proportions for your cereal are 20% red, 35% white, and 45% blue. The sample data for Day 4 were as follows: Red 235 White 355 Blue 410 Note the steps of a complete chi-­‐square goodness-­‐of-­‐fit test listed in Question 8. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 6 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.1.3: The Chi-­‐Square Distribution and Degrees of Freedom Homework (1) Prior to the November 2, 2010 election for Maryland governor, the Washington Post conducted a poll (September 22–26, 2010) asking respondents, “If the election for Maryland governor were held today, for whom would you vote?” An article summarizing the results stated, “A total of 1,448 randomly selected adults in Maryland were interviewed, including … 730 voters likely to cast ballots.” The article summarized the responses of the likely voters by the following categories: Governor Martin O’Malley, Bob Ehrlich, and Other, no opinion. The sample was intended to represent the population of likely Maryland voters for that time period.1 Although the exact counts for each response were not listed in the article, based on summary information in the article, the following represents a reasonable tally for the sample of 730 likely voters: Governor Martin O'Malley 382 responses Bob Ehrlich 302 responses 46 responses Other, no opinion Assume that previous polling information suggested that the distribution of responses for the population of likely Maryland voters for this time period would be 48% for O’Malley, 46% for Ehrlich, and 6% Other, no opinion. Using a 3% significance level, perform a complete chi-­‐square goodness-­‐of-­‐fit test to examine if there was sufficient evidence to challenge that claim regarding the distribution of responses for the population of likely Maryland voters for that time period. 1 Davis, A. C., Wagner, J., & Cohen, J. (2010, September 28). O'Malley gains ground over Ehrlich in Maryland governor's race, poll shows. The Washington Post. Retrieved from www.washingtonpost.com/wp-­‐dyn/content/article/2010/09/28/ AR2010092806130.html?sid=ST2010100700082 The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 7 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables Estimated number of 50-­‐minute class sessions: 2 Learning Goals and Concept Flow S.3. Statistical Evidence Goal: Students will demonstrate an ability to use appropriate statistical evidence to reason about population characteristics and about experimental treatment effects. The series of tasks in this lesson introduce the concept of a chi-­‐square test statistic as a means of measuring the degree to which a sample provides evidence against a claim that the row and column variables in a two-­‐way table of categorical variables are independent of one another. Later lessons reference these tasks while developing a formal framework for testing hypotheses concerning the independence of row and column variables in a two-­‐way table of categorical variables. Students will begin to understand that • for two-­‐way tables, although the chi-­‐square calculation will be similar to that used for one-­‐way tables and although the universal rules for comparing the P-­‐value to the significance level to determine whether to reject HO will still be employed, o the hypotheses are now different. o the expected count computations are now different. o the degrees-­‐of-­‐freedom formula is now different. Students will begin to be able to • • • determine which chi-­‐square test is appropriate—a chi-­‐square test of independence or a chi-­‐ square test of homogeneity—given data summarized in a two-­‐way table and a description of how the data were collected. choose appropriate null and alternative hypotheses for a chi-­‐square test of independence, given a claim about independence of two categorical variables. compute the value of the test statistic in a chi-­‐square test of independence. In this series of tasks, you are not formally developing the full framework for executing a chi-­‐square test of independence. Rather, the Rich Task concerns the examination of a two-­‐way table that builds upon context from Module 5. Based on how independence and probability were presented in previous modules, students are asked to determine what counts should be expected if in fact the row and column variables in the table are independent. Students are introduced to the expected count formula at this time. Similar to the Rich Task in Lesson 11.1.1, students are asked to compute expected counts for a hypothetical 1,000 individuals based on the claim of independence. Students then consider how different observed counts must be from expected counts to be judged a cause for concern. Students are presented with multiple hypothetical sample results, and they are asked to initially conjecture as to whether the distribution of the given hypothetical sample challenges the initial claim regarding independence between the row and column variables. Toward that end, students see how to calculate the chi-­‐square statistic for one of the hypothetical samples, and they then are asked to perform complete-­‐the-­‐table exercises to compute the chi-­‐square statistic for the additional hypothetical samples. Final activities ask students to conjecture about the characteristics of a chi-­‐square statistic, including the relationship between the size of a chi-­‐square statistic and the strength of evidence against the claim that the row and column variables may be independent. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 1 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables Part I: Students Work on a Rich Task Introducing the Task Remind students that in a previous module, they were introduced to the concept of independence in a two-­‐way table in the context of the movie-­‐viewing habits of individuals (specifically, a student and a partner recording the number of AFI Top 100 films they had seen). Inform students that the distribution and marketing of movies is extremely important to movie studios and that great care is often taken to examine demographic information about the movie-­‐going public. Consider showing an online poster image, official webpage, or an online movie information service’s listing for a highly successful (or highly anticipated) science fiction/action movie. Ask students if they saw or are planning to see the movie. Then consider asking how many of the students who answered yes consider themselves fans of science fiction or action films. Consider also asking the students who said no if they consider themselves fans of science fiction or action films. Ask them to speculate if the likelihood of a person going to the film might be related to how much of a fan they are. Also ask them to speculate if the likelihood of a person enjoying the film might also be related to how much of a fan the person is. (Note: For this lesson and the lesson that follows [11.2.2], students are only introduced to situations where a test of independence is appropriate. Although the mechanics for a chi-­‐square test for independence and a chi-­‐square test for homogeneity are quite similar, cases for which the chi-­‐square test for homogeneity is appropriate are not introduced until Lesson 11.2.3.) Task [Student Handout] In a previous module, you developed and analyzed a two-­‐way table regarding how many of the films you and another person had seen from the American Film Institute’s 1998 list of the greatest 100 American films. Recall from that module that two variables were considered independent when knowing the outcome or value of one variable had no effect on the relative frequency for the outcome of another variable. Consider the following case where a survey is conducted of 1,000 randomly selected moviegoers who just saw a new, highly anticipated science fiction/action film. In the survey, the moviegoers were asked if they liked the film (yes or no) and if they considered themselves very knowledgeable about science fiction, moderately knowledgeable about science fiction, or having little to no knowledge about science fiction. It is important for the company that made the movie to know if the movie was more (or less) popular among certain groups as this might affect the movie’s future advertising strategy, the sales distribution of the toys and clothing associated with the movie, the profit forecasts for the film, and so on. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 2 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables (1) A table such as the one below might appear in a report summarizing the results of the survey. “Did you like the film, yes or no?” Response Yes No Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL 300 700 TOTAL 400 250 350 1000 In the table, notice that 0.30 of the entire group liked the film (300/1,000). (a) If in fact the variables Self-­‐reported Science Fiction Knowledge Level and Response are independent, how many of the 400 Very Knowledgeable moviegoers would you expect to answer Yes, and how many would you expect to answer No? Fill in the appropriate two cells with your answers. (b) Similarly, if “Self-­‐reported Science Fiction Knowledge Level” and “Response” are independent, how many of the 250 “Moderately Knowledgeable” moviegoers would you expect to answer “Yes,” and how many would you expect to answer “No”? How many of the 350 Having Little to No Knowledge moviegoers would you expect to answer Yes, and how many would you expect to answer No? Fill in the appropriate cells with your answers. (c) Verify that the values you just added to the table support (add up to) the appropriate row and column totals shown in the margins of the table. Given that you have discussed sampling variability in a previous module, you know that it would be unusual to obtain a sample with the exact counts that you just computed for the Question 1 table even if the row and columns variables were truly independent for the entire population. (2) For another sample of 1,000 individuals, fill in the following table below in such a way that the data would not lead you to challenge the claim that the variables Response and Self-­‐reported Science Fiction Knowledge Level are independent. Make sure your entries add up to the correct row and column totals. “Did you like the film, yes or no?” Response Yes No Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL 300 700 TOTAL 400 250 350 1000 The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 3 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables (3) For another sample of 1,000 individuals, fill in the following table in such a way that the data would provide strong evidence against the claim that the variables Response and Self-­‐ reported Science Fiction Knowledge Level are independent. Make sure your entries add up to the correct row and column totals. “Did you like the film, yes or no?” Response Yes No Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL 300 700 TOTAL 400 250 350 1000 (4) Below are the distributions of three hypothetical random samples of size 1,000. For each sample, examine the proportions of Yes responses for each category of Self-­‐reported Science Fiction Knowledge Level and determine whether you think the sample provides strong evidence, moderate evidence, or weak evidence against the claim that the variables Response and Self-­‐reported Science Fiction Knowledge Level are independent. Then list the characteristics of the sample that led you to your decision. Hypothetical Sample 1: “Did you like the film, yes or no?” Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL Response Yes No 300 100 200 50 100 250 600 400 TOTAL 400 250 350 1000 It appears that Sample 1 provides (circle one) strong moderate weak evidence against the claim that the variables Response and Self-­‐reported Science Fiction Knowledge Level are independent because … Hypothetical Sample 2: “Did you like the film, yes or no?” Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL Response Yes No 102 98 140 170 220 270 462 538 TOTAL 200 310 490 1000 It appears that Sample 2 provides (circle one) strong moderate weak evidence against the claim that the variables Response and Self-­‐reported Science Fiction Knowledge Level are independent because … The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 4 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables Hypothetical Sample 3: “Did you like the film, yes or no?” Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL Response Yes No 180 20 190 120 80 410 450 550 TOTAL 200 310 490 1000 It appears that Sample 3 provides (circle one) strong moderate weak evidence against the claim that the variables Response and Self-­‐reported Science Fiction Knowledge Level are independent because … (5) For each hypothetical sample, develop a graphical display that visually compares the proportions of Yes responses for each category of Self-­‐reported Science Fiction Knowledge Level. For each sample’s graph, state the most notable feature of the graph. Does the information shown in each graph correspond in any way to your initial “strength of evidence” statements that you made above in Question 4? (6) Based on your work in the previous questions, which sample do you think gives the strongest evidence against the claim that the variables Response and Self-­‐reported Science Fiction Knowledge Level are independent? What characteristics of the sample were most important in your decision? (7) It would be useful to have a statistical measure of deviation to determine how much the distribution of a sample (such as those shown previously) deviates from what is expected. Create a method (or a statistic) to measure which sample deviates the most from its ideal expected distribution. How is your method similar to methods discussed in previous lessons? How is it different? Wrap-­‐Up for Part I/Transition to Part II As has been the case in previous lessons, the previous task should provide students the opportunity to struggle with the important ideas—in this case, what are the expected counts for a sample of size 1,000 based on the claim of independence and given the specific row and column totals, and how much deviation from those expected counts is reasonable? Students may have considered formal sampling distribution logic from previous modules in determining how much of a deviation is reasonable from an expected count, but that is not required. Part II is where you address any errors in student reasoning and computation. Consider polling the class on its responses to Question 6 (consider even using a categorical variable graph covered earlier in the course or a comment summary chart to record responses). Also consider allowing students to discuss as a group the sample characteristics that influenced their decisions in Question 6. Encourage students to present their graphs developed in Question 5: Are they the same kinds of graphs? Was the same scale used? Were the notable features fairly consistent in student responses? Have students share some of their inventions and ideas regarding Question 7. If appropriate, ask students to discuss how their methods were similar to previous methods discussed in the course and how they differ. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 5 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables Part II: Quantifying the Strength of the Evidence Introduction Tell students that they are now going to develop a way of more carefully quantifying some of the previous concepts. Reassure them that many of the mechanics involved are very similar to material covered in Lesson 11.1.1 (Chi-­‐Square Tests for One-­‐Way Tables). However, some adjustments are necessary since we are now dealing with two-­‐way tables. For those examples below where the final chi-­‐square value or intermediate calculations are provided, encourage students to seek assistance (if needed) until they obtain calculations that are consistent with the presented values. Answer any questions and address any issues that come up regarding the calculation of differences, squares, quotients, and sums, and/or general order of operations. Questions and Tasks [Student Handout] Revisiting Independence in the Context of Expected Counts In Question 1, you filled in a table under the assumption that the variables Self-­‐reported Science Fiction Knowledge Level and Response were independent. To fill in the count for the number of Very Knowledgeable moviegoers who said Yes, it was important to account for the fact that that 0.30 of the entire survey said Yes and that 400 individuals (i.e., 0.40 of the entire survey) responded as being Very Knowledgeable. Since 0.30 of the entire survey said Yes and since the counts that you filled in for Question 1 were to yield a situation of independence, the number of Yes responses for each category of Self-­‐reported Science Fiction Knowledge Level should have been as follows: • • • 0.30 of the Very Knowledgeable group = 0.30 × 400 = 120 0.30 of the Moderately Knowledgeable group = 0.30 × 250 = 75 0.30 of the Having Little to No Knowledge group = 0.30 × 350 = 105 Using earlier terms from the course, given that 0.30 of the entire survey said Yes, under the assumption of independence, the conditional frequency distribution for each category of Self-­‐reported Science Fiction Knowledge Level should be 0.30 Yes and 0.70 No. This means that under the assumption of independence, the expected count of 120 for the number of moviegoers who were Very Knowledgeable and said Yes was directly related to three pieces of information: 0.40 of the entire survey responded as being Very Knowledgeable, 0.30 of the entire survey said Yes, and 1,000 people were surveyed. Said another way, The expected count for Very Knowledgeable and Yes = Proportion of those surveyed who said Very Knowledgeable × Proportion of those surveyed who said Yes × Total number surveyed = 0.40 × 0.30 × 1,000 = 120. Generally speaking, for a two-­‐way table, this means that under the assumption of independence, any expected count for a cell that represents the combination of a row variable category with a column variable category can be computed based on the cell’s The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 6 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables corresponding row proportion, corresponding column proportion, and the total number of observations in the table (called the grand total). As a formula: expected count = corresponding row proportion × corresponding column proportion × total number of observations the table (i.e., grand total) Through algebra, there is another form of the above formula that is based on raw counts from the table: Expected count = row proportion × column proportion × grand total Expected Count = Expected Count = Row Total Column Total * * Grand Total Grand Total Grand Total Row Total Column Total Row Total * Column Total * * Grand Total = Grand Total Grand Total Grand Total (8) For the table in Question 1, you filled in the six counts under the assumption that the variables Self-­‐reported Science Fiction Knowledge Level and Response were independent. Thus, the values you filled in should have been the appropriate expected counts for each combination of a row variable category and a column variable category if the claim of independence between the row and column variables were true for the population that the 1,000 randomly selected moviegoers represent. Verify that the counts you developed based on the respective row and column totals follow the formula above (or change your expected counts as needed to adhere to the formula and to the row and column totals in the table). Computing a Chi-­‐Square Statistic For two-­‐way tables (such as the three tables you filled in for Questions 1–3 and the three tables presented for the hypothetical samples in Question 4), you can compute a chi-­‐square statistic that is useful in assessing the strength of your evidence against the claim of independence. The mechanics of computing the chi-­‐square statistic for a two-­‐way table are very similar to the methods introduced in a previous lesson for developing the chi-­‐square statistic for a one-­‐way table (see Lesson 11.1.1). The differences are as follows: • • • Expected counts are computed for each combination of a row variable category with a column variable category based on the corresponding row totals and column totals. (Note: The Total row and Total column presented in a table do not represent a category of the variable of interest. Any presentation of a row or column total in the table is not considered as a category of a given variable.) Computations comparing observed counts with expected counts are performed for each combination of a row variable category with a column variable category. The expected count for a combination of a row variable category with a column variable category is computed as shown previously: (row category total × column category total)/grand total for the table The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 7 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables As before, when calculating expected counts, it is okay if the expected counts are noninteger values (i.e., they do not have to be whole numbers) and you should generally not round expected counts to whole numbers. Also note that the sum of your expected counts for a given row should equal that row’s total in your sample and the sum of your expected counts for a given column should equal that column’s total in your sample. The expected counts for Hypothetical Sample 1 would be as follows: “Did you like the film, yes or no?” Response Self-­‐reported Science Fiction Knowledge Level Yes No TOTAL Very Knowledgeable 400 * 600/1000 = 240 400 * 400/1000 = 160 400 Moderately Knowledgeable 250 * 600/1000 = 150 250 * 400/1000 = 100 250 Having Little to No Knowledge 350 * 600/1000 = 210 350 * 400/1000 = 140 350 600 400 1000 TOTAL Once you have computed expected counts for each row and column variable combination, the steps for computing a chi-­‐square value for a two-­‐way table are as follows (again, very similar to steps discussed in a previous lesson): 1. For each combination of row variable category and column variable category, compute the difference between the actual count for that combination (obtained from the sample) and the expected count for that combination: (observed count – expected count) 2. For each combination of row variable category and column variable category, compute the square of the difference obtained in Step 1: (observed count – expected count)2 3. For each combination of row variable category and column variable category, divide the squared difference obtained in Step 2 by the expected count for the combination: (observed count – expected count)2/expected count 4. Add up the Step 3 calculation results from each combination; this will be the chi-­‐square value. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 8 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables Observed Count (from sample) Expected Count (based on claim of independence) Step 1: Observed Count -­‐ Expected Count Step 2: (Observed Count -­‐ Expected Count) 2 2 Step 3: (Observed Count -­‐ Expected Count) /Expected Count 300 240 60 100 160 -­‐60 3600 15 A ND "M ea bl od e" "N er o" at A el y ND Kn "M ow od le "Y dg er es at ea " A el bl y e" K ND no "L w itt le dg le "N to ea o" bl No A e" ND K no "L w itt le le dg to e" N o Kn ow le dg e" ow le dg er y K n "Y es " " A ND "V "N o "Y es " A ND "V er y K no w le dg ea b le " Hypothetical Sample 1 200 150 50 50 100 -­‐50 100 210 -­‐110 250 140 110 3600 2500 2500 12100 12100 22.5 16.667 25 57.619 86.429 Step 4: 15 + 22.5 + 16.667 + 25 + 57.619 + 86.429 = 223.215 For Hypothetical Sample 1, the chi-­‐square value generated is 223.215. (9) Compute the chi-­‐square values for the other two hypothetical samples by filling in the following tables. Compute the Step 3 calculations to three decimal places as shown in the example above. ow le dg "Y es " er y K n no w le dg ea y K " A ND "V "N o A ND "V er "Y es " Observed Count (from sample) Expected Count (based on claim of independence) Step 1: Observed Count -­‐ Expected Count A ND "M ea bl o e" d "N er o" at A el y ND Kn "M ow od le "Y dg er es at ea " A el bl y K e" ND no "L w itt le dg le "N to ea o" N bl A o e" ND Kn "L ow itt le le dg to e" N o Kn ow le dg e" Hypothetical Sample 2 bl e" 102 92.4 9.6 98 107.6 -­‐9.6 140 143.22 -­‐3.22 170 166.78 3.22 220 226.38 -­‐6.38 270 263.62 6.38 2 92.16 92.16 10.3684 10.3684 40.7044 40.7044 Step 3: (Observed Count -­‐ Expected Count) /Expected Count 0.997 0.857 0.072 0.062 0.180 0.154 Step 2: (Observed Count -­‐ Expected Count) 2 Step 4: 0.997 + + + 0.062 + + 0.154 = 2.323 For Hypothetical Sample 2, the chi-­‐square value generated is 2.323. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 9 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables le " ow A l e ND dg "M ea bl o e" d "N er o" at A el y ND Kn "M ow od le "Y dg er es at ea " A el bl y K e" ND no "L w itt le dg le "N to ea o" N bl A o e" ND Kn "L ow itt le le dg to e" N o Kn ow le dg e" Hypothetical Sample 3 Observed Count (from sample) Expected Count (based on claim of independence) Step 1: Observed Count -­‐ Expected Count Step 2: (Observed Count -­‐ Expected Count) 2 2 Step 3: (Observed Count -­‐ Expected Count) /Expected Count er y K n "Y es " " A ND "V "N o "Y es " A ND "V er y K no w le dg ea b 180 90 90 20 110 -­‐90 190 139.5 50.5 120 170.5 -­‐50.5 80 220.5 -­‐140.5 8100 8100 2550.25 2550.25 19740.25 19740.25 90 73.6 18.281 14.957 89.525 410 269.5 140.5 73.248 Step 4: 90 + + + 14.957 + 89.525 + 73.248 = For Hypothetical Sample 3, the chi-­‐square value generated is __________. (10) Which of the hypothetical samples had the highest chi-­‐square value? Does the size of the chi-­‐square values generated by these three samples correspond in any way to the initial strength of evidence statements that you made back in Question 4 or the conjectures you made in Question 6? Wrap-­‐Up Questions/Direct Instruction About Statistical Concepts Although expected counts are provided in some of the fill-­‐in-­‐the-­‐table cases, make sure that students see that the expected counts always follow the (row category total × column category total)/grand total for the table formula. As in Lesson 11.1.1, monitor if there was any difficulty with the calculation of differences, squares, quotients, and sums or general order of operations. Encourage students to examine how the size of a chi-­‐square statistic might be related to the strength of evidence against the claim that the row and column variables are independent. See the commentary and solutions at the end of the document for additional guidance. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 10 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables Homework [Student Handout] (1) Based on your work today, which seems to provide greater evidence against the claim of independence: a high chi-­‐square value (such as you computed for Hypothetical Sample 1 and Hypothetical Sample 3) or a low chi-­‐square value (such as you computed for Hypothetical Sample 2)? (2) A fourth hypothetical sample is as follows: “Did you like the film, yes or no?” Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL Response Yes No 260 140 150 100 190 160 600 400 TOTAL 400 250 350 1000 Compute the chi-­‐square value and determine if this value provides strong evidence against the claim that the variables Question Response and Self-­‐reported Science Fiction Knowledge Level are independent. Also develop a graphical display that visually compares the proportions of Yes responses for each category of Self-­‐reported Science Fiction Knowledge Level. (Note: For reasons that will be explained in a future lesson, in a two-­‐way table case such as this where one categorical variable contains three categories and the other categorical variable contains two categories, consider a chi-­‐square value of 5.99 or greater to be statistically significant evidence against the claim that the two variables are independent.) The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 11 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables Part I In a previous module, you developed and analyzed a two-­‐way table regarding how many of the films you and another person had seen from the American Film Institute’s 1998 list of the greatest 100 American films. Recall from that module that two variables were considered independent when knowing the outcome or value of one variable had no effect on the relative frequency for the outcome of another variable. Consider the following case where a survey is conducted of 1,000 randomly selected moviegoers who just saw a new, highly anticipated science fiction/action film. In the survey, the moviegoers were asked if they liked the film (yes or no) and if they considered themselves very knowledgeable about science fiction, moderately knowledgeable about science fiction, or having little to no knowledge about science fiction. It is important for the company that made the movie to know if the movie was more (or less) popular among certain groups as this might affect the movie’s future advertising strategy, the sales distribution of the toys and clothing associated with the movie, the profit forecasts for the film, and so on. (1) A table such as the one below might appear in a report summarizing the results of the survey. “Did you like the film, yes or no?” Response Yes No Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL 300 700 TOTAL 400 250 350 1000 In the table, notice that 0.30 of the entire group liked the film (300/1,000). (a) If in fact the variables Self-­‐reported Science Fiction Knowledge Level and Response are independent, how many of the 400 Very Knowledgeable moviegoers would you expect to answer Yes, and how many would you expect to answer No? Fill in the appropriate two cells with your answers. (b) Similarly, if “Self-­‐reported Science Fiction Knowledge Level” and “Response” are independent, how many of the 250 “Moderately Knowledgeable” moviegoers would you expect to answer “Yes,” and how many would you expect to answer “No”? How many of the 350 Having Little to No Knowledge moviegoers would you expect to answer Yes, and how many would you expect to answer No? Fill in the appropriate cells with your answers. (c) Verify that the values you just added to the table support (add up to) the appropriate row and column totals shown in the margins of the table. Given that you have discussed sampling variability in a previous module, you know that it would be unusual to obtain a sample with the exact counts that you just computed for the Question 1 table even if the row and columns variables were truly independent for the entire population. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 1 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables (2) For another sample of 1,000 individuals, fill in the following table below in such a way that the data would not lead you to challenge the claim that the variables Response and Self-­‐reported Science Fiction Knowledge Level are independent. Make sure your entries add up to the correct row and column totals. “Did you like the film, yes or no?” Response Yes No Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL 300 700 TOTAL 400 250 350 1000 (3) For another sample of 1,000 individuals, fill in the following table in such a way that the data would provide strong evidence against the claim that the variables Response and Self-­‐reported Science Fiction Knowledge Level are independent. Make sure your entries add up to the correct row and column totals. “Did you like the film, yes or no?” Response Yes No Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL 300 700 TOTAL 400 250 350 1000 The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 2 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables (4) Below are the distributions of three hypothetical random samples of size 1,000. For each sample, examine the proportions of Yes responses for each category of Self-­‐reported Science Fiction Knowledge Level and determine whether you think the sample provides strong evidence, moderate evidence, or weak evidence against the claim that the variables Response and Self-­‐reported Science Fiction Knowledge Level are independent. Then list the characteristics of the sample that led you to your decision. Hypothetical Sample 1: “Did you like the film, yes or no?” Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL Response Yes No 300 100 200 50 100 250 600 400 TOTAL 400 250 350 1000 It appears that Sample 1 provides (circle one) strong moderate weak evidence against the claim that the variables Response and Self-­‐reported Science Fiction Knowledge Level are independent because … Hypothetical Sample 2: “Did you like the film, yes or no?” Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL Response Yes No 102 98 140 170 220 270 462 538 TOTAL 200 310 490 1000 It appears that Sample 2 provides (circle one) strong moderate weak evidence against the claim that the variables Response and Self-­‐reported Science Fiction Knowledge Level are independent because … The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 3 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables Hypothetical Sample 3: “Did you like the film, yes or no?” Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL Response Yes No 180 20 190 120 80 410 450 550 TOTAL 200 310 490 1000 It appears that Sample 3 provides (circle one) strong moderate weak evidence against the claim that the variables Response and Self-­‐reported Science Fiction Knowledge Level are independent because … (5) For each hypothetical sample, develop a graphical display that visually compares the proportions of Yes responses for each category of Self-­‐reported Science Fiction Knowledge Level. For each sample’s graph, state the most notable feature of the graph. Does the information shown in each graph correspond in any way to your initial “strength of evidence” statements that you made above in Question 4? The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 4 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables (6) Based on your work in the previous questions, which sample do you think gives the strongest evidence against the claim that the variables Response and Self-­‐reported Science Fiction Knowledge Level are independent? What characteristics of the sample were most important in your decision? (7) It would be useful to have a statistical measure of deviation to determine how much the distribution of a sample (such as those shown previously) deviates from what is expected. Create a method (or a statistic) to measure which sample deviates the most from its ideal expected distribution. How is your method similar to methods discussed in previous lessons? How is it different? The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 5 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables Part II: Quantifying the Strength of the Evidence Revisiting Independence in the Context of Expected Counts In Question 1, you filled in a table under the assumption that the variables Self-­‐reported Science Fiction Knowledge Level and Response were independent. To fill in the count for the number of Very Knowledgeable moviegoers who said Yes, it was important to account for the fact that that 0.30 of the entire survey said Yes and that 400 individuals (i.e., 0.40 of the entire survey) responded as being Very Knowledgeable. Since 0.30 of the entire survey said Yes and since the counts that you filled in for Question 1 were to yield a situation of independence, the number of Yes responses for each category of Self-­‐reported Science Fiction Knowledge Level should have been as follows: • • • 0.30 of the Very Knowledgeable group = 0.30 × 400 = 120 0.30 of the Moderately Knowledgeable group = 0.30 × 250 = 75 0.30 of the Having Little to No Knowledge group = 0.30 × 350 = 105 Using earlier terms from the course, given that 0.30 of the entire survey said Yes, under the assumption of independence, the conditional frequency distribution for each category of Self-­‐reported Science Fiction Knowledge Level should be 0.30 Yes and 0.70 No. This means that under the assumption of independence, the expected count of 120 for the number of moviegoers who were Very Knowledgeable and said Yes was directly related to three pieces of information: 0.40 of the entire survey responded as being Very Knowledgeable, 0.30 of the entire survey said Yes, and 1,000 people were surveyed. Said another way, The expected count for Very Knowledgeable and Yes = Proportion of those surveyed who said Very Knowledgeable × Proportion of those surveyed who said Yes × Total number surveyed = 0.40 × 0.30 × 1,000 = 120. Generally speaking, for a two-­‐way table, this means that under the assumption of independence, any expected count for a cell that represents the combination of a row variable category with a column variable category can be computed based on the cell’s corresponding row proportion, corresponding column proportion, and the total number of observations in the table (called the grand total). As a formula: expected count = corresponding row proportion × corresponding column proportion × total number of observations the table (i.e., grand total) Through algebra, there is another form of the above formula that is based on raw counts from the table: Expected count = row proportion × column proportion × grand total Expected Count = Row Total Column Total * * Grand Total Grand Total Grand Total Expected Count = Row Total Column Total Row Total * Column Total * * GrandTotal = Grand Total GrandTotal Grand Total The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 6 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables (8) For the table in Question 1, you filled in the six counts under the assumption that the variables Self-­‐ reported Science Fiction Knowledge Level and Response were independent. Thus, the values you filled in should have been the appropriate expected counts for each combination of a row variable category and a column variable category if the claim of independence between the row and column variables were true for the population that the 1,000 randomly selected moviegoers represent. Verify that the counts you developed based on the respective row and column totals follow the formula above (or change your expected counts as needed to adhere to the formula and to the row and column totals in the table). Computing a Chi-­‐Square Statistic For two-­‐way tables (such as the three tables you filled in for Questions 1–3 and the three tables presented for the hypothetical samples in Question 4), you can compute a chi-­‐square statistic that is useful in assessing the strength of your evidence against the claim of independence. The mechanics of computing the chi-­‐square statistic for a two-­‐way table are very similar to the methods introduced in a previous lesson for developing the chi-­‐square statistic for a one-­‐way table (see Lesson 11.1.1). The differences are as follows: • • • Expected counts are computed for each combination of a row variable category with a column variable category based on the corresponding row totals and column totals. (Note: The Total row and Total column presented in a table do not represent a category of the variable of interest. Any presentation of a row or column total in the table is not considered as a category of a given variable.) Computations comparing observed counts with expected counts are performed for each combination of a row variable category with a column variable category. The expected count for a combination of a row variable category with a column variable category is computed as shown previously: (row category total × column category total)/grand total for the table As before, when calculating expected counts, it is okay if the expected counts are noninteger values (i.e., they do not have to be whole numbers) and you should generally not round expected counts to whole numbers. Also note that the sum of your expected counts for a given row should equal that row’s total in your sample and the sum of your expected counts for a given column should equal that column’s total in your sample. The expected counts for Hypothetical Sample 1 would be as follows: “Did you like the film, yes or no?” Response Self-­‐reported Science Fiction Knowledge Level Yes No TOTAL Very Knowledgeable 400 * 600/1000 = 240 400 * 400/1000 = 160 400 Moderately Knowledgeable 250 * 600/1000 = 150 250 * 400/1000 = 100 250 Having Little to No Knowledge 350 * 600/1000 = 210 350 * 400/1000 = 140 350 600 400 1000 TOTAL The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 7 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables Once you have computed expected counts for each row and column variable combination, the steps for computing a chi-­‐square value for a two-­‐way table are as follows (again, very similar to steps discussed in a previous lesson): 1. For each combination of row variable category and column variable category, compute the difference between the actual count for that combination (obtained from the sample) and the expected count for that combination: (observed count – expected count) 2. For each combination of row variable category and column variable category, compute the square of the difference obtained in Step 1: (observed count – expected count)2 3. For each combination of row variable category and column variable category, divide the squared difference obtained in Step 2 by the expected count for the combination: (observed count – expected count)2/expected count 4. Add up the Step 3 calculation results from each combination; this will be the chi-­‐square value. Observed Count (from sample) Expected Count (based on claim of independence) Step 1: Observed Count -­‐ Expected Count Step 2: (Observed Count -­‐ Expected Count) 2 2 Step 3: (Observed Count -­‐ Expected Count) /Expected Count A ND "M ea bl od e" "N er o" at A el y ND Kn "M ow od le "Y dg er es at ea " A el bl y e" K ND no "L w itt le dg le "N to ea o" bl No A e" ND K no "L w itt le le dg to e" N o Kn ow le dg e" ow le dg K n er y "Y es " " A ND "V "N o "Y es " A ND "V er y K no w le dg ea bl e" Hypothetical Sample 1 300 240 60 100 160 -­‐60 200 150 50 50 100 -­‐50 100 210 -­‐110 250 140 110 3600 3600 2500 2500 12100 12100 15 22.5 16.667 25 57.619 86.429 Step 4: 15 + 22.5 + 16.667 + 25 + 57.619 + 86.429 = 223.215 For Hypothetical Sample 1, the chi-­‐square value generated is 223.215. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 8 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables (9) Compute the chi-­‐square values for the other two hypothetical samples by filling in the following tables. Compute the Step 3 calculations to three decimal places as shown in the previous example. le " ow A l e ND dg "M ea bl o e" d "N er o" at A el y ND Kn "M ow od le "Y dg er es at ea " A el bl y K e" ND no "L w itt le dg le "N to ea o" N bl A o e" ND Kn "L ow itt le le dg to e" N o Kn ow le dg e" Hypothetical Sample 2 Observed Count (from sample) Expected Count (based on claim of independence) Step 1: Observed Count -­‐ Expected Count er y K n "Y es " " A ND "V "N o "Y es " A ND "V er y K no w le dg ea b 102 92.4 9.6 98 107.6 -­‐9.6 140 143.22 -­‐3.22 170 166.78 3.22 220 226.38 -­‐6.38 270 263.62 6.38 2 92.16 92.16 10.3684 10.3684 40.7044 40.7044 Step 3: (Observed Count -­‐ Expected Count) /Expected Count 0.997 0.857 0.072 0.062 0.180 0.154 Step 2: (Observed Count -­‐ Expected Count) 2 Step 4: 0.997 + + + 0.062 + + 0.154 = 2.323 For Hypothetical Sample 2, the chi-­‐square value generated is 2.323. ow A le ND dg "M ea bl o e" d "N er o" at A el y ND Kn "M ow od le "Y dg er es at ea " A el bl y K e" ND no "L w itt le dg le "N to ea o" N bl A o e" ND Kn "L ow itt le le dg to e" N o Kn ow le dg e" Hypothetical Sample 3 Observed Count (from sample) Expected Count (based on claim of independence) Step 1: Observed Count -­‐ Expected Count Step 2: (Observed Count -­‐ Expected Count) 2 2 Step 3: (Observed Count -­‐ Expected Count) /Expected Count K n er y "Y es " " A ND "V "N o "Y es " A ND "V er y K no w le dg ea bl e" 180 90 90 20 110 -­‐90 190 139.5 50.5 120 170.5 -­‐50.5 80 220.5 -­‐140.5 8100 8100 2550.25 2550.25 19740.25 19740.25 90 73.6 18.281 14.957 89.525 410 269.5 140.5 73.248 Step 4: 90 + + + 14.957 + 89.525 + 73.248 = For Hypothetical Sample 3, the chi-­‐square value generated is __________. (10) Which of the hypothetical samples had the highest chi-­‐square value? Does the size of the chi-­‐ square values generated by these three samples correspond in any way to the initial strength of evidence statements that you made back in Question 4 or the conjectures you made in Question 6? The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 9 Statway Student Handout April 25, 2012 (Full Version 1.0) Initiating Lesson 11.2.1: Introduction to Chi-­‐Square Tests for Two-­‐Way Tables Homework (1) Based on your work today, which seems to provide greater evidence against the claim of independence: a high chi-­‐square value (such as you computed for Hypothetical Sample 1 and Hypothetical Sample 3) or a low chi-­‐square value (such as you computed for Hypothetical Sample 2)? (2) A fourth hypothetical sample is as follows: “Did you like the film, yes or no?” Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL Response Yes No 260 140 150 100 190 160 600 400 TOTAL 400 250 350 1000 Compute the chi-­‐square value and determine if this value provides strong evidence against the claim that the variables Question Response and Self-­‐reported Science Fiction Knowledge Level are independent. Also develop a graphical display that visually compares the proportions of Yes responses for each category of Self-­‐reported Science Fiction Knowledge Level. (Note: For reasons that will be explained in a future lesson, in a two-­‐way table case such as this where one categorical variable contains three categories and the other categorical variable contains two categories, consider a chi-­‐square value of 5.99 or greater to be statistically significant evidence against the claim that the two variables are independent.) The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 10 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.2: Executing the Chi-­‐Square Test for Independence in Two-­‐Way Tables Estimated number of 50-­‐minute class sessions: 1 Learning Goals Students will understand that • • like the chi-­‐square test for goodness-­‐of-­‐fit, a chi-­‐square test for independence also has a degrees-­‐of-­‐freedom calculation, but in this case the degrees of freedom are related to the number of categories in the row and column variables. The logic, steps, and need to check conditions in a chi-­‐square test for independence are similar to hypothesis testing procedures encountered in previous modules. Students will be able to: • • • • • state and check the conditions needed for the use of the chi-­‐square test for independence to be appropriate, given sample data. compute the value of the test statistic and find the associated P-­‐value in a chi-­‐square test for independence.1 use the P-­‐value and the chosen significance level to reach a decision. carry out a chi-­‐square test for independence and interpret the conclusion in context. evaluate whether conclusions are reasonable, given the description of a statistical study and the results of a test for independence. Introduction Students are provided with cases based on their work in the previous module or real-­‐world examples where a test for independence could be employed. Students develop hypotheses for these cases under the framework that the null hypothesis is that the row and column variables are independent (not related) and that the alternative hypothesis is that the row and column variables are dependent (related). (Teaching Point: Specify that it is incorrect to say that a category from one variable is independent of a category in the other variable. Entire variable names should be used when independence is discussed in the hypotheses.) The conditions for the procedure are introduced, and students verify that conditions are met in the examples provided (reinforcing expected count computations). Should students inquire, the values of expected counts must be greater than five so that the sampling distribution of the chi-­‐square statistic calculated from the sample will in fact follow a chi-­‐square distribution with the appropriate degrees of freedom. Students compute the chi-­‐square statistic, degrees of freedom, and P-­‐value. Students are then asked to make a decision based on the P-­‐value and a given significance level, and they communicate a decision in nontechnical language regarding the original hypotheses. The homework activities include two complete tasks where students are provided with data from appropriate examples or statistical studies and then are asked to determine if the claim of independence between the row and column variables in those cases should be challenged. 1The specific methods of estimating/computing a P-­‐value are left to the instructor's discretion. The expectation is that outside of this lesson you will provide the minimal materials and demonstration needed regarding students’ use of preferred tables, technologies, etc. as warranted. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 1 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.2: Executing the Chi-­‐Square Test for Independence in Two-­‐Way Tables Tasks [Student Handout] In Lesson 11.2.1, for a highly anticipated science fiction/action film, you examined how the self-­‐reported science fiction knowledge level of a moviegoer might be associated with that person’s opinion of the movie. Just as it was important for the movie-­‐making company to know if the movie were more (or less) popular among certain groups within that Self-­‐reported Science Fiction Knowledge Level variable, there are other demographic variables and associations that might be of interest to the company. For example, some movies may have more (or less) appeal with certain age groups, with members of certain political parties, and so on. Suppose another film regarding a politically controversial subject was released, and a survey similar to the one described in the previous lesson (based on a random sample as well) was conducted. However, rather than asking about science-­‐fiction knowledge level, this survey asked about the respondent’s political affiliation: Democrat, Republican, or Other/Unaffiliated. The movie company wants to investigate if the popularity of the film is related to the moviegoers’ political affiliation. A table such as the one below might appear in a report summarizing the results of the survey. “Did you like the film, yes or no?” Political Affiliation Democrat Republican Other/Unaffiliated TOTAL Response Yes No 49 23 37 30 34 27 120 80 TOTAL 72 67 61 200 Analysis Method: Chi-­‐Square Test for Independence A chi-­‐square test for independence is an inference technique used to investigate the claim of independence between the row and column variables in a two-­‐way table. The mechanics of the test are very similar to previous hypothesis tests you have covered. Null Hypotheses For a chi-­‐square test for independence, the null hypothesis is that the row and column variables are independent (i.e., they are not related). Alternative Hypothesis The alternative hypothesis is that the row and column variables are not independent (i.e., they are related). (1) Using the specific names of the variables in the previously described case, state the null and alternative hypotheses in sentence form. HO: HA: The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 2 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.2: Executing the Chi-­‐Square Test for Independence in Two-­‐Way Tables Conditions As before, to conduct a chi-­‐square test for independence, the sample must be a random sample, and all expected counts must be five or greater. As you saw in the previous lesson, in a chi-­‐square test for independence, the expected count for a combination of a row variable category with a column variable category is as follows: (row category total × column category total)/grand total for the table As before, when calculating expected counts, it is okay if the expected counts are noninteger values (i.e., they do not have to be whole numbers) and you should generally not round expected counts to whole numbers. Also note that the sum of your expected counts for a given row should equal that row’s total in your sample and the sum of your expected counts for a given column should equal that column’s total in your sample. (2) For the survey previously described, compute the six expected counts based on the assumption of independence between Political Affiliation and Response, and record the counts in the table below. (The first expected count is already presented.) Verify that the six expected counts are all greater than or equal to 5. Verify for each row that the sum of your expected counts equals the row’s total. Verify for each column that the sum of your expected counts equals the column’s total. Expected counts for the Political Affiliation data: “Did you like the film, yes or no?” Response Yes 72*120/200 Democrat = 43.2 Political Affiliation No TOTAL 72 Republican 67 Other/Unaffiliated 61 TOTAL 120 80 200 Computing the Chi-­‐Square Test Statistic For a chi-­‐square test for independence for a two-­‐way table, compute the chi-­‐square test statistic as shown in Lesson 11.2.1. (3) Compute the chi-­‐square test statistic by filling in the following table. Compute the Step 3 calculations to three decimal places. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 3 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.2: Executing the Chi-­‐Square Test for Independence in Two-­‐Way Tables "Y es " A ND "D em "N oc o" ra A t" ND "D em "Y oc es ra " A t" ND "R ep "N ub o" lic an A ND " "R ep ub "Y lic es an " A " ND "O th "N er /U o" na A ND ffi lia "O te th d" er /U na ffi lia te d" Observed Count (from sample) Expected Count (based on claim of independence) Step 1: Observed Count -­‐ Expected Count Step 2: (Observed Count -­‐ Expected Count)2 2 Step 3: (Observed Count -­‐ Expected Count) /Expected Count 49 43.2 5.8 23 28.8 -­‐5.8 37 40.2 -­‐3.2 30 26.8 3.2 34 36.6 -­‐2.6 27 24.4 2.6 33.64 33.64 10.24 10.24 6.76 6.76 0.779 1.2 0.255 0.382 0.185 0.277 Step 4: 0.779 + + + + + = The chi-­‐square test statistic value is _________. Computing Degrees of Freedom and Computing (or Approximating) the P-­‐Value As you know from earlier lessons, P-­‐values are computed from chi-­‐square distributions; and the shape, center, and spread of a chi-­‐square distribution are based on degrees of freedom. For a chi-­‐square test for independence, degrees of freedom = (number of row variable categories – 1) × (number of column variable categories – 1) (Note: The Total row and Total column presented in a table do not represent a category of the variables of interest and should not be included in the computations above. Any presentations of totals in the table are not considered as categories of a given variable.) (4) In the case above where there are two categories of Question Response and three categories of Political Affiliation, how many degrees of freedom will your chi-­‐square test for independence have? (5) If you conducted a chi-­‐square test for independence based on a two-­‐way table with a row variable with three categories and a column variable with four categories, how many degrees of freedom would the test have? (6) Based on the chi-­‐square statistic you computed in Question 3 and the degrees of freedom you determined in Question 4, compute or approximate the P-­‐value for your chi-­‐square test for independence. Deciding and Concluding The rule for determining whether to reject the null hypothesis in a chi-­‐square test for independence is the same as for other hypothesis tests: Reject HO if P-­‐value ≤ α (where α is the significance level). (7) Based on your previous calculations, at a 5% level of significance, would you reject the null hypothesis? The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 4 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.2: Executing the Chi-­‐Square Test for Independence in Two-­‐Way Tables (8) Mindful that you should state your decision in context, based on your decision in Question 7, do your data support the claim that there is a relation between the moviegoers’ responses (as to whether they liked the movie) and their political affiliation at a 5% significance level? Explain your reasoning. Wrap-­‐Up Questions/Direct Instruction about Statistical Concepts Via discussion or lecture, highlight the following: • • • • • • The logic, steps, and need to check conditions in a chi-­‐square test for independence are similar to hypothesis testing procedures encountered in previous modules. The conditions needed for a chi-­‐square procedure are the same whether it is a chi-­‐square test for independence or a chi-­‐square test for goodness-­‐of-­‐fit. The null hypothesis is that the row and column variables are independent. The alternative hypothesis is that the row and column variables are not independent. The chi-­‐square test for independence is not for examining the independence of a single row category and a single column category. Rather, the test examines whether the row and column variables are independent. Larger chi-­‐square values generally correspond to smaller P-­‐values and stronger evidence against the null hypothesis. Similarly, smaller chi-­‐square values generally correspond to larger P-­‐values and weaker evidence against the null hypothesis. This is similar to a chi-­‐square test for goodness-­‐of-­‐fit. As mentioned in previous inference discussions, students should state findings and conclusions in context. Homework [Student Handout] (1) In a previous lesson, you investigated the results of a survey conducted of 1,000 randomly selected moviegoers who just saw a new, highly anticipated science fiction/action film. In the survey, the moviegoers were asked if they liked the film (yes or no) and if they considered themselves very knowledgeable about science fiction, moderately knowledgeable about science fiction, or having little to no knowledge about science fiction. Suppose the results of the survey (based on a random sample) are as follows: “Did you like the film, yes or no?” Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL Response Yes No 260 140 150 100 190 160 600 400 TOTAL 400 250 350 1000 The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 5 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.2: Executing the Chi-­‐Square Test for Independence in Two-­‐Way Tables Examine the claim that Response and Self-­‐reported Science Fiction Knowledge Level are independent by executing a complete chi-­‐square test for independence for this case. A complete test would include the following steps: • • • • • State null and alternative hypotheses. State conditions (and examine if they are met). Compute the chi-­‐square test statistic. Compute (or approximate) the P-­‐value. Decide and conclude (using the rule Reject HO if P-­‐value ≤ α and stating your final conclusion in context). Use a 1% significance level for this case. In addition, develop a suitable graphical display that visually compares the Yes percentages for each Self-­‐reported Science Fiction Knowledge Level group. (2) A survey conducted by the Pew Research Center in April-­‐May 2010,2 as part of the Pew Internet & American Life Project, obtained the following results based on a sample of 8,296 individuals: “Do you use a computer at your workplace, at school, at home, or anywhere else on at least an occasional basis?” Respondent's Urbanity Response Yes No Urban 1946 537 Suburban 3533 835 Rural 943 502 Do these data support the claim that the response to the question and the respondent’s urbanity are related? Execute a complete chi-­‐square test for independence for this case. In addition, develop a suitable graphical display that visually compares the Yes percentages for each urbanity group. 2 From the “Crosstab File” from the data set “May 2010 -­‐ Cell Phones” at http://pewinternet.org/Shared-­‐Content/Data-­‐ Sets/2010/May-­‐2010-­‐-­‐Cell-­‐Phones.aspx, accessed on February 20, 2011, p. 170. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 6 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.2: Executing the Chi-­‐Square Test for Independence in Two-­‐Way Tables In Lesson 11.2.1, for a highly anticipated science fiction/action film, you examined how the self-­‐reported science fiction knowledge level of a moviegoer might be associated with that person’s opinion of the movie. Just as it was important for the movie-­‐making company to know if the movie were more (or less) popular among certain groups within that Self-­‐reported Science Fiction Knowledge Level variable, there are other demographic variables and associations that might be of interest to the company. For example, some movies may have more (or less) appeal with certain age groups, with members of certain political parties, and so on. Suppose another film regarding a politically controversial subject was released, and a survey similar to the one described in the previous lesson (based on a random sample as well) was conducted. However, rather than asking about science-­‐fiction knowledge level, this survey asked about the respondent’s political affiliation: Democrat, Republican, or Other/Unaffiliated. The movie company wants to investigate if the popularity of the film is related to the moviegoers’ political affiliation. A table such as the one below might appear in a report summarizing the results of the survey. “Did you like the film, yes or no?” Political Affiliation Democrat Republican Other/Unaffiliated TOTAL Response Yes No 49 23 37 30 34 27 120 80 TOTAL 72 67 61 200 Analysis Method: Chi-­‐Square Test for Independence A chi-­‐square test for independence is an inference technique used to investigate the claim of independence between the row and column variables in a two-­‐way table. The mechanics of the test are very similar to previous hypothesis tests you have covered. Null Hypotheses For a chi-­‐square test for independence, the null hypothesis is that the row and column variables are independent (i.e., they are not related). Alternative Hypothesis The alternative hypothesis is that the row and column variables are not independent (i.e., they are related). (1) Using the specific names of the variables in the previously described case, state the null and alternative hypotheses in sentence form. HO: HA: The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 1 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.2: Executing the Chi-­‐Square Test for Independence in Two-­‐Way Tables Conditions As before, to conduct a chi-­‐square test for independence, the sample must be a random sample, and all expected counts must be five or greater. As you saw in the previous lesson, in a chi-­‐square test for independence, the expected count for a combination of a row variable category with a column variable category is as follows: (row category total × column category total)/grand total for the table As before, when calculating expected counts, it is okay if the expected counts are noninteger values (i.e., they do not have to be whole numbers) and you should generally not round expected counts to whole numbers. Also note that the sum of your expected counts for a given row should equal that row’s total in your sample and the sum of your expected counts for a given column should equal that column’s total in your sample. (2) For the survey previously described, compute the six expected counts based on the assumption of independence between Political Affiliation and Response, and record the counts in the table below. (The first expected count is already presented.) Verify that the six expected counts are all greater than or equal to 5. Verify for each row that the sum of your expected counts equals the row’s total. Verify for each column that the sum of your expected counts equals the column’s total. Expected counts for the Political Affiliation data: “Did you like the film, yes or no?” Response Yes No 72*120/200 Democrat = 43.2 Political Affiliation 72 Republican 67 Other/Unaffiliated 61 TOTAL TOTAL 120 80 200 The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 2 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.2: Executing the Chi-­‐Square Test for Independence in Two-­‐Way Tables Computing the Chi-­‐Square Test Statistic For a chi-­‐square test for independence for a two-­‐way table, compute the chi-­‐square test statistic as shown in Lesson 11.2.1. "Y es " A ND "D em "N oc o" ra A t" ND "D em "Y oc es ra " A t" ND "R ep "N ub o" lic an A ND " "R ep ub "Y lic es an " A " ND "O th "N er /U o" na A ND ffi lia "O te th d" er /U na ffi lia te d" (3) Compute the chi-­‐square test statistic by filling in the following table. Compute the Step 3 calculations to three decimal places. Observed Count (from sample) Expected Count (based on claim of independence) Step 1: Observed Count -­‐ Expected Count Step 2: (Observed Count -­‐ Expected Count)2 2 Step 3: (Observed Count -­‐ Expected Count) /Expected Count 49 43.2 5.8 23 28.8 -­‐5.8 37 40.2 -­‐3.2 30 26.8 3.2 33.64 33.64 10.24 10.24 6.76 6.76 0.779 1.2 0.255 0.382 0.185 0.277 The chi-­‐square test statistic value is _________. 34 36.6 -­‐2.6 27 24.4 2.6 Step 4: 0.779 + + + + + = Computing Degrees of Freedom and Computing (or Approximating) the P-­‐Value As you know from earlier lessons, P-­‐values are computed from chi-­‐square distributions; and the shape, center, and spread of a chi-­‐square distribution are based on degrees of freedom. For a chi-­‐square test for independence, degrees of freedom = (number of row variable categories – 1) × (number of column variable categories – 1) (Note: The Total row and Total column presented in a table do not represent a category of the variables of interest and should not be included in the computations above. Any presentations of totals in the table are not considered as categories of a given variable.) (4) In the case above where there are two categories of Question Response and three categories of Political Affiliation, how many degrees of freedom will your chi-­‐square test for independence have? The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 3 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.2: Executing the Chi-­‐Square Test for Independence in Two-­‐Way Tables (5) If you conducted a chi-­‐square test for independence based on a two-­‐way table with a row variable with three categories and a column variable with four categories, how many degrees of freedom would the test have? (6) Based on the chi-­‐square statistic you computed in Question 3 and the degrees of freedom you determined in Question 4, compute or approximate the P-­‐value for your chi-­‐square test for independence. Deciding and Concluding The rule for determining whether to reject the null hypothesis in a chi-­‐square test for independence is the same as for other hypothesis tests: Reject HO if P-­‐value ≤ α (where α is the significance level). (7) Based on your previous calculations, at a 5% level of significance, would you reject the null hypothesis? (8) Mindful that you should state your decision in context, based on your decision in Question 7, do your data support the claim that there is a relation between the moviegoers’ responses (as to whether they liked the movie) and their political affiliation at a 5% significance level? Explain your reasoning. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 4 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.2: Executing the Chi-­‐Square Test for Independence in Two-­‐Way Tables Homework (1) In a previous lesson, you investigated the results of a survey conducted of 1,000 randomly selected moviegoers who just saw a new, highly anticipated science fiction/action film. In the survey, the moviegoers were asked if they liked the film (yes or no) and if they considered themselves very knowledgeable about science fiction, moderately knowledgeable about science fiction, or having little to no knowledge about science fiction. Suppose the results of the survey (based on a random sample) are as follows: “Did you like the film, yes or no?” Self-­‐reported Science Fiction Knowledge Level TOTAL 400 250 350 1000 Examine the claim that Response and Self-­‐reported Science Fiction Knowledge Level are independent by executing a complete chi-­‐square test for independence for this case. A complete test would include the following steps: • • • • • Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL Response Yes No 260 140 150 100 190 160 600 400 State null and alternative hypotheses. State conditions (and examine if they are met). Compute the chi-­‐square test statistic. Compute (or approximate) the P-­‐value. Decide and conclude (using the rule Reject HO if P-­‐value ≤ α and stating your final conclusion in context). Use a 1% significance level for this case. In addition, develop a suitable graphical display that visually compares the Yes percentages for each Self-­‐reported Science Fiction Knowledge Level group. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 5 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.2: Executing the Chi-­‐Square Test for Independence in Two-­‐Way Tables 1 (2) A survey conducted by the Pew Research Center in April-­‐May 2010, as part of the Pew Internet & American Life Project, obtained the following results based on a sample of 8,296 individuals: “Do you use a computer at your workplace, at school, at home, or anywhere else on at least an occasional basis?” Respondent's Urbanity Response Yes No Urban 1946 537 Suburban 3533 835 Rural 943 502 Do these data support the claim that the response to the question and the respondent’s urbanity are related? Execute a complete chi-­‐square test for independence for this case. In addition, develop a suitable graphical display that visually compares the Yes percentages for each urbanity group. 1 From the “Crosstab File” from the data set “May 2010 -­‐ Cell Phones” at http://pewinternet.org/Shared-­‐Content/Data-­‐ Sets/2010/May-­‐2010-­‐-­‐Cell-­‐Phones.aspx, accessed on February 20, 2011, p. 170. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 6 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.3: Executing the Chi-­‐Square Test for Homogeneity in Two-­‐Way Tables Estimated number of 50-­‐minute class sessions: 1 Learning Goals Students will understand that • • the procedures for a chi-­‐square test for homogeneity are very similar to the procedures for a chi-­‐square test for independence. while the steps involved in the hypothesis tests may be similar, the concepts of (and the hypotheses for) homogeneity and independence cases are not the same. o o Homogeneity concerns investigating if the distribution of a single categorical variable is similar across multiple populations (distinct random sampling from each population). Independence concerns the relationship of two categorical variables in a single population (one random sample is selected from the one population of interest). Students will be able to • • • • • • • determine which chi-­‐square test is appropriate—a chi-­‐square test for independence or a chi-­‐ square test for homogeneity—given data summarized in a two-­‐way table and a description of how the data were collected. choose appropriate null and alternative hypotheses for a chi-­‐square test for homogeneity, given a claim about homogeneity of population proportions. state and check the conditions needed for the use of the chi-­‐square test for homogeneity to be appropriate, given sample data. compute the value of the test statistic and find the associated P-­‐value in a chi-­‐square test for homogeneity.1 use the P-­‐value and the chosen significance level to reach a decision. carry out a chi-­‐square test for homogeneity and interpret the conclusion in context. evaluate whether the conclusions are reasonable, given the description of a statistical study and the results of a test for homogeneity of population proportions. Introduction Students are provided with cases related to work in other modules. However, a test for homogeneity should be employed for these cases. Students develop hypotheses under the framework that the null hypothesis is that the distribution of the categorical variable is the same for the various populations, while the alternative hypothesis is that the distribution of the categorical variable is not the same for the various populations. While the steps involved in the hypothesis tests may be similar, the concepts of (and the hypotheses for) homogeneity and independence cases are not the same. • Homogeneity concerns investigating if the distribution of a single categorical variable is similar across multiple populations (distinct random sampling from each population). 1 The specific methods of estimating/computing a P-­‐value are left to the instructor’s discretion. The expectation is that outside of this lesson you will provide the minimal materials and demonstration needed regarding students’ use of preferred tables, technologies, etc. as warranted. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 1 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.3: Executing the Chi-­‐Square Test for Homogeneity in Two-­‐Way Tables • Independence concerns the relationship of two categorical variables in a single population (one random sample is selected from the one population of interest). It is important to reiterate the difference between independence and homogeneity in this lesson, particularly since the steps for a chi-­‐square test for independence and a chi-­‐square test for homogeneity are so similar. The conditions for the procedure are introduced, and students verify that conditions are met in the examples provided. Students compute the chi-­‐square statistic, degrees of freedom, and P-­‐value. They are then asked to make a decision based on the P-­‐value (and a given significance level) and to communicate a decision in nontechnical language regarding the original hypotheses. The homework activity is a complete task where students are provided with data from an appropriate statistical study and are then asked to determine if the claim of homogeneity should be challenged. Tasks [Student Handout] In Lesson 11.2.1, for a highly anticipated science fiction/action film, you examined how the self-­‐reported science fiction knowledge level of a moviegoer might be associated with that person’s opinion of the movie. Just as it was important for the movie-­‐making company to know if the movie was more (or less) popular among certain groups in that Self-­‐reported Science Fiction Knowledge Level variable, there would also be interest in knowing if the distribution of filmgoers was similar for different regions of the country. Such information might help the movie company to regionally target its marketing methods. Imagine that 1,000 randomly selected individuals were drawn from four regions of the country. (The U.S. Census Bureau usually classifies the United States into four regions: Northeast, Midwest, South, and West. See www.census.gov/geo/www/us_regdiv.pdf for details.) Consider the four regional samples as representing their region's population of all moviegoers for this film. Regional Survey Self-­‐reported Science Fiction Knowledge Level Region Northeast Midwest South Very Knowledgeable 105 95 145 Moderately Knowledgeable 80 60 100 Having Little to No Knowledge 115 95 105 TOTAL 300 250 350 West 55 10 35 100 TOTAL 400 250 350 1000 You are interested in knowing if the true Self-­‐reported Science Fiction Knowledge Level category proportions are the same for each regional population. This involves a chi-­‐square test for homogeneity. Analysis Method: Chi-­‐Square Test for Homogeneity A chi-­‐square test for homogeneity investigates if the distribution of a single categorical variable is similar across multiple populations and generally assumes that distinct, independent random sampling from each population has occurred. Note that this is technically a distinct procedure from a chi-­‐square test for independence for the following reasons: The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 2 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.3: Executing the Chi-­‐Square Test for Homogeneity in Two-­‐Way Tables • • As stated previously, a test for homogeneity concerns investigating if the distribution of a single categorical variable is similar across multiple populations (based on distinct, independent random sampling from each population). A test for independence concerns the relationship of two categorical variables in a single population (one random sample is selected from the one population of interest). Nonetheless, the steps for executing a chi-­‐square test for homogeneity are remarkably similar to the steps for executing a chi-­‐square test for independence. The only differences are with the statement of hypotheses and the subsequent final statement of your analysis results in context. Null Hypotheses For a chi-­‐square test for homogeneity, the null hypothesis states that the distribution of the population proportions in a categorical variable of interest is the same in all populations of interest. For the Regional Survey example, the null hypothesis is that the distribution of the population proportions for Self-­‐reported Science Fiction Knowledge Level is the same for each region’s population of moviegoers for this film. Alternative Hypothesis For a chi-­‐square test for homogeneity, the alternative hypothesis states that the distribution of the population proportions in a categorical variable of interest is not the same for all populations of interest. For the Regional Survey example, the alternative hypothesis is that the distribution of the population proportions for Self-­‐reported Science Fiction Knowledge Level is not the same for each region’s population of moviegoers for this film. Conditions As before, to conduct a chi-­‐square test for homogeneity, the sample must be a random sample, and all expected counts must be five or greater. As with a chi-­‐square test for independence, in a chi-­‐square test for homogeneity, the expected count for a combination of a row variable category with a column variable category is (row category total × column category total)/grand total for the table As before, when calculating expected counts, it is okay if the expected counts are noninteger values (i.e., they do not have to be whole numbers), and you should generally not round expected counts to whole numbers. Also note that the sum of your expected counts for a given row should equal that row’s total in your sample and the sum of your expected counts for a given column should equal that column’s total in your sample. (1) For the Regional Survey example, record the expected counts in the table below. Verify that the 12 expected counts are all greater than or equal to 5. Verify for each row that the sum of your expected counts equals the row’s total. Verify for each column that the The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 3 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.3: Executing the Chi-­‐Square Test for Homogeneity in Two-­‐Way Tables sum of your expected counts equals the column’s total (expected counts for the first column are already provided). The expected counts are as follows: Northeast Region Midwest South West TOTAL Very Knowledgeable 400 * 300/1000 = 120 250 * 300/1000 = 75 350 * 300/1000 Having Little to No Knowledge = 105 TOTAL 300 400 Moderately Knowledgeable 250 350 250 350 100 1000 Computing the Chi-­‐Square Test Statistic For a chi-­‐square test for homogeneity for a two-­‐way table, compute the chi-­‐square test statistic in the same way that you compute a chi-­‐square statistic for a test for independence (demonstrated and discussed in the previous two lessons). (2) Compute the chi-­‐square test statistic for a test for homogeneity based on the Regional Survey data and the expected counts you developed in Question 1. Use appropriate technology, or develop and fill in a chi-­‐square calculation table similar to those that have been shown in previous lessons. Compute your chi-­‐square test statistic to three decimal places. The chi-­‐square test statistic value is _________. Computing Degrees of Freedom and Computing (or Approximating) the P-­‐Value As before, P-­‐values are computed from chi-­‐square distributions, and the shape, center, and spread of a chi-­‐square distribution are based on degrees of freedom. Similar to a chi-­‐square test for independence, for a chi-­‐square test for homogeneity, degrees of freedom = (number of row variable categories – 1) × (number of column variable categories – 1) (Note: The Total row and Total column presented in a table do not represent a category of the variables of interest and should not be included in the computations above. Any presentations of totals in the table are not considered as categories of a given variable.) (3) In the case where there are three categories of Self-­‐reported Science Fiction Knowledge Level and four categories of Region, how many degrees of freedom will your chi-­‐square test for homogeneity have? (4) Based on the chi-­‐square statistic you computed in Question 2 and the degrees of freedom you determined in Question 3, compute or approximate the P-­‐value for your chi-­‐square test for homogeneity. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 4 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.3: Executing the Chi-­‐Square Test for Homogeneity in Two-­‐Way Tables Deciding and Concluding The rule for determining whether to reject the null hypothesis in a chi-­‐square test for homogeneity is the same as for other hypothesis tests: Reject HO if P-­‐value ≤ α (where α is the significance level). (5) Based on your calculations, at a 1% level of significance, would you reject the null hypothesis? (6) Mindful that you should state your decision in context, based on your decision in Question 5, do your data provide enough evidence to support the claim that the distribution of population proportions for Self-­‐reported Science Fiction Knowledge Level is not the same for each region (at a 1% significance level)? Explain your reasoning. (7) Suppose that a different regional survey had yielded the following data: Regional Survey 2 Self-­‐reported Science Fiction Knowledge Level Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL Northeast 122 73 105 300 Region Midwest 98 63 89 250 South 145 82 123 350 West 35 32 33 100 TOTAL 400 250 350 1000 Do these data for Regional Survey 2 provide enough evidence to support the claim that the distribution of population proportions for Self-­‐reported Science Fiction Knowledge Level is not the same for each region? Execute a complete chi-­‐square test for homogeneity by performing the following for this case: • • • • • State null and alternative hypotheses. State conditions (and examine if they are met). Compute the chi-­‐square test statistic. Compute (or approximate) the P-­‐value. Decide and conclude (using the rule Reject HO if P-­‐value ≤ α and stating your final conclusion in context). Use a 1% significance level for this case. Wrap-­‐Up Questions/Direct Instruction About Statistical Concepts Via discussion or lecture, highlight the following: • • • Homogeneity concerns investigating if the distribution of a single categorical variable is similar across multiple populations (distinct random sampling from each population). The logic, steps, and need to check conditions in a chi-­‐square test for homogeneity are similar to hypothesis testing procedures encountered in previous modules (and are particularly similar to the chi-­‐square test for independence). For a chi-­‐square test for homogeneity, the null hypothesis states that the distribution of the population proportions for the categorical variable of interest is the same for all populations of interest. The alternative hypothesis is that the distribution of the population proportions for the categorical variable of interest is not the same for all populations of interest. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 5 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.3: Executing the Chi-­‐Square Test for Homogeneity in Two-­‐Way Tables • • Larger chi-­‐square values generally correspond to smaller P-­‐values and stronger evidence against the null hypothesis. Similarly, smaller chi-­‐square values generally correspond to larger P-­‐values and weaker evidence against the null hypothesis. This is also the case for a chi-­‐square test for goodness-­‐of-­‐fit and a chi-­‐square test for independence. As mentioned in previous inference discussions, students should state findings and conclusions in context. Homework [Student Handout] (Note: Portions of this task previously appeared in Lesson 11.1.3.) Prior to the November 2, 2010, election for Maryland governor, the Washington Post conducted a poll (September 22–26, 2010) asking respondents, “If the election for Maryland Governor were held today, for whom would you vote?” An article summarizing the results stated, “A total of 1,448 randomly selected adults in Maryland were interviewed, including … 730 voters likely to cast ballots.” The article summarized the responses of the likely voters by the following categories: Governor Martin O’Malley, Bob Ehrlich, and Other, no opinion. The sample was intended to represent the population of likely Maryland voters for that September time period. Although the exact counts for each response were not listed in the article, based on summary information in the article, the following represents a reasonable tally for the sample of 730 likely voters: Governor Martin O'Malley Bob Ehrlich Other, no opinion 382 responses 302 responses 46 responses A subsequent Washington Post poll conducted October 19–22, 2010, interviewed “2,355 randomly selected adults in Maryland … including … 1,434 voters likely to cast ballots.”2 Similarly, this October sample was intended to represent the population of likely Maryland voters for that October time period. Although the exact counts for each response were also not listed in this article, based on summary information in the article, the following represents a reasonable tally for the sample of 1,434 likely voters: Governor Martin O'Malley Bob Ehrlich Other, no opinion 774 responses 574 responses 86 responses (1) Explain briefly why the proper test for this case is a chi-­‐square test for homogeneity rather than a chi-­‐square test for independence. 2 Davis, A. C., Wagner, J., & Cohen, J. (2010, October 25). Ehrlich appears to be losing GOP traction. The Washington Post. Retrieved from www.washingtonpost.com/wp-­‐dyn/content/article/2010/10/25/AR2010102500002.html. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 6 Statway Instructor’s Notes April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.3: Executing the Chi-­‐Square Test for Homogeneity in Two-­‐Way Tables (2) Do the data provide sufficient evidence to support the claim that the distribution of responses for the population of likely Maryland voters for the October 19–22 time period is different from the distribution of responses for the population of likely Maryland voters for the September 22–26 time period? Execute a complete chi-­‐square test for homogeneity at a significance level of 5%. A table summarizing the data is provided below. Poll Responses: "If the election for Maryland Governor were held today, for whom would you vote?" September 22 to 26, 2010 October 19 to 22, 2010 Governor Martin O'Malley 382 774 Bob Ehrlich 302 574 Other, no opinion 46 86 TOTAL 730 1434 TOTAL 1156 876 132 2164 The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 7 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.3: Executing the Chi-­‐Square Test for Homogeneity in Two-­‐Way Tables In Lesson 11.2.1, for a highly anticipated science fiction/action film, you examined how the self-­‐reported science fiction knowledge level of a moviegoer might be associated with that person’s opinion of the movie. Just as it was important for the movie-­‐making company to know if the movie was more (or less) popular among certain groups in that Self-­‐reported Science Fiction Knowledge Level variable, there would also be interest in knowing if the distribution of filmgoers was similar for different regions of the country. Such information might help the movie company to regionally target its marketing methods. Imagine that 1,000 randomly selected individuals were drawn from four regions of the country. (The U.S. Census Bureau usually classifies the United States into four regions: Northeast, Midwest, South, and West. See www.census.gov/geo/www/us_regdiv.pdf for details.) Consider the four regional samples as representing their region's population of all moviegoers for this film. Regional Survey Self-­‐reported Science Fiction Knowledge Level Region Northeast Midwest South Very Knowledgeable 105 95 145 Moderately Knowledgeable 80 60 100 Having Little to No Knowledge 115 95 105 TOTAL 300 250 350 West 55 10 35 100 TOTAL 400 250 350 1000 You are interested in knowing if the true Self-­‐reported Science Fiction Knowledge Level category proportions are the same for each regional population. This involves a chi-­‐square test for homogeneity. Analysis Method: Chi-­‐Square Test for Homogeneity A chi-­‐square test for homogeneity investigates if the distribution of a single categorical variable is similar across multiple populations and generally assumes that distinct, independent random sampling from each population has occurred. Note that this is technically a distinct procedure from a chi-­‐square test for independence for the following reasons: • • As stated previously, a test for homogeneity concerns investigating if the distribution of a single categorical variable is similar across multiple populations (based on distinct, independent random sampling from each population). A test for independence concerns the relationship of two categorical variables in a single population (one random sample is selected from the one population of interest). Nonetheless, the steps for executing a chi-­‐square test for homogeneity are remarkably similar to the steps for executing a chi-­‐square test for independence. The only differences are with the statement of hypotheses and the subsequent final statement of your analysis results in context. Null Hypotheses For a chi-­‐square test for homogeneity, the null hypothesis states that the distribution of the population proportions in a categorical variable of interest is the same in all populations of interest. For the Regional Survey example, the null hypothesis is that the distribution of the population proportions for Self-­‐reported Science Fiction Knowledge Level is the same for each region’s population of moviegoers for this film. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 1 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.3: Executing the Chi-­‐Square Test for Homogeneity in Two-­‐Way Tables Alternative Hypothesis For a chi-­‐square test for homogeneity, the alternative hypothesis states that the distribution of the population proportions in a categorical variable of interest is not the same for all populations of interest. For the Regional Survey example, the alternative hypothesis is that the distribution of the population proportions for Self-­‐reported Science Fiction Knowledge Level is not the same for each region’s population of moviegoers for this film. Conditions As before, to conduct a chi-­‐square test for homogeneity, the sample must be a random sample, and all expected counts must be five or greater. As with a chi-­‐square test for independence, in a chi-­‐square test for homogeneity, the expected count for a combination of a row variable category with a column variable category is (row category total × column category total)/grand total for the table As before, when calculating expected counts, it is okay if the expected counts are noninteger values (i.e., they do not have to be whole numbers), and you should generally not round expected counts to whole numbers. Also note that the sum of your expected counts for a given row should equal that row’s total in your sample and the sum of your expected counts for a given column should equal that column’s total in your sample. (1) For the Regional Survey example, record the expected counts in the table below. Verify that the 12 expected counts are all greater than or equal to 5. Verify for each row that the sum of your expected counts equals the row’s total. Verify for each column that the sum of your expected counts equals the column’s total (expected counts for the first column are already provided). The expected counts are as follows: Region Midwest Northeast South West Very Knowledgeable 400 * 300/1000 = 120 400 250 * 300/1000 = 75 350 * 300/1000 Having Little to No Knowledge = 105 TOTAL 300 Moderately Knowledgeable TOTAL 250 350 250 350 100 1000 The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 2 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.3: Executing the Chi-­‐Square Test for Homogeneity in Two-­‐Way Tables Computing the Chi-­‐Square Test Statistic For a chi-­‐square test for homogeneity for a two-­‐way table, compute the chi-­‐square test statistic in the same way that you compute a chi-­‐square statistic for a test for independence (demonstrated and discussed in the previous two lessons). (2) Compute the chi-­‐square test statistic for a test for homogeneity based on the Regional Survey data and the expected counts you developed in Question 1. Use appropriate technology, or develop and fill in a chi-­‐square calculation table similar to those that have been shown in previous lessons. Compute your chi-­‐square test statistic to three decimal places. The chi-­‐square test statistic value is _________. Computing Degrees of Freedom and Computing (or Approximating) the P-­‐Value As before, P-­‐values are computed from chi-­‐square distributions, and the shape, center, and spread of a chi-­‐square distribution are based on degrees of freedom. Similar to a chi-­‐square test for independence, for a chi-­‐square test for homogeneity, degrees of freedom = (number of row variable categories – 1) × (number of column variable categories – 1) (Note: The Total row and Total column presented in a table do not represent a category of the variables of interest and should not be included in the computations above. Any presentations of totals in the table are not considered as categories of a given variable.) (3) In the case where there are three categories of Self-­‐reported Science Fiction Knowledge Level and four categories of Region, how many degrees of freedom will your chi-­‐square test for homogeneity have? (4) Based on the chi-­‐square statistic you computed in Question 2 and the degrees of freedom you determined in Question 3, compute or approximate the P-­‐value for your chi-­‐square test for homogeneity. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 3 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.3: Executing the Chi-­‐Square Test for Homogeneity in Two-­‐Way Tables Deciding and Concluding The rule for determining whether to reject the null hypothesis in a chi-­‐square test for homogeneity is the same as for other hypothesis tests: Reject HO if P-­‐value ≤ α (where α is the significance level). (5) Based on your calculations, at a 1% level of significance, would you reject the null hypothesis? (6) Mindful that you should state your decision in context, based on your decision in Question 5, do your data provide enough evidence to support the claim that the distribution of population proportions for Self-­‐reported Science Fiction Knowledge Level is not the same for each region (at a 1% significance level)? Explain your reasoning. (7) Suppose that a different regional survey had yielded the following data: Regional Survey 2 Self-­‐reported Science Fiction Knowledge Level Region Midwest 98 63 89 250 South 145 82 123 350 West 35 32 33 100 TOTAL 400 250 350 1000 Do these data for Regional Survey 2 provide enough evidence to support the claim that the distribution of population proportions for Self-­‐reported Science Fiction Knowledge Level is not the same for each region? Execute a complete chi-­‐square test for homogeneity by performing the following for this case: • • • • • Very Knowledgeable Moderately Knowledgeable Having Little to No Knowledge TOTAL Northeast 122 73 105 300 State null and alternative hypotheses. State conditions (and examine if they are met). Compute the chi-­‐square test statistic. Compute (or approximate) the P-­‐value. Decide and conclude (using the rule Reject HO if P-­‐value ≤ α and stating your final conclusion in context). Use a 1% significance level for this case. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 4 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.3: Executing the Chi-­‐Square Test for Homogeneity in Two-­‐Way Tables Homework (Note: Portions of this task previously appeared in Lesson 11.1.3.) Prior to the November 2, 2010, election for Maryland governor, the Washington Post conducted a poll (September 22–26, 2010) asking respondents, “If the election for Maryland Governor were held today, for whom would you vote?” An article summarizing the results stated, “A total of 1,448 randomly selected adults in Maryland were interviewed, including … 730 voters likely to cast ballots.” The article summarized the responses of the likely voters by the following categories: Governor Martin O’Malley, Bob Ehrlich, and Other, no opinion. The sample was intended to represent the population of likely Maryland voters for that September time period. Although the exact counts for each response were not listed in the article, based on summary information in the article, the following represents a reasonable tally for the sample of 730 likely voters: Governor Martin O'Malley Bob Ehrlich Other, no opinion 382 responses 302 responses 46 responses A subsequent Washington Post poll conducted October 19–22, 2010, interviewed “2,355 randomly selected adults in Maryland … including … 1,434 voters likely to cast ballots.”1 Similarly, this October sample was intended to represent the population of likely Maryland voters for that October time period. Although the exact counts for each response were also not listed in this article, based on summary information in the article, the following represents a reasonable tally for the sample of 1,434 likely voters: Governor Martin O'Malley Bob Ehrlich Other, no opinion 774 responses 574 responses 86 responses (1) Explain briefly why the proper test for this case is a chi-­‐square test for homogeneity rather than a chi-­‐square test for independence. 1 Davis, A. C., Wagner, J., & Cohen, J. (2010, October 25). Ehrlich appears to be losing GOP traction. The Washington Post. Retrieved from www.washingtonpost.com/wp-­‐dyn/content/article/2010/10/25/AR2010102500002.html. The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 5 Statway Student Handout April 25, 2012 (Full Version 1.0) Supporting Lesson 11.2.3: Executing the Chi-­‐Square Test for Homogeneity in Two-­‐Way Tables (2) Do the data provide sufficient evidence to support the claim that the distribution of responses for the population of likely Maryland voters for the October 19–22 time period is different from the distribution of responses for the population of likely Maryland voters for the September 22–26 time period? Execute a complete chi-­‐square test for homogeneity at a significance level of 5%. A table summarizing the data is provided below. Poll Responses: "If the election for Maryland Governor were held today, for whom would you vote?" September 22 to 26, 2010 October 19 to 22, 2010 Governor Martin O'Malley 382 774 Bob Ehrlich 302 574 Other, no opinion 46 86 TOTAL 730 1434 TOTAL 1156 876 132 2164 The original versions of the Statway™ and Quantway™ courses were created by The Charles A. Dana Center at The University of Texas at Austin under sponsorship of the Carnegie Foundation for the Advancement of Teaching, and are copyright © 2011 by the Carnegie Foundation for the Advancement of Teaching and the Charles A. Dana Center at The University of Texas at Austin. STATWAY™/Statway™ and Quantway™ are trademarks of the Carnegie Foundation for the Advancement of Teaching. The Dana Center’s frontmatter for Statway™ and Quantway™ is available at www.utdanacenter.org/mathways. 6