Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hypothesis Tests Hypothesis Tests (for Means). 1. A government agency has received numerous complaints that a particular restaurant has been selling underweight.

Similar presentations


Presentation on theme: "Hypothesis Tests Hypothesis Tests (for Means). 1. A government agency has received numerous complaints that a particular restaurant has been selling underweight."— Presentation transcript:

1 Hypothesis Tests Hypothesis Tests (for Means)

2 1. A government agency has received numerous complaints that a particular restaurant has been selling underweight hamburgers. The restaurant advertises that its patties are “a quarter pound” (4 ounces). How can I tell if they really are underweight? Take a sample & find x representative But how do I know if this particular x is one that is representative of the population? A hypothesis test will help me decide!

3 What do hypothesis tests answer? Could our x 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? NOT Statistically significant: NOT a random chance occurrence! Is it one of the sample means 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 hypothesis statements

6 Conditions for z-test/t-test SRS (or randomly assigned treatments) Sampling dist. is (approx.) normal –Pop. is normal (given) –Large sample size (n > 30) –Graph shows normality σ is known (z) or unknown (t) YAY! These are the same as confidence intervals!!

7 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 Sampling dist. is approx. normal because the normal prob. plot is roughly linear σ unknown  t-test

8 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:

9 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)

10 3. A government agency has received numerous complaints that a particular restaurant has been selling underweight hamburgers. The restaurant advertises that its patties are “a quarter pound” (4 ounces). State the hypotheses we'd use to test a sample of hamburgers. Where μ is the true mean weight of hamburgers H 0 : μ = 4 H a : μ < 4

11 4. A car dealer advertises that its new compact models get 47 mpg. You suspect the mileage might be overrated. State the hypotheses we'd use to test a sample of compacts. Where μ is the true mean mpg H 0 : μ = 47 H a : μ < 47

12 5. Many older homes have electrical systems that use fuses instead of circuit breakers. A manufacturer of 40-amp fuses wants to make sure that the mean current which its fuses burn out is indeed 40. If the mean amperage is lower than 40, customers will complain because the fuses require replacement too often. If the amperage is higher than 40, the manufacturer might be liable for damage to an electrical system due to fuse malfunction. State the hypotheses we'd use to test a sample of fuses. Where μ is the true mean amperage of the fuses H 0 : μ = 40 H a : μ ≠ 40

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

14 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

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

16 Level of Significance Threshold of enough evidence to doubt the null hypothesis Called α –Can be any probability –Usual values: 0.1, 0.05, 0.01 –Most common is 0.05

17 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)

18 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."

19 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

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

21 Draw & shade a curve, and calculate the p-value: 1) right-tail test  t = 1.6; n = 20 2) left-tail test  z = -2.4; n = 15 3) two-tailed test  t = 2.3; n = 25 p-value =.0630 p-value =.0082 p-value = (.0152)2 =.0304

22 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

23 “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!

24 6. Drinking water is considered unsafe if the mean concentration of lead is greater than 15 ppb (parts per billion). A community randomly selects 25 water samples and computes a t-test statistic of 2.1. Assume lead concentrations are normally distributed. Write the hypotheses, calculate the p-value, and write the appropriate conclusion for α = 0.05. H 0 : μ = 15Where μ is the true mean H a : μ > 15concentration of lead p-value = tcdf(2.1, 1E99, 24) =.0232 t=2.1 Since p-value < α, I reject the H 0. There is sufficient evidence to suggest that the mean concentration of lead is greater than 15 ppb.

25 7. A certain type of frozen dinners states that the dinner contains 240 calories. A random sample of 12 of these frozen dinners was selected from production to see if the caloric content was greater than stated on the box. The t-test statistic was calculated to be 1.9. Assume calories vary normally. Write the hypotheses, calculate the p-value, and write the appropriate conclusion for α = 0.05. H 0 : μ = 240 Where μ is the true mean caloric H a : μ > 240 content of the frozen dinners p-value = tcdf(1.9, 1E99, 11) =.0420 t=1.9 Since p-value < α, I reject the H 0. There is sufficient evidence to suggest that the true mean caloric content is greater than 240 calories.

26 Test Statistics σ known (z-test): z = μ

27 Test Statistics σ unknown (t-test): t df = μ

28 8. 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 and a standard deviation of 0.008. 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. Is there sufficient evidence to suggest that this producer is adding water to the milk?

29 Conditions: SRS of milk Freezing temperature is normal (so samp. dist. is normal) σ known  z-test H 0 : μ = -0.545 H a : μ > -0.545 where μ is the true mean freezing temperature of milk What are your hypothesis statements? Is there a key word? Plug values into formula p-value =.0252 Calculate p-value α =.05

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

31 9. 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?

32 Conditions: SRS of third-graders n > 30  sampling dist. is approx. normal σ unknown  t-test p-value =.5212α =.1 H 0 : μ = 34where μ is the true mean reading H a : μ ≠ 34 ability of the district’s third-graders

33 Conclusion: Since p-value > α, I 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.

34 10. 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 $275. Does this indicate that the sales of the cookies in 2012 were lower than the 2011 figure?

35 Conditions: SRS of weeks n > 30  sampling dist. is approx. normal σ unknown  t-test H 0 : μ = 1323 where μ is the true mean cookie sales H a : μ < 1323 per week p-value =.034 α = 0.05 Since p-value < α, I reject the H 0. There is sufficient evidence to suggest that the sales of cookies were lower than the 2011 figure.

36 10. 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 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.

37 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 10(b): 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

38 Matched Pairs Test A special type of t-inference

39 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

40 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)

41 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

42 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.

43 11. 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

44 Day 123456789101112131415 Morning 897910131082577687 After- noon 810989118104789669 Differenc es 0-21122 -202 Conditions: SRS of days Normal probability plot is approx. linear  sampling dist. is approx. normal σ unknown  t-test 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

45 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 from 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

46 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


Download ppt "Hypothesis Tests Hypothesis Tests (for Means). 1. A government agency has received numerous complaints that a particular restaurant has been selling underweight."

Similar presentations


Ads by Google