340 likes | 483 Views
This section covers the fundamentals of hypothesis testing in statistics. It explains how to define null (H0) and alternative (H1) hypotheses based on claims, and elaborates on Type I and Type II errors that can occur during testing. The process involves quantifying our confidence in the claims through statistical methods. By using an example of a car manufacturer's mileage claim, the section illustrates how to interpret sample means in relation to these hypotheses. Understand the significance levels and the types of tests to support valid conclusions in statistical analysis.
E N D
Chapter 10Section 1 The Language of Hypothesis Testing
1 2 3 Chapter 10 – Section 1 • Learning objectives • Determine the null and alternative hypotheses from a claim • Understand Type I and Type II errors • State conclusions to hypothesis tests
1 2 3 Chapter 10 – Section 1 • Learning objectives • Determine the null and alternative hypotheses from a claim • Understand Type I and Type II errors • State conclusions to hypothesis tests
Chapter 10 – Section 1 • The environment of our problem is that we want to test whether a particular claim is believable, or not • The process that we use is called hypothesistesting • This is one of the most common goals of statistics
Chapter 10 – Section 1 • Hypothesis testing involves two steps • Step 1 – to state what we think is true • Step 2 – to quantify how confident we are in our claim • The first step is relatively easy • The second step is why we need statistics
Chapter 10 – Section 1 • We are usually told what the claim is, what the goal of the test is • Now similar to estimation in the previous chapter, we will again use the material in Chapter 8 on the sample mean to quantify how confident we are in our claim
Chapter 10 – Section 1 • An example of what we want to quantify • An example of what we want to quantify • A car manufacturer claims that a certain model of car achieves 29 miles per gallon • An example of what we want to quantify • A car manufacturer claims that a certain model of car achieves 29 miles per gallon • We test some number of cars • An example of what we want to quantify • A car manufacturer claims that a certain model of car achieves 29 miles per gallon • We test some number of cars • We calculate the sample mean … it is 27 • An example of what we want to quantify • A car manufacturer claims that a certain model of car achieves 29 miles per gallon • We test some number of cars • We calculate the sample mean … it is 27 • Is 27 miles per gallon consistent with the manufacturer’s claim? How confident are we that the manufacturer has significantly overstated the miles per gallon achievable?
Chapter 10 – Section 1 • How confident are we that the gas economy is definitely less than 29 miles per gallon? • How confident are we that the gas economy is definitely less than 29 miles per gallon? • We would like to make either a statement “We’re pretty sure that the mileage is less than 29 mpg” • How confident are we that the gas economy is definitely less than 29 miles per gallon? • We would like to make either a statement “We’re pretty sure that the mileage is less than 29 mpg” or “It’s believable that the mileage is equal to 29 mpg”
Chapter 10 – Section 1 • A hypothesistest for an unknown parameter is a test of a specific claim • Compare this to a confidence interval which gives an interval of numbers, not a “believe it” or “don’t believe it” answer • A hypothesistest for an unknown parameter is a test of a specific claim • Compare this to a confidence interval which gives an interval of numbers, not a “believe it” or “don’t believe it” answer • The levelofsignificance represents the confidence we have in our conclusion
Chapter 10 – Section 1 • How do we state our claim? • Our claim • Is the statement to be tested • Is called the nullhypothesis • Is written as H0 (and is read as “H-naught”)
Chapter 10 – Section 1 • How do we state our counter-claim? • Our counter-claim • Is the opposite of the statement to be tested • Is called the alternativehypothesis • Is written as H1 (and is read as “H-one”)
Chapter 10 – Section 1 • There are different types of null hypothesis / alternative hypothesis pairs, depending on the claim and the counter-claim • There are different types of null hypothesis / alternative hypothesis pairs, depending on the claim and the counter-claim • One type of H0 / H1 pair, called a two-tailedtest, tests whether the parameter is either equal to, versus not equal to, some value • H0: parameter = some value • H1: parameter ≠ some value
Chapter 10 – Section 1 • An example of a two-tailed test • An example of a two-tailed test • A bolt manufacturer claims that the diameter of the bolts average 10 mm • H0: Diameter = 10 • H1: Diameter ≠ 10 • An example of a two-tailed test • A bolt manufacturer claims that the diameter of the bolts average 10 mm • H0: Diameter = 10 • H1: Diameter ≠ 10 • An alternative hypothesis of “≠ 10” is appropriate since • A sample diameter that is too high is a problem • A sample diameter that is too low is also a problem • An example of a two-tailed test • A bolt manufacturer claims that the diameter of the bolts average 10 mm • H0: Diameter = 10 • H1: Diameter ≠ 10 • An alternative hypothesis of “≠ 10” is appropriate since • A sample diameter that is too high is a problem • A sample diameter that is too low is also a problem • Thus this is a two-tailed test
Chapter 10 – Section 1 • Another type of pair, called a left-tailedtest, tests whether the parameter is either equal to, versus less than, some value • H0: parameter = some value • H1: parameter < some value
Chapter 10 – Section 1 • An example of a left-tailed test • An example of a left-tailed test • A car manufacturer claims that the mpg of a certain model car is at least 29.0 • H0: MPG = 29.0 • H1: MPG < 29.0 • An example of a left-tailed test • A car manufacturer claims that the mpg of a certain model car is at least 29.0 • H0: MPG = 29.0 • H1: MPG < 29.0 • An alternative hypothesis of “< 29” is appropriate since • A mpg that is too low is a problem • A mpg that is too high is not a problem • An example of a left-tailed test • A car manufacturer claims that the mpg of a certain model car is at least 29.0 • H0: MPG = 29.0 • H1: MPG < 29.0 • An alternative hypothesis of “< 29” is appropriate since • A mpg that is too low is a problem • A mpg that is too high is not a problem • Thus this is a left-tailed test
Chapter 10 – Section 1 • Another third type of pair, called a right-tailedtest, tests whether the parameter is either equal to, versus greater than, some value • H0: parameter = some value • H1: parameter > some value
Chapter 10 – Section 1 • An example of a right-tailed test • An example of a right-tailed test • A bolt manufacturer claims that the defective rate of their product is at most 1 part in 1,000 • H0: Defect Rate = 0.001 • H1: Defect Rate > 0.001 • An example of a right-tailed test • A bolt manufacturer claims that the defective rate of their product is at most 1 part in 1,000 • H0: Defect Rate = 0.001 • H1: Defect Rate > 0.001 • An alternative hypothesis of “> 0.001” is appropriate since • A defect rate that is too low is not a problem • A defect rate that is too high is a problem • An example of a right-tailed test • A bolt manufacturer claims that the defective rate of their product is at most 1 part in 1,000 • H0: Defect Rate = 0.001 • H1: Defect Rate > 0.001 • An alternative hypothesis of “> 0.001” is appropriate since • A defect rate that is too low is not a problem • A defect rate that is too high is a problem • Thus this is a right-tailed test
Chapter 10 – Section 1 • A comparison of the three types of tests • The null hypothesis • We believe that this is true • A comparison of the three types of tests • The null hypothesis • We believe that this is true • The alternative hypothesis
Chapter 10 – Section 1 • A manufacturer claims that there are at least two scoops of cranberries in each box of cereal • A manufacturer claims that there are at least two scoops of cranberries in each box of cereal • What would be a problem? • The parameter to be tested is the number of scoops of cranberries in each box of cereal • If the sample mean is too low, that is a problem • If the sample mean is too high, that is not a problem • A manufacturer claims that there are at least two scoops of cranberries in each box of cereal • What would be a problem? • The parameter to be tested is the number of scoops of cranberries in each box of cereal • If the sample mean is too low, that is a problem • If the sample mean is too high, that is not a problem • This is a left-tailed test • The “bad case” is when there are too few
Chapter 10 – Section 1 • A manufacturer claims that there are exactly 500 mg of a medication in each tablet • A manufacturer claims that there are exactly 500 mg of a medication in each tablet • What would be a problem? • The parameter to be tested is the amount of a medication in each tablet • If the sample mean is too low, that is a problem • If the sample mean is too high, that is a problem too • A manufacturer claims that there are exactly 500 mg of a medication in each tablet • What would be a problem? • The parameter to be tested is the amount of a medication in each tablet • If the sample mean is too low, that is a problem • If the sample mean is too high, that is a problem too • This is a two-tailed test • A “bad case” is when there are too few • A “bad case” is also where there are too many
Chapter 10 – Section 1 • A manufacturer claims that there are at most 8 grams of fat per serving • A manufacturer claims that there are at most 8 grams of fat per serving • What would be a problem? • The parameter to be tested is the number of grams of fat in each serving • If the sample mean is too low, that is not a problem • If the sample mean is too high, that is a problem • A manufacturer claims that there are at most 8 grams of fat per serving • What would be a problem? • The parameter to be tested is the number of grams of fat in each serving • If the sample mean is too low, that is not a problem • If the sample mean is too high, that is a problem • This is a right-tailed test • The “bad case” is when there are too many
Chapter 10 – Section 1 • There are two possible results for a hypothesis test • There are two possible results for a hypothesis test • If we believe that the null hypothesis could be true, this is called notrejectingthenullhypothesis • Note that this is only “we believe … could be” • There are two possible results for a hypothesis test • If we believe that the null hypothesis could be true, this is called notrejectingthenullhypothesis • Note that this is only “we believe … could be” • If we are pretty sure that the null hypothesis is not true, so that the alternative hypothesis is true, this is called rejectingthenullhypothesis • Note that this is “we are pretty sure that … is”
1 2 3 Chapter 10 – Section 1 • Learning objectives • Determine the null and alternative hypotheses from a claim • Understand Type I and Type II errors • State conclusions to hypothesis tests
Chapter 10 – Section 1 • In comparing our conclusion (not reject or reject the null hypothesis) with reality, we could either be right or we could be wrong • When we reject (and state that the null hypothesis is false) but the null hypothesis is actually true • When we not reject (and state that the null hypothesis could be true) but the null hypothesis is actually false • These would be undesirable errors
Chapter 10 – Section 1 • A summary of the errors is • We see that there are four possibilities … in two of which we are correct and in two of which we are incorrect
Chapter 10 – Section 1 • When we reject (and state that the null hypothesis is false) but the null hypothesis is actually true … this is called a TypeIerror • When we reject (and state that the null hypothesis is false) but the null hypothesis is actually true … this is called a TypeIerror • When we do not reject (and state that the null hypothesis could be true) but the null hypothesis is actually false … this called a TypeIIerror • When we reject (and state that the null hypothesis is false) but the null hypothesis is actually true … this is called a TypeIerror • When we do not reject (and state that the null hypothesis could be true) but the null hypothesis is actually false … this called a TypeIIerror • In general, Type I errors are considered the more serious of the two
Chapter 10 – Section 1 • A very good analogy for Type I and Type II errors is in comparing it to a criminal trial • A very good analogy for Type I and Type II errors is in comparing it to a criminal trial • In the US judicial system, the defendant “is innocent until proven guilty” • Thus the defendant is presumed to be innocent • The null hypothesis is that the defendant is innocent • H0: the defendant is innocent
Chapter 10 – Section 1 • If the defendant is not innocent, then • The defendant is guilty • The alternative hypothesis is that the defendant is guilty • H1: the defendant is guilty • If the defendant is not innocent, then • The defendant is guilty • The alternative hypothesis is that the defendant is guilty • H1: the defendant is guilty • The summary of the set-up • H0: the defendant is innocent • H1: the defendant is guilty
Chapter 10 – Section 1 • Our possible conclusions • Our possible conclusions • Reject the null hypothesis • Go with the alternative hypothesis • H1: the defendant is guilty • We vote “guilty” • Our possible conclusions • Reject the null hypothesis • Go with the alternative hypothesis • H1: the defendant is guilty • We vote “guilty” • Do not reject the null hypothesis • Go with the null hypothesis • H0: the defendant is innocent • We vote “not guilty” (which is not the same as voting innocent!)
Chapter 10 – Section 1 • A Type I error • Reject the null hypothesis • The null hypothesis was actually true • We voted “guilty” for an innocent defendant • A Type I error • Reject the null hypothesis • The null hypothesis was actually true • We voted “guilty” for an innocent defendant • A Type II error • Do not reject the null hypothesis • The alternative hypothesis was actually true • We voted “not guilty” for a guilty defendant
Chapter 10 – Section 1 • Which error do we try to control? • Which error do we try to control? • Type I error (sending an innocent person to jail) • The evidence was “beyond reasonable doubt” • We must be pretty sure • Very bad! We want to minimize this type of error • Which error do we try to control? • Type I error (sending an innocent person to jail) • The evidence was “beyond reasonable doubt” • We must be pretty sure • Very bad! We want to minimize this type of error • A Type II error (letting a guilty person go) • The evidence wasn’t “beyond a reasonable doubt” • We weren’t sure enough • If this happens … well … it’s not as bad as a Type I error (according to the US system)
1 2 3 Chapter 10 – Section 1 • Learning objectives • Determine the null and alternative hypotheses from a claim • Understand Type I and Type II errors • State conclusions to hypothesis tests
Chapter 10 – Section 1 • “Innocent” versus “Not Guilty” • This is an important concept • Innocent is not the same as not guilty • Innocent – the person did not commit the crime • Not guilty – there is not enough evidence to convict … that the reality is unclear • To not reject the null hypothesis – doesn’t mean that the null hypothesis is true – just that there isn’t enough evidence to reject
Summary: Chapter 10 – Section 1 • A hypothesis test tests whether a claim is believable or not, compared to the alternative • We test the null hypothesis H0 versus the alternative hypothesis H1 • If there is sufficient evidence to conclude that H0 is false, we reject the null hypothesis • If there is insufficient evidence to conclude that H0 is false, we do not reject the null hypothesis