1 Tests of Hypotheses about the mean - continued.

Post on 20-Jan-2016

219 views 0 download

Transcript of 1 Tests of Hypotheses about the mean - continued.

1

Tests of Hypotheses

about the mean

- continued

2

Reminder

Two types of hypotheses:

H0 - the null hypothesis (e.g. μ=24)

H1 - the alternative hypothesis (e.g. μ>24)

Test statistic:

P-value: probability of obtaining values as extreme as or more extreme than the test statistic

e.g., P(Z≤-2)=0.0228

Decision at the α significance level:

Reject H0 if p-value<α

n

XZ

2

1003

244.23 :e.g.

Z

3

Testing hypotheses using a confidence interval:

Example:A certain maintenance medication is supposed to contain a mean of 245 ppm of a particular chemical. If the concentration is too low, the medication may not be effective; if it is too high, there may be serious side effects. The manufacturer takes a random sample of 25 portions and finds the mean to be 247 ppm. Assume concentrations to be normal with a standard deviation of 5 ppm. Is there evidence that concentrations differ significantly (α=5%) from the target level of 245 ppm?

Hypotheses:

H0: μ=245

H1: μ≠245

4

First, lets examine the Z test statistic:

Test statistic:

P-value:

2P(Z>2)=2(0.0228)=0.0456

Decision at 5% significance level:

P-value>α reject H0

The concentration differs from 245

n

XZ

2

255

245247

5

Now, examine the hypotheses using a confidence interval

α =0.05 confidence level is 1- α = 95%

95% CI:

[245.04 , 248.96]

We are 95% certain that the mean concentration is between 245.04 and 248.96.

Since 245 is outside this CI - reject H0.

The concentration differs from 245

n

zX

975. 25

596.1247

)1(96.1247

6

H0: μ=μ0

H1: μ≠μ0

If μ0 is outside the confidence interval, then we reject the null hypothesis at the α significance level.

Note: this method is good for testing two-sided hypotheses only

[ confidence interval]

Examine the hypotheses using a confidence interval

μ0

7

ExampleSuppose a claim is made that the mean weight μ for a population of male runners is 57.5 kg. A random sample of size 24 yields . [σ is known to be 5 kg].

Based on this, test the following hypotheses:

H0: μ=57.5

H1: μ≠57.5

Answer using:

a) A Z test statistic

b) A confidence interval

60X

8

a)

Test statistic:

P-value:

2P(Z>2.45)=2(1-.9929)=2(.0071)=.0142

Decision at 5% significance level:

P-value<α reject H0

Conclusion:

Mean weight differs from 57.5

n

XZ

45.2

245

5.5760

9

b) α =0.05 confidence level is 1- α = 95%

95% CI:

[58 , 62]

57.5 is outside this CI - reject H0.

Mean weight differs from 57.5

question?: Would you reject H0: μ=59 vs. H1: μ≠59?

No, because 59 is in the interval [58, 62]

n

zX

975. 24

596.160

)02.1(96.160

10

Testing hypotheses using Minitab

In a certain university, the average grade in statistics courses is 80, and σ=11. A teacher at that university wanted to examine whether her students received higher grades than the rest of the stat classes. She took a sample of 30 students and recorded their grades

hypotheses:H0:μ=80H1:μ>80

data are:

mean: 03.85X

95 100 82 76 75 83 75 96 75 98 79 80 79 75 100 91 81 78 100 72 94 80 87 100 97 91 70 89 99 54

11

Test statistic:

P-value:P(Z>2.51)=1-0.9940=0.006

Decision at 5% significance level:P-value<α reject H0

conclusion:The grades are higher than 80

n

XZ

51.2

3011

8003.85

12

Minitab…

.\test of hypotheses.MPJ

13

Column of scores:

14

Choose:

Stat > Basic Statistics >1-Sample Z

Pick options

15

In the “options” window pick the alternative hypothesis

16

One-Sample Z: scores

Test of mu = 80 vs mu > 80The assumed sigma = 11

Variable N Mean StDev SE Meanscores 30 85.03 11.51 2.01

Variable 95.0% Lower Bound Z Pscores 81.73 2.51 0.006

In the session window:

Test statistic: Z = 2.51

P-value: 0.006

Decision: reject H0 at the 5% significance level

conclusion:The grades are higher than 80

17

Use Minitab to build a confidence interval

Choose:

Stat > Basic Statistics >1-Sample Z

Pick options

18

In the “options” window pick the two-sided alternative hypothesis

Pick “not equal”

Because a confidence interval is like a two sided hypothesis

19

In the session window:

One-Sample Z: scores

Test of mu = 80 vs mu not = 80The assumed sigma = 11

Variable N Mean StDev SE Mean scores 30 85.03 11.51 2.01

Variable 95.0% CI Z Pscores ( 81.10, 88.97) 2.51 0.012

A 95% CI: [81.10, 88.97]

Equivalent to testing hypotheses:H0:μ=80H1:μ≠80

20

Questions

1. Suppose H0 was rejected at α=.05. Answer the following questions as: “Yes”, “No”, “Cannot tell”:

(a) Would H0 also be rejected at α=.03?

(b) Would H0 also be rejected at α=.08?

(c) Is the p-value larger than .05?

21

2. Suppose H0 was not rejected at α=.05. Answer the following questions as: “Yes”, “No”, “Cannot tell”:

(a) Would H0 be rejected at α=.03?

(b) Would H0 be rejected at α=.08?

(c) Is the p-value larger than .05?

22

3. A 95% confidence interval for the mean time (in hours) to complete an audit task is: [7.04,7.76].Use the relation between confidence intervals and two-sided tests to examine the following sets of hypotheses:

(a) H0: μ=7.5 H1: μ≠7.5 (α=.05)

(b) H0: μ=7 H1: μ≠7 (α=.05)

23

4. A 90% confidence interval for the mean is: [20.1, 23.5].We can use the relation between confidence intervals and two-sided tests to examine hypotheses about the mean

At what level of significance, α, can we test these hypotheses based on the confidence interval?

(a) α=.01(b) α=.025(c) α=.05(d) α=.1

24

5. A 90% confidence interval for the mean is: [20.1, 23.5] has been used for testing the following hypotheses:

H0: μ=19 H1: μ≠ 19

H0 is rejected at 10% significance level(19 is outside the CI)

At what level of significance, α, can we still reject H0: μ=19?

Answer:

We can reject H0 for α<0.1