HAWKES LEARNING SYSTEMS math courseware specialists Copyright © 2008 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 10.2 Hypothesis Testing for Means (Small Samples) What this lesson is about • Learn to perform a hypothesis test • The previous lesson was only about how to set up a hypothesis test. – Reading and understanding the real-life scenario. – Getting the right letter, μ or p. – Getting the right relational operators in the right places: = and ≠, ≤ and >, ≥ and <. – Getting the right value of μ or p (and setting aside the “noise” numbers in the problem statement.) (Added content by D.R.S.) Choice: Do a t Test or a z Test? Small Samples: t Test • “Small” means “sample size is n < 30. • There’s an assumption that the population is normally distributed. • If the population is not normally distributed, this method we use is NOT valid. • Easy for today: everything we do is a t Test. Large Samples: z Test • “Large” means “sample size is n ≥ 30. • To be discussed in a later lesson. • The Bluman book has slightly different rules from the way this Hawkes book does it. Just be aware of that. (Added content by D.R.S.) HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Test Statistic for Small Samples, n < 30: with d.f. = n – 1 To determine if the test statistic calculated from the sample is statistically significant we will need to look at the critical value. The critical values for n < 30 are found from the t-distribution. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Find the critical value: Find the critical t-score for a right-tailed test that has 14 degrees of freedom at the 0.025 level of significance. Solution: d.f. = 14 and a = 0.025 t0.025 = 2.145 (Added info) • It’s in Table C, Critical Values of t Inputs: • Column for α (alpha) • Choose the right column for one- or two-tailed • Row for d.f., degrees of freedom (= sample size n, minus 1) HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Rejection Regions: Determined by two things: 1. The type of hypothesis test. 2. The level of significance, a. Finding a Rejection Region: 1. Look up the critical value, tc, to determine the cutoff for the rejection region. 2. If the test statistic you calculate from the sample data falls in the a area, then reject H0. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Types of Hypothesis Tests: Alternative Hypothesis Type of Test < Value > Value ≠ Value Left-tailed test Right-tailed test Two-tailed test HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Rejection Regions for Left-Tailed Tests, Ha contains <: Reject if t ≤ –ta HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Rejection Regions for Right-Tailed Tests, Ha contains >: Reject if t ≥ ta HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Rejection Regions for Two-Tailed Tests, Ha contains ≠: Reject if | t | ≥ ta/2 HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Steps for Hypothesis Testing: IMPORTANT !!!! 1. State the null and alternative hypotheses. 2. Set up the hypothesis test by choosing the test statistic [that is, make a decision on whether it’s a t or z problem] and determining the values of the test statistic that would lead to rejecting the null hypothesis [the critical value(s)]. 3. Gather data and calculate the necessary sample statistics [t = or z = ]. 4. Draw a conclusion [Stating it two ways: reject/fail to reject, and also in plain English]. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Draw a conclusion: 27 college students are asked how many parking tickets they get a semester to test the claim that the average student gets more than 9 tickets a semester. The sample mean for the number of tickets was found to be 9.8 with a standard deviation of 1.5. Use a = 0.10. Solution: H0: μ ≤ 9 tickets Ha: μ > 9 tickets. n = 27, = 9, = 9.8, s = 1.5, d.f. = 26, a = 0.10 This is the CRITICAL VALUE. Either use table or t0.10 = 1.315 invT(0.10,26). Draw a PICTURE, too. Mark 1.315 and highlight the critical region. 2.771 This is the TEST STATISTIC. Mark 2.771 on your picture. Since t is greater than ta , we will reject the null hypothesis. Remarks about the parking ticket example • There was a choice made to do a t Test because the sample size was < 30. • There was an implicit assumption that the distribution of the count of parking tickets fits a normal distribution. • It was a RIGHT-TAILED TEST because of the “>” in the alternative hypothesis. (Added content by D.R.S.) Remarks about the parking ticket example, continued • Hypothesis tests are really essay questions. • The outline for the essay is the four-step procedure described in the earlier slide. • Each of the four steps needs to be explained plainly with a lot of words: Complete thoughts and complete sentences. • The final statement is in plain English, suitable for the general public to understand. (Added content by D.R.S.) The Parking Ticket problem done as an essay question 1. State the hypotheses • We investigate the claim that the average student receives more than nine parking tickets in a semester. Our hypotheses are: • Null hypothesis, H0: μ ≤ 9 • Alternative hypothesis: Ha: μ > 9, more than nine tickets per semester. 2. Find the critical value • This is a t Test, right tailed. • The sample size is n = 27. • The degrees of freedom is d.f. = n – 1 = 26. • The level of significance chosen is α = 0.10 • The critical value is tα=0.10,d.f.=26 = 1.315 (Added content by D.R.S.) The Parking Ticket problem done as an essay question 3. Compute the test statistic • (As shown on the earlier slide – formula & details) 2.771 4. Conclusions • Since the test value 2.771 is greater than the critical value 1.315, we reject the null hypothesis. • “There is sufficient evidence to support the claim that the average student gets more than 9 parking tickets per semester.” (Added content by D.R.S.) HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Draw a conclusion: A hometown department store has chosen its marketing strategies for many years under the assumption that the average shopper spends no more than $100 in their store. A newly hired store manager claims that the current average is higher, and wants to change their marketing scheme accordingly. A group of 24 shoppers is chosen at random and found to have spent on average $104.93 with a standard deviation of $9.07. Test the store manager’s claim at the 0.010 level of significance. Solution: First state the hypotheses: H0: ≤ 100 Ha: > 100 Next, set up the hypothesis test and determine the critical value: d.f. = 23, a = 0.010 t0.010 = 2.500 Reject if t ≥ ta , or if t > 2.500. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Solution (continued): Gather the data and calculate the necessary sample statistics: n = 24, = 100, = 104.93, s = 9.07, 2.663 Finally, draw a conclusion: Since t is greater than ta , we will reject the null hypothesis. Added content • Repeating several of the slides with extra comments about TI-84 • Also an important reminder: using this method for small sample sizes requires that the population being studied is NORMALLY DISTRIBUTED. Not uniform, not skewed, but a bell curve distribution is assumed. (This book somewhat glosses over this point. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) The critical values for n < 30 are found from the t-distribution. Find the Find the critical t-score for a right-tailed test that has 14 critical degrees of freedom at the 0.025 level of significance. value: d.f. = 14 and a = 0.025 Solution: t 0.025 = 2.145 invT(area to left, d.f.) = t value Plus or Minus Sign? Either by symmetry or by adjusting the area value for a right-tailed test. You still have to understand whether it’s left-tailed, righttailed, or two-tailed. The calculator won’t do that for you ! HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Draw a conclusion: 27 college students are asked how many parking tickets they get a semester to test the claim that the average student gets more than 9 tickets a semester. The sample mean for the number of tickets was found to be 9.8 with a standard deviation of 1.5. Use a = 0.10. Solution: n = 27, = 9, t0.10 = 1.315 = 9.8, s = 1.5, d.f. = 26, a = 0.10 Again, fix up the sign by knowing that it’s a right-tailed test, therefore positive critical value. The calculator will not do this thinking for you. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) (continued from previous slide) Solution: n = 27, = 9, = 9.8, s = 1.5, d.f. = 26, a = 0.10 EXTRA ( ) around complicated numerators and denominators !!! t0.10 = 1.315 2.771 Since t is greater than ta , we will reject the null hypothesis. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Draw a conclusion: A hometown department store has chosen its marketing strategies for many years under the assumption that the average shopper spends no more than $100 in their store. A newly hired store manager claims that the current average is higher, and wants to change their marketing scheme accordingly. A group of 24 shoppers is chosen at random and found to have spent on average $104.93 with a standard deviation of $9.07. Test the store manager’s claim at the 0.010 level of significance. Solution: First state the hypotheses: H0: ≤ 100 Ha: > 100 Next, set up the hypothesis test and determine the critical value: d.f. = 23, a = 0.010 t0.010 = 2.500 Reject if t ≥ ta , or if t > 2.500. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Solution (continued): Gather the data and calculate the necessary sample statistics: n = 24, = 100, = 104.93, s = 9.07, 2.663 Finally, draw a conclusion: Since t is greater than ta , we will reject the null hypothesis. TI-84 T-Test • The TI-84 has a built in Hypothesis Testing tool • STAT menu, TESTS submenu, 2:T-Test • You must understand how to do hypothesis testing with charts and formulas, however. The calculator is not a substitute for that. Mere button smashing will lead you to failure. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Example: 27 college students are asked how many parking tickets they get a semester to test the claim that the average student gets more than 9 tickets a semester. The sample mean for the number of tickets was found to be 9.8 with a standard deviation of 1.5. Use a = 0.10. Solution: Sample’s Mean, Standard deviation, and Size Highlight “Calculate” and press ENTER Choose “Data” if the 27 data values were in TI-84 Lists, Stats if we have summary statistics already calculated Null hypothesis’s mean Direction of the Alternative Hypothesis HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) Example, continued: . . . . Use a = 0.10. Verify that it did the Test you wanted and that it has the correct Alternative Hypothesis. Verify that the sample data is correct. When using the calculator’s T-Test, we use the “p-value method”. You don’t need a t critical value. Instead, you compare your p-value to the α (alpha) level of significance. If your p < α(alpha), then the decision is “Reject H0”. The t= is the Test Statistic. It comes from the same formula as the one we’ve been using. The p = is the p-value. It is the area to the right of that t value (in the case of this righttailed test.) It is the probability of getting a t value as extreme as the t value we got. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.2 Hypothesis Testing for Means (Small Samples) The other example, done with TI-84 T-Test and the p-value method: A hometown department store has chosen its marketing strategies for many years under the assumption that the average shopper spends no more than $100 in their store. A newly hired store manager claims that the current average is higher, and wants to change their marketing scheme accordingly. A group of 24 shoppers is chosen at random and found to have spent on average $104.93 with a standard deviation of $9.07. Test the store manager’s claim at the 0.010 level of significance. H0: ≤ 100 Ha: > 100 Compare your p-value p=.0069501788 to alpha: α=0.010 and make the decision: Should we reject H0?