Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 9: Testing a Claim Section 9.1 Significance Tests: The Basics.

Similar presentations


Presentation on theme: "The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 9: Testing a Claim Section 9.1 Significance Tests: The Basics."— Presentation transcript:

1 The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 9: Testing a Claim Section 9.1 Significance Tests: The Basics

2  9.1Significance Tests: The Basics  9.2Tests about a Population Proportion  9.3Tests about a Population Mean

3 LEARNING OBJECTIVES After this section, you should be able to… STATE correct hypotheses for a significance test about a population proportion or mean. INTERPRET P-values in context. INTERPRET a Type I error and a Type II error in context, and give the consequences of each. DESCRIBE the relationship between the significance level of a test, P(Type II error), and power.

4  Introduction Confidence intervals are one of the two most common types of statistical inference. Use a confidence intervalwhen your goal is to estimate a population parameter.The second common type of inference, calledsignificance tests, has a different goal: to assess the evidence provided by data about some claimconcerning a population. A significance test is a formal procedure for comparing observed data with a claim (also called a hypothesis)whose truth we want to assess. The claim is astatement about a parameter, like the populationproportion p or the population mean µ. We express the results of a significance test in terms of a probabilitythat measures how well the data and the claim agree. In this chapter, we’ll learn the underlying logic of statistical tests, how to perform tests about populationproportions and population means, and how tests areconnected to confidence intervals.

5  The Reasoning of Significance Tests Statistical tests deal with claims about a population. Tests ask if sample data give good evidence against a claim. A test might say, “If we took many random samples and the claim were true, we would rarely get aresult like this.” To get a numerical measure of how strong the sampleevidence is, replace the vague term “rarely” by a probability. We can use software to simulate 400 sets of 50 shots assuming that the player is really an 80% shooter. The observed statistic is so unlikely if the actual parameter value is p = 0.80 that it gives convincing evidence that the player’s claim is not true. You can say how strong the evidence against the player’s claim is by giving the probability that he would make as few as 32 out of 50 free throws if he really makes 80% in the long run. Suppose a basketball player claimed to be an 80% free-throw shooter. To test this claim, we have him attempt 50 free-throws. He makes 32 of them. His sample proportion of made shots is 32/50 = 0.64. What can we conclude about the claim based on this sample data? Suppose a basketball player claimed to be an 80% free-throw shooter. To test this claim, we have him attempt 50 free-throws. He makes 32 of them. His sample proportion of made shots is 32/50 = 0.64. What can we conclude about the claim based on this sample data?

6  The Reasoning of Significance Tests Based on the evidence, we might conclude the player’s claim is incorrect. In reality, there are two possible explanations for the fact that he made only 64% of his free throws. 1) The player’s claim is correct (p = 0.8), and by bad luck, a very unlikely outcome occurred. 2) The population proportion is actually less than 0.8, so the sample result is not an unlikely outcome. An outcome that would rarely happen if a claim were true is good evidence that the claim is not true. Basic Idea

7  Stating Hypotheses A significance test starts with a careful statement of the claims we want to compare. The first claim is called the null hypothesis. Usually, the null hypothesis is a statement of “no difference.” The claim we hope or suspectto be true instead of the null hypothesis is called the alternative hypothesis. Definition: The claim tested by a statistical test is called the null hypothesis (H 0 ). The test is designed to assess the strength of the evidence against the null hypothesis. Often the null hypothesis is a statement of “no difference.” The claim about the population that we are trying to find evidence for is the alternative hypothesis (H a ). Definition: The claim tested by a statistical test is called the null hypothesis (H 0 ). The test is designed to assess the strength of the evidence against the null hypothesis. Often the null hypothesis is a statement of “no difference.” The claim about the population that we are trying to find evidence for is the alternative hypothesis (H a ). In the free-throw shooter example, our hypotheses are H 0 : p = 0.80 H a : p < 0.80 where p is the long-run proportion of made free throws.

8  Stating Hypotheses Definition: The alternative hypothesis is one-sided if it states that a parameter is larger than the null hypothesis value or if it states that the parameter is smaller than the null value. It is two-sided if it states that the parameter is different from the null hypothesis value (it could be either larger or smaller). Definition: The alternative hypothesis is one-sided if it states that a parameter is larger than the null hypothesis value or if it states that the parameter is smaller than the null value. It is two-sided if it states that the parameter is different from the null hypothesis value (it could be either larger or smaller). Hypotheses always refer to a population, not to a sample. Be sure to state H 0 and H a in terms of population parameters. It is never correct to write a hypothesis about a sample statistic, such as In any significance test, the null hypothesis has the form H 0 : parameter = value The alternative hypothesis has one of the forms H a : parameter < value H a : parameter > value H a : parameter ≠ value To determine the correct form of H a, read the problem carefully.

9  Example: Studying Job Satisfaction Does the job satisfaction of assembly-line workers differ when their work is machine- paced rather than self-paced? One study chose 18 subjects at random from acompany with over 200 workers who assembled electronic devices. Half of theworkers were assigned at random to each of two groups. Both groups did similarassembly work, but one group was allowed to pace themselves while the other groupused an assembly line that moved at a fixed pace. After two weeks, all the workerstook a test of job satisfaction. Then they switched work setups and took the testagain after two more weeks. The response variable is the difference in satisfactionscores, self-paced minus machine-paced. a)Describe the parameter of interest in this setting. b) State appropriate hypotheses for performing a significance test. The parameter of interest is the mean µ of the differences (self-paced minus machine-paced) in job satisfaction scores in the population of all assembly-line workers at this company. Because the initial question asked whether job satisfaction differs, the alternative hypothesis is two-sided; that is, either µ 0. For simplicity, we write this as µ ≠ 0. That is, H 0 : µ = 0 H a : µ ≠ 0 Because the initial question asked whether job satisfaction differs, the alternative hypothesis is two-sided; that is, either µ 0. For simplicity, we write this as µ ≠ 0. That is, H 0 : µ = 0 H a : µ ≠ 0

10  Interpreting P -Values The null hypothesis H 0 states the claim that we are seeking evidence against. The probability that measures the strength of the evidence against a nullhypothesis is called a P -value. Definition: The probability, computed assuming H 0 is true, that the statistic would take a value as extreme as or more extreme than the one actually observed is called the P-value of the test. The smaller the P-value, the stronger the evidence against H 0 provided by the data. Definition: The probability, computed assuming H 0 is true, that the statistic would take a value as extreme as or more extreme than the one actually observed is called the P-value of the test. The smaller the P-value, the stronger the evidence against H 0 provided by the data. Small P-values are evidence against H 0 because they say that the observed result is unlikely to occur when H 0 is true. Large P-values fail to give convincing evidence against H 0 because they say that the observed result is likely to occur by chance when H 0 is true.

11  Example: Studying Job Satisfaction a)Explain what it means for the null hypothesis to be true in this setting. b) Interpret the P-value in context. In this setting, H 0 : µ = 0 says that the mean difference in satisfaction scores (self-paced - machine-paced) for the entire population of assembly-line workers at the company is 0. If H 0 is true, then the workers don’t favor one work environment over the other, on average. For the job satisfaction study, the hypotheses are H 0 : µ = 0 H a : µ ≠ 0 The P-value is the probability of observing a sample result as extreme or more extreme in the direction specified by H a just by chance when H 0 is actually true. An outcome that would occur so often just by chance (almost 1 in every 4 random samples of 18 workers) when H 0 is true is not convincing evidence against H 0. We fail to reject H 0 : µ = 0. An outcome that would occur so often just by chance (almost 1 in every 4 random samples of 18 workers) when H 0 is true is not convincing evidence against H 0. We fail to reject H 0 : µ = 0.

12  Statistical Significance The final step in performing a significance test is to draw a conclusion about the competing claims you were testing. We will make one of two decisionsbased on the strength of the evidence against the null hypothesis (and infavor of the alternative hypothesis) -- reject H 0 or fail to reject H 0. If our sample result is too unlikely to have happened by chance assumingH 0 is true, then we’ll reject H 0. Otherwise, we will fail to reject H 0. Note: A fail-to-reject H 0 decision in a significance test doesn’t mean that H 0 is true. For that reason, you should never “accept H 0 ” or use language implying that you believe H 0 is true. In a nutshell, our conclusion in a significance test comes down to P-value small → reject H 0 → conclude H a (in context) P-value large → fail to reject H 0 → cannot conclude H a (in context)

13  Statistical Significance There is no rule for how small a P -value we should require in order to reject H 0 — it’s a matter of judgment and depends on the specific circumstances. Butwe can compare the P -value with a fixed value that we regard as decisive, called the significance level. We write it as α, the Greek letter alpha. When our P -value is less than the chosen α, we say that the result is statistically significant. Definition: If the P-value is smaller than alpha, we say that the data are statistically significant at level α. In that case, we reject the null hypothesis H 0 and conclude that there is convincing evidence in favor of the alternative hypothesis H a. Definition: If the P-value is smaller than alpha, we say that the data are statistically significant at level α. In that case, we reject the null hypothesis H 0 and conclude that there is convincing evidence in favor of the alternative hypothesis H a. When we use a fixed level of significance to draw a conclusion in a significance test, P-value < α → reject H 0 → conclude H a (in context) P-value ≥ α → fail to reject H 0 → cannot conclude H a (in context)

14  Example: Better Batteries a)What conclusion can you make for the significance level α = 0.05? b) What conclusion can you make for the significance level α = 0.01? Since the P-value, 0.0276, is less than α = 0.05, the sample result is statistically significant at the 5% level. We have sufficient evidence to reject H 0 and conclude that the company’s deluxe AAA batteries last longer than 30 hours, on average. A company has developed a new deluxe AAA battery that is supposed to last longer than its regular AAA battery. However, these new batteries are more expensive to produce, so the company would like to be convinced that they really do last longer. Based on years of experience, the company knows that its regular AAA batteries last for 30 hours of continuous use, on average. The company selects an SRS of 15 new batteries and uses them continuously until they are completely drained. A significance test is performed using the hypotheses H 0 : µ = 30 hours H a : µ > 30 hours where µ is the true mean lifetime of the new deluxe AAA batteries. The resulting P- value is 0.0276. Since the P-value, 0.0276, is greater than α = 0.01, the sample result is not statistically significant at the 1% level. We do not have enough evidence to reject H 0 in this case. therefore, we cannot conclude that the deluxe AAA batteries last longer than 30 hours, on average.

15  Type I and Type II Errors When we draw a conclusion from a significance test, we hope our conclusion will be correct. But sometimes it will be wrong. There are two types ofmistakes we can make. We can reject the null hypothesis when it’s actuallytrue, known as a Type I error, or we can fail to reject a false null hypothesis, which is a Type II error. Definition: If we reject H 0 when H 0 is true, we have committed a Type I error. If we fail to reject H 0 when H 0 is false, we have committed a Type II error. Definition: If we reject H 0 when H 0 is true, we have committed a Type I error. If we fail to reject H 0 when H 0 is false, we have committed a Type II error. Truth about the population H 0 true H 0 false (H a true) Conclusion based on sample Reject H 0 Type I error Correct conclusion Fail to reject H 0 Correct conclusion Type II error

16  Example: Perfect Potatoes Describe a Type I and a Type II error in this setting, and explain the consequences of each. A Type I error would occur if the producer concludes that the proportion of potatoes with blemishes is greater than 0.08 when the actual proportion is 0.08 (or less). Consequence: The potato-chip producer sends the truckload of acceptable potatoes away, which may result in lost revenue for the supplier. A Type II error would occur if the producer does not send the truck away when more than 8% of the potatoes in the shipment have blemishes. Consequence: The producer uses the truckload of potatoes to make potato chips. More chips will be made with blemished potatoes, which may upset consumers. A potato chip producer and its main supplier agree that each shipment of potatoes must meet certain quality standards. If the producer determines that more than 8% of the potatoes in the shipment have “blemishes,” the truck will be sent away to get another load of potatoes from the supplier. Otherwise, the entire truckload will be used to make potato chips. To make the decision, a supervisor will inspect a random sample of potatoes from the shipment. The producer will then perform a significance test using the hypotheses H 0 : p = 0.08 H a : p > 0.08 where p is the actual proportion of potatoes with blemishes in a given truckload.

17

18 Example 2: 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. expect unlikely But how do I know if this x is one that I expect to happen or is it one that is unlikely to happen? Hypothesis test will help me decide!

19 WHAT ARE HYPOTHESIS TESTS? Calculations that tell us if a value occurs by random chance or not – if it is statistically significant Is it...  a random occurrence due to variation?  a biased occurrence due to some other reason?

20 NATURE OF HYPOTHESIS TESTS -  First begin by supposing the “effect” is NOT present  Next, see if data provides evidence against the supposition Example:murder trial How does a murder trial work? First - assume that the person is innocent must Then – must have sufficient evidence to prove guilty

21 STEPS: 1) Assumptions 2) Hypothesis statements & define parameters 3) Calculations 4) Conclusion, in context Notice the steps are the same except we add hypothesis statements – which you will learn today

22 ASSUMPTIONS FOR Z-TEST (T- TEST):  Have an SRS of context  Distribution is (approximately) normal  Given  Large sample size  Graph data   is known (unknown) YES YES – These are the same assumptions as confidence intervals!!

23 Example 1: 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 assumptions met? 299.4 297.7 298.9 300.2 297 301

24 WRITING HYPOTHESIS STATEMENTS:  Null hypothesis – is the statement being tested; this is a statement of “no effect” or “no difference”  Alternative hypothesis – is the statement that we suspect is true H0:H0: Ha:Ha:

25 THE FORM: Null hypothesis H 0 : parameter = hypothesized value Alternative hypothesis H a : parameter > hypothesized value H a : parameter < hypothesized value H a : parameter = hypothesized value

26 Example 2: 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 : Where  is the true mean weight of hamburger patties H 0 :  = 4 H a :  < 4

27 Example 3: A car dealer advertises that its new subcompact models get 47 mpg. You suspect the mileage might be overrated. State the hypotheses : Where  is the true mean mpg H 0 :  = 47 H a :  < 47

28 Example 4: Many older homes have electrical systems that use fuses rather than circuit breakers. A manufacturer of 40-A fuses wants to make sure that the mean amperage at which its fuses burn out is in fact 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 : Where  is the true mean amperage of the fuses H 0 :  = 40 H a :  = 40

29 FACTS TO REMEMBER ABOUT HYPOTHESES:  ALWAYS refer to populations (parameters)  The null hypothesis for the “difference” between populations is usually equal to zero  The null hypothesis for the correlation (rho) of two events is usually equal to zero. H 0 :  = 0 H 0 :  = 0

30 Must use parameter (population) x is a statistic (sample)  is the population proportion! Must use same number as H 0 !  is parameter for population correlation coefficient – but H 0 MUST be “=“ ! Must be NOT equal!

31 P-VALUES -  The probability that the test statistic would have a value as extreme or more than what is actually observed

32  Is the amount of evidence necessary before we begin to doubt that the null hypothesis is true  Is the probability that we will reject the null hypothesis, assuming that it is true   Denoted by   Can be any value  Usual values: 0.1, 0.05, 0.01  Most common is 0.05

33 as smallsmaller  The p-value is as small or smaller than the level of significance (  ) fail to reject  If p > , “fail to reject” the null hypothesis at the  level. reject  If p < , “reject” the null hypothesis at the  level.

34  ALWAYS make decision about the null hypothesis!  Large p-values show support for the null hypothesis, but never that it is true!  Small p-values show support that the null is not true.  Double the p-value for two-tail (=) tests  Never accept  Never accept the null hypothesis!

35 Never “accept” the null hypothesis!

36 a).03 b).15 c).45 d).023 Reject Fail to reject

37  For z-test statistic –  Use normalcdf(lb,ub,0,1)  [using standard normal curve]  For t-test statistic –  Use tcdf(lb, ub, df)

38 1) right-tail test t = 1.6; n = 20 2) left-tail testz = -2.4; n = 15 3) two-tail testt = 2.3; n = 25

39 1) A statement of the decision being made (reject or fail to reject H 0 ) & why (linkage) 2) A statement of the results in context. (state in terms of H a ) AND

40 “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 (words)!

41 Example 5: Drinking water is considered unsafe if the mean concentration of lead is 15 ppb (parts per billion) or greater. Suppose a community randomly selects 25 water samples and computes a t-test statistic of 2.1. Assume that lead concentrations are normally distributed. Write the hypotheses, calculate the p-value & write the appropriate conclusion for  = 0.05. H 0 :  = 15 H a :  > 15 Where  is the true mean concentration of lead in drinking water P-value = tcdf(2.1,10^99,24) =.0232 t=2.1 Since the p-value < , I reject H 0. There is sufficient evidence to suggest that the mean concentration of lead in drinking water is greater than 15 ppb.

42 Example 6: 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 & write the appropriate conclusion for  = 0.05. H 0 :  = 240 H a :  > 240 Where  is the true mean caloric content of the frozen dinners P-value = tcdf(1.9,10^99,11) =.0420 t=1.9 Since the p-value < , I reject H 0. There is sufficient evidence to suggest that the true mean caloric content of these frozen dinners is greater than 240 calories.

43  known: z = 

44  unknown: t = 

45 Example 7: The Fritzi Cheese Company buys milk from several suppliers as the essential raw material for its cheese. Fritzi 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). The laboratory manager measures the freezing temperature of five randomly selected lots of milk from one producer with a mean of -0.538 degrees. Is there sufficient evidence to suggest that this producer is adding water to his milk?

46 Assumptions: I have an SRS of milk from one producer The freezing temperature of milk is a normal distribution. (given)  is known SRS? Normal? How do you know? Do you know  ? 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 = normalcdf(1.9566,1E99)=.0252 Use normalcdf to calculate p-value.  =.05

47 Conclusion: Compare your p-value to  & make decision Since p-value < , I reject the null hypothesis. Write 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. This suggests that the producer is adding water to the milk.

48 Example 8: 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, is there sufficient evidence to suggest that this district’s third graders reading ability is different than the national mean of 34?

49 I have an SRS of third-graders Since the sample size is large, the sampling distribution is approximately normally distributed OR Since the histogram is unimodal with no outliers, the sampling distribution is approximately normally distributed  is unknown SRS? Normal? How do you know? Do you know  ? What are your hypothesis statements? Is there a key word? Plug values into formula. p-value = tcdf(.6467,1E99,43)=.2606(2)=.5212 Use tcdf to calculate p-value.  =.1 H 0 :  = 34where  is the true mean reading H a :  = 34 ability of the district’s third-graders

50 Conclusion: Compare your p-value to  & make decision Since p-value > , I fail to reject the null hypothesis. Write conclusion in context in terms of H a. There is not sufficient evidence to suggest that the true mean reading ability of the district’s third-graders is different than the national mean of 34.

51 Example 9: The Wall Street Journal (January 27, 1994) reported that based on sales in a chain of Midwestern grocery stores, President’s Choice Chocolate Chip Cookies were selling at a mean rate of $1323 per week. Suppose a random sample of 30 weeks in 1995 in the same stores showed that the cookies were selling at the average rate of $1208 with standard deviation of $275. Does this indicate that the sales of the cookies is different from the earlier figure?

52 Assume: Have an SRS of weeks Distribution of sales is approximately normal due to large sample size  unknown H0:  = 1323 where  is the true mean cookie sales per Ha:  ≠ 1323week Since p-value <  of 0.05, I reject the null hypothesis. There is sufficient evidence to suggest that the sales of cookies are different from the earlier figure.


Download ppt "The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 9: Testing a Claim Section 9.1 Significance Tests: The Basics."

Similar presentations


Ads by Google