Section 7.2: Hypothesis Testing

Section 7.2: Hypothesis Testing We are now going to be comparing two sample from two populations Population 1 Sample 1 Population 2 Sample 2 Is t...
Author: Dominick Bryan
7 downloads 3 Views 488KB Size
Section 7.2: Hypothesis Testing We are now going to be comparing two sample from two populations

Population 1

Sample 1

Population 2

Sample 2

Is the sample similar to the population or is it different that is what we will be focusing on in this chapter. Hypothesis: is a statement that something is true. Null and Alternative Hypotheses: Hypothesis Test Null hypothesis: A hypothesis to be tested. We use the symbol H O to represent the null hypothesis. Alternative hypothesis: A hypothesis to be considered as an alternative to the null hypothesis. We use the symbol represent the alternative hypothesis.

H

a

to

Hypothesis test: The problem in a hypothesis test is to decide whether the null hypothesis should be rejected in favor of the alternative hypothesis. Symbolically Null Hypothesis: The null hypothesis is expressed as H o : 1   2

In our course, we will have two values for each of our parameters  1 and  2 .

Alternative Hypothesis:  In this type of alternative hypothesis, we are testing if the population means  1 and  2 are different from each other H a : 1   2

An alternative hypothesis of this form is called a two-tailed test.  In this type of alternative hypothesis, we are testing if the population means  1 is less than  2 H a : 1   2

An alternative hypothesis of this form is called a left-tailed test.  In this type of alternative hypothesis, we are testing if the population means  1 is greater than  2 H a : 1   2

An alternative hypothesis of this form is called a right-tailed test.

One tailed test: A hypothesis test is called this if it is left tailed or right tailed. Example 1: Hypothesis test are proposed. For the hypothesis test, a. Determine the null hypothesis. b. Determine the alternative hypothesis. c. Classify the hypothesis test as two tailed, left tailed, or right tailed. A. The seagrass Thalassia testudinum is an integral part of the Texas coastal ecosystem. Essential to the growth of T. Testudinum is ammonium. Researchers K. Lee and K. Dunton of the Marine Science Institute of the University of Texas at Austin noticed that the seagrass beds in Corpus Christi Bay (CCB) were taller and thicker than those in Lower Laguna Madre (LLM). The compared the sediment ammonium concentrations in the two locations and published their findings in Marine Ecology Progress Series. Following are the summary statistics on sediment ammonium concentrations, in micromoles, obtained by the researchers. CCB

LLM

y  115 . 1

y

s  79 . 4

s

1

1

n  51 1

B.

2

 24 . 3

 10 . 5 2

 19

n 2

At the 1% significance level, is there sufficient evidence to conclude that the mean sediment ammonium concentration in CCB exceeds that in LLM? B.Is the daily protein level intake measured in grams different for omnivores and vegetarians? Omnivores Vegetarians y  49 . 92

y

s  18 . 97

s

n  53

n

1

1

1

2

2 2

 39 . 04  18 . 82  51

At the 1% significance level, is there sufficient evidence to conclude that the mean daily protein level intake for omnivores is different than for vegetarians?

Basic Logic of Hypothesis Testing Take a random sample from the population. If the sample data are consistent with the null hypothesis, do not reject the null hypothesis; if the sample data are not inconsistent with the null hypothesis and supportive of the alternative hypothesis, reject the null hypothesis in favor of the alternative hypothesis.

t - Test for  1 and  2

Nonpooled

Assumptions 1. Simple random samples 2. Normal Populations or large samples 3. Independent Samples STEP 1: The null hypothesis is H

O

:  1   2 OR  1   2  0

The alternative hypotheses H

A

:  1   2 OR  1   2  0

(Two tailed test)

H

A

:  1   2 OR  1   2  0

(One (right) tailed tests)

STEP 2: Decide on the significan ce level 

STEP 3:

H

A

:  1   2 OR  1   2  0

(One (left) tailed tests)

Compute the value of the test statistic y1  y 2

tS 

 s1 

2



s2 

n1

2

n2

STEP 4: The t-statistic has df 2  s 12 s2    n n2  1

df   

 s 12   n  1

   

2

n1  1



   

2

 s 22  n  2

   

2

n2  1

round down to the nearest integer. Use Table IV to estimate the P-value.

P-value

P-value

ts Right tailed Test

-ts Two tailed Test

P-value

ts

-ts Left tailed Test

STEP 5: If

P  value

do not reject H



, then reject the null hypothesis H

O

; otherwise

O

STEP 6: Interpret the results of the hypothesis test. --------------------------------------------------------------------------------------We are going to be focusing on the alternative hypothesis H A :  1   2 OR  1   2  0 in this section. Note: In this type of test we can have either a positive

ts

or a

ts

Interpretation of the Test Statistic Even if the null hypothesis is not rejected, we do not expect the test statistic t s to be 0. Why not? Sampling error So if we plot the test statistic on our t-distribution, we can have it look like the picture below:

-ts 0 ts

We see that the test statistic is close to 0 so there probably is not a difference between the two means.

What if we have this situation?

-ts

0

ts

We can’t tell exactly, the test statistic is further away from the middle of the distribution 0. What helps us to decide if the two means are different from each other? From our degrees of freedom and our test statistic we determine our p-value p-value: of the test is the area under the student t’s curve in the double tails of  t s and t s P-value

-ts Two tailed Test

ts

Example 1 (7.2.1) For each of the following test, Use Table 4 to bracket where the two tailed p-value would be given the data set and the calculated test statistic. A.

Sample 1

Sample 2

y  735

y

n  4

n

1

1

SE

 y1 

y

2

2

2

 854

 3

 =38

df  4

C. Sample 1

Sample 2

y  36

y

n  15

n

1

1

SE

 y1 

y

2 2

 30  20

=1.3  2

df  30

How do we interpret the p-value? The p-value is a measure of compatibility between the data and the null hypothesis H O :  1   2 OR  1   2  0  A large p-value (close to 1) indicates a value of the the center of the t-distribution (compatible with

ts

near

ts

near

HO )

 A small p-value (close to 0) indicates a value of the the far tails of the t-distribution (compatible with

H

A)

How do we decide what the p-value is compatible with? We compare the p-value to the significance level  The significance level is designated by the experimenter. Common significance levels are 0.1, 0.05, and 0.01. If the

P  value



, then we reject

If the

P  value



, then we do not reject

HO

is not sufficient evidence to support

H

and accept HO

H

A

and state that there

A

Example 2 (7.2.4) For each of the following test, suppose that H O :  1   2 OR  1   2  0 is being tested against H

A

:  1   2 OR  1   2  0 . State

whether or not there is significant

evidence for H A . a. P-value=0.046 and α=0.02 b. P-value=0.033 and α=0.05 c. t s =2.26 with 5 degrees of freedom, α=0.10 d.

ts

=1.94 with 16 degrees of freedom, α=0.05

p-value is a measure of probability. Assuming that the null hypothesis is true, what is the probability that the test statistic that e calculated would be this extreme?  Small p-value indicates not likely that the null is true.  Large p-value indicates not likely that the null is not true.

Example 3 A random sample of human vegetarians and omnivores was taken to determine the difference in the daily protein level intake measured in grams between the two. Omnivores

Vegetarians

y 1  49 . 92 grams

y 2  39 . 04 grams

s1  18 . 97 grams

s 2  18 . 82 grams

n1  53

n 2  51

With a significance level of 0.05, determine if omnivores and vegetarians have protein level intakes.

Example 4 A random sample of the average number of days stay in a short term hospital for men and women are shown in the table below. Male

Female

y 1  7 . 8974

days

y 2  7 . 1143 days

s1  6 . 4105

days

s 2  5 . 0865 days

n1  39

n 2  35

With a significance level of 0.1, determine if men and women stay in the hospital for a different number of days.