Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
• Have HW out to be checked. Introduction to Hypothesis Testing Section 7.1 Objectives • State a null hypothesis and an alternative hypothesis • Identify type I and type II errors and interpret the level of significance • Determine whether to use a one-tailed or two-tailed statistical test and find a p-value • Make and interpret a decision based on the results of a statistical test • Write a conclusion for a hypothesis test Larson/Farber 4th ed. 3 Hypothesis Tests Hypothesis test • A process that uses sample statistics to test a claim about the value of a population parameter. • For example: An automobile manufacturer advertises that its new hybrid car has a mean mileage of 50 miles per gallon. To test this claim, a sample would be taken. If the sample mean differs enough from the advertised mean, you can decide the advertisement is wrong. Larson/Farber 4th ed. 4 USES • Marketing strategies • New medicines and treatments Larson/Farber 4th ed. 5 REMEMBER • Central limit theorem • 1) if n ≥ 30 then sample means will approximate a normal distribution. • 2) if population is normally distributed then sample means will be normally distributed for any n. 2 𝜎² • Variance: 𝜎𝑥 = 𝑛 • Standard deviation : 𝜎𝑥 = 𝜎 𝑛 6 Normal curve 7 Hypothesis Tests Statistical hypothesis • A statement, or claim, about a population parameter. • Need a pair of hypotheses • one that represents the claim • the other, its complement • When one of these hypotheses is false, the other must be true. Larson/Farber 4th ed. 8 Stating a Hypothesis Null hypothesis • A statistical hypothesis that contains a statement of equality such as , =, or . • Denoted H0 read “H subzero” or “H naught.” Alternative hypothesis • A statement of inequality such as >, , or <. • Must be true if H0 is false. • Denoted Ha read “H sub-a.” complementary statements Larson/Farber 4th ed. 9 To test a population parameter • 1) state 2 hypotheses: 𝐻0 & 𝐻𝑎 • 2) prove one of them is true or false • 3) if one is true other must be false Larson/Farber 4th ed. 10 To write a hypothesis • 1) write claim in math form • 2) write its complement • 3) 𝐻0 always one with = or ≤ 𝑜𝑟 ≥ • Ex: 𝐻0 = 5 then 𝐻𝑎 ≠ 5 • 𝐻0 ≥70 then 𝐻𝑎 < 70 • 𝐻0 ≤8 then 𝐻𝑎 > 8 • Larson/Farber 4th ed. 11 EXAMPLE • In prob and stats the average age of a student is 17. • 𝐻0 is µ = 17 • 𝐻𝑎 is µ ≠ 17 Larson/Farber 4th ed. 12 Stating a Hypothesis • To write the null and alternative hypotheses, translate the claim made about the population parameter from a verbal statement to a mathematical statement. • Then write its complement. H0: μ ≤ k Ha: μ > k H0: μ ≥ k Ha: μ < k H0: μ = k Ha: μ ≠ k • Regardless of which pair of hypotheses you use, you always assume μ = k and examine the sampling distribution on the basis of this assumption. Larson/Farber 4th ed. 13 Larson/Farber 4th ed. 14 Example: Stating the Null and Alternative Hypotheses Write the claim as a mathematical sentence. State the null and alternative hypotheses and identify which represents the claim. 1. A university publicizes that the proportion of its students who graduate in 4 years is 82%. Solution: H0: p = 0.82 Equality condition (Claim) Ha: p ≠ 0.82 Complement of H0 Larson/Farber 4th ed. 15 Example: Stating the Null and Alternative Hypotheses Write the claim as a mathematical sentence. State the null and alternative hypotheses and identify which represents the claim. 2. A water faucet manufacturer announces that the mean flow rate of a certain type of faucet is less than 2.5 gallons per minute. Solution: H0: μ ≥ 2.5 gallons per minute Ha: μ < 2.5 gallons per minute Larson/Farber 4th ed. Complement of Ha Inequality (Claim) condition 16 Example: Stating the Null and Alternative Hypotheses Write the claim as a mathematical sentence. State the null and alternative hypotheses and identify which represents the claim. 3. A cereal company advertises that the mean weight of the contents of its 20-ounce size cereal boxes is more than 20 ounces. Solution: H0: μ ≤ 20 ounces Ha: μ > 20 ounces Larson/Farber 4th ed. Complement of Ha Inequality (Claim) condition 17 Types of Errors • No matter which hypothesis represents the claim, always begin the hypothesis test assuming that the equality condition in the null hypothesis is true. • At the end of the test, one of two decisions will be made: reject the null hypothesis fail to reject the null hypothesis • Because your decision is based on a sample, there is the possibility of making the wrong decision. Larson/Farber 4th ed. 18 Types of Errors Actual Truth of H0 Decision Do not reject H0 Reject H0 H0 is true Correct Decision Type I Error H0 is false Type II Error Correct Decision • A type I error occurs if the null hypothesis is rejected when it is true. • A type II error occurs if the null hypothesis is not rejected when it is false. Larson/Farber 4th ed. 19 Example: Identifying Type I and Type II Errors The USDA limit for salmonella contamination for chicken is 20%. A meat inspector reports that the chicken produced by a company exceeds the USDA limit. You perform a hypothesis test to determine whether the meat inspector’s claim is true. When will a type I or type II error occur? Which is more serious? (Source: United States Department of Agriculture) Larson/Farber 4th ed. 20 Solution: Identifying Type I and Type II Errors Let p represent the proportion of chicken that is contaminated. Hypotheses: H0: p ≤ 0.2 Ha: p > 0.2 (Claim) Chicken meets USDA limits. H0: p ≤ 0.20 Chicken exceeds USDA limits. H0: p > 0.20 p 0.16 Larson/Farber 4th ed. 0.18 0.20 0.22 0.24 21 Solution: Identifying Type I and Type II Errors Hypotheses: H0: p ≤ 0.2 Ha: p > 0.2 (Claim) A type I error is rejecting H0 when it is true. The actual proportion of contaminated chicken is less than or equal to 0.2, but you decide to reject H0. A type II error is failing to reject H0 when it is false. The actual proportion of contaminated chicken is greater than 0.2, but you do not reject H0. Larson/Farber 4th ed. 22 Solution: Identifying Type I and Type II Errors Hypotheses: H0: p ≤ 0.2 Ha: p > 0.2 (Claim) • With a type I error, you might create a health scare and hurt the sales of chicken producers who were actually meeting the USDA limits. • With a type II error, you could be allowing chicken that exceeded the USDA contamination limit to be sold to consumers. • A type II error could result in sickness or even death. Larson/Farber 4th ed. 23 Level of Significance Level of significance • Your maximum allowable probability of making a type I error. Denoted by , the lowercase Greek letter alpha. • By setting the level of significance at a small value, you are saying that you want the probability of rejecting a true null hypothesis to be small. • Commonly used levels of significance: = 0.10 = 0.05 = 0.01 • P(type II error) = β (beta) Larson/Farber 4th ed. 24 Statistical Tests • After stating the null and alternative hypotheses and specifying the level of significance, a random sample is taken from the population and sample statistics are calculated. • The statistic that is compared with the parameter in the null hypothesis is called the test statistic. Population parameter Test statistic μ x p σ2 p̂ Larson/Farber 4th ed. s2 Standardized test statistic z (Section 7.2 n 30) t (Section 7.3 n < 30) z (Section 7.4) χ2 (Section 7.5) 25 Assignment • Page 367 1-36 Larson/Farber 4th ed. 26