Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 5 Hypothesis Testing

Similar presentations


Presentation on theme: "Chapter 5 Hypothesis Testing"β€” Presentation transcript:

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


Download ppt "Chapter 5 Hypothesis Testing"

Similar presentations


Ads by Google