Statistics for Managers Using Microsoft Excel Fundamentals of Hypothesis Testing Chapter 7 Learning Objectives Describe the hypothesis testing process Distinguish the types of hypotheses Explain hypothesis testing errors Solve hypothesis testing problems One population mean One population proportion One & two-tailed tests As a result of this class, you will be able to...
Statistical Methods
Reject hypothesis! Not close. Hypothesis Testing I believe the population mean age is 50 (hypothesis). Reject hypothesis! Not close. Population Random sample Mean X = 20
What’s a Hypothesis? A belief about a population parameter Parameter is population mean, proportion, variance Must be stated before analysis I believe the mean GPA of this class is 3.5! © 1984-1994 T/Maker Co.
Null Hypothesis What is tested Has serious outcome if incorrect decision made Always has equality sign: , or Designated H0 Pronounced ‘H sub-zero’ or ‘H oh’ Example H0: 3
Alternative Hypothesis Opposite of null hypothesis Always has inequality sign: ,, or Designated H1 Example H1: < 3
Identifying Hypotheses in Problems Problem: Test that the population mean is not 3 Steps State the question statistically: 3 State the opposite statistically: = 3 Must be mutually exclusive & exhaustive Select the null hypothesis: = 3 Has the =, , or sign
Identifying Hypotheses Thinking Challenge What are the hypotheses? Is the population average amount of TV viewing 12 hours?
Identifying Hypotheses Thinking Challenge What are the hypotheses? Is the population average amount of TV viewing 12 hours? Is the population average amount of TV viewing different from 12 hours?
Identifying Hypotheses Thinking Challenge What are the hypotheses? Is the population average amount of TV viewing 12 hours? Is the population average amount of TV viewing different from 12 hours? Is the average cost per hat less than or equal to $20?
Identifying Hypotheses Thinking Challenge What are the hypotheses? Is the population average amount of TV viewing 12 hours? Is the population average amount of TV viewing different from 12 hours? Is the average cost per hat less than or equal to $20? Is the average amount spent in the bookstore greater than $25?
Sampling Distribution Basic Idea Sampling Distribution It is unlikely that we would get a sample mean of this value ... ... therefore, we reject the hypothesis that = 50. ... if in fact this were the population mean 20 H0
Level of Significance Defines unlikely values of sample statistic if null hypothesis is true Called rejection region of sampling distribution Designated (alpha) Typical values are .01, .05, .10 Selected by researcher at start
Rejection Region (One-Tail Test) Sampling Distribution Level of Confidence 1 - Rejection region does NOT include critical value. Observed sample statistic
Rejection Region (One-Tail Test) Sampling Distribution Level of Confidence 1 - Rejection region does NOT include critical value. Observed sample statistic
Rejection Regions (Two-Tailed Test) Sampling Distribution Level of Confidence 1 - Rejection region does NOT include critical value. Observed sample statistic
Rejection Regions (Two-Tailed Test) Sampling Distribution Level of Confidence 1 - Rejection region does NOT include critical value. Observed sample statistic
Rejection Regions (Two-Tailed Test) Sampling Distribution Level of Confidence 1 - Rejection region does NOT include critical value. Observed sample statistic
Risk of Errors in Making Decision Type I error Reject true null hypothesis Has serious consequences Probability of Type I error is Called level of significance Type II error Do not reject false null hypothesis Probability of Type II error is (Beta)
Decision Results H0: Innocent
& Have an Inverse Relationship You can’t reduce both errors simultaneously!
increases when difference with hypothesized parameter decreases Factors Affecting True value of population parameter increases when difference with hypothesized parameter decreases Significance level, Increases when decreases Population standard deviation, Increases when increases Sample size, n Increases when n decreases
Hypothesis H0 Testing Steps State H0 State H1 Choose Choose n Choose test
H0 Testing Steps State H0 Set up critical values State H1 Collect data Choose Choose n Choose test Set up critical values Collect data Compute test statistic Make statistical decision Express decision
One Population Tests
Two-Tailed Z Test for Mean ( Known) Assumptions Population is normally distributed If not normal, can be approximated by normal distribution (n 30) Null hypothesis has = sign only Z-test statistic
Two-Tailed Z Test Example Does an average box of cereal contain 368 grams of cereal? A random sample of 25 boxes showed X = 372.5. The company has specified to be 15 grams. Test at the .05 level. 368 gm.
Two-Tailed Z Test Solution H0: = 368 H1: 368 .05 n 25 Critical Value(s): Test Statistic: Decision: Conclusion: Do not reject at = .05 No evidence average is not 368
p-Value Probability of obtaining a test statistic more extreme (or than actual sample value given H0 is true Called observed level of significance Smallest value of H0 can be rejected Used to make rejection decision If p-value , do not reject H0 If p-value < , reject H0
Two-Tailed Z Test p-Value Solution p-value is P(Z -1.50 or Z 1.50) = .1336 .5000 - .4332 .0668 .4332 From Z table: lookup 1.50 Z value of sample statistic
Two-Tailed Z Test p-Value Solution Do not reject. 1/2 p-Value = .0668 1/2 p-Value = .0668 1/2 = .025 1/2 = .025 Test statistic is in ‘Do not reject’ region
Two-Tailed Z Test Thinking Challenge You’re a Q/C inspector. You want to find out if a new machine is making electrical cords to customer specification: average breaking strength of 70 lb. with = 3.5 lb. You take a sample of 36 cords & compute a sample mean of 69.7 lb. At the .05 level, is there evidence that the machine is not meeting the average breaking strength?
Two-Tailed Z Test Solution* H0: = 70 H1: 70 = .05 n = 36 Critical Value(s): Test Statistic: Decision: Conclusion: Do not reject at = .05 No evidence average is not 70
One-Tailed Z Test for Mean ( Known) Assumptions Population is normally distributed If not normal, can be approximated by normal distribution (n 30) Null hypothesis has or sign only
One-Tailed Z Test for Mean ( Known) Assumptions Population is normally distributed If not normal, can be approximated by normal distribution (n 30) Null hypothesis has or sign only Z-test statistic
One-Tailed Z Test for Mean Hypotheses H0:0 H1: < 0 H0:0 H1: > 0 Must be significantly below Small values satisfy H0 . Don’t reject!
One-Tailed Z Test Finding Critical Z What Is Z given = .025? .500 - .025 .475 = .025
One-Tailed Z Test Finding Critical Z What Is Z given = .025? Standardized Normal Probability Table (Portion) .500 - .025 .475 .06 = .025 1.9 .4750
One-Tailed Z Test Example Does an average box of cereal contain more than 368 grams of cereal? A random sample of 25 boxes showedX = 372.5. The company has specified to be 15 grams. Test at the .05 level. 368 gm.
One-Tailed Z Test Solution H0: 368 H1: > 368 = .05 n = 25 Critical Value(s): Test Statistic: Decision: Conclusion: Do not reject at = .05 No evidence average is more than 368
One-Tailed Z Test p-Value Solution Do not reject. p-Value = .0668 = .05 Test statistic is in ‘Do not reject’ region
One-Tailed Z Test Thinking Challenge You’re an analyst for Ford. You want to find out if the average miles per gallon of Escorts is at least 32 mpg. Similar models have a standard deviation of 3.8 mpg. You take a sample of 60 Escorts & compute a sample mean of 30.7 mpg. At the .01 level, is there evidence that the miles per gallon is at least 32?
Solution Template H0: H1: = n = Critical Value(s): Test Statistic: Decision: Conclusion:
One-Tailed Z Test Solution* H0: H1: = n = Critical Value(s): Test Statistic: Decision: Conclusion:
One-Tailed Z Test Solution* H0: 32 H1: < 32 = n = Critical Value(s): Test Statistic: Decision: Conclusion:
One-Tailed Z Test Solution* H0: 32 H1: < 32 = .01 n = 60 Critical Value(s): Test Statistic: Decision: Conclusion:
One-Tailed Z Test Solution* H0: 32 H1: < 32 = .01 n = 60 Critical Value(s): Test Statistic: Decision: Conclusion:
One-Tailed Z Test Solution* H0: 32 H1: < 32 = .01 n = 60 Critical Value(s): Test Statistic: Decision: Conclusion:
One-Tailed Z Test Solution* H0: 32 H1: < 32 = .01 n = 60 Critical Value(s): Test Statistic: Decision: Conclusion: Reject at = .01
One-Tailed Z Test Solution* H0: 32 H1: < 32 = .01 n = 60 Critical Value(s): Test Statistic: Decision: Conclusion: Reject at = .01 There is evidence average is less than 32
p-Value Thinking Challenge You’re an analyst for Ford. You want to find out if the average miles per gallon of Escorts is at least 32 mpg. Similar models have a standard deviation of 3.8 mpg. You take a sample of 60 Escorts & compute a sample mean of 30.7 mpg. What is the value of the observed level of significance (p-Value)? .
p-Value Solution* p-Value is P(Z -2.65) = .004. p-Value < ( = .01). Reject H0. .5000 - .4960 .0040 Use alternative hypothesis to find direction .4960 Z value of sample statistic From Z table: lookup 2.65
One Population Tests
t Test for Mean ( Unknown) Assumptions Population is normally distributed If not normal, only slightly skewed & large sample (n 30) taken Parametric test procedure t test statistic
Two-Tailed t Test Finding Critical t Values Given: n = 3; = .10 df = n - 1 = 2 /2 = .05 /2 = .05
Two-Tailed t Test Finding Critical t Values Given: n = 3; = .10 Critical Values of t Table (Portion) df = n - 1 = 2 /2 = .05 2.920 /2 = .05
Two-Tailed t Test Example Does an average box of cereal contain 368 grams of cereal? A random sample of 36 boxes had a mean of 372.5 & a standard deviation of 12 grams. Test at the .05 level. 368 gm.
Two-Tailed t Test Solution H0: = 368 H1: 368 = .05 df = 36 - 1 = 35 Critical Value(s): Test Statistic: Decision: Conclusion:
Two-Tailed t Test Solution H0: = 368 H1: 368 = .05 df = 36 - 1 = 35 Critical Value(s): Test Statistic: Decision: Conclusion: Reject at = .05 There is evidence pop. average is not 368
Two-Tailed t Test Thinking Challenge You work for the FTC. A manufacturer of detergent claims that the mean weight of detergent is 3.25 lb. You take a random sample of 64 containers. You calculate the sample average to be 3.238 lb. with a standard deviation of .117 lb. At the .01 level, is the manufacturer correct? Allow students about 10 minutes to finish this. 3.25 lb.
Two-Tailed t Test Solution* H0: = 3.25 H1: 3.25 .01 df 64 - 1 = 63 Critical Value(s): Test Statistic: Decision: Conclusion: Do not reject at = .01 There is no evidence average is not 3.25
One-Tailed t Test Example Is the average capacity of batteries at least 140 ampere-hours? A random sample of 20 batteries had a mean of 138.47 & a standard deviation of 2.66. Assume a normal distribution. Test at the .05 level.
One-Tailed t Test Solution H0: 140 H1: < 140 = .05 df = 20 - 1 = 19 Critical Value(s): Test Statistic: Decision: Conclusion: Reject at = .05 There is evidence pop. average is less than 140
One-Tailed t Test Thinking Challenge You’re a marketing analyst for Wal-Mart. Wal-Mart had teddy bears on sale last week. The weekly sales ($ 00) of bears sold in 10 stores was: 8 11 0 4 7 8 10 5 8 3. At the .05 level, is there evidence that the average bear sales per store is more than 5 ($ 00)? Assume that the population is normally distributed. Allow students about 10 minutes to solve this.
One-Tailed t Test Solution* H0: 5 H1: > 5 = .05 df = 10 - 1 = 9 Critical Value(s): Test Statistic: Decision: Conclusion: Note: More than 5 have been sold (6.4), but not enough to be significant. Do not reject at = .05 There is no evidence average is more than 5
Data Types
Categorical Data Categorical random variables yield responses that classify e.g., gender (male, female) Measurement reflects # in category Nominal or ordinal scale Examples Do you own savings bonds? Do you live on-campus or off-campus?
Proportions Involve categorical variables Fraction or % of population in a category If two categorical outcomes, binomial distribution Possess or don’t possess characteristic
Proportions Involve categorical variables Fraction or % of population in a category If two categorical outcomes, binomial distribution Possess or don’t possess characteristic Sample proportion (ps)
One Population Tests
One-Sample Z Test for Proportion Assumptions Two categorical outcomes Population follows binomial distribution Normal approximation can be used n·p 5 & n·(1 - p) 5
One-Sample Z Test for Proportion Assumptions Two categorical outcomes Population follows binomial distribution Normal approximation can be used n·p 5 & n·(1 - p) 5 Z-test statistic for proportion Hypothesized population proportion
One-Proportion Z Test Example The present packaging system produces 10% defective cereal boxes. Using a new system, a random sample of 200 boxes had11 defects. Does the new system produce fewer defects? Test at the .05 level. n·p 5 n·(1 - p) 5
One-Proportion Z Test Solution H0: p .10 H1: p < .10 = .05 n = 200 Critical Value(s): Test Statistic: Decision: Conclusion:
One-Proportion Z Test Solution H0: p .10 H1: p < .10 = .05 n = 200 Critical Value(s): Test Statistic: Decision: Conclusion: Reject at = .05 There is evidence new system < 10% defective
One-Proportion Z Test Thinking Challenge You’re an accounting manager. A year-end audit showed 4% of transactions had errors. You implement new procedures. A random sample of 500 transactions had 25 errors. Has the proportion of incorrect transactions changed at the .05 level? n·p 5 n·(1 - p) 5
One-Proportion Z Test Solution* H0: p = .04 H1: p .04 = .05 n = 500 Critical Value(s): Test Statistic: Decision: Conclusion: Do not reject at = .05 There is evidence proportion is still 4%
Conclusion Described the hypothesis testing process Distinguished the types of hypotheses Explained hypothesis testing errors Solved hypothesis testing problems One population mean One population proportion One & two-tailed tests As a result of this class, you will be able to ...