9.1 hypothesis testing (part 2)homepage.stat.uiowa.edu/~rdecook/stat1010/notes/section...interval to...

Post on 10-Aug-2020

4 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

9.1 Hypothesis Testing (part 2)

Introduction to Hypothesis

Testing

Null hypothesis (H0)?

Or the Alternative hypothesis (Ha)?

Who makes a claim or a statement?

 A company:  The amount of cereal advertised on a box.

 An everyday person:  One person claims she is a more accurate

basketball shooter than another person.  A researcher:

 They claim that their new drug is better than a presently used drug on the market.

2

How do we decide if the claim is believable? Or unbelievable?

 A company:  Measure the amount in a sample of boxes.

 An everyday person:  Record the number of baskets made and missed.

 A researcher:  Assign some patients to each of the drugs and

see how the patients fare on the drugs. 3

We collect data!!!!

How do we decide if the claim is believable? Or unbelievable?

 … and then we do a .  What is a ?

 It is a standard procedure for testing a claim about the value of a population parameter.

 It is a way to make a decision based on evidence (collected data).

4

We collect data!!!!

The Procedure

 We will have two “competing” hypotheses:

 The null hypothesis   This statement always has an = sign in it.   The mean amount of cereal in the box is 16 oz.   H0: µ = 16 oz.

 The alternative hypothesis   This is where the ‘counter statement’ goes   This statement has one of these in it: <, > , ≠   HA: µ ≠ 16 oz.

5

The Procedure

 Claim: The average cost of a veterinary clinic visit is greater than $100.

 The null hypothesis   H0: µ = $100

 The alternative hypothesis   HA: µ > $100

6 NOTE: Cost is a continuous variable parameter of interest is µ.

The Procedure

 Claim: The proportion of students who like Friday afternoon classes is less than 0.10.

 The null hypothesis   H0: p = 0.10

 The alternative hypothesis   HA: p < 0.10

7 NOTE: We’re collecting ‘like’ or ‘not like’ responses parameter of interest is p.

The Procedure  Claim: A sales rep claims that her vending

machines dispense coffee so that the mean amount supplied is equal to 10 ounces.

 The null hypothesis   H0: µ = 10 ounces

 The alternative hypothesis   HA: µ ≠ 10 ounces

8 NOTE: Ounces is a continuous variable parameter of interest is µ.

9 9

Data in a sample is used to calculate a statistic, such as (sample mean) or s (sample std. dev.). Values that describe the population are parameters, such as µ (population mean) or p (population proportion).

X

The Procedure

 A hypothesis states a claim about a parameter (µ or p), not a statistic.

 But we use a calculated statistic, such as to make a decision about a population parameter, such as µ.

  is our best estimate for µ, so it makes sense to use that in our decision about µ.

10

X

X

11

An Example…  Claim: An engine company claims their

engine has a mean octane rating of 90.

 The null hypothesis   H0: µ = 90

 The alternative hypothesis   HA: µ ≠ 90

12

Example 1: Test of Hypothesis for

 Step 1: State your null and alternative hypotheses.

µ

90:H90:H0

=

µ

µ

A

We use ≠ because ‘greater than’ and ‘less than’ were not part of the original statement.

13

 Step 2: Draw a sample of engines and calculate (sample mean) and s (sample standard deviation).

x

Example 1: Test of Hypothesis for µ

n = 60 randomly sampled engines

= 90.94 s = 2.45

x

14

 Step 3: Construct the 95% confidence interval for µ.

 Formula:

 Calculated:

Example 1: Test of Hypothesis for µ

X ± 2sn

90.94± 2(2.45)60

(90.307, 91.573)

15

 Step 3 (continued): Construct the 95% confidence interval for µ.

 We are 95% confident that the true population mean octane rating for all engines built by this company is between 90.307 and 91.573.

Example 1: Test of Hypothesis for µ

(90.307, 91.573)

16

 Step 4: Use the 95% confidence interval to make a decision for the hypothesis test.

 95% CI:  90 is NOT in the CI, so 90 is NOT a plausible

value for the population mean octane rating.

Example 1: Test of Hypothesis for µ

90:H90:H0

=

µ

µ

A

(90.307, 91.573)

Decision Reject H0.

17

 There is convincing evidence that the population mean octane rating is not 90 but something different.

Example 1: Test of Hypothesis for µ

18

The Procedure  Because we have used a 95% confidence

interval to perform this hypothesis test, the significance level of the test is at the 0.05 level.

  In this class, we will always perform tests at the 0.05 level, but other levels are possible.

 For example, a test done using a 90% confidence interval would be at the 0.10 level.

19

Example 2: Test of Hypothesis for µ

  I think the population mean number of songs in an iTunes library is 7000.

 The null hypothesis   H0: µ = 7000

 The alternative hypothesis   HA: µ ≠ 7000

20

 Step 1: State your null and alternative hypotheses. H0 :µ = 7000

HA :µ ≠ 7000

Example 2: Test of Hypothesis for µ

21

 Step 2: Draw sample and calculate the statistics and s.

x

= 7160 songs, s=1200, from n=150 sample x

Example 2: Test of Hypothesis for µ

22

 Step 3: Construct the 95% confidence interval for µ.

 Formula:

 Calculated:

Example 2: Test of Hypothesis for µ

X ± 2sn

7160± 2(1200)150

(6964, 7356)

23

 Step 4: Use the 95% confidence interval to make a decision for the hypothesis test.

 95% CI:  7000 IS in the CI, so 7000 IS a plausible value

for the population mean number of songs.

Example 2: Test of Hypothesis for µ

Decision Do Not Reject H0.

H0 :µ = 7000HA :µ ≠ 7000

(6964, 7356)

24

 There is not convincing evidence that the population mean number of songs is something other than 7000.

Example 2: Test of Hypothesis for µ

25

The Procedure

 We NEVER prove that the null is correct.

  If we do not reject the null (i.e. we accept it), it just means we didn’t have strong evidence for the alternative hypothesis.

26

The Procedure  The hypothesis test procedure starts off by

assuming that the null is true, and then we collect evidence (or data).

 The evidence tells us one of two things...  1) We should ‘throw-out’ the null statement

that we originally assumed to be true because the data support the alternative hypothesis.

 2) We do not have strong evidence to support the alternative hypothesis (kind of wishy washy outcome).

27 27 Copyright © 2009 Pearson Education, Inc.

1. Reject the null hypothesis, H0, in which case we have evidence in support of the alternative hypothesis.

2. Do not reject the null hypothesis, H0, in which case we do not have enough evidence to support the alternative hypothesis.

Two Possible Outcomes of a Hypothesis Test

top related