1 / 48

Statistics and Quantitative Analysis U4320

Statistics and Quantitative Analysis U4320. Segment 7 : Hypothesis Testing Prof. Sharyn O’Halloran. Hypothesis Testing. I. Introduction A. Review of Confidence Intervals. Introduction (cont.). B. Hypothesis Testing: Basic Definitions

Download Presentation

Statistics and Quantitative Analysis U4320

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Statistics and Quantitative Analysis U4320 Segment 7 : Hypothesis Testing Prof. Sharyn O’Halloran

  2. Hypothesis Testing • I. Introduction • A. Review of Confidence Intervals

  3. Introduction (cont.) • B. Hypothesis Testing: Basic Definitions • 1. A Hypotheses is a statement about the population • 2. Null Hypothesis • The Null Hypothesis (Ho)- the statement about our data that we want to test. • It is always stated as an equality. For instance; • Ho: m = 82, where m is the average test score • Or, H0: D = 0, where D is the difference between men's and women' salaries is zero.

  4. Introduction (cont.) • 3. Alternative Hypothesis • Every Null Hypothesis has an associated Alternative Hypothesis, denoted Ha. • This is always stated as an inequality either , >, or <. • For instances, the alternative hypothesis to the test scores having a mean of 82 might be Ha: m 82. • The alternative hypothesis to men's and women's' salaries being equal might be Ha: D > 0.

  5. Introduction (cont.) • 4. One Tail vs. Two Tail Tests • If the alternative hypothesis is in terms of a  sign, it is called a two-tailed test. • If the alternative hypothesis is in terms of a < or > sign, it is called a one-tailed test.

  6. Introduction (cont.) • C. Three Methods for Testing Hypothesis • 1. Method I: Testing hypotheses using confidence intervals. • 2. Method II: Testing hypotheses using p-values. • 3. Method III: Testing hypotheses using critical values.

  7. Hypothesis Testing Using Confidence Intervals • II. Method I: Hypothesis Testing Using Confidence Intervals Note: This method works only for two-tail tests

  8. Hypothesis Testing Using Confidence Intervals (cont.) • A. Example: Differences in Means • In a large university, 10 male professors and 5 female professors were randomly sampled. Their salaries were:

  9. Hypothesis Testing Using Confidence Intervals (cont.) • 1. Step 1: Define Hypothesis • We are interested in the difference between the means of men's and women's salaries. Call this difference D = (m1-m2), • The males state that D = 0, • The females say that D = 7, • Do the data support both of these hypotheses, one of them, or neither? We will test these hypotheses at the 5 % a-level.

  10. Hypothesis Testing Using Confidence Intervals (cont.) • 2. Step 2: Calculate a Confidence Interval • Form a 95% confidence interval: • Notice that our data are two samples, one of men and other of women, from the same larger population of university professors. So we can pool our sample variances.

  11. Hypothesis Testing Using Confidence Intervals (cont.) (cont.) • So the 95% confidence interval is from 1 to 9 thousand dollars.

  12. Hypothesis Testing Using Confidence Intervals (cont.) • 3. Step 3: Accept or Reject the Hypothesis • According to these data, is the claim that D = 0 plausible? • We must reject the hypothesis that D = 0 because it falls outside the 95% confidence interval • What about the hypothesis that D = 7?

  13. Hypothesis Testing Using Confidence Intervals (cont.) • 4. Summary: Step by Step Procedure • 1. Step 1: Define Hypothesis • Pick a significance level; the usual one is 5%. • 2. Step 2: Construct confidence interval • Formula depends on type of data, (matched or pooled variance) and how confident you want to be. • 3. Step 3: Accept or Reject • If falls within this interval, then we fail to reject the null, otherwise we reject it.

  14. Hypothesis Testing Using Confidence Intervals (cont.) • B. Another Example: Matched Data • A firm producing plate glass has developed a less expensive tempering process to allow glass for fireplaces to rise to a higher temperature without breaking. To test it, five different plates of glass were drawn randomly from a production run, then cut in half, with one half tempered by the new process and one half tempered by the old. The two halves were then heated until they broke. The results of the experiment look like this: (next slide)

  15. Hypothesis Testing Using Confidence Intervals (cont.) • Matched Data (cont.) • We want to test the hypothesis that the two processes are equal at the 95% confidence level or at the a = .05 significance level.

  16. Hypothesis Testing Using Confidence Intervals (cont.) • 1. Step 1: Define Hypothesis H0: D = 0; Ha: D¹ 0; Significance level a = 5%. • 2. Step 2: Calculate a 95% Confidence interval. (s2unknown)

  17. Hypothesis Testing Using Confidence Intervals (cont.) • Step 2 (cont.)

  18. Hypothesis Testing Using Confidence Intervals (cont.) • 3. Step 3: Accept or reject null hypothesis? • So we do not reject the hypothesis that H0: D = 0 because 0 falls within that range. The two processes are seen as indistinguishable.

  19. p-Values • III. Method II: p-Values • P-values are essentially the significance level. • In essence, we are calculating the probability that the hypothesis is true. It summarizes the credibility of the null hypothesis.

  20. p-Values • A. s known • 1. Step 1: State the Hypothesis • A manufacturing process produces TV. tubes with an average lifem=1200 hours and s = 300 hours. A new process is thought to give tubes a higher average life. And out of a sample of 100 tubes we find that they have an average life = 1265 hours. Is the new process really any better than the old?

  21. p-Values • Step 1 (cont.) H0: m = 1200 Ha: m > 1200 a= .05 or 5% significance-level • This is a one-tailed test because we have put all the area in one-tail of the distribution. We are interested in those values that are greater than the mean.

  22. p-Values • 2. Step 2: Calculate p-value • We know s and n is large so we can use the normal distribution. • m0 = 1200, and s= 300 and n= 100 • Standard error = s/Ön = 300/ Ö100 = 30. • The observed value = 1265. • a. Standardize • We then standardize (get the z-value )

  23. p-Values • b. Find z-score (probability of the event occurring)

  24. p-Values • 3. Step 3: Accept or Reject the Hypothesis • This suggests that if the null hypothesis was true that there would be only a 1.5% probability of observing as larger as 1265. • Since 1.5% lies to the right of our initial 5% significance level, we can reject the null hypothesis.

  25. p-Values • 4. Two-Tailed Test H0: m = 1200 Ha: m¹ 1200 a = .05 or 5% significance-level

  26. p-Values • Accept or Reject • Since the area to the right of 1265 is only 1.5%, we can again reject H0.

  27. p-Values • B. s unknown • Usually s is unknown and has to be estimated with the sample standard deviation s. The test statistic is then t instead of Z.

  28. p-Values • 1. Step 1: State Hypothesis (e.g., difference in men's and women's salaries) • We know from the above example, ( - ) = 5 • Standard Error = 1.84 • Is this a one or a two tailed test?

  29. p-Values • 2. Step 2: Calculate p-value • a. Standardize

  30. p-Values • b. Find probability of event from t-table • Degrees of freedom = (n-1) = 13 • So the probability of observing a t-value of 2.72 lies beyond • This means that the tail probability is smaller than .01. That is, p-value < .01.

  31. p-Values • 3. Step 3: Accept or Reject Hypothesis • Since the p-value is a measure of the credibility of H0, such a low value (below a = 5%) leads us to conclude that H0 is implausible. • Therefore, we reject the null hypothesis.

  32. p-Values • C. Getting t-values from Computers (Review of Homework) • 1. Calculate t-values • How does the computer calculate the t-value?

  33. p-Values • 2. Calculate p-value • The 2-tail probability gives the area to the right of the t-value times two. • If this value is less than your significance level for a 2-tail test, then reject your null hypothesis.

  34. p-Values • 3. Example: Sample Homework • For example, the difference of means test between men and women's incomes, produced a t-value = 6.60 and an associated p-value of .00. • Therefore, I can reject the hypothesis that m1-m2 = 0 because .00 is less than .025.

  35. p-Values • D. Summary • 1. Step 1: Define Hypothesis • Choose H0, Ha and a significance level a (default is 5%). • 2. Step 2: Calculate p-value • Calculate your p-value from the statistics • if s known • if s is unknown

  36. p-Values • 3. Step 3: Accept or Reject hypothesis Reject H0 if p-value a • For a One-Tailed Test • Reject H0 if the p-value is less than the significance level a. • Accept H0 otherwise. • For a Two-tailed Test • Reject H0 if the p-value is less than 1/2 the significance level.(i.e., 1/2a = .025) • Accept H0 otherwise.

  37. Critical Values • IV. Method III: Critical Values • Classical hypothesis testing is very similar to the p-value approach. • A. Example: Manufacturing of TV tubes • 1. State the Hypothesis: H0: m = 1200 n=100 Ha: m > 1200 m0=1200 a = 5%. s=300

  38. Critical Values • 2. Test Hypothesis: Find the Critical Values • A. In General • What z-value is associated with 5% of the area under the curve? • From the z-tables we see that the area of 5% is associated with a z-value of 1.64. • The question is what value on the x-axis corresponds to a z-value of 1.64?

  39. Critical Values • B. Critical Value • The critical value is the X-value that corresponds to a Z-value. • We obtain the critical value by arbitrarily setting a= 5% and calculating: • C. Calculating the Critical Value for Manufacturing TV Tubes • We know that the m0=1200, and SE=300/Ö100=30. • The Critical Value then is:

  40. Critical Values • 3. Step 3: Reject or Accept the Hypothesis • To accept or reject our hypothesis we collect data and see if our sample mean is greater then this critical value. • From the above example we observed a sample mean = 1265. • Therefore we reject H0: m=1200 because 1265>1249. • So we once again conclude that the new process is better than the old.

  41. Critical Values • B. Example of 2-tailed test How do we construct a two-tailed test at the 5% significance value? • 1. Step 1: State Hypothesis H0: m = 1200 Ha: m¹ 1200 a = 5%.

  42. Critical Values • 2. Step 2: Calculate Critical Value • We use Z.025 instead of Z.05. • In this case, we would get c = m0 Z.025*SE. • c = 1200 1.96*30 = 1141 and 1259.

  43. Critical Values • 3 Step 3: Accept or reject null Hypothesis • We would reject H0 if the observed fell below 1141 or above 1259. • Again 1265 exceeds the critical value so we still reject H0.

  44. Critical Values • C. Summary: • 1. Step 1: Define Hypothesis • State H0; • State Ha; and • Choose a significance level a.

  45. Critical Values • 2. Step 2: Calculate Critical Value • Draw a normal curve and find the critical values at the level of significance you arbitrarily set. Usually at the .05 significance-level. • For two-tailed test: • s known: c = m0± Z.025*SE. • s unknown: c = m0 + t.025*SE(estimated) • For one-tailed test: • s known: c = m0 + Z.05*SE. • s unknown: c = m0 + t.05*SE(estimated)

  46. Critical Values • 3. Step 3: Accept or Reject • Then collect sample data. • If the sample mean exceeds the critical value, then reject H0; otherwise accept H0.

  47. Notes About the Exam • V. Notes About the Exam • 1. Hand in your homework at the beginning of class • 2. The exam will cover the material through today's lecture. • 3. Problems, no definitions. • 4. You may bring a calculator and one 3 X 5 index card with whatever you want written on it. • 5. Z-tables and t-tables will be supplied.

  48. Review Session Review Session: Saturday March 8 11 to 1 PM Room 411 IAB

More Related