1 Chapter 8 Hypothesis Testing 8.2 Basics of Hypothesis Testing 8.3 Testing about a Proportion p 8.4 Testing about a Mean µ (σ known) 8.5 Testing about.

Slides:



Advertisements
Similar presentations
Chapter 7 Hypothesis Testing
Advertisements

Introduction to Hypothesis Testing
Statistics.  Statistically significant– When the P-value falls below the alpha level, we say that the tests is “statistically significant” at the alpha.
Testing a Claim about a Proportion Assumptions 1.The sample was a simple random sample 2.The conditions for a binomial distribution are satisfied 3.Both.
Chapter 8 Hypothesis Testing
Hypothesis Testing A hypothesis is a claim or statement about a property of a population (in our case, about the mean or a proportion of the population)
Copyright © 2014 by McGraw-Hill Higher Education. All rights reserved.
Chapter 10 Section 2 Hypothesis Tests for a Population Mean
Hypothesis Tests Chapter 7 Prof. Felix Apfaltrer Office:N518 Phone: Office hours: Tue, Thu 10:30am-12:00 pm.
8-2 Basics of Hypothesis Testing
8-3 Testing a Claim about a Proportion
Copyright © 2014, 2013, 2010 and 2007 Pearson Education, Inc. Chapter Hypothesis Tests Regarding a Parameter 10.
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.
1 Chapter 9 Inferences from Two Samples In this chapter we will deal with two samples from two populations. The general goal is to compare the parameters.
STATISTICS ELEMENTARY MARIO F. TRIOLA Chapter 7 Hypothesis Testing
Lecture Slides Elementary Statistics Eleventh Edition
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved Chapter 8 Hypothesis Testing 8-1 Review and Preview 8-2 Basics of Hypothesis.
Copyright © 2010, 2007, 2004 Pearson Education, Inc Lecture Slides Elementary Statistics Eleventh Edition and the Triola Statistics Series by.
Lecture Slides Elementary Statistics Twelfth Edition
Overview Definition Hypothesis
Copyright © 2004 Pearson Education, Inc.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved Section 8-1 Review and Preview.
Sections 8-1 and 8-2 Review and Preview and Basics of Hypothesis Testing.
Section 9.1 Introduction to Statistical Tests 9.1 / 1 Hypothesis testing is used to make decisions concerning the value of a parameter.
Chapter 8 Hypothesis Testing
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved Section 8-5 Testing a Claim About a Mean:  Not Known.
Overview Basics of Hypothesis Testing
Copyright © 2010, 2007, 2004 Pearson Education, Inc Lecture Slides Elementary Statistics Eleventh Edition and the Triola Statistics Series by.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Section 9-2 Inferences About Two Proportions.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 9 Hypothesis Testing.
Slide Slide 1 Chapter 8 Hypothesis Testing 8-1 Overview 8-2 Basics of Hypothesis Testing 8-3 Testing a Claim about a Proportion 8-4 Testing a Claim About.
Section 9.2 Testing the Mean  9.2 / 1. Testing the Mean  When  is Known Let x be the appropriate random variable. Obtain a simple random sample (of.
Hypothesis testing Chapter 9. Introduction to Statistical Tests.
1 Section 8.5 Testing a claim about a mean (σ unknown) Objective For a population with mean µ (with σ unknown), use a sample to test a claim about the.
Chapter 9 Inferences from Two Samples
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved Section 8-3 Testing a Claim About a Proportion.
Slide Slide 1 Section 8-3 Testing a Claim About a Proportion.
1 Section 8.3 Testing a claim about a Proportion Objective For a population with proportion p, use a sample (with a sample proportion) to test a claim.
Copyright © 2010, 2007, 2004 Pearson Education, Inc Section 8-2 Basics of Hypothesis Testing.
Copyright © 2010, 2007, 2004 Pearson Education, Inc Section 8-2 Basics of Hypothesis Testing.
Slide Slide 1 Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley. Overview.
Slide Slide 1 Section 8-4 Testing a Claim About a Mean:  Known.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved Lecture Slides Elementary Statistics Eleventh Edition and the Triola.
Testing Hypotheses about a Population Proportion Lecture 29 Sections 9.1 – 9.3 Fri, Nov 12, 2004.
© Copyright McGraw-Hill 2004
SAA 2023 COMPUTATIONALTECHNIQUE FOR BIOSTATISTICS Semester 2 Session 2009/2010 ASSOC. PROF. DR. AHMED MAHIR MOKHTAR BAKRI Faculty of Science and Technology.
Testing Hypotheses about a Population Proportion Lecture 31 Sections 9.1 – 9.3 Wed, Mar 22, 2006.
Understanding Basic Statistics Fourth Edition By Brase and Brase Prepared by: Lynn Smith Gloucester County College Chapter Nine Hypothesis Testing.
1 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.
1 Section 8.2 Basics of Hypothesis Testing Objective For a population parameter (p, µ, σ) we wish to test whether a predicted value is close to the actual.
1 Section 8.5 Testing a claim about a mean (σ unknown) Objective For a population with mean µ (with σ unknown), use a sample to test a claim about the.
Copyright© 1998, Triola, Elementary Statistics by Addison Wesley Longman 1 Testing a Claim about a Mean: Large Samples Section 7-3 M A R I O F. T R I O.
Slide Slide 1 Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley. Lecture Slides Elementary Statistics and the Triola Statistics.
Created by Erin Hodgess, Houston, Texas Section 7-1 & 7-2 Overview and Basics of Hypothesis Testing.
Copyright © 2010, 2007, 2004 Pearson Education, Inc Lecture Slides Elementary Statistics Eleventh Edition and the Triola Statistics Series by.
1 Section 8.4 Testing a claim about a mean (σ known) Objective For a population with mean µ (with σ known), use a sample (with a sample mean) to test a.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved Lecture Slides Elementary Statistics Eleventh Edition and the Triola.
Chapter 9 Hypothesis Testing Understanding Basic Statistics Fifth Edition By Brase and Brase Prepared by Jon Booze.
Slide Slide 1 Hypothesis Testing 8-1 Overview 8-2 Basics of Hypothesis Testing Chapter 8.
Lecture Slides Elementary Statistics Twelfth Edition
Chapter Nine Hypothesis Testing.
Lecture Slides Elementary Statistics Twelfth Edition
Review and Preview and Basics of Hypothesis Testing
Lecture Slides Essentials of Statistics 5th Edition
Elementary Statistics
Overview and Basics of Hypothesis Testing
Testing a Claim About a Mean:  Known
Chapter 8 Hypothesis Testing
Presentation transcript:

1 Chapter 8 Hypothesis Testing 8.2 Basics of Hypothesis Testing 8.3 Testing about a Proportion p 8.4 Testing about a Mean µ (σ known) 8.5 Testing about a Mean µ (σ unknown) 8.6 Testing about a Standard Deviation σ

2 Section 8.2 Basics of Hypothesis Testing Objective For a population parameter (p, µ, σ) we wish to test whether a predicted value is close to the actual value (based on sample values).

3 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 a claim about a property of a population. Ch. 8 will cover hypothesis tests about a Proportion p Mean µ (σ known or σ unknown) Standard Deviation σ

4 Claim: The XSORT method of gender selection increases the likelihood of birthing a girl. (i.e. increases the proportion of girls born) To test the claim, use a hypothesis test (about a proportion) on a sample of 14 couples: If 6 or 7 have girls, the method probably doesn’t increase the probability of birthing a girl. If 13 or 14 couples have girls, this method probably does increase the probability of birthing a girl. This will be explained in Section 8.3 Example 1

5 Rare Event Rule for Inferential Statistics If, under a given assumption, the probability of a particular event is exceptionally small, we conclude the assumption is probably not correct. Example: Suppose we assume the probability of pigs flying is If we find a farm with 100 flying pigs, we conclude our assumption probably wasn’t correct

6 Components of a Hypothesis Test Null Hypothesis: H 0 Alternative Hypothesis: H 1

7 Null Hypothesis: H 0 The null hypothesis (denoted H 0 ) is a statement that the value of a population parameter (p, µ, σ) is equal to some claimed value. We test the null hypothesis directly. It will either reject H 0 or fail to reject H 0 (i.e. accept H 0 ) Example H 0 : p = 0.6 H 1 : p < 0.6

8 The alternative hypothesis (denoted H 1 ) is a statement that the parameter has a value that somehow differs from the null hypothesis. The difference will be one of, ≠ (less than, greater than, doesn’t equal) Alternative Hypothesis: H 1 Example H 0 : p = 0.6 H 1 : p < 0.6

9 The null hypothesis must say “equal to”: H 0 : p = 0.5 The alternative hypothesis states the difference: H 1 : p > 0.5 Here, the original claim is the alternative hypothesis Claim: The XSORT method of gender selection increases the likelihood of birthing a girl. Let p denote the proportion of girls born. The claim is equivilent to “p>0.5” Example 1

10 If we reject the null hypothesis, then the original clam is accepted. Conclusion: The XSORT method increases the likelihood of having a baby girl. If we fail to reject the null hypothesis, then the original clam is rejected. Conclusion: The XSORT method does not increase the likelihood of having a baby girl. Claim: The XSORT method of gender selection increases the likelihood of birthing a girl. Continued Note: We always test the null hypothesis Example 1

11 Claim: For couples using the XSORT method, the likelihood of having a girl is 50% Again, let p denote the proportion of girls born. The claim is equivalent to “p=0.5” The null hypothesis must say “equal to”: H 0 : p = 0.5 The alternative hypothesis states the difference: H 1 : p ≠ 0.5 Here, the original claim is the null hypothesis Example 2

12 If we reject the null hypothesis, then the original clam is rejected. Conclusion: For couples using the XSORT method, the likelihood of having a girl is not 0.5 If we fail to reject the null hypothesis, then the original clam is accepted. Conclusion: For couples using the XSORT method, the likelihood of having a girl is indeed 0.5 Claim: For couples using the XSORT method, the likelihood of having a girl is 50% Continued Note: We always test the null hypothesis Example 2

13 Claim: For couples using the XSORT method, the likelihood of having a girl is at least 50% Again, let p denote the proportion of girls born. The claim is equivalent to “p ≥ 0.5” The null hypothesis must say “equal to”: H 0 : p = 0.5 The alternative hypothesis states the difference: H 1 : p < 0.5 Here, the original claim is the null hypothesis we can’t use ≥ or ≤ in the alternative hypothesis, so we test the negation Example 3

14 Claim: For couples using the XSORT method, the likelihood of having a girl is at least 50% Continued If we reject the null hypothesis, then the original clam is rejected. Conclusion: For couples using the XSORT method, the likelihood of having a girl is less than 0.5 If we fail to reject the null hypothesis, then the original clam is accepted. Conclusion: For couples using the XSORT method, the likelihood of having a girl is at least 0.5 Note: We always test the null hypothesis Example 3

15 General rules If the null hypothesis is rejected, the alternative hypothesis is accepted. H 0 rejected → H 1 accepted If the null hypothesis is accepted, the alternative hypothesis is rejected. H 0 accepted → H 1 rejected Acceptance or rejection of the null hypothesis is called an initial conclusion. The final conclusion is always expressed in terms of the original claim. Not in terms of the null hypothesis or alternative hypothesis.

16 Type I Error A Type I error is the mistake of rejecting the null hypothesis when it is actually true. Also called a “True Negative” True: means the actual hypothesis is true Negative: means the test rejected the hypothesis The symbol    (alpha) is used to represent the probability of a type I error.

17 Type II Error A Type II error is the mistake of accepting the null hypothesis when it is actually false. Also called a “False Positive” False: means the actual hypothesis is false Positive: means the test failed to reject the hypothesis The symbol    (beta) is used to represent the probability of a type II error.

18 Type I and Type II Errors

19 Claim: A new medication has greater success rate (p) than that of the old (existing) machine (p 0 ) p: Proportion of success for the new medication p 0 : Proportion of success for the old medication The claim is equivalent to “p > p 0 ” Null hypothesis: H 0 : p = p 0 Alternative hypothesis: H 1 : p > p 0 Here, the original claim is the null hypothesis Example 4

20 Continued Type I error H 0 is true, but we reject it → We accept the claim So we adopt the new (inefficient, potentially harmful) medicine. (This is called a critical error, must be avoided) Type II error H 1 is true, but we reject it → We reject the claim So we decline the new medicine and continue with the old one. (no direct harm…) Claim: A new medication has greater success rate (p) than that of the old (existing) machine (p 0 ) H 0 : p = p 0 H 1 : p > p 0 Example 4

21 Significance Level The probability of a type I error (denoted  ) is also called the significance level of the test. Characterizes the chance the test will fail. (i.e. the chance of a type I error) Used to set the “significance” of a hypothesis test. (i.e. how reliable the test is in avoiding type I errors) Lower significance → Lower chance of type I error Values used most:  = 0.1, 0.05, 0.01 (i.e. 10%, 5%, 1%, just like with CIs)

22 Consider a parameter (p, µ, σ, etc.) The “guess” for the parameter will have a probability that follows a certain distribution (z, t, χ 2,etc.) Note: This is just like what we used to calculate CIs. Using the significance level α, we determine the region where the guessed value becomes unusual. This is known as the critical region. The region is described using critical value(s). (Like those used for finding confidence intervals) Critical Region

23 p follows a z-distribution If we guess p > p 0 the critical region is defined by the right tail whose area is α If we guess p < p 0 the critical region is defined by the left tail whose area is α If we guess p ≠ p 0 the critical region is defined by the two tails whose areas are α/2 tαtα -t α -t α/2 t α/2 Example

24 1. State the H 0 and H 1 2. Compute the test statistic Depends on the value being tested 3. Compute the critical region for the test statistic Depends on the distribution of the test statistic (z, t, χ 2 ) Depends on the significance level α Found using the critical values 4. Make an initial conclusion from the test Reject H 0 (accept H 1 ) if the test statistic is within the critical region Accept H 0 if test statistic is not within the critical region 5. Make a final conclusion about the claim State it in terms of the original claim Testing a Claim Using a Hypothesis Test

25 H 0 : p = 0.5 H 1 : p > 0.5 Claim: The XSORT method of gender selection increases the likelihood of birthing a girl. Suppose 14 couples using XSORT had 13 girls and 1 boy. Test the claim at a 5% significance level 1. State H 0 and H 1 We accept the claim 2. Find the test statistic 3. Find the critical region 4. Initial conclusion 5. Final conclusion Example 5

26

27 Section 8.3 Testing a claim about a Proportion Objective For a population with proportion p, use a sample (with a sample proportion) to test a claim about the proportion. Testing a proportion uses the standard normal distribution (z-distribution)

28 Notation

29 (1) The sample used is a a simple random sample (i.e. selected at random, no biases) (2) Satisfies conditions for a Binomial distribution (3) n p 0 ≥ 5 and n q 0 ≥ 5 Requirements Note: p 0 is the assumed proportion, not the sample proportion Note: 2 and 3 satisfy conditions for the normal approximation to the binomial distribution

30 Test Statistic Denoted z (as in z-score) since the test uses the z-distribution.

31 If the test statistic falls within the critical region, reject H 0. If the test statistic does not fall within the critical region, fail to reject H 0 (i.e. accept H 0 ). Traditional method:

32 Types of Hypothesis Tests: Two-tailed, Left-tailed, Right-tailed The tails in a distribution are the extreme regions where values of the test statistic agree with the alternative hypothesis

33 Left-tailed Test “<” H 0 : p = 0.5 H 1 : p < 0.5  significance level Area =  -z  (Negative)

34 Right-tailed Test “>” H 0 : p = 0.5 H 1 : p > 0.5  significance level Area =  zz (Positive)

35 Two-tailed Test “≠” H 0 : p = 0.5 H 1 : p ≠ 0.5  significance level z  Area =  -z 

36 The XSORT method of gender selection is believed to increases the likelihood of birthing a girl. 14 couples used the XSORT method and resulted in the birth of 13 girls and 1 boy. Using a 0.05 significance level, test the claim that the XSORT method increases the birth rate of girls. (Assume the normal birthrate of girls is 0.5) What we know: p 0 = 0.5 n = 14 x = 13 p = Claim: p > 0.5 using α = 0.05 Example 1 n p 0 = 14*0.5 = 7 n q 0 = 14*0.5 = 7 Since n p 0 > 5 and n q 0 > 5, we can perform a hypothesis test.

37 H 0 : p = 0.5 H 1 : p > 0.5 Example 1 Right-tailed What we know: p 0 = 0.5 n = 14 x = 13 p = Claim: p > 0.5 using α = 0.01 z in critical region z = z α = Test statistic: Critical value: Initial Conclusion: Since z is in the critical region, reject H 0 Final Conclusion: We Accept the claim that the XSORT method increases the birth rate of girls

38 P-Value The P-value is the probability of getting a value of the test statistic that is at least as extreme as the one representing the sample data, assuming that the null hypothesis is true. z Test statistic z α Critical value z zαzα P-value = P(Z > z) p-value (area) Example

39 P-Value Critical region in the left tail: Critical region in the right tail: Critical region in two tails: P-value = area to the left of the test statistic P-value = area to the right of the test statistic P-value = twice the area in the tail beyond the test statistic

40 P-Value method: If the P is low, the null must go. If the P is high, the null will fly. If P-value  , reject H 0. If P-value > , fail to reject H 0.

41 Caution Don’t confuse a P-value with a proportion p. Know this distinction: P-value = probability of getting a test statistic at least as extreme as the one representing sample data p = population proportion

42 Calculating P-value for a Proportion Stat → Proportions → One sample → with summary

43 Calculating P-value for a Proportion Enter the number of successes (x) and the number of observations (n)

44 Calculating P-value for a Proportion Enter the Null proportion (p 0 ) and select the alternative hypothesis (≠, ) Then hit Calculate

45 Calculating P-value for a Proportion The resulting table shows both the test statistic (z) and the P-value Test statistic P-value P-value =

46 Using P-value Initial Conclusion: Since p-value < α (α = 0.05), reject H 0 Final Conclusion: We Accept the claim that the XSORT method increases the birth rate of girls P-value = Stat → Proportions→ One sample → With summary Null: proportion= Alternative Number of successes: Number of observations: H 0 : p = 0.5 H 1 : p > 0.5 Example 1 What we know: p 0 = 0.5 n = 14 x = 13 p = Claim: p > 0.5 using α = > ● Hypothesis Test

47 Do we prove a claim? A statistical test cannot definitely prove a hypothesis or a claim. Our conclusion can be only stated like this: The available evidence is not strong enough to warrant rejection of a hypothesis or a claim We can say we are 95% confident it holds. “The only definite is that there are no definites” -Unknown

48 Mendel’s Genetics Experiments When Gregor Mendel conducted his famous hybridization experiments with peas, one such experiment resulted in 580 offspring peas, with 26.2% of them having yellow pods. According to Mendel’s theory, ¼ of the offspring peas should have yellow pods. Use a 0.05 significance level to test the claim that the proportion of peas with yellow pods is equal to ¼. What we know: p 0 = 0.25 n = 580 p = Claim: p = 0.25 using α = 0.05 Example 2 n p 0 = 580*0.25 = 145 n q 0 = 580*0.75 = 435 Since n p 0 > 5 and n q 0 > 5, we can perform a hypothesis test. Problem 32, pg 424

49 H 0 : p = 0.25 H 1 : p ≠ 0.25 Example 2 Two-tailed z not in critical region z = z α = Test statistic: Critical value: Initial Conclusion: Since z is not in the critical region, accept H 0 Final Conclusion: We Accept the claim that the proportion of peas with yellow pods is equal to ¼ What we know: p 0 = 0.25 n = 580 p = Claim: p = 0.25 using α = 0.05 z α = 1.960

50 Using P-value Example 2 Initial Conclusion: Since P-value > α, accept H 0 Final Conclusion: We Accept the claim that the proportion of peas with yellow pods is equal to ¼ H 0 : p = 0.25 H 1 : p ≠ 0.25 What we know: p 0 = 0.25 n = 580 p = Claim: p = 0.25 using α = 0.05 x = np = 580*0.262 ≈ 152 P-value = Stat → Proportions→ One sample → With summary Null: proportion= Alternative Number of successes: Number of observations: ≠ ● Hypothesis Test

51

52 Section 8.4 Testing a claim about a mean (σ known) Objective For a population with mean µ (with σ known), use a sample (with a sample mean) to test a claim about the mean. Testing a mean (when σ known) uses the standard normal distribution (z-distribution)

53 Notation

54 (1) The population standard deviation σ is known (2) One or both of the following: The population is normally distributed or n > 30 Requirements

55 Test Statistic Denoted z (as in z-score) since the test uses the z-distribution.

56 People have died in boat accidents because an obsolete estimate of the mean weight of men (166.3 lb.) was used. A random sample of n = 40 men yielded the mean = lb. Research from other sources suggests that the population of weights of men has a standard deviation given by  = 26 lb. Use a 0.1 significance level to test the claim that men have a mean weight greater than lb. Example 1 What we know: µ 0 = n = 40 x = σ = 26 Claim: µ > using α = 0.1

57 H 0 : µ = H 1 : µ > Example 1 Right-tailed z in critical region Test statistic: Critical value: Initial Conclusion: Since z is in the critical region, reject H 0 Final Conclusion: We Accept the claim that the actual mean weight of men is greater than lb. z = 1.520z α = What we know: µ 0 = n = 40 x = σ = 26 Claim: µ > using α = 0.05 Using Critical Region

58 Stat → Z statistics → One sample → with summary Calculating P-value for a Mean (σ known)

59 Calculating P-value for a Mean (σ known)

60 Then hit Calculate Calculating P-value for a Mean (σ known)

61 The resulting table shows both the test statistic (z) and the P-value Test statistic P-value P-value = Calculating P-value for a Mean (σ known)

62 Using P-value Stat → Z statistics→ One sample → With summary Null: proportion= Alternative Sample mean: Standard deviation: Sample size: Example 1 ● Hypothesis Test > P-value = Initial Conclusion: Since P-value < α, reject H 0 Final Conclusion: We Accept the claim that the actual mean weight of men is greater than lb. H 0 : µ = H 1 : µ > What we know: µ 0 = n = 40 x = σ = 26 Claim: µ > using α = 0.05

63 Weight of Bears A sample of 54 bears has a mean weight of lb. Assuming that σ is known to be 37.8 lb. use a 0.05 significance level to test the claim that the population mean of all such bear weights is less than 250 lb. Example 2 What we know: µ 0 = 250 n = 54 x = σ = 37.8 Claim: µ < 250 using α = 0.05

64 H 0 : µ = 250 H 1 : µ < 250 Example 2 Left-tailed z in critical region Test statistic: Critical value: Initial Conclusion: Since z is in the critical region, reject H 0 Final Conclusion: We Accept the claim that the mean weight of bears is less than 250 lb. z = –2.352 –z α = –1.645 Using Critical Region What we know: µ 0 = 250 n = 54 x = σ = 37.8 Claim: µ < 250 using α = 0.05

65 Using P-value Null: proportion= Alternative Sample mean: Standard deviation: Sample size: Example 2 ● Hypothesis Test < P-value = H 0 : µ = 250 H 1 : µ < 250 What we know: µ 0 = 250 n = 54 x = σ = 37.8 Claim: µ < 250 using α = 0.05 Initial Conclusion: Since P-value < α, reject H 0 Final Conclusion: We Accept the claim that the mean weight of bears is less than 250 lb. Stat → Z statistics→ One sample → With summary