P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine...

31
P-values MATH 450 November 7 th , 2017 MATH 450 P-values

Transcript of P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine...

Page 1: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

P-values

MATH 450

November 7th, 2017

MATH 450 P-values

Page 2: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Overview

Week 1 · · · · · ·• Chapter 1: Descriptive statistics

Week 2 · · · · · ·• Chapter 6: Statistics and SamplingDistributions

Week 4 · · · · · ·• Chapter 7: Point Estimation

Week 7 · · · · · ·• Chapter 8: Confidence Intervals

Week 10 · · · · · ·• Chapter 9: Tests of Hypotheses

Week 12 · · · · · ·• Two-sample inference, ANOVA, regression

MATH 450 P-values

Page 3: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Overview

9.1 Hypotheses and test procedures

test procedureserrors in hypothesis testingsignificance level

9.2 Tests about a population mean

normal population with known σlarge-sample testsa normal population with unknown σ

9.4 P-values

9.3 Tests concerning a population proportion

9.5 Selecting a test procedure

MATH 450 P-values

Page 4: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Hypothesis testing

MATH 450 P-values

Page 5: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Hypothesis testing

In any hypothesis-testing problem, there are two contradictoryhypotheses under consideration

The null hypothesis, denoted by H0, is the claim that isinitially assumed to be true

The alternative hypothesis, denoted by Ha, is the assertionthat is contradictory to H0.

MATH 450 P-values

Page 6: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Implicit rules (of this chapter)

H0 will always be stated as an equality claim.

If θ denotes the parameter of interest, the null hypothesis willhave the form

H0 : θ = θ0

θ0 is a specified number called the null value

The alternative hypothesis will be either:

Ha : θ > θ0

Ha : θ < θ0

Ha : θ 6= θ0

MATH 450 P-values

Page 7: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Test procedures

A test procedure is specified by the following:

A test statistic T : a function of the sample data on which thedecision (reject H0 or do not reject H0) is to be based

A rejection region R: the set of all test statistic values forwhich H0 will be rejected

Example:

H0 : µ = 75

Ha : µ < 75

Test procedure:

Compute X̄If X̄ ≤ 72, reject H0.

MATH 450 P-values

Page 8: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Type I and Type II errors

A type I error consists of rejecting the null hypothesis H0

when it is true

A type II error involves not rejecting H0 when H0 is false.

MATH 450 P-values

Page 9: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Significance level

The approach adhered to by most statistical practitioners is

specify the largest value of α that can be tolerated

find a rejection region having that value of α rather thananything smaller

α: the significance level of the test

the corresponding test procedure is called a level α test

MATH 450 P-values

Page 10: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Hypothesis testing for one parameter

1 Identify the parameter of interest

2 Determine the null value and state the null hypothesis

3 State the appropriate alternative hypothesis

4 Give the formula for the test statistic

5 State the rejection region for the selected significance level α

6 Compute statistic value from data

7 Decide whether H0 should be rejected and state thisconclusion in the problem context

MATH 450 P-values

Page 11: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Tests about a population mean

MATH 450 P-values

Page 12: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Normal population with known σ

Null hypothesis: µ = µ0

Test statistic:

Z =X̄ − µ0

σ/√n

MATH 450 P-values

Page 13: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

General rule

MATH 450 P-values

Page 14: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Large-sample tests

Null hypothesis: µ = µ0

Test statistic:

Z =X̄ − µ0

S/√n

[Does not need the normal assumption]

MATH 450 P-values

Page 15: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

t-test

[Require normal assumption]

MATH 450 P-values

Page 16: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

P-values

MATH 450 P-values

Page 17: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Remarks

The common approach in statistical testing is:1 specifying significance level α2 reject/not reject H0 based on evidence

Weaknesses of this approach:

it says nothing about whether the computed value of the teststatistic just barely fell into the rejection region or whether itexceeded the critical value by a large amounteach individual may select their own significance level for theirpresentation

We also want to include some objective quantity thatdescribes how strong the rejection is → P-value

MATH 450 P-values

Page 18: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Practice problem

Problem

Suppose µ was the true average nicotine content of brand Bcigarettes. We want to test:

H0 : µ = 1.5

Ha : µ > 1.5

Suppose that n = 64 and z = x̄−1.5s/√n

= 2.1. Will we reject H0 if the

significance level is

(a) α = 0.05

(b) α = 0.025

(c) α = 0.01

(d) α = 0.005

MATH 450 P-values

Page 19: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Φ(z)

MATH 450 P-values

Page 20: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

P-value

Question: What is the smallest value of α for which H0 is rejected.

MATH 450 P-values

Page 21: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

P-value

MATH 450 P-values

Page 22: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Testing by P-value method

Remark: the smaller the P-value, the more evidence there is in thesample data against the null hypothesis and for the alternativehypothesis.

MATH 450 P-values

Page 23: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

P-values for z-tests

MATH 450 P-values

Page 24: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Practice problem

Problem

The target thickness for silicon wafers used in a certain type ofintegrated circuit is 245 µm. A sample of 50 wafers is obtainedand the thickness of each one is determined, resulting in a samplemean thickness of 246.18 µm and a sample standard deviation of3.60 µm.Does this data suggest that true average wafer thickness issomething other than the target value?

MATH 450 P-values

Page 25: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Φ(z)

MATH 450 P-values

Page 26: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

P-values for z-tests

MATH 450 P-values

Page 27: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

P-values for z-tests

MATH 450 P-values

Page 28: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

P-values for t-tests

MATH 450 P-values

Page 29: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Practice problem

Problem

Suppose we want to test

H0 : µ = 25

Ha : µ > 25

from a sample with n = 5 and the calculated value

t =x̄ − 25

s/√n

= 1.02

(a) What is the P-value of the test

(b) Should we reject the null hypothesis?

MATH 450 P-values

Page 30: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

t-table

MATH 450 P-values

Page 31: P-values · MATH 450 P-values. Practice problem Problem Suppose was the true average nicotine content of brand B cigarettes. We want to test: H 0: = 1:5 H a: >1:5 Suppose that n =

Interpreting P-values

A P-value:

is not the probability that H0 is true

is not the probability of rejecting H0

is the probability, calculated assuming that H0 is true, ofobtaining a test statistic value at least as contradictory to thenull hypothesis as the value that actually resulted

MATH 450 P-values