the language of hypothesis testingbanach.millersville.edu/~bob/math130/language/main.pdf · the...

40
The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan Department of Mathematics Fall 2017

Upload: phungnguyet

Post on 02-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

The Language of Hypothesis TestingMATH 130, Elements of Statistics I

J. Robert Buchanan

Department of Mathematics

Fall 2017

Page 2: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Objectives

At the end of this lesson we will be able to:I determine the null and the alternative hypotheses,I explain the Type I and Type II errors, andI state the conclusions to hypothesis tests.

Page 3: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Making Decisions

One of the main uses of inferential statistics is in makingdecisions. A decision made in the face of uncertainty shouldhave the backing force of evidence and should provide aprobability of the decision being incorrect.

DefinitionHypothesis testing is a procedure, based on sample evidenceand probability, used to test statements regarding acharacteristic of one or more populations.

Page 4: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Making Decisions

One of the main uses of inferential statistics is in makingdecisions. A decision made in the face of uncertainty shouldhave the backing force of evidence and should provide aprobability of the decision being incorrect.

DefinitionHypothesis testing is a procedure, based on sample evidenceand probability, used to test statements regarding acharacteristic of one or more populations.

Page 5: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Illustration

ExampleThe mean score on the math portion of the SAT is 518. Atutoring center believes that students who participate in theirtutoring program (for which a fee is charged) score higher thanthe average on the SAT Math Reasoning exam. Suppose thetutoring center samples 35 participants and finds an average of550 with a standard deviation of 25. Is this evidence sufficientlycompelling to justify their belief?

Page 6: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Steps in Hypothesis Testing

1. A statement is made regarding the nature of the population(usually about µ or p).

2. Evidence (sample data) is collected to test the statement.3. The data are analyzed to assess the plausibility of the

statement.

Remark: sample data can never prove that the statement iscorrect, it can only provide evidence for or against belief in thestatement.

Page 7: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Steps in Hypothesis Testing

1. A statement is made regarding the nature of the population(usually about µ or p).

2. Evidence (sample data) is collected to test the statement.

3. The data are analyzed to assess the plausibility of thestatement.

Remark: sample data can never prove that the statement iscorrect, it can only provide evidence for or against belief in thestatement.

Page 8: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Steps in Hypothesis Testing

1. A statement is made regarding the nature of the population(usually about µ or p).

2. Evidence (sample data) is collected to test the statement.3. The data are analyzed to assess the plausibility of the

statement.

Remark: sample data can never prove that the statement iscorrect, it can only provide evidence for or against belief in thestatement.

Page 9: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Steps in Hypothesis Testing

1. A statement is made regarding the nature of the population(usually about µ or p).

2. Evidence (sample data) is collected to test the statement.3. The data are analyzed to assess the plausibility of the

statement.

Remark: sample data can never prove that the statement iscorrect, it can only provide evidence for or against belief in thestatement.

Page 10: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Hypotheses

DefinitionA hypothesis is a statement regarding a characteristic(typically µ or p) of one or more populations.

The null hypothesis, denoted H0 (pronounced “H-naught”), isa statement to be tested. The null hypothesis is assumed to betrue until evidence indicates otherwise.

The alternative hypothesis, denoted H1 (pronounced“H-one”), is a statement that is true if the null hypothesis isfalse. We will try to find evidence to support the alternativehypothesis.

Page 11: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Structure of Hypotheses

There are 3 forms of H0 and H1:1. Equality versus Inequality (two-tailed test)

H0: parameter = some valueH1: parameter 6= some value

2. Equality versus less than (left-tailed test)H0: parameter = some valueH1: parameter < some value

3. Equality versus greater than (right-tailed test)H0: parameter = some valueH1: parameter > some value

Page 12: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Examples

Determine the null and alternative hypotheses in the followingstatements.

1. According to Giving and Volunteering in the United States,2001 Edition, the mean charitable contribution perhousehold in the US in 2000 was $1623. A researcherbelieves that the level of giving has changed since 2000.

2. Federal law requires that jars of peanut butter labeled ascontaining 32 oz. must contain at least 32 oz. A consumeradvocate feels that a certain peanut butter manufacturer isunder-filling jars so the mean contents are less than 32 oz.

3. According to the Centers for Disease Control andPrevention, 16% of children aged 6 to 11 years areoverweight. A school nurse thinks the percentage of 6- to11-year-olds who are overweight is higher in her district.

Page 13: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Hypotheses1. Giving and Volunteering in the United States, 2001 Edition,

H0 : µ = 1623H1 : µ 6= 1623

2. Jars of peanut butter,

H0 : µ = 32H1 : µ < 32

3. Overweight children,

H0 : p = 0.16H1 : p > 0.16

Page 14: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Hypotheses1. Giving and Volunteering in the United States, 2001 Edition,

H0 : µ = 1623H1 : µ 6= 1623

2. Jars of peanut butter,

H0 : µ = 32H1 : µ < 32

3. Overweight children,

H0 : p = 0.16H1 : p > 0.16

Page 15: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Hypotheses1. Giving and Volunteering in the United States, 2001 Edition,

H0 : µ = 1623H1 : µ 6= 1623

2. Jars of peanut butter,

H0 : µ = 32H1 : µ < 32

3. Overweight children,

H0 : p = 0.16H1 : p > 0.16

Page 16: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Hypotheses1. Giving and Volunteering in the United States, 2001 Edition,

H0 : µ = 1623H1 : µ 6= 1623

2. Jars of peanut butter,

H0 : µ = 32H1 : µ < 32

3. Overweight children,

H0 : p = 0.16H1 : p > 0.16

Page 17: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Hypotheses1. Giving and Volunteering in the United States, 2001 Edition,

H0 : µ = 1623H1 : µ 6= 1623

2. Jars of peanut butter,

H0 : µ = 32H1 : µ < 32

3. Overweight children,

H0 : p = 0.16H1 : p > 0.16

Page 18: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Hypotheses1. Giving and Volunteering in the United States, 2001 Edition,

H0 : µ = 1623H1 : µ 6= 1623

2. Jars of peanut butter,

H0 : µ = 32H1 : µ < 32

3. Overweight children,

H0 : p = 0.16H1 : p > 0.16

Page 19: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Outcomes of Hypothesis Testing

Sample data are used to reject or not reject the nullhypothesis. However, since sample data are an incompletepicture of the population, there is no guarantee that the correctdecision is always made.

Theorem (Outcomes)

1. Reject the H0 when H1 is true (correct decision).2. Do not reject the H0 when H0 is true (correct decision).3. Reject the H0 when H0 is true (incorrect decision called a

Type I error).4. Do not reject the H0 when H1 is true (incorrect decision

called a Type II error).

Page 20: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Outcomes of Hypothesis Testing

Sample data are used to reject or not reject the nullhypothesis. However, since sample data are an incompletepicture of the population, there is no guarantee that the correctdecision is always made.

Theorem (Outcomes)

1. Reject the H0 when H1 is true (correct decision).2. Do not reject the H0 when H0 is true (correct decision).3. Reject the H0 when H0 is true (incorrect decision called a

Type I error).4. Do not reject the H0 when H1 is true (incorrect decision

called a Type II error).

Page 21: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Illustration

RealityH0 is True H1 is True

Conclusion Do not reject H0Reject H0

Correct Type II ErrorType I Error Correct

Page 22: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Example

According to the Statistical Abstract of the United States in2000, 10.7% of Americans over the age of 65 used the Internet.A researcher believes the proportion of Americans over 65years of age who use the Internet today is higher.

1. Identify the null and alternative hypotheses.2. Describe the Type I and Type II errors which could be

made.

Page 23: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Description

1. Hypotheses:

H0 : p = 0.107H1 : p > 0.107

2. Errors:

I Type I: Rejecting the claim that the proportion of Americansover 65 using the internet is 10.7%, when in fact this is true.

I Type II: Failing to reject the claim that the proportion ofAmericans over 65 using the internet is 10.7%, when in factthe proportion of Americans over 65 using the internet isgreater than 10.7%.

Page 24: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Description

1. Hypotheses:

H0 : p = 0.107H1 : p > 0.107

2. Errors:

I Type I: Rejecting the claim that the proportion of Americansover 65 using the internet is 10.7%, when in fact this is true.

I Type II: Failing to reject the claim that the proportion ofAmericans over 65 using the internet is 10.7%, when in factthe proportion of Americans over 65 using the internet isgreater than 10.7%.

Page 25: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Description

1. Hypotheses:

H0 : p = 0.107H1 : p > 0.107

2. Errors:

I Type I: Rejecting the claim that the proportion of Americansover 65 using the internet is 10.7%, when in fact this is true.

I Type II: Failing to reject the claim that the proportion ofAmericans over 65 using the internet is 10.7%, when in factthe proportion of Americans over 65 using the internet isgreater than 10.7%.

Page 26: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Description

1. Hypotheses:

H0 : p = 0.107H1 : p > 0.107

2. Errors:I Type I: Rejecting the claim that the proportion of Americans

over 65 using the internet is 10.7%, when in fact this is true.I Type II: Failing to reject the claim that the proportion of

Americans over 65 using the internet is 10.7%, when in factthe proportion of Americans over 65 using the internet isgreater than 10.7%.

Page 27: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Probability of Type I or Type II Errors

Notation:

α = P(Type I Error) = P(rejecting H0 when H0 is true)β = P(Type II Error) = P(not rejecting H0 when H1 is true)

Remark: the probability of making a Type I error, α is called thelevel of significance.

Remark: as α decreases β increases and vice versa.

Page 28: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Probability of Type I or Type II Errors

Notation:

α = P(Type I Error) = P(rejecting H0 when H0 is true)β = P(Type II Error) = P(not rejecting H0 when H1 is true)

Remark: the probability of making a Type I error, α is called thelevel of significance.

Remark: as α decreases β increases and vice versa.

Page 29: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Stating the Conclusion of a Hypothesis Test

I The sample evidence of a hypothesis testing situationenables us to decide whether to reject or not reject the nullhypothesis.

I If we do not reject the null hypothesis, we are not sayingthe null hypothesis is true, only that it could be true.

Page 30: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Stating the Conclusion of a Hypothesis Test

I The sample evidence of a hypothesis testing situationenables us to decide whether to reject or not reject the nullhypothesis.

I If we do not reject the null hypothesis, we are not sayingthe null hypothesis is true, only that it could be true.

Page 31: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Jury Decision Analogy

Consider a criminal trial in which the jury must decide based onevidence presented whether a person is guilty of a particularcrime.

I The presumption is that the person is innocent(corresponding to H0: innocent).

I The jury verdict is announced as guilty or not guilty whichis different from guilty or innocent.

I “Not guilty” is equivalent in some sense to “the evidence isnot sufficiently compelling to reject the presumption ofinnocence”.

Page 32: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Jury Decision Analogy

Consider a criminal trial in which the jury must decide based onevidence presented whether a person is guilty of a particularcrime.

I The presumption is that the person is innocent(corresponding to H0: innocent).

I The jury verdict is announced as guilty or not guilty whichis different from guilty or innocent.

I “Not guilty” is equivalent in some sense to “the evidence isnot sufficiently compelling to reject the presumption ofinnocence”.

Page 33: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Jury Decision Analogy

Consider a criminal trial in which the jury must decide based onevidence presented whether a person is guilty of a particularcrime.

I The presumption is that the person is innocent(corresponding to H0: innocent).

I The jury verdict is announced as guilty or not guilty whichis different from guilty or innocent.

I “Not guilty” is equivalent in some sense to “the evidence isnot sufficiently compelling to reject the presumption ofinnocence”.

Page 34: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Jury Decision Analogy

Consider a criminal trial in which the jury must decide based onevidence presented whether a person is guilty of a particularcrime.

I The presumption is that the person is innocent(corresponding to H0: innocent).

I The jury verdict is announced as guilty or not guilty whichis different from guilty or innocent.

I “Not guilty” is equivalent in some sense to “the evidence isnot sufficiently compelling to reject the presumption ofinnocence”.

Page 35: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Example

Federal law requires that a jar of peanut butter that is labeledas containing 32 oz. must contain at least 32 oz. A consumeradvocate feels that a certain peanut butter manufacturer isunder-filling jars so that the mean contents are less than 32 oz.

1. State the null and alternative hypotheses for this test.2. State the conclusion for the case that the null hypothesis is

rejected.3. State the conclusion for the case that the null hypothesis is

not rejected.

Page 36: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Hypothesis Testing Conclusions

1. Hypotheses:

H0 : µ = 32H1 : µ < 32

2. If we reject the null hypothesis,

“There is sufficient evidence to conclude that themean contents of the jars of peanut butter is lessthan 32 oz.”

3. If we do not reject the null hypothesis,

“There is not sufficient evidence to say that themean contents of the jars of peanut butter is lessthan 32 oz.”

Page 37: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Hypothesis Testing Conclusions

1. Hypotheses:

H0 : µ = 32H1 : µ < 32

2. If we reject the null hypothesis,

“There is sufficient evidence to conclude that themean contents of the jars of peanut butter is lessthan 32 oz.”

3. If we do not reject the null hypothesis,

“There is not sufficient evidence to say that themean contents of the jars of peanut butter is lessthan 32 oz.”

Page 38: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Hypothesis Testing Conclusions

1. Hypotheses:

H0 : µ = 32H1 : µ < 32

2. If we reject the null hypothesis,“There is sufficient evidence to conclude that themean contents of the jars of peanut butter is lessthan 32 oz.”

3. If we do not reject the null hypothesis,

“There is not sufficient evidence to say that themean contents of the jars of peanut butter is lessthan 32 oz.”

Page 39: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Hypothesis Testing Conclusions

1. Hypotheses:

H0 : µ = 32H1 : µ < 32

2. If we reject the null hypothesis,“There is sufficient evidence to conclude that themean contents of the jars of peanut butter is lessthan 32 oz.”

3. If we do not reject the null hypothesis,

“There is not sufficient evidence to say that themean contents of the jars of peanut butter is lessthan 32 oz.”

Page 40: The Language of Hypothesis Testingbanach.millersville.edu/~bob/math130/Language/main.pdf · The Language of Hypothesis Testing MATH 130, Elements of Statistics I J. Robert Buchanan

Hypothesis Testing Conclusions

1. Hypotheses:

H0 : µ = 32H1 : µ < 32

2. If we reject the null hypothesis,“There is sufficient evidence to conclude that themean contents of the jars of peanut butter is lessthan 32 oz.”

3. If we do not reject the null hypothesis,“There is not sufficient evidence to say that themean contents of the jars of peanut butter is lessthan 32 oz.”