Chapter 5 Hypothesis Testing

Slides:



Advertisements
Similar presentations
Chapter Goals After completing this chapter, you should be able to:
Advertisements

Inferences About Process Quality
Definitions In statistics, a hypothesis is a claim or statement about a property of a population. A hypothesis test is a standard procedure for testing.
Chi-Square Tests and the F-Distribution
Aaker, Kumar, Day Ninth Edition Instructor’s Presentation Slides
Chapter 5 Hypothesis Testing Introduction Definition Hypothesis testing is a formal approach for determining if data from a sample support.
Business Statistics, A First Course (4e) © 2006 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests Business Statistics, A First Course 4 th Edition.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Statistical Inferences Based on Two Samples Chapter 9.
Copyright © 2004 Pearson Education, Inc.
1 Section 9-4 Two Means: Matched Pairs In this section we deal with dependent samples. In other words, there is some relationship between the two samples.
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests and Nonparametric Tests Statistics for.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved. 1 Understandable Statistics S eventh Edition By Brase and Brase Prepared by: Lynn Smith.
© Copyright McGraw-Hill 2004
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved Lecture Slides Elementary Statistics Eleventh Edition and the Triola.
Chapter 12 The Analysis of Categorical Data and Goodness of Fit Tests.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 12 Tests of Goodness of Fit and Independence n Goodness of Fit Test: A Multinomial.
Chapter 10 Section 5 Chi-squared Test for a Variance or Standard Deviation.
Slide 1 Copyright © 2004 Pearson Education, Inc. Chapter 11 Multinomial Experiments and Contingency Tables 11-1 Overview 11-2 Multinomial Experiments:
Class Seven Turn In: Chapter 18: 32, 34, 36 Chapter 19: 26, 34, 44 Quiz 3 For Class Eight: Chapter 20: 18, 20, 24 Chapter 22: 34, 36 Read Chapters 23 &
Chi Square Test of Homogeneity. Are the different types of M&M’s distributed the same across the different colors? PlainPeanutPeanut Butter Crispy Brown7447.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Chapter 10 Chi-Square Tests and the F-Distribution
Hypothesis Testing – Two Population Variances
Test of independence: Contingency Table
Chapter 12 Chi-Square Tests and Nonparametric Tests
10 Chapter Chi-Square Tests and the F-Distribution Chapter 10
Lecture Slides Elementary Statistics Twelfth Edition
CHAPTER 11 CHI-SQUARE TESTS
Lecture Slides Elementary Statistics Twelfth Edition
Lecture Slides Elementary Statistics Twelfth Edition
Comparing Three or More Means
Testing a Claim About a Mean:  Not Known
CHAPTER 11 Inference for Distributions of Categorical Data
Chapter 8 Hypothesis Testing with Two Samples.
Chapter 10 Chi-Square Tests and the F-Distribution
Overview and Basics of Hypothesis Testing
Elementary Statistics
CONCEPTS OF HYPOTHESIS TESTING
Chapter 11 Goodness-of-Fit and Contingency Tables
Elementary Statistics: Picturing The World
Elementary Statistics
The Analysis of Categorical Data and Chi-Square Procedures
Elementary Statistics
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
Chapter 11: Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
Contingency Tables: Independence and Homogeneity
STAT 312 Introduction Z-Tests and Confidence Intervals for a
Inference on Categorical Data
The Analysis of Categorical Data and Goodness of Fit Tests
CHAPTER 11 Inference for Distributions of Categorical Data
Analyzing the Association Between Categorical Variables
CHAPTER 11 CHI-SQUARE TESTS
Hypothesis Tests for a Standard Deviation
The Analysis of Categorical Data and Goodness of Fit Tests
Goodness of Fit.
CHAPTER 11 Inference for Distributions of Categorical Data
The Analysis of Categorical Data and Goodness of Fit Tests
CHAPTER 11 Inference for Distributions of Categorical Data
Lecture Slides Elementary Statistics Twelfth Edition
Section 11-1 Review and Preview
CHAPTER 11 Inference for Distributions of Categorical Data
The Analysis of Categorical Data and Goodness of Fit Tests
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
Testing a Claim About a Standard Deviation or Variance
STATISTICS INFORMED DECISIONS USING DATA
Presentation transcript:

Chapter 5 Hypothesis Testing

5.1 - Introduction Definition 5.1.1 Hypothesis testing is a formal approach for determining if data from a sample support a claim about a population. State the null and alternative hypotheses Calculate the test statistic Find the critical value (or calculate the P-value) State the technical conclusion State the final conclusion

The Process Claim: More than half the students at a particular university are from out of state Step 1: State the null and alternative hypotheses Define the parameter p = The proportion of all students at the university who are from out of state State the hypotheses H0: p = 0.50 H1: p > 0.50

The Process Step 2: Calculate the test statistic For a claim about a single proportion 𝑝 = sample proportion 𝑛= sample size 𝑝 0 = number in H0

The Process Step 3: Find the critical value At the 95% confidence level,

Reject H0 or Do not reject H0 The Process Step 4: State the technical conclusion One of two statements: Reject H0 or Do not reject H0 Reject H0 if the test statistic falls into the critical region and do not reject H0 otherwise z = 2.36, critical region: [1.645, ∞) Reject H0

The Process Step 5: State the final conclusion The data support the claim

P-value Method Criteria Reject H0 if P-value ≤ α Do not reject H0 if P-value > α

P-value Method

5.2 – Testing Claims about a Proportion 1-Proportion Z-Test Purpose: To test a claim about a single population proportion where the null hypothesis is of the form H0: p = p0. Let x be the number of “successes” in a sample of size n and 𝑝 =𝑥/𝑛 be the sample proportion.

1-Proportion Z-Test The test statistic is The critical value is a z-score and the P-value is an area under the standard normal density curve.

1-Proportion Z-Test Requirements The sample is random The conditions for a binomial distribution must be met (at least approximately) The conditions 𝑛 𝑝 0 ≥5 and 𝑛 (1−𝑝 0 )≥5 are both met

p = The proportion of all M&M candies that are red Example 5.2.1 A student claims that less than 25% of plain M&M candies are red. A random sample of 195 candies contains 37 red candies. Use this data to test the claim at the 0.05 significance level. The parameter about which the claim is made is p = The proportion of all M&M candies that are red

Example 5.2.1 The claim in mathematical notation is p < 0.25 H0: p = 0.25 H1: p < 0.25 The sample proportion is 𝑝 =37/195≈0.190 The critical value is − 𝑧 0.05 =−1.645 The P-value is the area to the left of z = −1.93 which is 0.0268.

Example 5.2.1 Critical region: (−∞, −1.645] z lies in this region P-value <𝛼 Technical conclusion: Reject H0 Final conclusion: The data support the claim

Types of Errors

5.3 – Testing Claims about a Mean T-Test for a Claim About a Single Population Mean Purpose: To test a claim about the mean of a single population where the null hypothesis is of the form H0: 𝜇= 𝜇 0 , and a sample of size 𝑛 has a mean of 𝑥 and standard deviation 𝑠. The test statistic is The critical value is a t-score with n − 1 degrees of freedom and the P-value is an area under the corresponding Student-t density curve.

T-Test Requirements The sample is random Either the population is normally distributed or n > 30

μ = The mean weight of all 12 oz packages Example 5.3.3 A manufacturer of cheese claims that the mean weight of all its 12 oz packages of shredded cheddar is greater than 12 oz. They collect a random sample of n = 36 packages, weigh each, and calculate a sample mean of 𝑥 =12.05 and a sample standard deviation of s = 0.15. Use this data to test the claim at the 0.05 significance level. The parameter about which the claim is made is μ = The mean weight of all 12 oz packages

Example 5.3.3 The claim in mathematical notation is µ > 12 H0: µ = 12 H1: µ > 12 The test statistic is The critical value is 𝑡 0.05 (35)=1.690 The P-value is the area to the right of t = 2 By software: P-value = 0.027

Example 5.3.3 Critical region: [1.690, ∞) t lies in this region P-value <𝛼 Technical conclusion: Reject H0 Final conclusion: The data support the claim

5.4 – Comparing Two Proportions 2-Proportion Z-Test Purpose: To test a claim comparing proportions from two independent populations where the null hypothesis is of the form H0: 𝑝 1 = 𝑝 2 . The test statistic is 𝑛 1 , 𝑛 2 = sample sizes 𝑥 1 , 𝑥 2 = numbesr of “successes” 𝑝 1 , 𝑝 2 = sample proportions

2-Proportion Z-Test Requirements Both samples are random and independent In both samples, the conditions for a binomial distribution are satisfied In both samples, there are at least 5 successes and 5 failures

Example 5.4.1 In a survey of voters in the 2008 Texas Democrat primary, 54% of the 1167 females voted for Hillary Clinton while 47% of the 881 males voted for Clinton (data from www.CNNPolitics.com, March 5, 2008). Use this data to test the claim that of the voters in the 2008 Texas Democrat primary, the proportion of females who voted for Clinton is higher than the proportionof males who voted for Clinton.

Example 5.4.1 The parameters about which the claim is made are 𝑝1= The proportion of all females who voted for Clinton 𝑝2= The proportion of all males who voted for Clinton The claim is 𝑝1>𝑝2 H0: 𝑝1=𝑝2 H1: 𝑝1>𝑝2 Test statistic:

Example 5.4.1 Critical value: 𝑧 0.05 =1.645 P-value = area to the right of 𝑧=3.14 which is 0.0008 Critical region: [1.645, ∞) Technical conclusion: Reject H0 Final conclusion: The data support the claim

5.5 – Comparing Two Variances F-Test Purpose: To test a claim comparing the variances of two independent populations where the null hypothesis is of the form H0: 𝜎 1 2 = 𝜎 2 2 . The test statistic is

F-Test The critical value is an F-value with 𝑛=( 𝑛 1 −1) and 𝑑=( 𝑛 2 −1) degrees of freedom Requirements Both samples are random and independent Both populations are normally distributed (strict requirement)

Example 5.5.1 Among the 𝑛1=10 subjects who followed diet A, their mean weight loss was 𝑥 1 =4.5 lb with a standard deviation of 𝑠1=6.5 lb. Among the 𝑛2=10 subjects who followed diet B, their mean weight loss was 𝑥 2 =3.2 lb with a standard deviation of 𝑠2=4.5 lb. Test the claim that the two populations have the same variance.

Example 5.5.1 The parameters about which the claim is made are Test statistic:

Example 5.5.1 Critical value: 𝑓 0.05/2 9, 9 =4.03 P-value = area to the right of 𝑓=4.03 Using software: P-value = 0.288 Critical region: [4.03, ∞) Technical conclusion: Do not reject H0 Final conclusion: There is not sufficient evidence to reject the claim

5.6 – Comparing Two Means 2-Sample T-Tests Purpose: To test a claim regarding the means of two independent populations where the null hypothesis is of the form H0: 𝜇1−𝜇2=𝑐. Select random and independent samples from each population Calculate the mean and variance of each sample

Equal Population Variances Test statistic: Critical value: t-score with 𝑛1+𝑛2−2 degrees of freedom P-value is an area under the Student-t density curve with this number of degrees of freedom.

Unequal Population Variances Test statistic: The critical value is a t-score with r degrees of freedom where r is If r is not an integer, then round it down to the nearest whole number

Requirements Both samples are random The samples are independent Both populations are normally distributed or both sample sizes are greater than 30

Example 5.6.1 Among the 𝑛1=10 subjects who followed diet A, their mean weight loss was 𝑥 1 =4.5 lb with a standard deviation of 𝑠1=6.5 lb. Among the 𝑛2=10 subjects who followed diet B, their mean weight loss was 𝑥 2 =3.2 lb with a standard deviation of 𝑠2=4.5 lb. Test the claim that the two populations have the same variance

Example 5.6.1 The parameters about which the claim is made are Assume equal population variances. Test statistic:

Example 5.6.1 Critical value: 𝑡 0.05 (10+10−2)=1.734 P-value = area to the right of 𝑡=0.52 Using software: P-value = 0.305 Critical region: [1.734, ∞) Technical conclusion: Do not reject H0 Final conclusion: The data do not support the claim

Paired T-Test Purpose: To test the claim that a set of paired data 𝑥𝑖, 𝑦𝑖 , 𝑖=1,…, 𝑛 come from a population in which the differences (𝑥−𝑦) have a mean less than, greater than, or equal to 0. Let 𝜇𝑑 denote the population mean of the differences. The null hypothesis is H0: 𝜇𝑑 =0 Calculate the differences 𝑥 𝑖 − 𝑦 𝑖 , 𝑖 = 1,…, 𝑛 Use the differences from step 3 and the T-test from Section 5.3 to test the claim.

Example 5.6.3 At a large university, freshman students are required to take an introduction to writing class. Students are given a survey on their attitudes toward writing at the beginning and end of the class. Each student receives a score between 0 and 100 (the higher the score, the more favorable his or her attitude toward writing). Test the claim that the scores improve from the beginning to the end.

Example 5.6.3 These data come in “matched pairs” They are not independent We cannot use a 2-sample T-test If scores improve, then the differences (End – Beginning) would be positive We test the claim 𝜇 𝑑 >0

Example 5.6.3 State the hypotheses 𝜇 𝑑 = population mean of (end − beginning) H0: 𝜇𝑑=0 H1:𝜇𝑑>0 Test statistic: Mean and standard deviation of sample differences: 𝑥 =3.256, 𝑠=4.215 Critical value: 𝑡 0.05 (9−1)=1.860 P-value: Area to the right of 2.32 which is 0.025

Example 5.6.3 Critical region: [1.860, ∞) Reject H0 Final conclusion: The data support the claim

5.7 – Goodness-of-fit Test Chi-square Goodness-of-fit Test Purpose: To test the claim that a random variable X has some particular distribution. Divide the range of X into k categories Observe values of X and record frequencies of the categories, 𝑂 𝑖 Calculate expected frequencies of the categories, 𝐸 𝑖 Calculate the test statistic

Chi-square Goodness-of-fit Test Critical value: 𝜒 𝛼 2 (𝑘−1) P-value = Area to the right of c under the 𝜒 2 (𝑘−1) density curve If 𝑐 >𝜒 𝛼 2 (𝑘−1) or P-value <𝛼, then reject the claim that X has the claimed distribution Requirements The data have been randomly chosen Each expected frequency is at least 5

Example 5.7.3 A student simulated dandelions in a lawn by randomly placing 300 dots on a piece of paper with an area of 100 in2. He then randomly chose 75 different 1 in2 sections of paper and counted the number of dots in each section.

Example 5.7.3 Let X = number of dots in a 1 in2 section Claim: X has a Poisson distribution with 𝜆=3 Let 𝑝𝑖=𝑃(𝑋=𝑖), 𝑖=0,…,6 If the claim were true, then, for instance Denote this number 𝜋 1 𝐸 1 =75 0.149 =11.20

Example 5.7.3 Critical value: Final conclusion: 𝜒 0.05 2 (7−1) =12.59 Do not reject H0 Final conclusion: It is reasonable to assume that X has Poisson distribution with 𝜆=3

5.8 – Test of Independence Two students want to determine if their university men’s basketball team benefits from home-court advantage. They randomly select 205 games played by the team and record if each one was played at home or away and if the team won or lost (data collected by Emily Hudgins and Courtney Santistevan, 2009). “Contingency Table”

Chi-square Test of Independence Purpose: To test if the row events of a contingency table are independent of the column events. Let 𝑛= total number of observations 𝑎= number of rows 𝑏= number of columns 𝑅𝑖 = sum of the i th row 𝐶𝑗 = sum of the j th column 𝑂𝑖𝑗= frequency in the i th row and j th column H0: The rows are independent of the columns

Test of Independence Test statistic: Critical value: 𝜒 𝛼 2 [ 𝑎−1 𝑏−1 ] P-value = area to the right of 𝑐 Reject H0 if 𝑐> c.v. Requirements The data in the table represent frequency counts and are randomly selected All expected frequencies are at least 5

Example Final Conclusion Critical value: 𝜒 0.05 2 2−1 2−1 =3.841 Reject H0 Final Conclusion The result is not independent of the location

5.9 – One-way ANOVA A seed company plants four types of new corn seed on several plots of land and records the yield (in bushels/acre) of each plot as shown below. Test the claim that the four types of seed produce the same mean yield.

One-way ANOVA Purpose: To test for equality of two or more populations means Null hypothesis: H0: 𝜇 1 = ⋯= 𝜇 𝑘 𝑁= total number of data values Test statistic

One-way ANOVA Critical region: [ 𝑓 𝛼 𝑘−1, 𝑁−𝑘 , ∞) P-value: area to the right of F under the F-distribution density curve with k − 1 and N − k degrees of freedom Requirements (“loose” requirements) The populations are normally distributed The populations have the same variance The samples are random and independent Definition: Treatment (or factor) A characteristic that distinguishes the different populations (or groups) from each other

H0: 𝜇 1 = 𝜇 2 = 𝜇 3 = 𝜇 4 H1: At least one mean is different Example 5.9.3 Let 𝜇 1 = mean yield of Type A, etc H0: 𝜇 1 = 𝜇 2 = 𝜇 3 = 𝜇 4 H1: At least one mean is different Critical region 𝑓 0.05 4−1, 14−4 , ∞ =[3.71, ∞) - Reject H0 Final conclusion: The data do not support the claim of equal means

5.10 – Two-way ANOVA Randomized Block Design A statistics professor is comparing four different delivery methods for her introduction to statistics class: face-to-face, online, hybrid, and video (called the treatments). She divides the population of students into three groups according to their overall GPA: high, middle, and low. (called blocks) She randomly chooses four students from each block and randomly assigns each one to a class using one of the delivery methods At the end of the semester she records each student’s overall grade

Two-way ANOVA Two questions: Do the four treatments have the same population mean? Do the blocks have any affect on the scores?

Two-way ANOVA Parameters Null hypotheses 𝜇 𝑖 = ith treatment mean 𝛽 𝑖 = jth “block effect” (a measure of the effect that block i has on the score) Null hypotheses

ANOVA Table P-value = 0.271 – Do not reject H0 There is not a statistically significant difference between the treatment means P-value = 0.008 – Reject HB There is a statistically significant difference in the block effects

Factorial Experiment The statistics professors randomly chooses 16 students from each GPA level, randomly assigns four to each delivery method, and records their scores at the end of the semester. Three questions: Is there any difference between the population mean scores of the delivery methods? Does the GPA level affect the scores? Does the interaction of the delivery method and GPA level affect the scores?

Factorial Experiment 3×4 factorial experiment with 4 replications per treatment Factors GPA (factor A) Delivery Method (factor B) Levels 3 levels of GPA 4 levels of Delivery Method

Factorial Experiment

Factorial Experiment Parameters Null hypotheses 𝜇 𝑗 = population mean of the jth delivery method 𝛼 𝑖 = effect of the ith GPA level on the score 𝛾 𝑖𝑗 =“interaction effect” of the ith GPA level on the jth delivery method Null hypotheses

ANOVA Table P-value = 0.176 – Do not reject HB There is not a statistically significant difference between the means of the delivery methods P-value = 0.000 – Reject HA There is a statistically significant difference in the effects of the GPA levels

ANOVA Table P-value = 0.004 – Reject HAB Overall There is a statistically significant difference in the interaction effects Overall There is not a “best” method Consider certain delivery methods to certain GPA levels