Download presentation
Presentation is loading. Please wait.
1
Chapter 5 Hypothesis Testing
2
5.1 - Introduction Definition 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
3
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 = H1: p > 0.50
4
The Process Step 2: Calculate the test statistic
For a claim about a single proportion π = sample proportion π= sample size π 0 = number in H0
5
The Process Step 3: Find the critical value
At the 95% confidence level,
6
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
7
The Process Step 5: State the final conclusion
The data support the claim
8
P-value Method Criteria Reject H0 if P-value β€ Ξ±
Do not reject H0 if P-value > Ξ±
9
P-value Method
10
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.
11
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.
12
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
13
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
14
Example 5.2.1 The claim in mathematical notation is p < 0.25
H0: p = 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
15
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
16
Types of Errors
17
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.
18
T-Test Requirements The sample is random
Either the population is normally distributed or n > 30
19
ΞΌ = 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 = 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
20
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
21
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
22
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
23
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
24
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 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.
25
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:
26
Example 5.4.1 Critical value: π§ 0.05 =1.645
P-value = area to the right of π§=3.14 which is Critical region: [1.645, β) Technical conclusion: Reject H0 Final conclusion: The data support the claim
27
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 = π The test statistic is
28
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)
29
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.
30
Example 5.5.1 The parameters about which the claim is made are
Test statistic:
31
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
32
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
33
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.
34
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
35
Requirements Both samples are random The samples are independent
Both populations are normally distributed or both sample sizes are greater than 30
36
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
37
Example 5.6.1 The parameters about which the claim is made are
Assume equal population variances. Test statistic:
38
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
39
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.
40
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.
41
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
42
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
43
Example 5.6.3 Critical region: [1.860, β)
Reject H0 Final conclusion: The data support the claim
44
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
45
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
46
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.
47
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 = =11.20
48
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
49
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β
50
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
51
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
52
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
53
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.
54
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
55
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
56
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 = π H1: At least one mean is different Critical region π β1, 14β4 , β =[3.71, β) - Reject H0 Final conclusion: The data do not support the claim of equal means
57
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
58
Two-way ANOVA Two questions:
Do the four treatments have the same population mean? Do the blocks have any affect on the scores?
59
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
60
ANOVA Table P-value = 0.271 β Do not reject H0
There is not a statistically significant difference between the treatment means P-value = β Reject HB There is a statistically significant difference in the block effects
61
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?
62
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
63
Factorial Experiment
64
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
65
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 = β Reject HA There is a statistically significant difference in the effects of the GPA levels
66
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.