Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hypothesis Tests. 1. A lottery advertises that 10% of people who buy a lottery ticket win a prize. Recently, the organization that oversees this lottery.

Similar presentations


Presentation on theme: "Hypothesis Tests. 1. A lottery advertises that 10% of people who buy a lottery ticket win a prize. Recently, the organization that oversees this lottery."— Presentation transcript:

1 Hypothesis Tests

2 1. A lottery advertises that 10% of people who buy a lottery ticket win a prize. Recently, the organization that oversees this lottery has received several complaints claiming that there are fewer winners than there should be. How can I tell if there really are too few winners? Take a sample & find p representative But how do I know if this particular p is one that is representative of the population? A hypothesis test will help me decide!

3 Could our p have happened just by random chance, or is it statistically significant? Is it... –a random occurrence due to natural variation? –a biased occurrence due to some other reason? What do hypothesis tests answer? NOT Statistically significant: NOT a random chance occurrence! Is it one of the sample proportions that are likely to occur? Is it one that isn’t likely to occur?

4 The Idea 1) Assume your suspicion is NOT correct 2) See if data provides evidence against that assumption How does a murder trial work? 1)Assume the person is innocent sufficient 2) Must have sufficient evidence to prove guilty Hypothesis tests use the same process!

5 Steps for a Hypothesis Test 1)Check conditions 2)State hypotheses & define parameters 3)Calculations 4)Conclusion in context Same as confidence intervals, except we add hypotheses

6 SRS (or randomly assigned treatments) Sampling dist. is (approx.) normal –np > 10 and n(1 – p) > 10 Independence –Pop. is at least 10n YAY! These are the same as confidence intervals!! Conditions for a Proportions z-Test

7 SRS (or randomly assigned treatments) Sampling dist. is (approx.) normal –Pop. is normal (given) –CLT (n > 30) –Graph shows normality YAY! These are the same as confidence intervals!! Conditions for a Means t-Test

8 2. Bottles of a popular cola are supposed to contain 300 mL of cola. There is some variation from bottle to bottle. An inspector, who suspects that the bottler is under-filling, measures the contents of six randomly selected bottles. Are the conditions met? 299.4 297.7 298.9 300.2 297 301 SRS of bottles Normal prob. plot is linear  sampling dist. is approx. normal

9 Writing Hypothesis Statements Null hypothesis: The statement being tested; “nothing suspicious is going on” Alternative hypothesis: The statement we suspect is true H0:H0: Ha:Ha:

10 Writing Hypothesis Statements Null hypothesis: H 0 : parameter = hypothesized value Alternative hypothesis: H a : parameter > hyp. value (right tail test) H a : parameter < hyp. value (left tail test) H a : parameter ≠ hyp. value (two-tailed test)

11 3. A lottery advertises that 10% of people who buy a lottery ticket win a prize. Recently, the organization that oversees this lottery has received several complaints claiming that there are fewer winners than there should be. State the hypotheses we'd use to test a sample of lottery tickets. Where p is the true proportion of winners H 0 : p =.1 H a : p <.1

12 4. A consumer magazine advertizes a new compact car as getting, on average, 22 mpg. A dealership believes this ad underrates the car's mileage. State the hypotheses we'd use to test a sample of compact cars. Where μ is the true mean mpg H 0 : μ = 47 H a : μ > 47

13 5. The carbon dioxide (CO 2 ) level in a home varies greatly, but a typical level is around.06%. Since CO 2 concentration outdoors is typically lower, an indoor level of less than.06% may indicate that the home is not properly sealed. Indoor CO 2 levels above.06%, on the other hand, may cause residents to feel drowsy and report that the air feels poor. State the hypotheses we'd use to test CO 2 levels in a sample of homes. Where p is the true proportion of CO 2 in a home H 0 : p =.0006 H a : p ≠.0006

14 The Golden Rules of Hypotheses ALWAYS refer to populations (parameters) H 0 always equals a value H 0 always means "nothing interesting is happening"

15 Are these valid hypotheses? If not, why? Must use parameter (population); x is a statistic (sample) p is the population proportion Must use same number as H 0 H 0 must be "=" Must be different than H 0

16 P-value Assuming H 0 is true, p-value = probability that the statistic (x or p) would be as extreme or more than what we actually found  P(our data | H 0 ) In other words... is our statistic far out in the tails of the sampling distribution?

17 Level of Significance Threshold of enough evidence to doubt the null hypothesis Called α –Can be any probability –Usual values:.1,.05,.01 –When in doubt, use.05

18 Statistically Significant When p-value < α reject  If p-value < α, reject the null hypothesis (guilty) fail to reject  If p-value > α, fail to reject the null hypothesis (not guilty) p-value low, reject the H 0

19 Golden Rules of p-Values We're assuming H 0 is true, so reject/fail to reject H 0, not H a Large p-values support the H 0, but never prove it is true! Two-tailed (≠) tests have double the p-value of one-tail tests Never acceptNever accept the null hypothesis!  No jury ever says "We find the defendant innocent." They only say "Not guilty."

20 At an α level of.05, would you reject or fail to reject H 0 for the given p-values? a).03 b).15 c).45 d).023 Reject Fail to reject

21 Calculating p-Values For a z-test: –normalcdf(lower, upper) with z-scores For a t-test: –tcdf(lower, upper, df) with t-scores

22 Draw & shade a curve, and calculate the p-value: 1) right-tail test  z = 1.6 2) left-tail test  z = -2.4 3) two-tailed test  z = 2.3 p-value =.0548 p-value =.0082 p-value =.0107*2 =.0214

23 Hypothesis Test Conclusions 1)The decision (reject or fail to reject H 0 ) and why (p-value & α) 2)The results (in terms of H a ) in context AND

24 “Since the p-value α, I reject/fail to reject the H 0. There is/is not sufficient evidence to suggest that H a.” Be sure to write H a in context!

25 6. To be considered two percent milk, a carton of milk must have at most a 2.5% fat concentration. A consumer randomly selects 25 two percent milk cartons and computes a z-test statistic of 2.1. Write the hypotheses, calculate the p-value, and write the appropriate conclusion for α =.05. H 0 : p =.025Where p is the true proportion H a : p >.025of fat in 2% milk p-value = normalcdf(2.1, 1E99) =.0179 z=2.1 Since p-value < α, I reject the H 0. There is sufficient evidence to suggest that the concentration of milkfat is greater than 2.5%.

26 7. A lottery advertises that 10% of people who buy a lottery ticket win a prize. Recently, the organization that oversees this lottery has received several complaints claiming that there are fewer winners than there should be. A group of citizens collects a random sample of lottery tickets and finds a test statistic of -1.35. Assume the conditions are met. Write the hypotheses, calculate the p- value, and write the appropriate conclusion for α = 0.05. p-value = normalcdf(-1E99, -1.35) =.0885 z=-1.35 Since p-value > α, I fail to reject the H 0. There is not sufficient evidence to suggest that the true proportion of winners is less than 10%. H 0 : p =.1 Where p is the true H a : p <.1 proportion of winners

27 Test Statistic for a Proportion

28 8. A company is willing to renew its advertising contract with a local radio station only if the station can prove that more than 20% of the residents of the city have heard the ad. The radio station conducts a random sample of 400 people and finds that 90 have heard the ad. Is this sufficient evidence for the company to renew its contract?

29 Conditions: SRS of people np = 400(.2) = 80 > 10, n(1 – p) = 400(.8) = 320 > 10  sampling dist. is approx. normal Population of people is at least 4000 H 0 : p =.2where p is the true proportion of people H a : p >.2who heard the ad Since p-value > α, we fail to reject the H 0. There is not sufficient evidence to suggest that the true proportion of people who heard the ad is greater than.2. We assume the H 0 is true, so use the value of p from the H 0 in the conditions Again: We have a value of p from the H 0, so we can use that in the formula

30 9. A supernatural magazine claims that 63% of Americans believe in ghosts. Gallup surveys 200 randomly selected Americans and finds that 54% of them say they believe in ghosts. At the 1% significance level, does the Gallup poll give us evidence to doubt the magazine's claim?

31 Conditions: SRS of Americans np = 200(.63) = 126 > 10, n(1 – p) = 200(.37) = 74 > 10  sampling dist. is approx. normal Population of Americans is at least 2000 H 0 : p =.63where p is the true proportion of Americans H a : p ≠.63who believe in ghosts Since p-value < α, we reject the H 0. There is sufficient evidence to suggest that the true proportion of people who believe in ghosts is not.63.

32 Test Statistic for a Mean t df = μ

33 10. Kraft buys milk from several suppliers as the essential raw material for its cheese. Kraft suspects that some producers are adding water to their milk to increase their profits. Excess water can be detected by determining the freezing point of milk. The freezing temperature of natural milk varies normally, with a mean of -0.545 degrees. Added water raises the freezing temperature toward 0 degrees, the freezing point of water (in Celsius). A laboratory manager measures the freezing temperature of five randomly selected lots of milk from one producer and finds a mean of -0.538 degrees and a standard deviation of 0.008. Is there sufficient evidence to suggest that this producer is adding water to the milk?

34 Conditions: SRS of milk Freezing temp. is normal H 0 : μ = -0.545 H a : μ > -0.545 where μ is the true mean freezing temperature of milk Plug values into formula p-value =.061 Calculate p-value α =.05

35 Conclusion: Compare p-value to α & make a decision Since p-value > α, we fail to reject the H 0. Write a conclusion in context in terms of H a There is not sufficient evidence to suggest that the true mean freezing temperature is greater than -0.545. (So the producer is adding water to the milk.)

36 11. The Degree of Reading Power (DRP) is a test of the reading ability of children. Here are DRP scores for a random sample of 44 third-grade students in a suburban district: (data on note page) At the.1 significance level, is there sufficient evidence to suggest that this district’s third graders' reading ability is different than the national average of 34?

37 Conditions: SRS of third-graders n > 30  normal samp. dist. (CLT) p-value =.5212α =.1 H 0 : μ = 34where μ is the true mean reading H a : μ ≠ 34 ability of the district’s third-graders

38 Conclusion: Since p-value > α, we fail to reject the H 0. There is not sufficient evidence to suggest that the true mean reading ability of the district’s third-graders is different than the national average of 34.

39 12. a) In 2011, Mrs. Field's chocolate chip cookies were selling at a mean rate of $1323 per week. A random sample of 30 weeks in 2012 in the same stores showed that the cookies were selling at an average rate of $1228 per week with standard deviation of $275. Compute a 95% confidence interval for the mean weekly sales rate. CI = ($1125.30, $1330.70) Based on this interval, is the mean weekly sales rate statistically lower than the 2011 figure? Since $1323 is in the interval, we do not have significant evidence that it is lower than 2011.

40 12. b) In 2011, Mrs. Field's chocolate chip cookies were selling at a mean rate of $1323 per week. A random sample of 30 weeks in 2012 in the same stores showed that the cookies were selling at an average rate of $1228 per week with standard deviation $275. Does this indicate that the sales of the cookies in 2012 were lower than the 2011 figure? H 0 : μ = 1323 where μ is the true mean H a : μ < 1323 cookie sales per week p-value =.034 α = 0.05 Since p-value < α, we reject the H 0. There is sufficient evidence to suggest that the sales of cookies were lower than the 2011 figure.

41 Why did we get different answers? We reject at α =.05, but we fail to reject with a 95% CI. In a one-tail test, all of α (5%) goes into that tail. But a CI has two tails with equal area – so there should also be 5% in the upper tail. 90% CI in 12(a): Since $1323 is not in this interval, we would reject H 0 – just like we did with the hypothesis test! α =.05.05.90 ($1142.70, $1313.70) Tail probabilities between the significance level (α) and the confidence level must match for CIs and tests to give the same results

42 Matched Pairs Test A special type of t-inference

43 Two Types Pair people by certain characteristics Randomly select a treatment for person A Person B gets the other treatment B's treatment is dependent on A's Every person gets both treatments Random order, or before/after measurements Measures are dependent on the person

44 Is this matched pairs? a) A college wants to see if there’s a difference in time it took last year’s class to find a job after graduation and the time it took the class from five years ago to find work after graduation. Researchers take a random sample from both classes and measure the number of days between graduation and first day of employment No, there's no pairing of individuals (independent samples)

45 Is this matched pairs? b) A pharmaceutical company wants to test its new weight- loss drug. Before giving the drug to a random sample, company researchers take a weight measurement on each person. After a month of using the drug, each person’s weight is measured again. Yes, each person is their own pair

46 Is this matched pairs? c) In a taste test, a researcher asks people in a random sample to taste a certain brand of spring water and rate it. Another random sample of people is asked to taste a different brand of water and rate it. The researcher wants to compare these samples. No, people aren't being paired. (If the same people tasted both brands (in a random order), then it would be matched pairs.)

47 13. a) A whale-watching company noticed that many customers wanted to know whether it was better to book an excursion in the morning or the afternoon. To test this question, the company recorded the number of whales spotted in the morning and afternoon on 15 randomly selected days over the past month. Day123456789101112131415 Morning 897910131082577687 After- noon 810989118104789669 We can only handle one set of data in a t-test, so let's find the differences Each pair is dependent on the day, making this data matched pairs

48 Conditions: SRS of days Normal prob. plot is linear  sampling dist. is approx. normal Day 123456789101112131415 Morning 897910131082577687 After- noon 810989118104789669 Differenc es 0-21122 -202 You can subtract either way – just be careful when writing your H a The differences are the data you're testing, so use them to check the conditions

49 Differences0-21122 -202 Is there sufficient evidence that more whales are sighted in the afternoon? Be careful writing the H a ! Think about how we subtracted: (morning – afternoon) If more are sighted in the afternoon, should the differences be + or -? H 0 : μ D = 0 H a : μ D < 0 where μ D is the true mean difference in whale sightings (morning minus afternoon) μ D = mean of the differences H 0 = "nothing is going on"  What should the mean difference be? If we subtracted (afternoon – morning), we would have H a : μ D > 0

50 Since p-value > α, I fail to reject H 0. There is not sufficient evidence to suggest that more whales are sighted in the afternoon than in the morning. If we subtracted (afternoon – morning), the test statistic would be t = +.945, but the p-value would be the same Perform a t-test using the differences (L3) Differences0-21122 -202

51 13. b) Construct a 90% confidence interval for the mean difference in whale sightings. Does your conclusion match the conclusion from the hypothesis test? Differences0-21122 -202 (-1.145,.34528) Since 0 is included in this interval, we do not have evidence to suggest more whales are sighted in the afternoon.


Download ppt "Hypothesis Tests. 1. A lottery advertises that 10% of people who buy a lottery ticket win a prize. Recently, the organization that oversees this lottery."

Similar presentations


Ads by Google