lecture 16 section 8.1 objectives: testing statistical hypotheses − stating hypotheses statements...

21
Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses Stating hypotheses statements Type I and II errors Conducting a hypothesis test

Upload: avice-tabitha-henderson

Post on 04-Jan-2016

217 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Lecture 16Section 8.1

Objectives:

•Testing Statistical Hypotheses− Stating hypotheses statements− Type I and II errors− Conducting a hypothesis test

Page 2: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Hypotheses and test procedures

While confidence intervals are appropriate when our goal is to estimate a population parameter, Tests of hypotheses are used to assess the amount evidence the data has in favor or against some claim about the population.

The hypothesis is a statement about the parameter in the population.

A test of hypotheses is a method for using sample data to decide between the two competing hypotheses under consideration. We initially assume that one of the hypotheses, the null hypothesis, is correct; this is the “prior belief” claim. We then consider the evidence (sample data), and we reject the null hypothesis in favor of thecompeting claim, called the alternative hypothesis, only if there is convincing evidence against the null hypothesis.

Page 3: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Reasoning of Significance Tests

We have seen that the properties of the sampling distribution of help us

estimate a range of likely values for population mean .

We can also rely on the properties of the sample distribution to test hypotheses.

Example: You are in charge of quality control in your food company. You sample

randomly four packs of cherry tomatoes, each labeled 1/2 lb. (227 g).

The average weight from your four boxes is 222 g. Obviously, we cannot expect

boxes filled with whole tomatoes to all weigh exactly half a pound. Thus,

Is the somewhat smaller weight simply due to chance variation?

Is it evidence that the calibrating machine that sorts

cherry tomatoes into packs needs revision?

x

Page 4: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Stating hypotheses

A test of statistical significance tests a specific hypothesis using

sample data to decide on the validity of the hypothesis.

In statistics, a hypothesis is an assumption or a theory about the

characteristics of one or more variables in one or more populations.

What you want to know: Does the calibrating machine that sorts cherry

tomatoes into packs need revision?

The same question reframed statistically: Is the population mean µ for the

distribution of weights of cherry tomato packages equal to 227 g (i.e., half

a pound)?

Page 5: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

The null hypothesis is a very specific statement about a parameter of

the population(s). It is labeled H0.

The alternative hypothesis is a more general statement about a

parameter of the population(s) that is exclusive of the null hypothesis. It

is labeled Ha.

Weight of cherry tomato packs:

H0 : µ = 227 g (µ is the average weight of the population of packs)

Ha : µ ≠ 227 g (µ is either larger or smaller)

Page 6: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

One-sided and two-sided tests A two-tail or two-sided test of the population mean has these null

and alternative hypotheses:

H0 :  µ = [a specific number] Ha : µ [a specific number]

A one-tail or one-sided test of a population mean has these null and

alternative hypotheses:

H0 :   µ = [a specific number] Ha :   µ < [a specific number] OR

H0 :   µ = [a specific number] Ha :   µ > [a specific number]

The FDA tests whether a generic drug has an absorption extent similar to

the known absorption extent of the brand-name drug it is copying. Higher or

lower absorption would both be problematic, thus we test:

H0 : µgeneric = µbrand Ha : µgeneric µbrand two-sided

Page 7: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Type I and II errors

A Type I error is made when we reject the null hypothesis and the

null hypothesis is actually true (incorrectly reject a true H0).

The probability of making a Type I error is the significance level

A Type II error is made when we fail to reject the null hypothesis

and the null hypothesis is false (incorrectly keep a false H0).

The probability of making a Type II error is labeled .

The power of a test is 1 − .

Page 8: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Running a test of significance is a balancing act between the chance α

of making a Type I error and the chance of making a Type II error.

Reducing α reduces the power of a test and thus increases .

It might be tempting to emphasize greater power (the more the better).

However, with “too much power” trivial effects become highly significant.

A type II error is not definitive since a failure to reject the null hypothesis

does not imply that the null hypothesis is wrong.

Page 9: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Remarks on Type I and II ErrorsIdeally, we wish to have a test making both α and β as small as possible. However, as α decreases, β increases.

In a test of hypotheses, we control the significance level α to be employed in the test. Common significance levels are α = 0.10 or 0.05 or 0.01. A test with α=0.01 means that if H0 is actually true and the test procedure used repeatedly on samples, in the long run H0 would be incorrectly rejected only 1% of the time.

Then which value of significance level should be employed?If a type I error is much more serious than a type II error, a very small value of α is reasonable. When a type II error could have quite unpleasant consequences, it is better to use a larger α . But if there is no significant difference in the effects of these two errors, researchers often choose α=0.05.

Page 10: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Hypotheses and test procedures

Steps for conducting a hypothesis test1. Set up the null and alternative hypotheses2. Calculate the test statistic3. Calculate the p-value4. Make a conclusion in terms of the problem

Test statisticTest statistic is computed assuming that the null hypothesis is true. So, a test statistic measures compatibility between the null hypothesis and the data.

Page 11: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

The P-value

The packaging process has a known standard deviation = 5 g.

H0 : µ = 227 g versus Ha : µ ≠ 227 g

The average weight from your four random boxes is 222 g.

What is the probability of drawing a random sample such as yours if H0 is true?

Tests of statistical significance quantify the chance of obtaining a

particular random sample result if the null hypothesis were true. This

quantity is the P-value.

This is a way of assessing the “believability” of the null hypothesis, given

the evidence provided by a random sample.

Page 12: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Interpreting a P-value

Could random variation alone account for the difference between

the null hypothesis and observations from a random sample?

A small P-value implies that random variation due to the sampling

process alone is not likely to account for the observed difference.

With a small p-value we reject H0. The true property of the

population is significantly different from what was stated in H0.

Thus, small P-values are strong evidence AGAINST H0.

But how small is small…?

Page 13: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Decision Rule

What do you conclude from the test?

We can compare the P-value with the desired significance level α .If P-value ≤ α then we reject H0 at significance level α .If P-value > α then we fail to reject H0 at significance level α.

Page 14: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Stating hypothesesA consumer advocate is interested in evaluating the claim that a new granola cereal contains “4 ounces of cashews in every bag.” The advocate recognizes that the amount of cashews will vary slightly from bag to bag, but she suspects that the mean amount of cashews per bag is less than 4 ounces. To check the claim, the advocate purchases a random sample of 40 bags of cereal and calculates a sample mean of 3.68 ounces of cashews.

What alternative hypothesis does she want to test?

a)

b)

c)

d)

e)

Page 15: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Statistical significanceWe reject the null hypothesis whenever

a) P-value > .

b) P-value .

c) P-value .

d) P-value .

Page 16: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Statistical significanceThe significance level is denoted by

a) b) c) d) P-value

Page 17: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Calculating P-valuesTo calculate the P-value for a significance test, we need to use

information about the

a) Sample distribution

b) Population distribution

c) Sampling distribution of

Page 18: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

ConclusionsSuppose the P-value for a hypothesis test is 0.304. Using = 0.05,

what is the appropriate conclusion?

a) Reject the null hypothesis.

b) Reject the alternative hypothesis.

c) Do not reject the null hypothesis.

d) Do not reject the alternative hypothesis.

Page 19: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

ConclusionsSuppose the P-value for a hypothesis test is 0.0304. Using = 0.05,

what is the appropriate conclusion?

a) Reject the null hypothesis.

b) Reject the alternative hypothesis.

c) Do not reject the null hypothesis.

d) Do not reject the alternative hypothesis.

Page 20: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Stating hypothesesIf we test H0: = 40 vs. Ha: < 40, this test is

a) One-sided (left tail).

b) One-sided (right tail).

c) Two-sided.

Page 21: Lecture 16 Section 8.1 Objectives: Testing Statistical Hypotheses − Stating hypotheses statements − Type I and II errors − Conducting a hypothesis test

Stating hypothesesIf we test H0: = 40 vs. Ha: 40, this test is

a) One-sided (left tail).

b) One-sided (right tail).

c) Two-sided.