1 / 53

Chapter 10

Hypothesis Testing. Chapter 10. Chapter Goals. When you have completed this chapter, you will be able to:. Define null and alternative hypothesis and hypothesis testing. Define Type I and Type II errors. Describe the five-step hypothesis testing procedure.

Download Presentation

Chapter 10

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. Hypothesis Testing Chapter 10

  2. Chapter Goals When you have completed this chapter, you will be able to: Define null and alternative hypothesis and hypothesis testing Define Type I and Type II errors Describe the five-step hypothesis testing procedure Distinguish between a one-tailed and a two-tailed test of hypothesis and...

  3. 10 Chapter Goals Conductatest of hypothesisabout apopulation mean Conductatest of hypothesisabout a population proportion Explain the relationship betweenhypothesis testingand confidence interval estimation Compute the probability of a Type II error, and power of a test

  4. Terminology Hypothesis …is a statementabout a population distribution such that: (i) it is either true or false, but never both, and (ii) with full knowledgeof thepopulation data, it is possible to identify, with certainty, whether it is true or false. …the mean monthly income for all systems analysts is $3569. Examples …35% of all customers buying coffee at Tim Horton’s return within a week.

  5. Terminology Hypothesis Testing Steps Alternative Hypothesis H1 …is the statementthat we are interested in proving . It is usually a research hypothesis. Null Hypothesis Ho …is the complement of the alternative hypothesis. We accept the null hypothesis as the default hypothesis. It is not rejected unless there is convincing sample evidence against it.

  6. Hypothesis Testing State the null and alternate hypotheses Step 1 Select the level of significance Step 2 Identify the test statistic Step 3 State the decision rule Step 4 Step 5 Computethe value of the test statistic and make a decision Do NOT reject H0 Reject H0 and acceptH1

  7. Keep in Mind When a decision is based on analysis of sampledata and not the entire population data, it is not possibleto make a correct decisionall the time. Our objective is to try to keep the probabilityofmaking a wrong decisionas small as possible!

  8. But do the courts always make the “right” decision? Two kinds of errors Let’s look at the Canadian legal system for an analogy... Two hypotheses: 1. …the accused person is innocent 2. …the accused person is guilty After hearing from both the prosecution and the defence, a decision is made, declaring the accused either: Innocent! or Guilty!

  9. Court Decision Reality Two kinds of errors Person is declared“guilty” Person is declared ’not guilty’ Person is “innocent” Error Correct Decision Type I Error H0 is true Person is “guilty” Error Correct Decision Type II Error H1 is true H0: person is innocentH1: person is guilty

  10. Terminology Level of Significance …is the probability of rejecting the nullhypothesis when it is actually true, i.e. Type I Error Type II Error …accepting the null hypothesis when it is actually false.

  11. Terminology Test Statistic …is a value, determined from sample information, used to determinewhether or notto reject the null hypothesis. Critical Value …is the dividing point between the region wherethe null hypothesis isrejected and the region where it isnot rejected.

  12. One-Tail Two-Tail Vs. Tests

  13. One-Tail  = rejection region 1-  = acceptance region Critical z  0

  14. Two-Tail  = rejection region 1-  = acceptance region /2 /2 -z/2 z/2 0

  15. Tests of Significance One-Tailed A test is one-tailedwhen the alternatehypothesis, H1, states a direction. Examples • H1:The mean yearly commissions earned by full-time realtors is more than $65,000. (µ>$65,000) • H1: The mean speed of trucks traveling on the 407 in Ontario is less than 120 kilometres per hour. (µ<120) • H1:Less than 20 percent of the customers pay cash for their gasoline purchase. (p<.20)

  16. =.05 Sampling Distribution One-Tailed 5% Level of Significance Reject Ho when z>1.65 1-  = 95% acceptance region = 5%rejection region 1.65 0

  17. Tests of Significance Two-Tailed A test is two-tailedwhen no directionisspecified in the alternatehypothesis, H1 Examples • H1:The mean time Canadian families live in a particular home is not equal to 10 years. (µ10) • H1: The average speed of trucks travelling on the 407 in Ontario is different than120 kph. (µ120) • H1: The percentage of repeat customers within a week at Tim Horton’s is not 50%. (p .50)

  18. Sampling Distribution Two-Tailed 5% Level of Significance Reject Ho whenz>1.96orz< -1.96 = 5% rejection region = 95%acceptance region 0.025 0.025 1.96 & -1.96 are called “critical values”

  19. - m X = z s / n Testing for the Population Mean: Large Sample, Population Standard Deviation Known Test Statistic to be used:

  20. Solve Testing for the Population Mean: Large Sample, Population Standard Deviation Known 10 - 20 The processors of eye drop medication indicate on thelabel that the bottle contains 16 ml of medication. The standard deviation of the process is 0.5 ml. A sample of 36 bottles from the last hour’s production revealed a mean weight of 16.12 ml per bottle. At the .05 significance levelis the process out of control? That is, can we conclude that the mean amount per bottle is different from 16 ml?

  21. Step 1 State the null and alternate hypotheses Step 2 Select the level of significance Step 3 Identify the test statistic Step 4 State the decision rule Step 5 Compute the test statistic and make a decision - m - X 16 . 12 16 . 00 = = = z 1 . 44 s n 0 . 5 36 Hypothesis Test H0: µ = 16 H1: µ  16  = 0.05 Because we know the standard deviation, the test statistic is Z Reject H0 if z > 1.96 or z < -1.96 Conclusion: Do not reject the null hypothesis. We cannot conclude the mean is different from 16 ml.

  22. Solve Testing for the Population Mean: Large Sample, Population Standard Deviation Unknown Rock’s Discount Store chain issues its own credit card. Lisa, the credit manager, wants to find out if themeanmonthly unpaid balance is more than $400. Thelevel ofsignificance is set at .05. A random check of 172 unpaidbalances revealed the sample mean to be $407 and the sample standard deviation to be $38. Should Lisa conclude that the populationmean is greater than $400, or is it reasonable to assume that the difference of $7 ($407-$400) is due to chance?

  23. Tip When the sample is large, i.e. over 30, you can use the z-distribution as your test statistic. (Just replace the sample standard deviation for the population standard deviation) Remember, use the best that you have!

  24. Step 1 State the null and alternate hypotheses Step 2 Select the level of significance Step 3 Identify the test statistic Step 4 State the decision rule - $ 407 $ 400 = Step 5 Compute the test statistic and make a decision $ 38 172 - m X = = z 2 . 42 s n Hypothesis Test H0: µ = 400 H1: µ > 400  = 0.05 Because the sample is large, we use the test statistic Z Reject H0 if z > 1.645 Conclusion: Reject the hypothesis. H0 . Lisa can conclude that the mean unpaid balance is greater than $400!

  25. - m X = t s / n Testing for the Population Mean: Small Sample, Population Standard Deviation Unknown Test Statistic to be used:

  26. Testing for the Population Mean: Small Sample, Population Standard Deviation Unknown The current production rate for producing 5 amp fuses at Ned’s Electric Co. is 250 per hour. A new machine has been purchased and installed that, according to the supplier, will increasethe production rate! A sample of 10 randomly selected hours from last month revealed the mean hourly production on thenew machine was 256units, with a sample standarddeviation of 6 per hour. At the .05 significance level, can Ned conclude that the new machine is faster?

  27. Step 1 State the null and alternate hypotheses Step 2 Select the level of significance Step 3 Identify the test statistic Step 4 State the decision rule - 256 250 = Step 5 Compute the test statistic and make a decision 6 10 - m X = = t 3 . 162 s n Hypothesis Test H0: µ = 250 H1: µ > 250  = 0.05 Because the sample is small and  is unknown, we use the t-test … 10 -1 = 9 degrees of freedom Reject H0 if t> 1.833 Conclusion: Reject the hypothesis. H0 . Ned can conclude that the new machine will increase the production rate!

  28. p-value in hypothesis testing A P -Valueis the probability, (assuming that the null hypothesis is true) of finding a value of the test statisticat least as extremeas the computed value for the test! If the P-Value issmallerthan thesignificance level, H0 is rejected. If the P-Value is larger than the significance level, H0 is not rejected.

  29. Recall - m X = = z 2 . 42 s n Previouslydetermined…  = 0.05 Rock’s Discount Store chain issues its own credit card. Lisa, the credit manager, wants to find out if the meanmonthly unpaid balance is more than $400. Thelevel ofsignificance is set at .05. A random check of 172 unpaidbalances revealed the sample mean to be $407 and the sample standard deviation to be $38. Should Lisa conclude that the population mean is greater than $400? P(z  2.42) = .5 - .4922 = .0078 Since P-value is smaller than  of 0.05, reject H0. The population mean is greater than $400.

  30. One-Tail Two-Tail p-value in hypothesis testing P-Value = p(z|computed value|) P-Value = 2p(z|computed value|) |....| meansabsolute value of…

  31. Recall The processors of eye drop medication indicate on thelabel that the bottle contains 16 ml of medication. The standard deviation of the process is 0.5 ml. A sample of 36 bottles from last hour’s production revealed a mean weight of 16.12 ml per bottle. At the .05 significance levelis the process out of control? That is, can we conclude that the mean amount per bottle is different from 16 ml? - m X = = z 1 . 44 s n Previouslydetermined…  = 0.05 P-Value = 2p(z|computed value|) = 2p(z|1.44|) = 2(.5- .4251) = 2(.0749) = .1498 Since .1498 > .05, do not reject H0.

  32. Interpretingthe Weight of Evidence against Ho If the P-value is less than … • .10 we have some evidence that Ho is not true • .05 we have strongevidence that Ho is not true • .01we have very strong evidence that Ho is not true • .001we have extremely strongevidence that Ho is not true

  33. If the P-value is less than… .10 we have some evidence .05 we have strongevidence .01we have very strong evidence .001we have extremely strongevidence that Ho is not true Since P-value is .0078 … we have very strong evidence to conclude that the population mean is greater than $400!

  34. Number of successes in the sample p = Number sampled Tests concerning Proportions A Proportion … is the fractionor percentage that indicates the part of thepopulation or sample having a particular trait of interest … is denoted byp … is found by: Sample Proportion

  35. - ˆ p p 0 = z - p ( 1 p ) 0 0 n ^ p Testing a Single Population Proportion: Test Statistic to be used: where … is the symbol for sample proportion p … is the symbol for population proportion p0 … represents a population proportion of interest

  36. In the past, 15%of the mail order solicitations for a certain charity resulted in a financial contribution. A new solicitation letter that has been drafted is sent to a sample of 200 people and 45 responded with a contribution. At the .05 significance level can it be concluded that the new letter is more effective?

  37. Step 1 State the null and alternate hypotheses Step 2 Select the level of significance Step 3 Identify the test statistic Step 4 State the decision rule 45 - . 15 - ˆ p p 200 z = Step 5 Compute the test statistic and make a decision - p ( 1 p ) - ˆ .15 ( 1 . 15 ) = 2 . 97 = n 200 Hypothesis Test H0: p = .15 H1: p> .15  = 0.05 We will use the z-test Reject H0 if z > 1.645 Conclusion: Reject the hypothesis. More than 15% are responding with a pledge, therefore, the new letter is more effective!

  38. Two-Tail RelationshipBetween Hypothesis Testing Procedure and Confidence Interval Estimation Case 1: TEST Our decision rule can be restated as: Do notreject H0 if 0 lies in the (1-) confidence intervalestimate of the population mean, computed from the sample data

  39. Two-Tail  = rejection region 1-  = Confidence Interval region 0 Do not reject Ho when z falls in the confidence interval estimate

  40. RelationshipBetween Hypothesis Testing Procedure and Confidence Interval Estimation Lower-tailed test Case 2: Our decision rule can be restated as: Do not reject H0 if 0 is less than or equalto the (1-) upper confidence bound for , computed from the sample data.

  41. RelationshipBetween Hypothesis Testing Procedure and Confidence Interval Estimation Lower-Tailed 1- = confidence level region  =rejection region 0 Do not reject

  42. RelationshipBetween Hypothesis Testing Procedure and Confidence Interval Estimation Upper-tailed test Case 3: Our decision rule can be restated as: Do not reject H0 if 0 is greater than or equalto the (1-) lower confidence bound for , computed from the sample data.

  43. Upper-Tailed 1- = acceptance region  =rejection region 0

  44. Level of Significance …is the probability of rejecting the nullhypothesis when it is actually true,i.e. Type I Error Type II Error …accepting the null hypothesis when it is actually false. Type II Error 10 - 44

  45. Solve Calculating the Probability of a Type IIError 10 - 45 A batch of 5000 light bulbs either belong to a superior type, with a mean life of 2400 hours, or to an inferior type, with a mean life of 2000 hours. (By default, the bulbs will be sold as the inferior type.) Both bulb distributions are normal, with a standard deviation of 300 hours.  = 0.025. Suppose we select a sample of 4 bulbs. Find the probability of a Type II error.

  46. Step 1 State the null and alternate hypotheses Step 2 Select the level of significance Step 3 Identify the test statistic Step 4 State the decision rule Superior: =2400Inferior: =2000 =300 =0.025 H0: µ = 2000 H1: µ = 2400  = 0.025 As populations are normal,  is known, we use the z-test Reject H0 if the computed z > 1.96, or stated another way, If the computed value x baris greater than xu = 2000 +1.96(300/n), REJECT H0 in favour of H1

  47. £ Xu X Suppose H0 is false and H1 is true. i.e. the true value of µ is 2400, then x bar is approximately normally distributed with a mean of 2400 and a standard deviation of /n = 300/n The probability of a Type II Error …is the probability of not rejecting Ho …is the probability that the value of x bar obtained will be less than or equal to xu

  48. - m - X 2294 2400 = = = - z 0 . 70666 s n 300 4 Suppose we select a sample of 4 bulbs. Then x bar has a mean of 2400 and a sd of 300/4 = 150 Xu = 2000+1.96(300/4) = 2294 A1 = 0.2611, giving us a left tail area of 0.24

  49. The probability of a Type II error is 0.24 i.e.=0.24

  50. If we decrease the value of (alpha), the value zincreases and the critical value xu moves to the right, and therefore the value of (beta) increases. • Conversely, if we increasethe value of (alpha), xu moves to the left, thereby decreasingthe value of (beta) • For a given value of (alpha), the value of (beta) can be decreased by increasing the sample size.

More Related