Top Banner
1 Confidence Interval and Hypothesis Testing for: Population Mean ( )
27

1 Confidence Interval and Hypothesis Testing for: Population Mean ( )

Dec 18, 2015

Download

Documents

Verity Spencer
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

1

Confidence Interval and Hypothesis Testing for:

Population Mean ( )

Page 2: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

2

Assumptions & ConditionsRandom sample

Independent observations

Nearly normal distribution

y ~ N (, / n )

Page 3: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

3

y - sn

t =

Student’s t-Model for decisions about the mean,

With df=n-1

Page 4: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

4

One-Sample t-IntervalWhen the conditions are met, the confidence interval for the means of one population is:

_______________________

where the standard error of the means is:_______________________

The critical value (t*) depends on the particular confidence level, C, and the degrees of freedom, df.

Page 5: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

5

CI for the mean,

Stat, tests, 8: T-Interval

HT for the mean,

Stat, tests, 2: T-Test

Page 6: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

6

Terms

Significant Level ()

P-value (P in TI)

Null Hypothesis (H

Alternative Hypothesis (H

Page 7: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

7

Reject the null hypothesis if the P-value is less than or equal to the significance level .

Reject Ho if P-value < .

Fail to reject Ho if P-value > .

Decisions

Page 8: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

8

Procedures1. Hypotheses:

H

H

2. Assumptions and Conditions:

3. Mechanics

T = P-value =< Significant Level ()?

4. Conclusion: Answer the original question.

Page 9: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

9

Confidence Interval and Hypothesis

TestingComparing Two Population

Means: Finding and Testing their

difference (1- 2)

Page 10: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

10

Assumptions and Conditions for t-model• Independence Assumption (Each condition needs to be checked for both groups.):– Randomization Condition: Were the data collected with suitable randomization (representative random samples or a randomized experiment)?

– 10% Condition: Is the sample size (n) less than 10% of the population size (N)? We don’t usually check this condition for differences of means. We will check it for means only if we have a very small population or an extremely large sample.

Page 11: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

11

Assumptions and Conditions (cont.)

• Normal Population Assumption:– Nearly Normal Condition: This must be checked for both groups. A violation by either one violates the condition.

• Independent Groups Assumption: The two groups we are comparing must be independent of each other.

Page 12: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

12

Two-Sample t-IntervalWhen the conditions are met, the confidence interval for the difference (between means of two independent groups) is:

where the standard error of the difference of the means is:

The critical value (t*) depends on the particular

confidence level, C, and the degrees of freedom, df, derived from the sample sizes and a special formula.

2 21 2

1 21 2

s sSE y y

n n

1 2 1 2dfy y t SE y y

Page 13: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

13

Degrees of Freedom (df)

• The special formula for the degrees of freedom for our t critical value is a bear:

• Because of this, we will let technology calculate degrees of freedom for us!

(or pursue a stat major or minor)

22 21 2

1 22 22 2

1 2

1 1 2 2

1 11 1

s sn n

dfs s

n n n n

Page 14: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

14

Testing the Difference Between Two Means

• The hypothesis test we use is the two-sample t-test for means.• The conditions for the two-sample t-test for the difference between the means of two independent groups are the same as for the two-sample t-interval.

Page 15: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

15

Testing the Difference Between Two Means

(cont.)We test the hypothesis H0:1 – 2 = 0, where the hypothesized difference, 0, is almost always 0, using the statistic

The standard error is

When the conditions are met and the null hypothesis is true, this statistic can be closely modeled by a Student’s t-model with a number of degrees of freedom given by a special formula. We use that model to obtain a P-value.

1 2 0

1 2

y yt

SE y y

2 21 2

1 21 2

s sSE y y

n n

Page 16: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

16

Back Into the Pool• Remember that when we know a proportion, we know its standard deviation. – Thus, when testing the null hypothesis that two proportions were equal, we could assume their variances were equal as well.

– This led us to pool our data for the hypothesis test for p1-p2.

Page 17: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

17

Back Into the Pool (cont.)

• For means, there is also a pooled t-test.– Like the two-proportions z-test, this test assumes that the variances in the two groups are equal.

– But, be careful, there is no link between a mean and its standard deviation…

Page 18: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

18

Back Into the Pool (cont.)

• If we are willing to assume that the variances of two means are equal, we can pool the data from two groups to estimate the common variance and make the degrees of freedom formula much simpler.

• We are still estimating the pooled standard deviation from the data, so we use Student’s t-model, and the test is called a pooled t-test.

Page 19: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

19

*The Pooled t-Test• If we assume that the variances are equal, we can estimate the common variance from the numbers we already have:

• Substituting into our standard error formula, we get:

• Our degrees of freedom are now df = n1 + n2 – 2.

2 21 1 2 22

1 2

1 1

1 1pooled

n s n ss

n n

1 21 2

1 1pooled pooledSE y y s

n n

Page 20: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

20

*The Pooled t-Test and Confidence Interval

• The conditions are the same, plus the assumption that the variances of the two groups are the same.

• For the hypothesis test, our test statistic is

which has df = n1 + n2 – 2.

• Our confidence interval is

1 2 0

1 2pooled

y yt

SE y y

1 2 1 2df pooledy y t SE y y

Page 21: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

21

Is the Pool All Wet?• So, when should you use pooled-t methods rather than two-sample t methods? Well, hardly ever.

• Because the advantages of pooling are small, and you are allowed to pool only rarely (when the equal variance assumption is met).

• Don’t pool.

Page 22: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

22

Can We Test Whether the Variances Are

Equal?

• The test is very sensitive to non-normal data and works poorly for small sample sizes.

• So, the test does not work when we need it to.

Page 23: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

23

What Can Go Wrong?• Watch out for paired data.

– The Independent Groups Assumption deserves special attention.

– If the samples are not independent, you can’t use two-sample methods.

• Look at the plots.– Check for outliers and non-normal distributions by making and examining boxplots or normal probability plots.

Page 24: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

24

What have we learned? To use statistical inference to compare the means of two independent groups.– We use t-models for CI and HT.– It is important to check conditions to see if the assumptions for t-model are met.

– Don’t pool the standard errors.

Page 25: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

25

Coke Versus Pepsi

Independent random samples of 36 cans of Coke and Pepsi are weighed and summarized below. Use the 0.01 significance level to test the claim that the mean weight of regular Coke is different from the mean weight of regular Pepsi.

Regular Coke Regular Pepsi

n 36 36

y 0.817 0.824

s 0.0076 0.0057

Page 26: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

26

Coke Versus Pepsi

Page 27: 1 Confidence Interval and Hypothesis Testing for: Population Mean (  )

27

Ho : 1 = 2Ha : 1 2 = 0.01

Coke vs. Pepsi

Fail to reject H0Reject H0Reject H0

- t* = - ____ t* = _____ t = 0