Search Header Logo
AP STATS CP 6 MS. ROJAS

AP STATS CP 6 MS. ROJAS

Assessment

Presentation

Mathematics

9th Grade - University

Hard

CCSS
HSS.IC.B.4

Standards-aligned

Created by

Diana Rojas

FREE Resource

27 Slides • 5 Questions

1

Calculating a confidence interval or a test statistic and p-value are generally done with statistical software. It is important, then, to focus not on the calculations, but rather on

1. choosing the correct procedure

2. understanding when the procedures do or do not apply, and

3. interpreting the results.

CHAPTER 6. INFERENCE FOR CATEGORICAL DATA

2

Choosing the correct procedure requires understanding the type of data and the method of data collection.

All of the inference procedures in Chapter 6 are for categorical variables.

Here we list the five tests encountered in this chapter:

  1. 1-proportion Z-test

  2. 2-proportion Z-test

  3. χ 2 goodness of fit test

  4. χ 2 test for homogeneity

  5. χ 2 test for independence

CHAPTER 6. INFERENCE FOR CATEGORICAL DATA

3

media

​1-proportion Z-test

These are the steps for carrying out a hypothesis test (Z-tests for short) for a proportion using the five step framework introduced in the previous chapter.

Most of the confidence interval procedures and hypothesis tests of this book involve: a point estimate, the standard error for the point estimate, and an assumption about the shape of the sampling distribution of the point estimate. In this section, we explore inference when the parameter of interest is a proportion.

4

Example : A Gallup poll conducted in March of 2016 found that 54% of respondents oppose nuclear energy. This was the first time since Gallup first asked the question in 1994 that a majority of respondents said they oppose nuclear energy. The survey was based on telephone interviews from a random sample of 1,019 adults in the United States. Does this poll provide evidence that greater than half of U.S. adults oppose nuclear energy? Carry out an appropriate test at the 0.10 significance level. Use the five step framework to organize your work.

media

5

media
media

6

Open Ended

Exercise 1: Some people claim that they can tell the difference between a diet soda and a regular soda in the first sip. A researcher wanting to test this claim randomly sampled 80 such people. He then filled 80 plain white cups with soda, half diet and half regular through random assignment, and asked each person to take one sip from their cup and identify the soda as diet or regular. 53 participants correctly identified the soda.

(a) Do these data provide strong evidence that these people are able to detect the difference between diet and regular soda, in other words, are the results significantly better than just random guessing? Carry out an appropriate test and include all steps of the Identify, Choose, Check, Calculate, Conclude framework.

(b) Interpret the p-value in this context.

7

  • https://www.youtube.com/watch?v=TICHc59wAA4&list=PLkIselvEzpM4AQEGTWF95pYy3ZqwTXkHc

  • (a) Identify: H0: p = 0.5. HA: p > 0.5. α = 0.05. Choose: 1-proportion Z-test. Check: Independence (random sample, < 10% of population) is satisfied, as is the success-failure conditions (using p0 = 0.5, we expect 40 successes and 40 failures). Calculate: Z = 2.91 → p- value = 0.0018. Conclude: Since the p-value < 0.05, we reject the null hypothesis. The data provide strong evidence that the rate of correctly identifying a soda for these people is significantly better than just by random guessing. (b) The p-value represents the following conditional probability: P(ˆp > 0.6625 | p = 0.5). If in fact people cannot tell the difference between diet and regular soda and they randomly guess, the probability of getting a random sample of 80 people where 66.25% (53/80) or higher identify a soda correctly would be 0.0018.

​Exercise 1 - Answers

8

2-proportion Z-test

  • When the null hypothesis is that the two populations proportions are equal to each other, use the pooled sample proportion, below.

  • When there are two samples or treatments and the parameter of interest is a difference of proportions, to the right.

media
media

9

​Example: A Gallup poll conducted in March of 2016 found that 54% of respondents oppose nuclear energy. This was the first time since Gallup first asked the question in 1994 that a majority of respondents said they oppose nuclear energy. The survey was based on telephone interviews from a random sample of 1,019 adults in the United States. Does this poll provide evidence that greater than half of U.S. adults oppose nuclear energy? Carry out an appropriate test at the 0.10 significance level. Use the five step framework to organize your work.

media

10

media
media

11

Open Ended

Question image

Exercise 2: Sleep deprived transportation workers. The National Sleep Foundation conducted a survey on the sleep habits of randomly sampled transportation workers and randomly sampled non-transportation workers that serve as a “control” for comparison. The results of the survey are shown to the left.

Conduct a hypothesis test to evaluate if these data provide evidence of a difference between the proportion of truck drivers and non-transportation workers (the “control” group) who get less than 6 hours of sleep per day (i.e. are considered sleep deprived). Include all steps of the Identify, Choose, Check, Calculate, Conclude framework

12

  • Identify: Subscript C means control group. Subscript T means truck drivers. H0 : pC = pT . HA : pC 6= pT . α = 0.05. Choose: 2-proportion Ztest. Check: Independence is satisfied (random samples that are independent), as is the success-failure condition, which we check using the pooled proportion (ˆppool = 70/495 = 0.141). Calculate: Z = −1.65 → p-value = 0.0989. Conclude: Since the p-value is > α, we fail to reject H0. The data do not provide strong evidence that the rates of sleep deprivation are different for non-transportation workers and truck drivers.

​Exercise 2 - Answers

13

​χ 2 goodness of fit test

When we want to see if a model is a good fit for observed data or if data is representative of a particular population, we can use a χ 2 goodness of fit test. This test is used when there is one variable with multiple categories (bins) that can be arranged in a one-way table.

media

14

​Example:

media
media

15

​Example cont......

media

16

media

17

media

18

Open Ended

Exercise 3: A professor using an open source introductory statistics book predicts that 60% of the students will purchase a hard copy of the book, 25% will print it out from the web, and 15% will read it online. At the end of the semester he asks his students to complete a survey where they indicate what format of the book they used. Of the 126 students, 71 said they bought a hard copy of the book, 30 said they printed it out from the web, and 25 said they read it online.

(a) State the hypotheses for testing if the professor’s predictions were inaccurate.

(b) How many students did the professor expect to buy the book, print the book, and read the book exclusively online?

(c) List the conditions required for the chi-square goodness of fit test and discuss whether they are satisfied.

(d) Assume conditions are sufficiently met. Calculate the chi-square statistic, the degrees of freedom associated with it, and the p-value.

(e) Based on the p-value calculated in part (d), what is the conclusion of the hypothesis test? Interpret your conclusion in this context.

19

  • (a) H0: The distribution of the format of the book used by the students follows the professor’s predictions. HA: The distribution of the format of the book used by the students does not follow the professor’s predictions. (b) Ehard copy = 126 × 0.60 = 75.6. Eprint = 126 × 0.25 = 31.5. Eonline = 126 × 0.15 = 18.9. (c) Independence: The sample is not random. However, if the professor has reason to believe that the proportions are stable from one term to the next and students are not affecting each other’s study habits, independence could be reasonable. Sample size: All expected counts are at least 5. (d) χ 2 = 2.32, df = 2, p-value = 0.313. (e) Since the p-value is large, we fail to reject H0. The data do not provide strong evidence indicating the professor’s predictions were statistically inaccurate.

​Exercise 3 - Answers

20

χ 2 test for homogeneity

When there are multiple random samples or treatments and we are comparing the distribution of a categorical variable across several groups, e.g. comparing the distribution of rural/urban/suburban dwellers among 4 states, the hypotheses can be written as follows:

We test these hypotheses at the α significance level using a χ 2 test for homogeneity.

media
media

21

​Example:

media

22

​Example Cont.

media

23

​χ 2 test for independence

When there is one random sample and we are looking for association or dependence between two categorical variables, e.g. testing for an association between gender and political party, the hypotheses can be written as:

We test these hypotheses at the α significance level using a χ 2 test for independence.

media
media

24

​Example

​χ 2 goodness of fit test

media

25

​Example Cont.

​χ 2 goodness of fit test

media

26

media
media

27

​χ 2 goodness of fit test

media

28

Open Ended

Question image

Exercise 4: A survey asked 827 randomly sampled registered voters in California “Do you support? Or do you oppose? Drilling for oil and natural gas off the Coast of California? Or do you not know enough to say?” To the left is the distribution of responses, separated based on whether or not the respondent has a college degree.44 Complete a chi-square test for these data to test whether there is an association between opinions regarding offshore drilling for oil and having a college degree. Include all steps of the Identify, Choose, Check, Calculate, Conclude framework.

29

  • https://www.youtube.com/watch?v=lpFYHCgXlg0&list=PLkIselvEzpM4AQEGTWF95pYy3ZqwTXkHc

  • Identify: H0: Opinions regarding offshore drilling for oil and having a college degree are independent. HA: Opinions regarding offshore drilling for oil and having a college degree are dependent. α = 0.05. Choose: chi-square test for independence Check:

    Erow 1,col 1 = 151.5 Erow 1,col 2 = 134.5 Erow 2,col 1 = 162.1 Erow 2,col 2 = 143.9 Erow 3,col 1 = 124.5 Erow 3,col 2 = 110.5

    Independence: The sample is random, and from less than 10% of the population, so independence between observations is reasonable. Expected counts: All expected counts are at least 5. Calculate: χ 2 = 11.47, df = 2 → p-value = 0.003. Conclude: Since the pvalue < α, we reject H0. There is strong evidence that there is an association between support for offshore drilling and having a college degree.

​Exercise 4 - Answers

30

Open Ended

Exercise 5:

Consider each of the following planned studies. Determine (i) if a goodness of fit test, test for homogeneity, or test for independence is more appropriate, and (ii) how many degrees of freedom should be used for the test.

(a) A state is conducting a study to better understand pay for tradespeople in the state’s three largest cities. In each city, the state will take a random sample of tradespeople and estimate the proportion who made at least $100,000 in each of the cities. In their final report, they would also like to note whether that proportion varies across the three cities.

(b) A particular gene has 3 variants that can be found in proportions p1 = 0.15, p2 = 0.60, and p3 = 0.25 in the general population. Scientists suspect different variants of this gene might indicate an elevated risk for a particular genetic disease, and one way to evaluate this is to see if the general population distribution is the same in patients with the disease. The scientists will sample 450 patients with the disease and identify which variant each patient has.

(c) A candy company produces candy pieces in 5 different colors that are mixed into bags. The colors should be in the following proportions: 15% green, 22% orange, 20% yellow, 24% red, and 19% purple. As a quality control check, the company randomly samples 1500 candy pieces and wants to determine if the target proportions match those of the observed distribution.

31

  • (a) Since there are 3 independent random samples here, we do a test for homogeneity. df = 2.

  • (b) Goodness of fit test, df = 2.

  • (c) Goodness of fit test, df = 4.

​Exercise 5 - Answers

32

​Other Resources

Calculating a confidence interval or a test statistic and p-value are generally done with statistical software. It is important, then, to focus not on the calculations, but rather on

1. choosing the correct procedure

2. understanding when the procedures do or do not apply, and

3. interpreting the results.

CHAPTER 6. INFERENCE FOR CATEGORICAL DATA

Show answer

Auto Play

Slide 1 / 32

SLIDE

Discover more resources for Mathematics