Chapter 9 Hypothesis Testing Hypothesis Testing A hypothesis

  • Slides: 27
Download presentation
Chapter 9 Hypothesis Testing

Chapter 9 Hypothesis Testing

Hypothesis Testing • A hypothesis is a claim about a population parameter, such as

Hypothesis Testing • A hypothesis is a claim about a population parameter, such as a population proportion, P, H 0, gives a specific value for a population parameter. When testing a claim about a population mean or population proportion, we (usually) write the null hypotheses in the form – H 0 : population parameter = claimed value GED 111/CDS 111 Statistics in Modern Society 2

Hypothesis Testing (cont. ) • The alternative hypothesis, or Ha, is a statement that

Hypothesis Testing (cont. ) • The alternative hypothesis, or Ha, is a statement that the population parameter has a value that somehow differs from the value claimed in the null hypothesis. • There always 2 possible outcomes of a hypothesis test: – Reject the null hypothesis, which lends support to the alternative hypothesis – Do not reject the null hypothesis, note that this does not prove that the null hypothesis is true GED 111/CDS 111 Statistics in Modern Society 3

Formulating Hypotheses • The manufacturer of a new fuel-conserving car advertises that the car

Formulating Hypotheses • The manufacturer of a new fuel-conserving car advertises that the car averages 38 miles per gallon on the highway. A consumer group claims that the true mean is less than 38 miles/gal. • H 0 : µ = 38 miles per gallon • Ha : µ < 38 miles per gallon GED 111/CDS 111 Statistics in Modern Society 4

Statistical Significance • Rare Event Rule – If, under a given assumption (such as

Statistical Significance • Rare Event Rule – If, under a given assumption (such as the null hypothesis), the probability of a particular event at least as extreme as the observed event is very small (such as 0. 05 or less), we conclude that the assumption is probably not correct. GED 111/CDS 111 Statistics in Modern Society 5

p-value • The p-value for a hypothesis test of a claim about a population

p-value • The p-value for a hypothesis test of a claim about a population parameter is the probability of selecting a sample at least as extreme as the observed sample, assuming that the null hypothesis is true. GED 111/CDS 111 Statistics in Modern Society 6

Example : Significance and Birth Weight • A county health official believes that the

Example : Significance and Birth Weight • A county health official believes that the mean birth weight of male babies at a local hospital is greater than the national average of 3. 39 kg. A random sample of 145 male babies born at that hospital has a mean birth weight of 3. 61 kg, a calculation shows that the probability of selecting a sample with a mean birth weight of 3. 61 kg or more is 0. 032. – Formulate the null and alternative hypotheses – What is the P-value for this sample? – Is the difference between the population mean (3. 39 kg) and the observed mean (3. 61 kg) significant at the 0. 05 level? GED 111/CDS 111 Statistics in Modern Society 7

Example : Significance and Birth Weight (cont. ) • The null hypothesis is the

Example : Significance and Birth Weight (cont. ) • The null hypothesis is the claim that the mean birth weight of all male babies born at this hospital is the national average of 3. 39 kg ; H 0 : µ = 3. 39 kg • The alternative hypothesis (formulated before the sample is selected) is the claim of the health official; Ha : µ>3. 39 kg • The p-value is 0. 032; it is the probability of randomly selecting a sample with a mean of at least 3. 61 kg (assumption that the population mean is really 3. 39 kg GED 111/CDS 111 Statistics in Modern Society 8

Example : Significance and Birth Weight (cont. ) • Because the p-value is less

Example : Significance and Birth Weight (cont. ) • Because the p-value is less than 0. 05, the difference is significant at the 0. 05 level. Based on the sample, there is sufficient evident to reject the null hypothesis, thereby supporting the alternative hypothesis that the mean weight for all male babies born at the hospital is greater than 3. 39 kg. GED 111/CDS 111 Statistics in Modern Society 9

Legal Analogies of Hypothesis Testing • In courts of law, the fundamental principle is

Legal Analogies of Hypothesis Testing • In courts of law, the fundamental principle is that a defendant is presumed innocent until proven guilty. – H 0 : the defendant is innocent – Ha : the defendant is guilty • A defendant is found guilty or NOT guilty, but they are never found to be innocent. • A verdict of not guilty means the evidence is not sufficient to establish guilt, but it does not prove innocence. GED 111/CDS 111 Statistics in Modern Society 10

Medical Analogies of Hypothesis Testing • A physician generally starts with the assumption of

Medical Analogies of Hypothesis Testing • A physician generally starts with the assumption of normal health (no disease) and then looks for evidence that a disease is actually present. – H 0 : the disease is absent. – Ha : the disease is present • The aim of a physician is to collect enough evidence (the sample data) to reject the null hypothesis and conclude that disease is present. GED 111/CDS 111 Statistics in Modern Society 11

Exercise • Q 13 p 378 • Q 15 -18 p 379 GED 111/CDS

Exercise • Q 13 p 378 • Q 15 -18 p 379 GED 111/CDS 111 Statistics in Modern Society 12

Setting Up hypothesis Tests • Forms of the Null and Alternative Hypotheses – The

Setting Up hypothesis Tests • Forms of the Null and Alternative Hypotheses – The null hypothesis gives a specific value for a population parameter. Thus, it has the form that includes equality • H 0 : population parameter = claimed value – The alternative hypothesis has one of the following forms • (left-tailed) Ha : population parameter < claimed value • (right-tailed) Ha : population parameter > claimed value • (two-tailed) Ha : population parameter ≠ claimed value – The hypotheses should be formulated before sample data are analyzed, and one should never test a hypothesis using the same data that suggested the hypothesis. GED 111/CDS 111 Statistics in Modern Society 13

Hypothesis Test Requirements • The claimed value of the population parameter. This value may

Hypothesis Test Requirements • The claimed value of the population parameter. This value may be either a population mean, µ, or a population proportion, p. _ ^ • The sample mean x, or the sample proportion, p. • The sample size, n. • In the case of a population mean, we also need the population standard deviation, σ, but for large samples we can approximate it by the sample standard deviation, s. GED 111/CDS 111 Statistics in Modern Society 14

Hypothesis Test Requirements (cont. ) • We use the above information to determine the

Hypothesis Test Requirements (cont. ) • We use the above information to determine the probability of observing the sample statistics found in the study (pvalue), assuming the null hypothesis is true. Based on this probability, we decide whether to reject the null hypothesis. GED 111/CDS 111 Statistics in Modern Society 15

 • Example : Mean Rental Car Mileage pp 370 -371 (1 st ed.

• Example : Mean Rental Car Mileage pp 370 -371 (1 st ed. ) • Example : Pre-Election Polls pp 371372(1 st ed. ) • Exercise : Q 5 -14 pp 372 -373(1 st ed. ) GED 111/CDS 111 Statistics in Modern Society 16

Stating the Results : p-values • Significance levels and standard scores (normal distribution) allow

Stating the Results : p-values • Significance levels and standard scores (normal distribution) allow us to make a yes/no decision about rejecting the null hypothesis. However, it is common practice to be more specific about the strength of the evidence for rejecting the null hypothesis. • p-value is used to state the significance of the sample (observed) data. GED 111/CDS 111 Statistics in Modern Society 17

Interpretation of p-values p-value Interpretation Less than 0. 01 Test is highly statistically significant

Interpretation of p-values p-value Interpretation Less than 0. 01 Test is highly statistically significant and offers strong evidence against H 0 0. 01 to 0. 05 Test is statistically significant and offers moderate evidence against H 0 Greater than 0. 05 Test is not statistically significant and does not offer sufficient evidence against H 0 GED 111/CDS 111 Statistics in Modern Society 18

Statistical Significance and Practical Significance • Consider a weight lost program that guarantees weight

Statistical Significance and Practical Significance • Consider a weight lost program that guarantees weight loss after 2 days in the program. Suppose a random sample of thousands of people in the program has a mean weight loss of 0. 37 pound after 2 days and this mean weight loss proves to be significant at the 0. 05 significant level (in another word, the null hypothesis of no weight loss is rejected). • Despite this statistical significance, the mean weight loss of 0. 37 pound is so small that it has virtually no practical significance. GED 111/CDS 111 Statistics in Modern Society 19

Statistical Significance and Practical Significance (cont. ) • Consider a large company in which

Statistical Significance and Practical Significance (cont. ) • Consider a large company in which the employees claim they are underpaid compared to the national average for workers in the same position. Suppose a sample of 50 employees has a mean monthly salary of US$2, 500, compare to a national mean salary of US$2, 950. A significance test give a p-value of 0. 072, which is not significant at the 0. 05 level. Because of factors such as large variation and a small sample, the difference of US$450 might not be statistically significant, but it could have practical significance for the employees. GED 111/CDS 111 Statistics in Modern Society 20

Two-tailed Test • Ha : µ ≠ claimed value • Consider a drug company

Two-tailed Test • Ha : µ ≠ claimed value • Consider a drug company that seeks to be sure that its 500 mg aspirin tablets really contain 500 mg of aspirin. If the tablets contain less than 500 mg, consumers are not getting the advertised dose. If the tablets contain more than 500 mg, consumers are getting too much of the drug. • Null hypothesis : the population mean of the aspirin content is 500 mg; H 0 : µ = 500 mg • Alternative hypothesis : the population mean content is either less than or greater than 500 mg; Ha : µ ≠ 500 mg GED 111/CDS 111 Statistics in Modern Society 21

Errors in Hypothesis Testing • Type I – H 0 is wrongly rejected •

Errors in Hypothesis Testing • Type I – H 0 is wrongly rejected • Type II – Wrongly fail to reject H 0 • Significance level is the probability of making a type I error. GED 111/CDS 111 Statistics in Modern Society 22

Errors in Hypothesis Testing Decision Table for H 0 and Ha Reality H 0

Errors in Hypothesis Testing Decision Table for H 0 and Ha Reality H 0 True Decision Reject H 0 Type I error Do not reject H 0 Correct Decision GED 111/CDS 111 Statistics in Modern Society Ha True Correct Decision Type II error 23

Exercise • Q 5 -7 p 390(1 st ed. ) GED 111/CDS 111 Statistics

Exercise • Q 5 -7 p 390(1 st ed. ) GED 111/CDS 111 Statistics in Modern Society 24

Hypothesis Testing for Proportion • Formulate H 0 in the form p = claimed

Hypothesis Testing for Proportion • Formulate H 0 in the form p = claimed value. Formulate Ha in the form p< claimed value (left-tail), p>claimed value (right-tailed), or p≠claimed value (two-tailed). • Identify the relevant sample statistics : the sample size, n, and the sample proportion, p. • Determine the outcome of the test either by comparing the standard score with the critical value or by computing a p-value. If the p-value is less than or equal to 0. 05, then the test is significant at the 0. 05 level; there is sufficient evidence to reject H 0. If the p-value is greater than 0. 05, H 0 cannot be reject. ^ GED 111/CDS 111 Statistics in Modern Society 25

Exercise • Chapter Review Exercise – Q 1 p 401 GED 111/CDS 111 Statistics

Exercise • Chapter Review Exercise – Q 1 p 401 GED 111/CDS 111 Statistics in Modern Society 26

Focus on Agriculture • Are Genetically Modified Foods Safe? Pp 406 -408 GED 111/CDS

Focus on Agriculture • Are Genetically Modified Foods Safe? Pp 406 -408 GED 111/CDS 111 Statistics in Modern Society 27