math 1710 class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · math 1710 class 22 dr. allen...

118
Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic of Hypothesis Testing Hypothesis Testing Vocabulary Three ways to Carry Out an HT HT Vocab Part II Alternative Hypotheses Sample Size for a Given MOE Examples Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016

Upload: others

Post on 23-Jul-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Math 1710 Class 22

Dr. Allen Back

Oct. 17, 2016

Page 2: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Smoke Detectors

CPSC ’96: 90% of American homes have at least one smokedetector. After a public safety campaign, a city observes that376 out of 400 randomly selected homes have a detector.

Page 3: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Smoke Detectors

CPSC ’96: 90% of American homes have at least one smokedetector. After a public safety campaign, a city observes that376 out of 400 randomly selected homes have a detector.Is this strong evidence the local rate is greater than thenational rate?

Page 4: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Smoke Detectors

CPSC ’96: 90% of American homes have at least one smokedetector. After a public safety campaign, a city observes that376 out of 400 randomly selected homes have a detector.Is this strong evidence the local rate is greater than thenational rate?

So p̂ =376

400= .94.

Page 5: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Logic of Hypothesis Testing

Null Hypothesis H0 - retained unless disproven.

Sometimes Preferred Terminology: “fail to reject H0” ratherthan “retain H0” to emphasize that the null is neverestablished.

Page 6: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Logic of Hypothesis Testing

Null Hypothesis H0 - retained unless disproven.

Sometimes Preferred Terminology: “fail to reject H0” ratherthan “retain H0” to emphasize that the null is neverestablished.

Alternative Hypothesis HA- Only thing which possibly can beproven in the HT.

Page 7: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Logic of Hypothesis Testing

Null Hypothesis H0 - retained unless disproven.

Sometimes Preferred Terminology: “fail to reject H0” ratherthan “retain H0” to emphasize that the null is neverestablished.

Alternative Hypothesis HA- Only thing which possibly can beproven in the HT.Procedure:

1 . . .2 . . .3 Consider the sampling distribution of p̂ which

would hold if H0 were true.4 Fail to reject H0 if p̂ is reasonably consistent with

this sampling distribution. Otherwise reject H0.5 . . .

Page 8: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Logic of Hypothesis Testing

to emphasize that the null is never established.

Procedure:

1 . . .2 . . .3 Consider the sampling distribution of p̂ which

would hold if H0 were true.4 Fail to reject H0 if p̂ is reasonably consistent with

this sampling distribution. Otherwise reject H0.5 . . .

Three ways to carry out step 4:

1 Calculate a Z-statistic and determine a p-value.2 Calculate a Z-statistic and compare with a critical

value z∗.3 Use a confidence interval.

Page 9: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Hypothesis Testing Vocabulary

Null Hypothesis H

Alternative Hypothesis H(One Sided vs Two Sided)

SD(p̂) vs. SE (p̂)

Z-statistic

Tail Probability

P-value

Significance Level

Fail to reject Null H (retain H0) vs. reject Null H (equiv.accept Alt H )

Page 10: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

Let p be the true proportion of smoke detectors homes in ourcity have.

Page 11: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

Let p be the true proportion of smoke detectors homes in ourcity have.H0 : p = .9, HA : p > .9

Page 12: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

Let p be the true proportion of smoke detectors homes in ourcity have.H0 : p = .9, HA : p > .9

SD(p̂) =

√.9 · .1400

= .015.

Page 13: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

Let p be the true proportion of smoke detectors homes in ourcity have.H0 : p = .9, HA : p > .9

SD(p̂) =

√.9 · .1400

= .015.

z-statistic

z =.94− .9.015

= 2.67.

Page 14: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

z-statistic

z =.94− .9.015

= 2.67.

z-statistic is the z-score of p̂ on the samp dist centered at thehypothesized value of p

Page 15: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

z-statistic

z =.94− .9.015

= 2.67.

z-statistic is the z-score of p̂ on the samp dist centered at thehypothesized value p0 of p

Page 16: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

z-statistic

z =.94− .9.015

= 2.67.

Two primary ways to continue:

Page 17: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

z-statistic

z =.94− .9.015

= 2.67.

Two primary ways to continue:Method 1: Tail Prob = P(p̂ > .94) = P(Z > 2.67) = .0038Since the test is 1-sided, P-value=tail probability=.0038.

Page 18: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

z-statistic

z =.94− .9.015

= 2.67.

Two primary ways to continue:Method 1: Tail Prob = P(p̂ > .94) = P(Z > 2.67) = .0038Since the test is 1-sided, P-value=tail probability=.0038.This is small, so conclusion is we reject H0.

Page 19: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

z-statistic

z =.94− .9.015

= 2.67.

Two primary ways to continue:Method 2: Say significance level is α = .05.

Page 20: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

z-statistic

z =.94− .9.015

= 2.67.

Two primary ways to continue:Method 2: Say significance level is α = .05.Since this is a 1-sided test with α = .05, the appropriatecritical value is z∗ = 1.645.

N(0,1)

Page 21: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

z-statistic

z =.94− .9.015

= 2.67.

Two primary ways to continue:Method 2: Say significance level is α = .05.Since our z-statistic of 2.67 is more extreme than z∗ = 1.645(and supports Ha), we reject Ha at α = .05.

N(0,1)

Page 22: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

Method 3: Using a CI. Still α = .05.

Page 23: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

Method 3: Using a CI. Still α = .05.The picture

shows that a 90% CI has the same critical value as an α = .05HT.

Page 24: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

Method 3: Using a CI. Still α = .05.

SE (p̂) =

√.94 · .06

400= .0119

Page 25: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

Method 3: Using a CI. Still α = .05.

SE (p̂) =

√.94 · .06

400= .0119

A 90% CI is

.94± 1.645 · .0119 = .94± .0196 = (.9204, .9596)

Page 26: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

Method 3: Using a CI. Still α = .05.

SE (p̂) =

√.94 · .06

400= .0119

A 90% CI is

.94± 1.645 · .0119 = .94± .0196 = (.9204, .9596)

Since all the values of p in our CI support Ha, the result of theHT is to reject the null.Had even one been consistent with H0, we would have failed toreject the null.

Page 27: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

Method 3: Using a CI. Still α = .05.

SE (p̂) =

√.94 · .06

400= .0119

A 90% CI is

.94± 1.645 · .0119 = .94± .0196 = (.9204, .9596)

Because of the extra error associated with SE instead of SD,Method 3 is not arithmetically equivalent to Methods 1 and 2.Method 3 could reject the null while method 1 failed to rejector vice-versa.

Page 28: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

Method 3: Using a CI. Still α = .05.

SE (p̂) =

√.94 · .06

400= .0119

A 90% CI is

.94± 1.645 · .0119 = .94± .0196 = (.9204, .9596)

Because of the extra error associated with SE instead of SD,Method 3 is not arithmetically equivalent to Methods 1 and 2.Method 3 could reject the null while method 1 failed to rejector vice-versa.This small discrepancy is not of practical importance. It couldbe corrected by a more elaborate CI formula.

Page 29: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

CPSC Example

Method 3: Using a CI. Still α = .05.

SE (p̂) =

√.94 · .06

400= .0119

A 90% CI is

.94± 1.645 · .0119 = .94± .0196 = (.9204, .9596)

Because of the extra error associated with SE instead of SD,Method 3 is not arithmetically equivalent to Methods 1 and 2.Method 3 could reject the null while method 1 failed to rejector vice-versa.This small discrepancy is not of practical importance. It couldbe corrected by a more elaborate CI formula.The general principle that many HT’s can be done via a CI isan important fact.

Page 30: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Hypothesis Testing Vocabulary

Null Hypothesis H

Alternative Hypothesis H(One Sided vs Two Sided)

SD(p̂) vs. SE (p̂)

Z-statistic

Tail Probability

P-value

Significance Level

Fail to reject Null H vs. Accept Alt H (equiv. reject NullH )

Page 31: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

HT Vocabulary Details Part II

z-statistic - the z-score of p̂ in relation to the samplingdistribution of p̂ assuming H0 is true.

Page 32: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

HT Vocabulary Details Part II

z-statistic - the z-score of p̂ in relation to the samplingdistribution of p̂ assuming H0 is true.

Page 33: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

HT Vocabulary Details Part II

z-statistic - the z-score of p̂ in relation to the samplingdistribution of p̂ assuming H0 is true.

z =p̂ − p0

SD(p̂)

Page 34: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

HT Vocabulary Details Part II

z-statistic - the z-score of p̂ in relation to the samplingdistribution of p̂ assuming H0 is true.

z =p̂ − p0

SD(p̂)

“. . . assuming H0 is true” is why we use SD(p̂) rather thanSE (p̂) in calculating our z-statistic.

Page 35: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

HT Vocabulary Details Part II

Tail Probability - The probability of a p̂ as extreme or more soand on the same side of p0 (assuming p̂ supports thealternative hypothesis) than the p̂ we actually observed.This is again assuming H0 is true.

Page 36: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

HT Vocabulary Details Part II

Tail Probability - The probability of a p̂ as extreme or more soand on the same side of p0 (assuming p̂ supports thealternative hypothesis) than the p̂ we actually observed.This is again assuming H0 is true.

(Tail probability shaded in gray.)

Page 37: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

HT Vocabulary Details Part II

P-value: The probability of a z-statistic as extreme as the givenone or more so (and in support of the alternative hypothesis)under the assumption that the null hypothesis is true.

Page 38: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

HT Vocabulary Details Part II

P-value: The probability of a z-statistic as extreme as the givenone or more so (and in support of the alternative hypothesis)under the assumption that the null hypothesis is true.So P-value =

(single) tail probability in 1-sided test casetwice the (single) tail probability in 2-sided test case.

Page 39: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

HT Vocabulary Details Part II

P-value: The probability of a z-statistic as extreme as the givenone or more so (and in support of the alternative hypothesis)under the assumption that the null hypothesis is true.So P-value =

(single) tail probability in 1-sided test casetwice the (single) tail probability in 2-sided test case.

Ha : p > p0 P-value=tail probability

Page 40: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

HT Vocabulary Details Part II

P-value: The probability of a z-statistic as extreme as the givenone or more so (and in support of the alternative hypothesis)under the assumption that the null hypothesis is true.So P-value =

(single) tail probability in 1-sided test casetwice the (single) tail probability in 2-sided test case.

Ha : p 6= p0 P-value=2(tail probability)

Page 41: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

HT Vocabulary Details Part II

P-value: The probability of a z-statistic as extreme as the givenone or more so (and in support of the alternative hypothesis)under the assumption that the null hypothesis is true.Significance Level α: The cutoff between ”small” and ”big”P-values.

Page 42: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

HT Vocabulary Details Part II

P-value: The probability of a z-statistic as extreme as the givenone or more so (and in support of the alternative hypothesis)under the assumption that the null hypothesis is true.Small P-value means reject the null.Big P-value means retain the null.

Page 43: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Three Kinds of H ′as

Ha for a prop. HT can be any of the three possibilities

Two-Sided p 6= p0

One-Sided p > p0

One-Sided p < p0

Page 44: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Three Kinds of H ′as

Ha for a prop. HT can be any of the three possibilities

Two-Sided p 6= p0

One-Sided p > p0

One-Sided p < p0

One chooses among these based on the question being studied.

Page 45: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Three Kinds of H ′as

Ha for a prop. HT can be any of the three possibilities

Two-Sided p 6= p0

One-Sided p > p0

One-Sided p < p0

One chooses among these based on the question being studied.

A question like “Is there strong evidence that p has changed. . . ” would point to 2-sided.

Page 46: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Three Kinds of H ′as

Ha for a prop. HT can be any of the three possibilities

Two-Sided p 6= p0

One-Sided p > p0

One-Sided p < p0

One chooses among these based on the question being studied.

A question like “Is there strong evidence that p has increased. . . ” would point to 1-sided.

Page 47: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Three Kinds of H ′as

Ha for a prop. HT can be any of the three possibilities

Two-Sided p 6= p0

One-Sided p > p0

One-Sided p < p0

One chooses among these based on the question being studied.

The value of p̂ never plays a role in formulating hypotheses!

Page 48: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Three Kinds of H ′as

N(0,1) and the critical value z∗

Page 49: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Three Kinds of H ′as

N(0,1)

Ha : p 6= p0 (2-sided), α = .10

Page 50: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Three Kinds of H ′as

N(0,1)

Ha : p > p0 (1-sided), α = .05

Page 51: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Three Kinds of H ′as

N(0,1)

Ha : p < p0 (1-sided), α = .05

Page 52: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

We wish to produce a 95% CI with a margin of error of .1%.What sample size should we use?

Page 53: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

We wish to produce a 95% CI with a margin of error of .1%.What sample size should we use?

MOE = z∗√

p̂q̂

n

Page 54: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

We wish to produce a 95% CI with a margin of error of .1%.What sample size should we use?

MOE = z∗√

p̂q̂

n

Margin of error picture.

Page 55: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

We wish to produce a 95% CI with a margin of error of .1%.What sample size should we use?

MOE = z∗√

p̂q̂

n

Algebra gives

n =

(z∗

MOE

)2

p̂q̂

Page 56: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

We wish to produce a 95% CI with a margin of error of .1%.What sample size should we use?Algebra gives

n =

(z∗

MOE

)2

p̂q̂

Here we have

n =

(1.96

.001

)2

p̂q̂ = 19602p̂q̂.

Page 57: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

We wish to produce a 95% CI with a margin of error of .1%.What sample size should we use?Algebra gives

n =

(z∗

MOE

)2

p̂q̂

Here we have

n =

(1.96

.001

)2

p̂q̂ = 19602p̂q̂.

The challenge is we don’t know p̂ until we conduct the sample.

Page 58: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

We wish to produce a 95% CI with a margin of error of .1%.What sample size should we use?Algebra gives

n =

(z∗

MOE

)2

p̂q̂

Here we have

n =

(1.96

.001

)2

p̂q̂ = 19602p̂q̂.

Three Approaches:

Page 59: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

We wish to produce a 95% CI with a margin of error of .1%.What sample size should we use?Algebra gives

n =

(z∗

MOE

)2

p̂q̂

Here we have

n =

(1.96

.001

)2

p̂q̂ = 19602p̂q̂.

Three Approaches:1. Conservative: Just use p̂ = .5 since that gives the biggestpossible value of p̂q̂.

(Think about the graph of y = x(1− x).)

Page 60: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

We wish to produce a 95% CI with a margin of error of .1%.What sample size should we use?1. Conservative: Just use p̂ = .5 since that gives the biggestpossible value of p̂q̂.

Page 61: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

We wish to produce a 95% CI with a margin of error of .1%.What sample size should we use?Here we have

n =

(1.96

.001

)2

p̂q̂ = 19602p̂q̂.

Three Approaches:1. Conservative: Just use p̂ = .5 since that gives the biggestpossible value of p̂q̂.Here we get

n = 19602(.5)(.5) = 9802 = 960, 400

which explains why surveys DO NOT seek an MOE of .1%.

Page 62: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

Three Approaches:1. Conservative: Just use p̂ = .5 since that gives the biggestpossible value of p̂q̂.Let’s shift to producing a 95% CI with a margin of error of 2%.What sample size should we use?

Page 63: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

Three Approaches:1. Conservative: Just use p̂ = .5 since that gives the biggestpossible value of p̂q̂.Let’s shift to producing a 95% CI with a margin of error of 2%.What sample size should we use?

n =

(1.96

.02

)2

p̂q̂ = 982p̂q̂ = 9604p̂q̂.

Page 64: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

Three Approaches:1. Conservative: Just use p̂ = .5 since that gives the biggestpossible value of p̂q̂.Let’s shift to producing a 95% CI with a margin of error of 2%.What sample size should we use?

n =

(1.96

.02

)2

p̂q̂ = 982p̂q̂ = 9604p̂q̂.

The conservative estimate here is n = 9604 · .25 = 2401.

Page 65: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

Three Approaches:Let’s shift to producing a 95% CI with a margin of error of 2%.What sample size should we use?

n =

(1.96

.02

)2

p̂q̂ = 982p̂q̂ = 9604p̂q̂.

2. Use an estimate of p̂:

Page 66: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

Three Approaches:Let’s shift to producing a 95% CI with a margin of error of 2%.What sample size should we use?

n =

(1.96

.02

)2

p̂q̂ = 982p̂q̂ = 9604p̂q̂.

2. Use an estimate of p̂:e.g. if we expect p̂ ∼ .2, we might use this value leading to anestimate n = 9604 · .2 · .8 = 1537. But no guarantees.

Page 67: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

Three Approaches:Let’s shift to producing a 95% CI with a margin of error of 2%.What sample size should we use?

n =

(1.96

.02

)2

p̂q̂ = 982p̂q̂ = 9604p̂q̂.

3. If you expect p̂ to be in a range, use the most demanding p̂within that range.As long as your expectation is met, this is guaranteed to work.

Page 68: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

Three Approaches:Let’s shift to producing a 95% CI with a margin of error of 2%.What sample size should we use?

n =

(1.96

.02

)2

p̂q̂ = 982p̂q̂ = 9604p̂q̂.

3. If you expect p̂ to be in a range, use the most demanding p̂within that range.As long as your expectation is met, this is guaranteed to work.

For example if we expect .05 ≤ p̂ ≤ .2, use p̂ = .2 againleading to 1537.

Page 69: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

Three Approaches:Let’s shift to producing a 95% CI with a margin of error of 2%.What sample size should we use?

n =

(1.96

.02

)2

p̂q̂ = 982p̂q̂ = 9604p̂q̂.

3. If you expect p̂ to be in a range, use the most demanding p̂within that range.As long as your expectation is met, this is guaranteed to work.

How about if we expect .2 ≤ p̂ ≤ .7?

Page 70: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

Let’s shift to producing a 95% CI with a margin of error of 2%.What sample size should we use?

n =

(1.96

.02

)2

p̂q̂ = 982p̂q̂ = 9604p̂q̂.

3. If you expect p̂ to be in a range, use the most demanding p̂within that range.As long as your expectation is met, this is guaranteed to work.

How about if we expect .2 ≤ p̂ ≤ .7?The most demanding is p̂ = .5, so we use that and again arriveat 2401.

Page 71: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Sample Size for a Given MOE

Note the slow growth: A 100 fold increase in sample sizereduces the MOE by only a factor of 10.

Page 72: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Smoking 2nd Edition Ch. 20 # 15

National data in the 1960s showed that about 44% of the adultpopulation had never smoked cigarettes. In 1995 a nationalhealth survey interviewed a random sample of 881 adults andfound that 52% had never been smokers.

(a) Create a 95% CI for the proportion of adults (in 1995)who had never been smokers.

(b) Does this provide evidence of a change in behavioramong Americans? Using your CI, test an appropriatehypothesis and state your conclusion.

Page 73: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Smoking 2nd Edition Ch. 20 # 15

Notation: Let p denote the proportion of Americans in 1995who had never smoked.

Page 74: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Smoking 2nd Edition Ch. 20 # 15

Hypotheses:

H0: p = .44

Ha: p 6= .44

Page 75: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Smoking 2nd Edition Ch. 20 # 15

Random Sampling: Stated.

Page 76: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Smoking 2nd Edition Ch. 20 # 15

10% Condition: Much less than the national population.

Page 77: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Smoking 2nd Edition Ch. 20 # 15

Success/Failure:

881 · .52 ≥ 10

881 · .48 ≥ 10

Page 78: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Women Executives Ch. 20 #25

A company is criticized because only 13 of 43 people inexecutive-level positions are women. The company explainsthat although this proportion is lower than it might wish, it’snot surprising given that only 40% of all its employees arewomen. What do you think? Test an appropriate hypothesisand state your conclusion.

Page 79: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Women Executives Ch. 20 #25

Notation: Let p denote the proportion of executives (incompanies like this one, perhaps) who are women.

Page 80: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Women Executives Ch. 20 #25

Hypotheses: If potentially proving the company is wrong:

H0: p = .4 (or p ≥ .4)

Ha: p < .4

If potentially proving the company is right:

H0: p = .4 (or p ≤ .4)

Ha: p > .4

Page 81: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Women Executives Ch. 20 #25

Random Sampling: Hopefully representative of a much largerpopulation.

Page 82: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Women Executives Ch. 20 #25

10% Condition: Depends on definition of the population.Hopefully much less than 10% of population.

Page 83: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Women Executives Ch. 20 #25

Success/Failure:

43

(13

43

)≥ 10

43

(30

43

)≥ 10

Page 84: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Dropouts Ch. 20 #27

Some people are concerned that new tougher standards andhigh-stakes tests adopted in many states have driven up thehigh school dropout rate. The National Center for EducationStatistics reported that the high school dropout rate for theyear 2004 was 10.3%. One school district whose dropout ratehas always been very close to the national average reports that210 of their 1782 high school students dropped out last year. Isthis evidence that their dropout rate may be increasing?Explain.

Page 85: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Dropouts Ch. 20 #27

Notation: Let p denote the proportion of students in districtslike this one who drop out.

Page 86: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Dropouts Ch. 20 #27

Hypotheses:

H0: p = 10.3 (or p ≤ 10.3)

Ha: p > 10.3

Page 87: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Dropouts Ch. 20 #27

Random Sampling: Hopefully representative of a much largerpopulation.

Page 88: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Dropouts Ch. 20 #27

10% Condition: Depends on definition of the population.Hopefully much less than 10% of population.Certainly much less than the national population.

Page 89: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Dropouts Ch. 20 #27

Success/Failure:

1782

(210

1782

)≥ 10

1782

(1572

1782

)≥ 10

Page 90: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Lost Luggage Ch. 20 #29

An airline’s public relations department says that the airlinerarely loses passengers’ luggage. It further claims that on thoseoccasions when luggage is lost, 90% is recovered and deliveredto its owner within 24 hours. A consumer group that surveyeda large number of air travelers found that only 103 of 122people who lost luggage on that airline were reunited with themissing items by the next day. Does this cast doubt on theairline’s claim? Explain.

Page 91: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Lost Luggage Ch. 20 #29

Notation: Let p denote the proportion of lost luggage that isreturned within 24 hours.

Page 92: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Lost Luggage Ch. 20 #29

Hypotheses:

H0: p = .9 (or p ≥ .9)

Ha: p < .9

Page 93: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Lost Luggage Ch. 20 #29

Random Sampling: Hopefully.

Page 94: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Lost Luggage Ch. 20 #29

10% Condition: Depends on definition of the population.Hopefully much less than 10% of population.Certainly much less than total volume of luggage.

Page 95: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Lost Luggage Ch. 20 #29

Success/Failure:

122

(103

122

)≥ 10

122

(19

122

)≥ 10

Page 96: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power, Type I/II Errors, α, and β

Given H0 : p = p0, there are two ways an HT can report aninaccurate result:

Page 97: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power, Type I/II Errors, α, and β

Given H0 : p = p0, there are two ways an HT can report aninaccurate result:

H0 true H0 false

Retain H0 Good Type II Errorprobability = βdepends on value of p

Reject H0 Type I Error Goodprobability = α probability = 1-β

= power

Page 98: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power, Type I/II Errors, α, and β

Given H0 : p = p0, there are two ways an HT can report aninaccurate result:Type I Error Examples:

a: False Positive in a diagnosis; i.e. deciding aperson is sick when they really are not. (H0 : Theperson is well.)

b: Convicting an innocent person. (H0 : The personis innocent.)

c: Producer Risk; the chance that a good goodshipment erroneously fails a a test for quality.(H0 : A product meets a specification.)

Page 99: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power, Type I/II Errors, α, and β

Given H0 : p = p0, there are two ways an HT can report aninaccurate result:Type I Error Examples:

a: False Positive in a diagnosis; i.e. deciding aperson is sick when they really are not. (H0 : Theperson is well.)

b: Convicting an innocent person. (H0 : The personis innocent.)

c: Producer Risk; the chance that a good goodshipment erroneously fails a a test for quality.(H0 : A product meets a specification.)

Type II Error Examples:

a: False Negative; missing a sick person.b: Letting a guilty person go free.c: Consumer Risk; the chance that a bad shipment

erroneously passes a a test for quality.

Page 100: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Example

40% of employees are women.Woman under-represented as executives?What would it take in p̂ for the company to prove that womenare as well represented among executives?

Page 101: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Example

40% of employees are women.Woman under-represented as executives?What would it take in p̂ for the company to prove that womenare as well represented among executives?

H0 : p = .4

Ha : p > .4

Page 102: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Example

40% of employees are women.Woman under-represented as executives?What would it take in p̂ for the company to prove that womenare as well represented among executives?

H0 : p = .4

Ha : p > .4

One could also do a HT to see if a given p̂ demonstrateswomen are under represented. Then Ha would be p < .4.

Page 103: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Example

H0 : p = .4

Ha : p > .4

n = 420,SD(p̂) = .0239.

z =p̂ − .4.0239

z > z∗ means p̂ > .0239z∗ + .4.α = .05⇒ z∗ = 1.645; rejection means p̂ > .439.α = .01⇒ z∗ = 2.326; rejection means p̂ > .456.

Page 104: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Example

How a p̂ will be dealt with in the HT

Page 105: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Example

How does the power depend on the effect size?

i.e. on the actual value of p

Page 106: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Example

How does the power depend on the effect size?

Sampling Dist of p̂ when effect size is large.

Power nearly 1

Page 107: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Example

How does the power depend on the effect size?

Sampling Dist of p̂ when effect size is small.

Power nearly α

Page 108: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Example

How does the power depend on the effect size?

Sampling Dist of p̂ when effect size is middle size.

Power in middle between 0 and 1; you could calulate it, but wewon’t ask you to.

Page 109: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Example

How does the power depend on the effect size?α = .05 case:

p β power

.4001 .95 .05

.41 .89 .11

.45 .33 .67

.5 .01 .99

Page 110: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Example

How does the power depend on the effect size?α = .01 case:

p β power

.4001 .99 .01

.41 .97 .03

.45 .59 .41

.5 .04 .96

Page 111: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Example

How does the power depend on the effect size?

Power vs. alternative value of p in 2-sided case.

A Power Curve

Page 112: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Poperties

Prob of type I error = α .

(H0 1-sides, α = .05 below)

Page 113: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Poperties

Power = 1 - β always.

Page 114: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Poperties

Power depends on effect size. (i.e actual alternative value forp.)

Page 115: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Poperties

Power is approx. α when actual p is near p0 but not exactly p0.

Page 116: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Poperties

Power goes to 1 as effect size grows, assuming in the 1 sidedcase that the alternative value supports Ha.

Page 117: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Poperties

Power increases as sample size increases.

Page 118: Math 1710 Class 22pi.math.cornell.edu/~web1710/slides/oct17_v1.pdf · Math 1710 Class 22 Dr. Allen Back Oct. 17, 2016. Math 1710 Class 22 V1 A Simple Hypothesis Test Question Logic

Math 1710Class 22

V1

A SimpleHypothesisTest Question

Logic ofHypothesisTesting

HypothesisTestingVocabulary

Three ways toCarry Out anHT

HT VocabPart II

AlternativeHypotheses

Sample Sizefor a GivenMOE

Examples

Power

PowerExample

PowerProperties

Power Poperties

Increasing α decreases β . (Easier to reject H0.)