HAWKES LEARNING SYSTEMS math courseware specialists Copyright © 2008 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 10.3 Hypothesis Testing for Means (Large Samples) What this lesson is about • • • • • • SAME - Stating the hypotheses, H0 and Ha. SAME – One-tailed or Two-tailed? DIFFERENT – large sample size, n ≥ 30. DIFFERENT – Critical value is a z value, not t SAME – Calculating the test statistic SAME – Making the decision HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.3 Hypothesis Testing for Means (Large Samples) Test Statistic for Large Samples, n ≥ 30: To determine if the test statistic calculated from the sample is statistically significant we will need to look at the critical value. c One-Tailed Test Two-Tailed Test 0.90 1.28 ±1.645 0.95 1.645 ±1.96 0.98 2.05 ±2.33 0.99 2.33 ±2.575 More about the critical values • Hawkes uses the “c” language from the Confidence Interval study, so I fixed it here. • Table gives values for the common c values. • Others use “α”, “Level of Significance”, = 1 – c. α – alpha (and c too) OneTailed Test TwoTailed Test 0.10 (0.90) 1.28 ±1.645 0.05 (0.95) 1.645 ±1.96 0.02 (0.98) 2.05 ±2.33 0.01 (0.99) 2.33 ±2.575 (Added content by D.R.S.) More about the critical values • α means area in the tail. • Remember TI-84 invNorm(area) = z value – – – – – – invNorm(0.1000) invNorm(0.0500) invNorm(0.0500/2) invNorm(0.0200) invNorm(0.0100) invNorm(0.0100/2) α – alpha (and c too) OneTailed Test TwoTailed Test 0.10 (0.90) 1.28 ±1.645 0.05 (0.95) 1.645 ±1.96 0.02 (0.98) 2.05 ±2.33 0.01 (0.99) 2.33 ±2.575 (Added content by D.R.S.) HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.3 Hypothesis Testing for Means (Large Samples) Draw a conclusion: A research company reports that in 2006 the average American woman is 25 years of age at her first marriage. A researcher claims that for women in California, this estimate is too low. A survey of 213 newlywed women in California gave a mean of 25.4 years with a standard deviation of 2.3 years. Using a 95% level of confidence, determine if the data supports the researcher’s claim. Solution: First state the hypotheses: H0: m ≤ 25 Ha: m > 25 Next, set up the hypothesis test and determine the critical value: c = 0.95 zc = 1.645 Reject if z ≥ zc, or if z ≥ 1.645. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.3 Hypothesis Testing for Means (Large Samples) Solution (continued): Gather the data and calculate the necessary sample statistics: n = 213, m = 25, = 25.4, s = 2.3, 2.54 Finally, draw a conclusion: Since z is greater than zc, we will reject the null hypothesis. Caution – a shift in the discussion What they’ve done so far • The “Tradtional”, or “Classical” method of hypothesis testing • You find a “critical value” based on the α level of significance (or c % confidence level) • You compute a “test value” • If test value is more extreme, “reject H0”. Where they’re going next • The “p-value” method of hypothesis testing. • You don’t find a critical value. • You do find a “test value” as usual. • Find p-value, the area that’s more extreme than the test value • If p-value > α, “reject H0”. (added content by D.R.S.) HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.3 Hypothesis Testing for Means (Large Samples) p-Values: • A p-value is the probability of obtaining a sample more extreme than the one observed on your data, when H0 is assumed to be true. • To find the p-value, first calculate the z-score from the sample data and then find the corresponding probability for that z-score. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.3 Hypothesis Testing for Means (Large Samples) Calculate the p-value: Calculate the p-value for a hypothesis test with the following hypotheses. Assume that data has been collected and the test statistic was calculated to be z = –1.34. H0: m ≥ 0.15 Ha: m < 0.15 Solution: The alternative hypothesis tells us that this is a left-tailed test. Therefore, the p-value for this situation is the probability that z is less than –1.34. p = 0.0901 “Find p-value” is really simple • If the test statistic is some negative z value, – the p-value is simply “what area lies to the left of that z value?” – You can use the printed table of z and area – Or use the TI-84 normalcdf(low z, high z) = area – Previous example: normalcdf(-1E99,-1.34) – 2ND DISTR (on VARS key) 2:normalcdf( – (-) 1 2ND comma 99 prints -1E99 means -infinity (added content by D.R.S.) HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.3 Hypothesis Testing for Means (Large Samples) Calculate the p-value: Calculate the p-value for a hypothesis test with the following hypotheses. Assume that data have been collected and the test statistic was calculated to be z = 2.78. H0: m ≤ 0.43 Ha: m > 0.43 Solution: The alternative hypothesis tells us that this is a right-tailed test. Therefore, the p-value for this situation is the probability that z is greater than 2.78. p = 0.0027 “Find p-value” is really simple • If the test statistic is some positive z value, – the p-value is simply “what area lies to the right of that z value?” – You can use the printed table of z and area, lookup for –z (or lookup z, and compute 1.0000 – area) – Or use the TI-84 normalcdf(low z, high z) = area – Previous example: normalcdf(2.78, 1E99) (added content by D.R.S.) HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.3 Hypothesis Testing for Means (Large Samples) Calculate the p-value: Calculate the p-value for a hypothesis test with the following hypotheses. Assume that data have been collected and the test statistic was calculated to be z = –2.15. H0: m = 0.78 Ha: m ≠ 0.78 Solution: The alternative hypothesis tells us that this is a two-tailed test. Therefore, the p-value for this situation is the probability that z is either less than –2.15 or greater than 2.15. p = 0.0158 (2) = 0.0316 Important remark on two-tailed test and p value • Find the extreme area beyond your z test value as usual (either area to left or to right) • Then DOUBLE IT to get the p value. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.3 Hypothesis Testing for Means (Large Samples) Conclusions for a Hypothesis Testing Using p-Values: 1. If p ≤ a, then reject the null hypothesis. 2. If p > a, then fail to reject the null hypothesis. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.3 Hypothesis Testing for Means (Large Samples) Draw a conclusion: Calculate the p-value for the following data and draw a conclusion based on the given value of alpha. a. Left-tailed test with z = –1.34 and a = 0.05. p = 0.0901 which is greater than 0.05 so we fail to reject the null hypothesis. b. Two-tailed test with z = –2.15 and a = 0.10. p = 0.0158(2) = 0.0316 which is less than 0.10 so we reject the null hypothesis. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.3 Hypothesis Testing for Means (Large Samples) Steps for Using p-Values in Hypothesis Testing: 1. State the null and alternative hypotheses. 2. Set up the hypothesis test by choosing the test statistic and stating the level of significance. 3. Gather data and calculate the necessary sample statistics. 4. Draw a conclusion by comparing the p-value to the level of significance. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.3 Hypothesis Testing for Means (Large Samples) Draw a conclusion: A recent study showed that the average number of children for women in Europe is 1.48. A global watch group claims that German women have an average fertility rate which is different from the rest of Europe. To test their claim, they surveyed 128 German women and found that had an average fertility rate of 1.39 children with a standard deviation of 0.84. Does this data support the claim made by the global watch group at the 90% level of confidence? Solution: First state the hypotheses: H0: m = 1.48 Ha: m ≠ 1.48 Next, set up the hypothesis test and state the level of significance: c = 0.90 a = 0.10 Reject if p < a, or if p < 0.10. HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.3 Hypothesis Testing for Means (Large Samples) Solution (continued): Gather the data and calculate the necessary sample statistics: n = 128, m = 1.48, = 1.39, s = 0.84, –1.21 Since this is a two-tailed test, p = 0.1131(2) = 0.2262. Finally, draw a conclusion: Since p is greater than a, we will fail to reject the null hypothesis. The evidence does not support the watch group’s claim at the 90% level of confidence. TI-84 Built-In Hypothesis Testing • It’s easiest to use if you’re thinking in terms of the the p-value Method. • You still need to be able to construct hypotheses, etc. The calculator won’t do the thinking for you. • You still have to choose between t and z tests. • You can’t do everything with it because Hawkes will ask you some small-step questions, too. (Added content by D.R.S.) HAWKES LEARNING SYSTEMS Hypothesis Testing math courseware specialists 10.3 Hypothesis Testing for Means (Large Samples) Draw a conclusion: A recent study showed that the average number of children for women in Europe is 1.48. A global watch group claims that German women have an average fertility rate which is different from the rest of Europe. To test their claim, they surveyed 128 German women and found that had an average fertility rate of 1.39 children with a standard deviation of 0.84. Does this data support the claim made by the global watch group at the 90% level of confidence? Solution: First state the hypotheses: H0: m = 1.48 Ha: m ≠ 1.48 This is all still necessary, even if we do the problem with the TI-84 z Test. Next, set up the hypothesis test and state the level of significance: c = 0.90 a = 0.10 Reject if p < a, or if p < 0.10. TI-84 Inputs for Z-Test STAT, TEST, 1:Z-Test The inputs, then “Calculate” • Data if you put raw data in L# list, Stats if you have summary stats of sample. • μ0 is the null hypoth’s mean • σ is standard deviation • Bar_x is sample’s mean • n = sample size • ≠ or < or > as per alternative hypothesis. (Added content by D.R.S.) TI-84 Outputs from Z-Test The TI-84 output screen What does it all mean? • It reminds you that you did a Z-Test • It reminds you of Ha. • It calculates the test statistic • It gives you the p-value (and if a two-tailed test, it already doubled it for you). • It reports back the sample mean and sample size. (Added content by D.R.S.) TI-84 p-value method conclusion The TI-84 output screen Same logic as we saw before • Compare the computed pvalue to the specified level of significance, α. • If the p-value is < α, then reject the null hypothesis. • If the p-value is > α, then “fail to reject H0”. • Here, we “fail to reject H0” because 0.2254 > 0.10 (Added content by D.R.S.)