+

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

+

Chapter 9 Testing a Claim

 9.1

Significance Tests: The Basics

 9.2

Tests about a Population Proportion

 9.3

Tests about a Population Mean

+ Section 9.1 Significance Tests: The Basics

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.

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 a statement about a parameter, like the population proportion p or the population mean µ. We express the results of a significance test in terms of a probability that 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 population proportions and population means, and how tests are connected to confidence intervals.

Significance Tests: The Basics

Confidence intervals are one of the two most common types of statistical inference. Use a confidence interval when your goal is to estimate a population parameter. The second common type of inference, called significance tests, has a different goal: to assess the evidence provided by data about some claim concerning a population.

+

 Introduction

Reasoning of Significance Tests

We can use software to simulate 400 sets of 50 shots assuming that the player is really an 80% shooter. 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. 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.

Significance Tests: The Basics

Statistical deal with claims abouttoa be population. Tests ask ifshooter. sample Suppose atests basketball player claimed an 80% free-throw good evidence against a claim. A test might He say,makes “If we 32 took Todata test give this claim, we have him attempt 50 free-throws. of manyHis random samples andof the claimshots wereistrue, we=would them. sample proportion made 32/50 0.64. rarely get a result like this.” To get a numerical measure of how strong the sample What can weis,conclude about the term claim“rarely” based on sample data? evidence replace the vague by this a probability.

+

 The

Reasoning of Significance Tests

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.

Basic Idea An outcome that would rarely happen if a claim were true is good evidence that the claim is not true.

Significance Tests: The Basics

Based on the evidence, we might conclude the player’s claim is incorrect.

+

 The

Example – Can you be confident of victory?

Heading into the mayoral election, Jack is feeling fairly confident that he will be elected by obtaining more than 50% of the vote. Suppose that a random sample of 100 voters shows that 56 will vote for Jack. Is his confidence warranted? Maybe. There are actually two possible explanations for why the majority of voters in the sample seem to favor Jack.



At most 50% of the voters actually support Jack and the favorable sample proportion was due to sampling variability. If this explanation is plausible, then Jack should not be confident of victory.



The sample proportion is above 50% because more than 50% of the voters actually support Jack. Jack should only believe this explanation and be confident of victory if explanation #1 can safely be ruled out.

Significance Tests: The Basics



+

 Alternate

We used Fathom software to simulate 400 samples of size 100 from a population in which exactly 50% of voters support Jack. Each dot represents ollectionthe 1 proportion of voters who prefer Jack in the simulated sample. In 13.75% of the simulated samples (marked in red), the sample proportion of voters who supported Jack was at least 0.56. This means that it is plausible that at most 50% of the 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 SampleProportion voters prefer Jack and the favorable sample proportion was due to sampling variability. Since it is plausible that the majority of voters do not favor Jack, he should not be confident of victory. 

Dot Plot

Hypotheses

Definition: The claim tested by a statistical test is called the null hypothesis (H0). 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 (Ha).

In the free-throw shooter example, our hypotheses are H0 : p = 0.80 Ha : p < 0.80 where p is the long-run proportion of made free throws.

Significance Tests: The Basics

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 suspect to be true instead of the null hypothesis is called the alternative hypothesis.

+

 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).  Hypotheses always refer to a population, not to a sample. Be sure to state H0 and Ha in terms of population parameters.  It is never correct to write a hypothesis about a sample statistic, ˆ  0.64 or x  85. such as p

Significance Tests: The Basics

In any significance test, the null hypothesis has the form H0 : parameter = value The alternative hypothesis has one of the forms Ha : parameter < value Ha : parameter > value Ha : parameter ≠ value To determine the correct form of Ha, read the problem carefully.

+

 Stating

Studying Job Satisfaction

a) Describe the parameter of interest in this setting. 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. b) State appropriate hypotheses for performing a significance test. Because the initial question asked whether job satisfaction differs, the alternative hypothesis is two-sided; that is, either µ < 0 or µ > 0. For simplicity, we write this as µ ≠ 0. That is, H0: µ = 0 Ha: µ ≠ 0

Significance Tests: The Basics

Does the job satisfaction of assembly-line workers differ when their work is machinepaced rather than self-paced? One study chose 18 subjects at random from a company with over 200 workers who assembled electronic devices. Half of the workers were assigned at random to each of two groups. Both groups did similar assembly work, but one group was allowed to pace themselves while the other group used an assembly line that moved at a fixed pace. After two weeks, all the workers took a test of job satisfaction. Then they switched work setups and took the test again after two more weeks. The response variable is the difference in satisfaction scores, self-paced minus machine-paced.

+

 Example:

Example – A better golf club?

Mike is an avid golfer who would like to improve his play. A friend suggests getting new clubs and lets Mike try out his 7-iron. Based on years of experience, Mike has established that the mean distance that balls travel when hit with his old 7-iron is = 175 yards with a standard deviation of = 15 yards. He is hoping that this new club will make his shots with a 7-iron more consistent (less variable), so he goes to the driving range and hits 50 shots with the new 7-iron.



Problem:



(a) Describe the parameter of interest in this setting.



Mike is interested in being more consistent, the parameter of interest is the standard deviation of the distance he hits the ball when using the new 7-iron.



(b) State appropriate hypotheses for performing a significance test.



Because Mike wants to be more consistent, he wants the standard deviation of the distance he hits the ball to be smaller than 15 yards.

H 0 :   15 H a :   15

Significance Tests: The Basics



+

 Alternate

P-Values

Definition: The probability, computed assuming H0 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 H0 provided by the data.  Small P-values are evidence against H0 because they say that the observed result is unlikely to occur when H0 is true.

 Large P-values fail to give convincing evidence against H0 because they say that the observed result is likely to occur by chance when H0 is true.

Significance Tests: The Basics

The null hypothesis H0 states the claim that we are seeking evidence against. The probability that measures the strength of the evidence against a null hypothesis is called a P-value.

+

 Interpreting

Example – Can you be confident of

 In

the alternate example on page 530, when we assumed that exactly 50% of voters supported Jack, 13.75% of the 400 simulated samples gave values of at least as high as the observed value of pˆ = 0.56. In other words, the P-value is P( pˆ ≥ 0.56 | p = 0.5) ≈ 0.1375. So, if exactly 50% of the voters in the population support Jack, there is about a 14% chance that in a sample of 100 voters, 56% or more would support Jack. This is not a small probability, so this does not provide convincing evidence to support the alternative hypothesis that p > 0.5.

Significance Tests: The Basics

victory

+

 Alternate

Studying Job Satisfaction

a) Explain what it means for the null hypothesis to be true in this setting.

In this setting, H0: µ = 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 H0 is true, then the workers don’t favor one work environment over the other, on average. b) Interpret the P-value in context.

Significance Tests: The Basics

For the job satisfaction study, the hypotheses are H0: µ = 0 Ha: µ ≠ 0 Data from the 18 workers gavex  17 and sx  60. That is, these workers rated the self - paced environment, on average, 17 points higher. Researchers performed a significance test using the sample data and found P a - value of 0.2302.

+

 Example:

 The P-value is the probability of observing a sample result as extreme or more extreme in the direction specified by Ha just by chance when H0 is actually true.

An outcome that would occur so often just by chance Because1the two- sided, the - value is the probability (almost in alternative every 4hypothesis randomissamples ofP 18 workers) whenof  getting a value of x as far from 0 in either direction as the observed x  17 when Htrue. trueis,is convincing against H0the . two 0 is That H 0 is annot average difference of evidence 17 or more points between We fail to reject H0time : µ =just 0.by chance in random work environments would happen 23% of the samples of 18 assembly-line workers when the true population mean is = 0.

Example: A better golf club? H a :   15

Where σ = the true standard deviation of the distances Mike hits golf balls using the new 7-iron. Based on 50 shots with the new 7-iron, the standard deviation was SX = 10.9 yards. Problem: A significance test using the sample data produced a P-value of 0.002. (a) Interpret the P-value in this context. If the true standard deviation is 15 yards, then there is an approximate probability of 0.002 that the sample standard deviation would be 10.9 yards or lower because of random chance alone.

(b) Do the data provide convincing evidence against the null hypothesis? Explain. Yes. Since the P-value is very small, random chance is not a plausible explanation for why the sample standard deviation was lower than 15 yards. Thus, there is convincing evidence that the true standard deviation with the new 7-iron is smaller.

Significance Tests: The Basics

When Mike was testing a new 7-iron, the hypotheses were: H 0 :   15

+

 Alternate

Significance



If our sample result is too unlikely to have happened by chance assuming H0 is true, then we’ll reject H0.



Otherwise, we will fail to reject H0.

Note: A fail-to-reject H0 decision in a significance test doesn’t mean that H0 is true. For that reason, you should never “accept H0” or use language implying that you believe H0 is true.

In a nutshell, our conclusion in a significance test comes down to P-value small → reject H0 → conclude Ha (in context) P-value large → fail to reject H0 → cannot conclude Ha (in context)

Significance Tests: The Basics

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 decisions based on the strength of the evidence against the null hypothesis (and in favor of the alternative hypothesis) -- reject H0 or fail to reject H0.

+

 Statistical

Example – Elections and golf clubs

the mayoral election example, the estimated P-value was 0.1375. Since the P-value is large, we fail to reject H0 : p = 0.5 and cannot conclude that more than 50% of all voters favor Jack.

 In

the 7-iron example, the estimated P-value was 0.002. Since the P-value is small, we reject H0 : = 15 and conclude that Mike is more consistent when using the new 7-iron (i.e. the true standard deviation of distances when using the new 7-iron is less than 15 yards).

Significance Tests: The Basics

 In

+

 Alternate

Significance

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 H0 and conclude that there is convincing evidence in favor of the alternative hypothesis Ha.

When we use a fixed level of significance to draw a conclusion in a significance test, P-value < α → reject H0 → conclude Ha (in context) P-value ≥ α → fail to reject H0 → cannot conclude Ha (in context)

Significance Tests: The Basics

There is no rule for how small a P-value we should require in order to reject H0 — it’s a matter of judgment and depends on the specific circumstances. But we 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.

+

 Statistical

Better Batteries

a) What conclusion can you make for the significance level α = 0.05? 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 H0 and conclude that the company’s deluxe AAA batteries last longer than 30 hours, on average. b) What conclusion can you make for the significance level α = 0.01? 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 H0 in this case. therefore, we cannot conclude that the deluxe AAA batteries last longer than 30 hours, on average.

Significance Tests: The Basics

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 H0 : µ = 30 hours Ha : µ > 30 hours where µ is the true mean lifetime of the new deluxe AAA batteries. The resulting Pvalue is 0.0276.

+

 Example:

a) What conclusion would you make for the significance level α = 0.01? Since the P-value is less than σ (0.0055 < 0.01), we reject H0 and conclude that students at Zenon’s school prefer name-brand chips. b) What conclusion can you make for the significance level α = 0.001? Since the P-value is greater than σ (0.0055 > 0.001), we fail to reject H0 and cannot conclude that students at Zenon’s school prefer name-brand chips.

+ Significance Tests: The Basics

 Alternate Example: Tasty chips For his second semester project in AP Statistics, Zenon decided to investigate if students at his school prefer name-brand potato chips to generic potato chips. He randomly selected 50 students and had each student try both types of chips, in random order. Overall, 34 of the 50 students preferred the name-brand chips. Zenon performed a significance test using the hypotheses: H0 : p = 0.5 Ha : p > 0.5 Where p is the true proportion of students at his school that prefer namebrand chips. The resulting P-value was 0.0055.

I and Type II Errors

+

 Type

Definition: If we reject H0 when H0 is true, we have committed a Type I error. If we fail to reject H0 when H0 is false, we have committed a Type II error.

Truth about the population

Conclusion based on sample

H0 true

H0 false (Ha true)

Reject H0

Type I error

Correct conclusion

Fail to reject H0

Correct conclusion

Type II error

Significance Tests: The Basics

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 of mistakes we can make. We can reject the null hypothesis when it’s actually true, known as a Type I error, or we can fail to reject a false null hypothesis, which is a Type II error.

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.

Significance Tests: The Basics

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 H0 : p = 0.08 Ha : p > 0.08 where p is the actual proportion of potatoes with blemishes in a given truckload.

+

 Example:

Example: Faster fast food?

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 manager decides that the true proportion of drive-through customers that have to wait at least 2 minutes has been reduced, when it really hasn’t been reduced. A consequence is that the manager will have to pay unnecessarily for an additional employee. • A Type II error would occur if the manager didn’t decide that the true proportion of customers that had to wait at least 2 minutes had been reduced, when it really had been reduced. A consequence is that the restaurant would not have an additional employee helping with the drive-through, so they aren’t providing faster service when they could.

Significance Tests: The Basics

The manager of a fast-food restaurant want to reduce the proportion of drive-through customers who have to wait more than 2 minutes to receive their food once their order is placed. Based on store records, the proportion of customers who had to wait at least 2 minutes was p = 0.63. To reduce this proportion, the manager assigns an additional employee to assist with drive-through orders. During the next month the manager will collect a random sample of drive-through times and test the following hypotheses: H0 : p = 0.63 Ha : p < 0.63 where p is the true proportion of drive-through customers who have to wait more than 2 minutes after their order is placed to receive their food.

+

 Alternate

Probabilities

+

 Error

For the truckload of potatoes in the previous example, we were testing H0 : p = 0.08 Ha : p > 0.08 where p is the actual proportion of potatoes with blemishes. Suppose that the potato-chip producer decides to carry out this test based on a random sample of 500 potatoes using a 5% significance level (α = 0.05).

AssumingH 0 : p  0.08 is true, the sampling distribution ofpˆ will have : Shape : Approximately Normal because 500(0.08)= 40 and 500(0.92)= 460 are both at least 10. Center :  pˆ  p  0.08 Spread:  pˆ 

p(1 p)  n

Significance Tests: The Basics

We can assess the performance of a significance test by looking at the probabilities of the two types of error. That’s because statistical inference is based on asking, “What would happen if I did this many times?”

The shaded area in the right tail is 5%. Sample proportion values to the right of 0.08(0.92) the green line at 0.0999 will cause us to reject 0.0121 H0 even though H0 is true. This will 500 happen in 5% of all possible samples. That is, P(making a Type I error) = 0.05.

Example – Faster fast food?

Significance Tests: The Basics

For the fast food alternate example, we were testing the following hypotheses: H0 : p = 0..63 Ha : p < 0.63 where p = the true proportion of drive-through customers who have to wait more than 2 minutes after their order is placed to receive their food. Suppose that the manager decided to carry out this test using a random sample of 250 orders and a significance level of σ = 0.10. What is the probability of a making a Type I error? To make a Type I error means that we reject H0 when H0 is Reject Ho Fail to Reject H0 actually true. In this case, a Type I error occurs when the true proportion of customers that have to wait at least 2 minutes P(Type I error) =α = 0.10 remains p = 0.63, but we get a value of p small enough that the P-value is less than 0.10. When H0 is true, this will happen 10% 0.63 of the time. In other words,  Values of p P(Type I error) = σ.

+

 Alternate

Probabilities

Significance and Type I Error

The significance level α of any fixed level test is the probability of a Type I error. That is, α is the probability that the test will reject the null hypothesis H0 when H0 is in fact true. Consider the consequences of a Type I error before choosing a significance level. What about Type II errors? A significance test makes a Type II error when it fails to reject a null hypothesis that really is false. There are many values of the parameter that satisfy the alternative hypothesis, so we concentrate on one value. We can calculate the probability that a test does reject H0 when an alternative is true. This probability is called the power of the test against that specific alternative.

Definition: The power of a test against a specific alternative is the probability that the test will reject H0 at a chosen significance level α when the specified alternative value of the parameter is true.

Significance Tests: The Basics

The probability of a Type I error is the probability of rejecting H0 when it is really true. As we can see from the previous example, this is exactly the significance level of the test.

+

 Error

Probabilities

+

 Error

What if p = 0.11?

Earlier, we decided to reject H0 at α = 0.05 if our sample yielded a sample proportion to the right of the green line.

Significance Tests: The Basics

The potato-chip producer wonders whether the significance test of H0 : p = 0.08 versus Ha : p > 0.08 based on a random sample of 500 potatoes has enough power to detect a shipment with, say, 11% blemished potatoes. In this case, a particular Type II error is to fail to reject H0 : p = 0.08 when p = 0.11.

( pˆ  0.0999)

Power and Type II Error

The power of a test against any alternative is 1 minus the probability of a Type II error for that alternative; that is, power = 1 - β.



Since we reject H0 at α= 0.05 if our sample yields a proportion > 0.0999, we’d correctly reject the shipment about 75% of the time.

Studies: The Power of a Statistical Test

Here Summary are the of influences questions we on the must question answer“How to decide manyhow many observations we do Ineed: need?” 1.Significance •If you insist onlevel. a smaller How significance much protection leveldo (such we want as 1% against rathera Type than 5%), I error you — have getting to atake significant a largerresult sample. from A smaller our sample when H significance true?requires stronger evidence to reject the null 0 is actuallylevel hypothesis.importance. How large a difference between the 2.Practical hypothesized • If you insist on parameter higher power value(such and the as actual 99% rather parameter than 90%), value is you important will needinapractice? larger sample. Higher power gives a better chance ofHow detecting a difference when is that really 3.Power. confident do we want to itbe ourthere. study will detect • At anya significance difference oflevel the size and we desired think power, is important? detecting a small difference requires a larger sample than detecting a large difference.

Significance Tests: The Basics

How large a sample should we take when we plan to carry out a significance test? The answer depends on what alternative values of the parameter are important to detect.

+

 Planning

+ Section 9.1 Significance Tests: The Basics Summary In this section, we learned that… 

A significance test assesses the evidence provided by data against a null hypothesis H0 in favor of an alternative hypothesis Ha.



The hypotheses are stated in terms of population parameters. Often, H0 is a statement of no change or no difference. Ha says that a parameter differs from its null hypothesis value in a specific direction (one-sided alternative) or in either direction (two-sided alternative).



The reasoning of a significance test is as follows. Suppose that the null hypothesis is true. If we repeated our data production many times, would we often get data as inconsistent with H0 as the data we actually have? If the data are unlikely when H0 is true, they provide evidence against H0 .



The P-value of a test is the probability, computed supposing H0 to be true, that the statistic will take a value at least as extreme as that actually observed in the direction specified by Ha .

+ Section 9.1 Significance Tests: The Basics Summary 

Small P-values indicate strong evidence against H0 . To calculate a P-value, we must know the sampling distribution of the test statistic when H0 is true. There is no universal rule for how small a P-value in a significance test provides convincing evidence against the null hypothesis.



If the P-value is smaller than a specified value α (called the significance level), the data are statistically significant at level α. In that case, we can reject H0 . If the P-value is greater than or equal to α, we fail to reject H0 .



A Type I error occurs if we reject H0 when it is in fact true. A Type II error occurs if we fail to reject H0 when it is actually false. In a fixed level α significance test, the probability of a Type I error is the significance level α.



The power of a significance test against a specific alternative is the probability that the test will reject H0 when the alternative is true. Power measures the ability of the test to detect an alternative value of the parameter. For a specific alternative, P(Type II error) = 1 - power.

+

Looking Ahead…

In the next Section…

We’ll learn how to test a claim about a population proportion. We’ll learn about  Carrying out a significance test  The one-sample z test for a proportion  Two-sided tests  Why confidence intervals give more information than significance tests