1 / 55

Chapter 11 (and part of 12.1 and 12.3)

Chapter 11 (and part of 12.1 and 12.3). Introduction to Hypothesis Testing. Nonstatistical Hypothesis Testing…. A criminal trial is an example of hypothesis testing without the statistics. In a trial a jury must decide between two hypotheses. The null hypothesis is

obert
Download Presentation

Chapter 11 (and part of 12.1 and 12.3)

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. Chapter 11 (and part of 12.1 and 12.3) Introduction to Hypothesis Testing

  2. Nonstatistical Hypothesis Testing… • A criminal trial is an example of hypothesis testing without the statistics. • In a trial a jury must decide between two hypotheses. The null hypothesis is • H0: The defendant is innocent • The alternative hypothesis or research hypothesis is • H1: The defendant is guilty • The jury does not know which hypothesis is true. They must make a decision on the basis of evidence presented.

  3. Nonstatistical Hypothesis Testing… • In the language of statistics convicting the defendant is called rejecting the null hypothesis in favor of the alternative hypothesis. That is, the jury is saying that there is enough evidence to conclude that the defendant is guilty (i.e., there is enough evidence to support the alternative hypothesis). • If the jury acquits it is stating that there is not enough evidence to support the alternative hypothesis. Notice that the jury is not saying that the defendant is innocent, only that there is not enough evidence to support the alternative hypothesis. That is why we never say that we accept the null hypothesis. We only do not reject it.

  4. Nonstatistical Hypothesis Testing… • There are two possible errors. • A Type I error occurs when accept a false alternate hypothesis. That is, a Type I error occurs when the jury convicts an innocent person. • I say that the defendant is guilty, but he really is innocent. • A Type II error occurs when we reject a true alternate hypothesis. That occurs when a guilty defendant is acquitted. • I say that the defendant is innocent, but he really is guilty.

  5. Nonstatistical Hypothesis Testing… • The probability of a Type I error is denoted as α (Greek letter alpha). The probability of a type II error is β (Greek letter beta). • The two probabilities are inversely related. Decreasing one increases the other.

  6. Nonstatistical Hypothesis Testing… • In our judicial system Type I errors are regarded as more serious. We try to avoid convicting innocent people. We are more willing to acquit guilty people. • We arrange to make α small by requiring the prosecution to prove its case and instructing the jury to find the defendant guilty only if there is “evidence beyond a reasonable doubt.”

  7. An Errors Example A dental laboratory can check for mercury vapor contamination by mechanically monitoring the air quality within the laboratory. As the air is monitored, a decision is made regarding the following hypothesis. H0: The laboratory is not contaminated with mercury vapor H1: The laboratory is contaminated with mercury vapor

  8. Type I or Type II Errors:Example H0: Lab is not contaminated with mercury vapor. H1: Lab is contaminated with mercury vapor. A Type I Error occurs if we conclude the lab is contaminated when, in fact, the lab is not contaminated with mercury vapor. Consequences: The office would probably be closed, and procedures to reduce the mercury vapor levels would be implemented. This means costs for decontamination and lack of income from patients, but no one is endangered.

  9. Type I or Type II Errors: Example H0: Lab is not contaminated with mercury vapor. H1: Lab is contaminated with mercury vapor. A Type II Error occurs if we conclude the lab is NOT contaminated when, in fact, the lab is contaminated with mercury vapor. Consequences: The office would be open and new patients and workers could be exposed to high levels of mercury vapor. This means possible law suits, people getting sick, dangerous work environment. It could lead to a bad reputation for this dental office.

  10. Type I or Type II Errors: Example H0: Lab is not contaminated with mercury vapor. H1: Lab is contaminated with mercury vapor. Which error is worse? Probably Type II in my opinion. Hence, I want to avoid this, so I set the probability low. The Type I Error means a loss of income, so it’s not good for business, but it’s not as serious. I’d set a > b. I’d like b small at .01, and a maybe at .05.

  11. Nonstatistical Hypothesis Testing… • The critical concepts are theses: • 1. There are two hypotheses, the null and the alternative hypotheses. • 2. The procedure begins with the assumption that the null hypothesis is true. • 3. The goal is to determine whether there is enough evidence to infer that the alternative hypothesis is true. • 4. There are two possible decisions: • Conclude that there is enough evidence to support the alternative hypothesis. • Conclude that there is not enough evidence to support the alternative hypothesis.

  12. Examples: Give the null hypothesis and the alternative hypothesis You are investigating a complaint that “special delivery mail takes too much time” to be delivered You want to show that people find the new design for a recliner chair more comfortable than the old design. You are trying to show that cigarette smoke has an effect on the quality of a person’s life

  13. Examples: Give the null hypothesis and the alternative hypothesis The mean age of the students enrolled in evening classes at a certain college is greater than 26 years. The mean weight of packages shipped on Air Express during the past month was less than 36.7 lb. The mean life of fluorescent light bulbs is at least 1600 hours. The mean grade of a student in a statistics class is not 80.

  14. Nonstatistical Hypothesis Testing… • 5. Two possible errors can be made. • Type I error: Accept a false alternative hypothesis • Type II error: Reject a true alternative hypothesis. • P(Type I error) = α • P(Type II error) = β

  15. Introduction.Statistical Hypothesis Testing • In addition to estimation, hypothesis testing is a procedure for making inferences about a population. • Hypothesis testing allows us to determine whether enough statistical evidence exists to conclude that a belief (i.e. hypothesis) about a parameter is supported by the data.

  16. Concepts of Hypothesis Testing (1)… • There are two hypotheses. One is called the null hypothesis and the other the alternative or research hypothesis. The usual notation is: • H0: — the ‘null’ hypothesis • H1: — the ‘alternative’ or ‘research’ hypothesis • The null hypothesis (H0) will always state that the parameter equals the value specified in the alternative hypothesis (H1)

  17. Concepts of Hypothesis Testing… • Once the null and alternative hypotheses are stated, the next step is to randomly sample the population and calculate a test statistic (in this example, the sample mean). • If the test statistic’s value is inconsistent with the null hypothesis we reject the null hypothesis and infer that the alternative hypothesis is true. • For example, if we’re trying to decide whether the mean is not equal to 350, a large value of (say, 600) would provide enough evidence. If is close to 350 (say, 355) we could not say that this provides a great deal of evidence to infer that the population mean is different than 350.

  18. Concepts of Hypothesis Testing… • Consider Example 10.1(p 309) (mean demand for computers during assembly lead time) again. Rather than estimate the mean demand, our operations manager wants to know whether the mean is different from 350 units. We can rephrase this request into a test of the hypothesis: • H0: = 350 • Thus, our research hypothesis becomes: • H1: ≠ 350 This is what we are interested in determining…

  19. Concepts of Hypothesis Testing (2)… • The testing procedure begins with the assumption that the null hypothesis is true. • Thus, until we have further statistical evidence, we will assume: • H0: = 350 (assumed to be TRUE)

  20. Concepts of Hypothesis Testing (3)… • The goal of the process is to determine whether there is enough evidence to infer that the alternative hypothesis is true. • That is, is there sufficient statistical information to determine if this statement: • H1: ≠ 350, is true? This is what we are interested in determining…

  21. Concepts of Hypothesis Testing (4)… • There are two possible decisions that can be made: • Conclude that there is enough evidence to support the alternative hypothesis (also stated as: rejecting the null hypothesis in favor of the alternative) • Conclude that there is not enough evidence to support the alternative hypothesis (also stated as: not rejecting the null hypothesis in favor of the alternative) NOTE: we do not say that we accept the null hypothesis…

  22. Concepts of Hypothesis Testing (5)… • Two possible errors can be made in any test: • A Type I error occurs when we accept a false alternate hypothesis and • A Type II error occurs when we reject a true alternative hypothesis. • There are probabilities associated with each type of error: • P(Type I error) = • P(Type II error ) = • is called the significance level.

  23. Types of Errors… • A Type I error occurs when we or accept H1 when it is FALSE • A Type II error occurs when we do not accept H1 when it is TRUE)

  24. Types of Errors… • Back to our example, we would commit a Type I error if: • Accept H1 when it is FALSE • We reject H0 ( = 350) in favor of H1 ( ≠ 350) when in fact the real value of is 350. • We would commit a Type II error in the case where: • Reject H1 when it is TRUE • We believe H0 is correct ( = 350), when in fact the real value of is something other than 350.

  25. Recap I… • 1) Two hypotheses: H0 & H1 • 2) ASSUME H0 is TRUE • 3) GOAL: determine if there is enough evidence to infer that H1 is TRUE • 4) Two possible decisions: • Accept H1 • Reject H1 • 5) Two possible types of errors: • Type I: Accept a false H1 [P(Type I)= ] • Type II: Reject a true H1 [P(Type II)= ]

  26. Recap II… • The null hypothesis must specify a single value of the parameter (e.g. =___) • Assume the null hypothesis is TRUE. • Sample from the population, and build a statistic related to the parameter hypothesized (e.g. the sample mean, ) • Compare the statistic with the value specified in the first step

  27. Example 11.1… • A department store manager determines that a new billing system will be cost-effective only if the mean monthly account is more than $170. • A random sample of 400 monthly accounts is drawn, for which the sample mean is $178. The accounts are approximately normally distributed with a standard deviation of $65. • Can we conclude that the new system will be cost-effective?

  28. Example 11.1… • The system will be cost effective if the mean account balance for all customers is greater than $170. • We express this belief as a our research hypothesis, that is: • H1: > 170 (this is what we want to determine) • Thus, our null hypothesis becomes: • H0: = 170 (this specifies a single value for the parameter of interest)

  29. Example 11.1… • What we want to show: • H1: > 170 • H0: = 170 (we’ll assume this is true) • We know: • n = 400, • = 178, and • = 65 • Hmm. What to do next?!

  30. Example 11.1… • To test our hypotheses, we can use two different approaches: • The rejection region approach (typically used when computing statistics manually), and • The p-value approach (which is generally used with a computer and statistical software). • We will use the p-value approach in this class…

  31. p-Value • The p-value of a test is the probability of observing a test statistic at least as extreme as the one computed given that the null hypothesis is true. • In the case of our department store example, what is the probability of observing a sample mean at least as extreme as the one already observed (i.e. = 178), given that the null hypothesis (H0: = 170) is true? p-value

  32. Interpreting the p-value… • The smaller the p-value, the more statistical evidence exists to support the alternative hypothesis. • If the p-value is less than 1%, there is overwhelming evidence that supports the alternative hypothesis. • If the p-value is between 1% and 5%, there is a strong evidence that supports the alternative hypothesis. • If the p-value is between 5% and 10% there is a weak evidence that supports the alternative hypothesis. • If the p-value exceeds 10%, there is no evidence that supports the alternative hypothesis. • We observe a p-value of .0069, hence there is overwhelming evidence to support H1: > 170.

  33. Interpreting the p-value… Overwhelming Evidence (Highly Significant) Strong Evidence (Significant) Weak Evidence (Not Significant) No Evidence (Not Significant) 0 .01 .05 .10 p=.0069

  34. Interpreting the p-value… • Compare the p-value with the selected value of the significance level: • If the p-value is less than , we judge the p-value to be small enough to reject the null hypothesis. • If the p-value is greater than, so we do not reject the null hypothesis. • Since p-value = .0069 < = .05, we accept H1 over H0

  35. Interpreting the p-value Note how the event is rare under H0 when but... …it becomes more probable under H1, when • Because the probability that the sample mean will assume a value of more than 178 when m = 170 is so small (.0069), there are reasons to believe that m > 170.

  36. Calculating p-values with Excel… • Consider the dataset for Example 11.1. • Click: Tools > Data Analysis Plus > Z-Test: Mean p-value

  37. Conclusions of a Test of Hypothesis… • If we accept the alternative hypothesis, we conclude that there is enough evidence to infer that the alternative hypothesis is true. • If we reject the alternative hypothesis, we conclude that there is not enough statistical evidence to infer that the alternative hypothesis is true. • Remember: The alternative hypothesis is the more important one. It represents what we are investigating.

  38. Chapter-Opening Example… • The objective of the study is to draw a conclusion about the mean payment period. Thus, the parameter to be tested is the population mean. We want to know whether there is enough statistical evidence to show that the population mean is less than 22 days. Thus, the alternative hypothesis is • H1:μ < 22 • The null hypothesis is • H0:μ = 22

  39. Chapter-Opening Example… • The test statistic is • We wish to reject the null hypothesis in favor of the alternative only if the sample mean and hence the value of the test statistic is small enough. As a result we locate the region of interest in the left tail of the sampling distribution. • We set the significance level at 10%.

  40. Chapter-Opening Example… • From the data in SSA we compute • p-value = P(Z < -.91) = .5 - .3186 = .1814

  41. Chapter-Opening Example… • 0.1814 > 0.10 so • Conclusion: There is not enough evidence to infer that the mean is less than 22. • There is not enough evidence to infer that the plan will be profitable.

  42. One– and Two–Tail Testing… • The department store example was a one tail test, because the rejection region is located in only one tail of the sampling distribution: • More correctly, this was an example of a right tail test.

  43. One– and Two–Tail Testing… • The SSA Envelope example is a left tail test because the rejection region was located in the lefttail of the sampling distribution.

  44. Right-Tail Testing… • Calculate the critical value of the mean ( ) and compare against the observed value of the sample mean ( )…

  45. Left-Tail Testing… • Calculate the critical value of the mean ( ) and compare against the observed value of the sample mean ( )…

  46. Two–Tail Testing… • Two tail testing is used when we want to test a research hypothesis that a parameter is not equal (≠) to some value

  47. Example 11.2… • AT&T’s argues that its rates are such that customers won’t see a difference in their phone bills between them and their competitors. They calculate the mean and standard deviation for all their customers at $17.09 and $3.87 (respectively). • They then sample 100 customers at random and recalculate a monthly phone bill based on competitor’s rates. • What we want to show is whether or not: • H1: ≠ 17.09. We do this by assuming that: • H0: = 17.09

  48. Two-Tail Test p-value… • In general, the p-value in a two-tail test is determined by • p-value = 2P(Z > |z|) • where z is the actual value of the test statistic and |z| is its absolute value. • When using Excel, we are interested • in the bottom rows of the • Data Analysis Plus output: use this p-value…

  49. Summary of One- and Two-Tail Tests…

  50. Hypothesis testing with proportions • The steps for the hypothesis testing are the same, the only difference is the test statistic.

More Related