Tests of Hypotheses Statistical Hypothesis an assertion concerning

  • Slides: 31
Download presentation
Tests of Hypotheses • (Statistical) Hypothesis: an assertion concerning one or more populations. •

Tests of Hypotheses • (Statistical) Hypothesis: an assertion concerning one or more populations. • In statistics, there are only two states of the world: H 0 : “equals” (null hypothesis) H 1 : _______ (alternate hypothesis) • Examples: H 0 : μ = 17 H 1 : μ ≠ 17 H 0 : μ = 8 H 1 : μ > 8 H 0 : p = 0. 5 H 1 : p < 0. 5 EGR 252 - Ch. 10 1

Choosing a Hypothesis • Your turn … Suppose a coffee vending machine claims it

Choosing a Hypothesis • Your turn … Suppose a coffee vending machine claims it dispenses an 8 -oz cup of coffee. You have been using the machine for 6 months, but recently it seems the cup isn’t as full as it used to be. You plan to conduct a test of your hypothesis. What are your hypotheses? EGR 252 - Ch. 10 2

Hypothesis testing • Level of significance, α – Probability of committing a Type I

Hypothesis testing • Level of significance, α – Probability of committing a Type I error = P (rejecting H 0 | H 0 is true) EGR 252 - Ch. 10 • β – Probability of committing a Type II error – Power of the test = ____ (probability of rejecting the null hypothesis given that the alternate is true. ) 3

Determining α & β • Example: Proportion of adults in a small town who

Determining α & β • Example: Proportion of adults in a small town who are college graduates is estimated to be p = 0. 6. A random sample of 15 adults is selected to test this hypothesis. If we find that between 6 and 12 adults are college graduates, we will accept H 0 : p = 0. 6; otherwise we will reject the hypothesis and conclude the proportion is something different (for this example, use H 1: p = 0. 5). α = ________ EGR 252 - Ch. 10 β = ________ 4

Hypothesis Testing • Approach 1 - Fixed probability of Type I error. 1. State

Hypothesis Testing • Approach 1 - Fixed probability of Type I error. 1. State the null and alternative hypotheses. Choose a fixed significance level α. Specify the appropriate test statistic and establish the critical region based on α. Draw a graphic representation. Compute the value of the test statistic based on the sample data. Make a decision to reject or fail to reject H 0, based on the location of the test statistic. Draw an engineering or scientific conclusion. 2. 3. 4. 5. 6. EGR 252 - Ch. 10 5

Hypothesis Testing • Approach 2 - Significance testing (P-value approach) 1. State the null

Hypothesis Testing • Approach 2 - Significance testing (P-value approach) 1. State the null and alternative hypotheses. 2. Choose an appropriate test statistic. 3. Compute value of test statistic and determine P-value. 4. Draw conclusion based on Pvalue. P=0 EGR 252 - Ch. 10 0. 25 0. 75 P=1 6

Hypothesis Testing Tells Us … • Strong conclusion: – If our calculated t-value is

Hypothesis Testing Tells Us … • Strong conclusion: – If our calculated t-value is “outside” tα, ν (approach 1) or we have a small p-value (approach 2), then we reject H 0: μ = μ 0 in favor of the alternate hypothesis. • Weak conclusion: – If our calculated t-value is “inside” tα, ν (approach 1) or we have a “large” p-value (approach 2), then we cannot reject H 0: μ = μ 0. • In other words: – Failure to reject H 0 does not imply that μ is equal to the stated value, only that we do not have sufficient evidence to favor H 1. EGR 252 - Ch. 10 7

Single Sample Test of the Mean A sample of 20 cars driven under varying

Single Sample Test of the Mean A sample of 20 cars driven under varying highway conditions achieved fuel efficiencies as follows: Sample mean Sample std dev x = 34. 271 mpg s = 2. 915 mpg Test the hypothesis that the population mean equals 35. 0 mpg vs. μ < 35. H 0: ____ n = ____ H 1: ____ σ unknown use ___ distribution. EGR 252 - Ch. 10 8

Example (cont. ) Approach 2: = _________ Using Excel’s tdist function, P(x ≤ -1.

Example (cont. ) Approach 2: = _________ Using Excel’s tdist function, P(x ≤ -1. 118) = _______ Conclusion: _________________ EGR 252 - Ch. 10 9

Example (concl. ) Approach 1: t 0. 05, 19 = _______ Since H 1

Example (concl. ) Approach 1: t 0. 05, 19 = _______ Since H 1 specifies “< μ, ” tcrit = ______ tcalc = _____ Conclusion: _________________ EGR 252 - Ch. 10 10

Your turn … A sample of 20 cars driven under varying highway conditions achieved

Your turn … A sample of 20 cars driven under varying highway conditions achieved fuel efficiencies as follows: Sample mean Sample std dev x = 34. 271 mpg s = 2. 915 mpg Test the hypothesis that the population mean equals 35. 0 mpg vs. μ ≠ 35 at an α level of 0. 05. Draw the picture. EGR 252 - Ch. 10 11

Two-Sample Hypothesis Testing • Example: A professor has designed an experiment to test the

Two-Sample Hypothesis Testing • Example: A professor has designed an experiment to test the effect of reading the textbook before attempting to complete a homework assignment. Four students who read the textbook before attempting the homework recorded the following times (in hours) to complete the assignment: 3. 1, 2. 8, 0. 5, 1. 9 hours Five students who did not read the textbook before attempting the homework recorded the following times to complete the assignment: 0. 9, 1. 4, 2. 1, 5. 3, 4. 6 hours EGR 252 - Ch. 10 12

Two-Sample Hypothesis Testing • Define the difference in the two means as: μ 1

Two-Sample Hypothesis Testing • Define the difference in the two means as: μ 1 - μ 2 = d 0 • What are the Hypotheses? H 0: ________ H 1: _______________ or H 1: ________ EGR 252 - Ch. 10 13

Our Example Reading: n 1 = 4 x 1 = 2. 075 s 12

Our Example Reading: n 1 = 4 x 1 = 2. 075 s 12 = 1. 363 No reading: n 2 = 5 x 2 = 2. 860 s 22 = 3. 883 If we assume the population variances are “equal”, we can calculate sp 2 and conduct a _____. = _________ EGR 252 - Ch. 10 14

Your turn … • Lower-tail test ((μ 1 - μ 2 < 0) –

Your turn … • Lower-tail test ((μ 1 - μ 2 < 0) – “Fixed α” approach (“Approach 1”) at α = 0. 05 level. – “p-value” approach (“Approach 2”) • Upper-tail test (μ 2 – μ 1 > 0) – “Fixed α” approach at α = 0. 05 level. – “p-value” approach • Two-tailed test (μ 1 - μ 2 ≠ 0) – “Fixed α” approach at α = 0. 05 level. – “p-value” approach Recall EGR 252 - Ch. 10 15

Lower-tail test ((μ 1 - μ 2 < 0) • Draw the picture: •

Lower-tail test ((μ 1 - μ 2 < 0) • Draw the picture: • Solution: • Decision: • Conclusion: EGR 252 - Ch. 10 16

Upper-tail test (μ 2 – μ 1 > 0) • Draw the picture: •

Upper-tail test (μ 2 – μ 1 > 0) • Draw the picture: • Solution: • Decision: • Conclusion: EGR 252 - Ch. 10 17

Two-tailed test (μ 1 - μ 2 ≠ 0) • Draw the picture: •

Two-tailed test (μ 1 - μ 2 ≠ 0) • Draw the picture: • Solution: • Decision: • Conclusion: EGR 252 - Ch. 10 18

Another Example Suppose we want to test the difference in carbohydrate content between two

Another Example Suppose we want to test the difference in carbohydrate content between two “low-carb” meals. Random samples of the two meals are tested in the lab and the carbohydrate content per serving (in grams) is recorded, with the following results: n 1 = 15 n 2 = 10 x 1 = 27. 2 x 2 = 23. 9 s 12 = 11 s 22 = 23 tcalc = ___________ ν = ________ (using equation in table 10. 2) EGR 252 - Ch. 10 19

Example (cont. ) • What are our options for hypotheses? • At an α

Example (cont. ) • What are our options for hypotheses? • At an α level of 0. 05, – One-tailed test, t 0. 05, 15 = ____ – Two-tailed test, t 0. 025, 15 = ____ • How are our conclusions affected? EGR 252 - Ch. 10 20

Special Case: Paired Sample T-Test Examples A. Car Radial 1 ** 2 ** 3

Special Case: Paired Sample T-Test Examples A. Car Radial 1 ** 2 ** 3 ** 4 ** B. Person Pre 1 ** 2 ** 3 ** 4 ** C. Student Test 1 1 ** 2 ** 3 ** 4 ** EGR 252 - Ch. 10 Paired-sample? Belted ** ** Post ** ** Test 2 ** ** Radial, Belted tires placed on each car. Pre- and post-test administered to each person. 5 scores from test 1, 5 scores from test 2. 21

Example* Nine steel plate girders were subjected to two methods for predicting sheer strength.

Example* Nine steel plate girders were subjected to two methods for predicting sheer strength. Partial data are as follows: Girder 1 2 Karlsruhe 1. 186 1. 151 Lehigh 1. 061 0. 992 9 1. 559 1. 052 difference, d Conduct a paired-sample t-test at the 0. 05 significance level to determine if there is a difference between the two methods. * adapted from Montgomery & Runger, Applied Statistics and Probability for Engineers. EGR 252 - Ch. 10 22

Example (cont. ) Hypotheses: H 0: μ D = 0 H 1: μ D

Example (cont. ) Hypotheses: H 0: μ D = 0 H 1: μ D ≠ 0 t_____ = ______ Calculate difference scores (d), mean and standard deviation, and tcalc … d = 0. 2736 sd = 0. 1356 tcalc = _______________ EGR 252 - Ch. 10 23

What does this mean? • Draw the picture: • Decision: • Conclusion: EGR 252

What does this mean? • Draw the picture: • Decision: • Conclusion: EGR 252 - Ch. 10 24

Goodness-of-Fit Tests • Procedures for confirming or refuting hypotheses about the distributions of random

Goodness-of-Fit Tests • Procedures for confirming or refuting hypotheses about the distributions of random variables. • Hypotheses: H 0: The population follows a particular distribution. H 1: The population does not follow the distribution. Examples: H 0: The data come from a normal distribution. H 1: The data do not come from a normal distribution. EGR 252 - Ch. 10 25

Goodness of Fit Tests (cont. ) • Test statistic is χ2 – Draw the

Goodness of Fit Tests (cont. ) • Test statistic is χ2 – Draw the picture – Determine the critical value χ2 with parameters α, ν = k – 1 • Calculate χ2 from the sample • Compare χ2 calc to χ2 crit • Make a decision about H 0 • State your conclusion EGR 252 - Ch. 10 26

Tests of Independence • Hypotheses H 0: independence H 1: not independent • Example

Tests of Independence • Hypotheses H 0: independence H 1: not independent • Example Choice of pension plan. 1. Develop a Contingency Table Worker Type Salaried Hourly Total EGR 252 - Ch. 10 Pension Plan #1 #2 160 140 40 60 200 #3 40 60 100 Total 340 160 500 27

Example Worker Type Salaried Hourly Total Pension Plan #1 #2 160 140 40 60

Example Worker Type Salaried Hourly Total Pension Plan #1 #2 160 140 40 60 200 #3 40 60 100 Total 340 160 500 2. Calculate expected probabilities P(#1 ∩ S) = ________ E(#1 ∩ S) = _______ P(#1 ∩ H) = ________ (etc. ) E(#1 ∩ H) = _______ #1 #2 #3 S (exp. ) H (exp. ) EGR 252 - Ch. 10 28

Hypotheses 3. Define Hypotheses H 0: the categories (worker & plan) are independent H

Hypotheses 3. Define Hypotheses H 0: the categories (worker & plan) are independent H 1: the categories are not independent 4. Calculate the sample-based statistic = ____________________ = ______ EGR 252 - Ch. 10 29

The Test 5. Compare to the critical statistic, χ2α, r where r = (a

The Test 5. Compare to the critical statistic, χ2α, r where r = (a – 1)(b – 1) for our example, say α = 0. 01 χ2_____ = ______ Decision: Conclusion: EGR 252 - Ch. 10 30

Homework for Thursday, March 23 • 3, 6, 7 (pg. 319) (Refer to your

Homework for Thursday, March 23 • 3, 6, 7 (pg. 319) (Refer to your updated schedule for future homework assignments. ) EGR 252 - Ch. 10 31