Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Statistics for Business and Economics Chapter 6 Inferences Based on a Single Sample: Tests of Hypothesis Learning Objectives 1. Distinguish Types of Hypotheses 2. Describe Hypothesis Testing Process 3. Explain p-Value Concept 4. Solve Hypothesis Testing Problems Based on a Single Sample 5. Explain Power of a Test Statistical Methods Statistical Methods Descriptive Statistics Inferential Statistics Estimation Hypothesis Testing Hypothesis Testing Concepts Hypothesis Testing Population I believe the population mean age is 50 (hypothesis). Random sample Mean X = 20 Reject hypothesis! Not close. What’s a Hypothesis? A belief about a population parameter I believe the mean GPA of this class is 3.5! • Parameter is population mean, proportion, variance • Must be stated before analysis © 1984-1994 T/Maker Co. Null Hypothesis 1. Specified as H0: Some numeric value Written with = sign even if , or Example, H0: 3 2. Assumed to be true--status quo 3. Gives the sampling distribution of the data and the test statistic (null distribution) 4. Cannot be proven; only rejected in favor of the alternative. Alternative Hypothesis 1. Designated Ha 2. Opposite of null hypothesis 3. Specified Ha: < or or > Some value Example, Ha: < 3 4. The research hypothesis: what you want to prove Identifying Hypotheses Example Historically, the average amount spent in the bookstore has been $50. There is concern that it may be dropping due to the student use of the internet. Is the average amount spent in the bookstore now less than $50? 1. H0: = 50 2. Ha: < 50 Basic Idea Sampling Distribution It is “impossible” get a sample mean of this value ... ... therefore, we reject the hypothesis that = 50. ... if in fact this were the population mean 20 = 50 H0 Sample Means Basic Idea 1. If the sample mean looks as though it could have come from the sampling distribution given by the null hypothesis, then we will accept the null hypothesis. 2. If the sample mean is way out on the tail, or completely outside the sampling distribution given by the null hypothesis, we should reject the null hypothesis. 3. Only work we have to do: decide what is inside, and what is outside the distribution! (Have to DRAW THE LINE!) Where to Draw the Line 1. Cut point determined by (alpha-probability of error) • Typical values are .01, .05, .10 2. Determines “how far in” to draw the line • • Outside line: rejection region Inside line: acceptance region 3. Selected by researcher at start 4. Alpha is the “significance level of the test” Rejection Region (One-Tail Test) Sampling Distribution Fail to reject here— test statistic in acceptance region---H0 OK Rejection Region 1– Acceptance Region Critical Value Ho Value Sample Statistic Observed sample statistic Rejection Regions (Two-Tailed Test) Sampling Distribution Rejection Region Rejection Region 1– 1/2 Reject H0 here! 1/2 Acceptance Region Critical Value Ho Value Critical Value Observed sample statistic Hypothesis Testing Steps Hypothesis Testing Steps 1. 2. 3. State H0, H1, , and n Collect data and compute test statistic (Xbar) Draw the line(s) One tail “<“ alternative: percentile of Xbar dist’n One tail “>” alternative: 1 - percentile Two tail alternative: /2 and (1 – )/2 percentiles 4. Draw conclusions. One-Tailed Z Test Thinking Challenge You’re an analyst for Ford. Historically, Ford Focus models have averaged 32 mpg. You want to test the research hypothesis (alternative) that the average miles per gallon of the Ford Focus is now greater than 32 mpg. Similar models have a standard deviation of 4.0 mpg. You take a sample of 64 Focus models and compute a sample mean of 33.7 mpg. Test at the 0.01 level of significance. Interpret the results. Alone Group Class One-Tailed Z Test Solution Step: 1. 2. 3. 4. Interpretation: Two-Tailed Z Test Example Does a cereal production line produce boxes containing an average of 368 grams of cereal as specified on the box---or has the value changed? To test these hypotheses, a random sample of 36 boxes showedX = 372.5. The company has specified to be 12 grams. Test at the .05 level of significance. Interpret the results 368 gm. Two-Tailed Z Test Solution Step: 1. 2. 3. 4. Interpretation: Observed Significance Levels: p-Values Short cut: If you have these, you do not need to calculate rejection region(s) p-Value 1. Probability of obtaining a test statistic more extreme (or than the actual sample value given H0 is true 2. Called observed level of significance Smallest value of H0 can be rejected 3. Used to make rejection decision If p-value , do not reject H0 If p-value < , reject H0 Hypothesis Testing Steps Using P-value (Step 3 reject regions replaced) 1. 2. 3. State H0, H1, , and n Collect data and compute test statistic (Xbar) Compute p-value One tail “<“ alternative: P(test stat < observed val) One tail “>” alternative: P(test stat > observed val) Two tail alternative: Compute one-tail and double 4. Draw conclusions: If p < alpha, reject null “If p is low, the null’s gotta go” One-Tailed Z Test via P-value You’re an analyst for Ford. Historically, Ford Focus models have averaged 32 mpg. You want to test the research hypothesis (alternative) that the average miles per gallon of the Ford Focus is now greater than 32 mpg. Similar models have a standard deviation of 4.0 mpg. You take a sample of 64 Focus models and compute a sample mean of 33.7 mpg. Test at the 0.01 level of significance. Interpret the results. Alone Group Class P-value Solution Test statistic is Xbar = 33.7 and the alternative is a “greater than” alternative. So: p-value = P(Xbar > 33.7| the null is true) Easy: Just use Minitab to find P(Xbar > 33.7) using the null distribution: = 32 and Xbar = 4/8=.5 Two-Tailed p-Value Solution Just find the one-tail value and double it! 1/2 p-value 1/2 p-value Z Xbar (observed) Two-Tailed P-value Example 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 of significance, is there evidence that the machine is not meeting the average breaking strength? Determine the p-value, draw conclusions. One Population Tests One Population Mean Proportion Variance (not covered) Z Test t Test Z Test c2 Test (1 & 2 tail) (1 & 2 tail) (1 & 2 tail) (1 & 2 tail) What if is unknown? Use the sample standard deviation, s. Then: 1. If the null hypothesis is true and 2. If the raw data are normally distributed, then The number of number of standard deviations from Xbar to follows a t distribution with n-1 degrees of freedom. The pvalue can be obtained using the t distribution. One-Tailed t Test Example Is the average capacity of batteries at least 140 amperehours? A random sample of 20 batteries had a mean of 138.47 and a standard deviation of 2.66. Assume a normal distribution. Test at the .05 level of significance. One-Tailed t Test Solution Step 1: H0: Ha: = n= = 140 < 140 .05 20 Step 2: Test Statistic: X 138.47 140 t 2.57 S 2.66 n 20 Step 3: P-value = P(t < -2.57) = .0093 (using Minitab for t with 19 df) Step 4: Conclude: Reject H0 because p =.0093 < .05 Minitab: Calc >> Probability Distributions >> t…… One-Tailed t Test Thinking Challenge You’re a marketing analyst for Wal-Mart. WalMart 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 of significance, is there evidence that the average bear sales per store is more than 5 ($ 00)? (Find the p-value where the alternative is “ > 5”) a) Do by hand the hard way! b) Do using Minitab: Stat >> Basic Statistics >> One Sample t Z Test of Proportion One Population Tests One Population Small Sample Proportion Z Test t Test Z Test (1 & 2 tail) (1 & 2 tail) (1 & 2 tail) Large Sample Mean One-Sample Z Test for Proportion • 1. Assumptions – Two categorical outcomes – Population follows binomial distribution – Normal approximation can be used • np 3 np 1 p does not contain 0 or n b g • 2. Z-test statistic for proportion Z p p0 p0 (1 p0 ) n Hypothesized population proportion 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? Alone Group Class One-Proportion Z Test Solution Step 1: (H0, Ha, n, ) Step 2: (Z test statistic) Step 3: P-value Step 4: Conclusion Decision Making Risks Errors in Making Decision 1. Type I Error • • • Reject true null hypothesis Has serious consequences Probability of Type I Error is (alpha) — Called level of significance 2. Type II Error • • Do not reject false null hypothesis Probability of Type II Error is (beta) Decision Results H0: Innocent Jury Trial Actual Situation Verdict Innocent Guilty Innocent Guilty H0 Test Actual Situation Decision Correct Error Accept H0 Error Correct Reject H0 H0 True H0 False 1– Type II Error () Type I Power Error () (1 – ) & Have an Inverse Relationship You can’t reduce both errors simultaneously! Factors Affecting 1. True value of population parameter • Increases when difference with hypothesized parameter decreases 2. Significance level, • Increases when decreases 3. Population standard deviation, • Increases when increases 4. Sample size, n • Increases when n decreases Conclusion 1. Distinguished Types of Hypotheses 2. Described Hypothesis Testing Process 3. Explained p-Value Concept 4. Solved Hypothesis Testing Problems Based on a Single Sample 5. Discussed (briefly!) Type I and Type II errors