Vous êtes sur la page 1sur 52

Chapter 8

Tests of Hypotheses

8.1

Relationship: Confidence Interval


and Test of Hypothesis

Two general methods for making inference


about population parameters
confidence

interval (estimating their values)


hypothesis testing (making decisions about
them)

8.2

Elements of a Statistical Test


1)
2)

3)
4)

5)

Null Hypothesis to be rejected or not rejected


Alternative Hypothesis - not equal, greater
than, less than. Used mainly to define rejection
region as one-sided or two-sided
Test Statistic calculated from sample data
Rejection Region values of test statistic that
will imply rejection
Conclusion decision made to whether accept
or reject the null hypothesis
3

8.2

Conclusions and Consequences


Decision
Retain Ho (fail to
reject)
Reject Ho

Truth
Ho is true

Ho is false

Correct decision

Type II error ()

Type I error ()

Correct decision

You are trying to detect a departure from Ho.

You cant prove Ho is true.


4

8.2

Hypotheses

H0: equal
Ha: less than, not
equal, or greater than

One-tailed or two-tailed
is a decision based
on assumed
alternative

Example:
H0:

m = m0

m m0
or
Ha: m m0
or
Ha: m m0
Ha:

8.2

Reject Region

8.2

Note

Failure to Reject is NOT Equivalent to Accept


(different than what book says)

Just as a court decision of NOT GUILTY does not


mean INNOCENT

The power of a statistical test, (1-), is the


probability of rejecting the null hypothesis Ho
when in fact, Ho is false

8.3

Example 8.5 (p.344)


1. Null Hypothesis H0 = 72
2. Alternative Hypothesis. Concerned that traffic volume
might be greater so Ha: > 72
3. Test Statistic calculated from sample data
Z0 =

y 72
74.1 72
=
= 1.12
s 13.3

n
50

4. Rejection Region Z0 > 1.28

(from Normal table)

Decision: reject or not reject H0?


8

8.4

Note

Choose H0 and Ha before obtaining data


to avoid bias

Statistical Significance does NOT equal to


PRACTICAL Significance

8.5

Testing Population Mean


Large Sample (n 30)
1.Define null hypothesis
2.Define alternative this specifies onetailed or two-tailed & location of rejection
region
3.Calculate Z values for rejection region
4. Calculate average of data set

10

8.5

Testing Population Mean Large Sample continued


5.Calculate standard deviation of data
6.Convert observed average into Z-score
7.Compare to Z rejection region. Make
decision

11

8.5

Example 8.8 page 348


1. Define null hypothesis H0: m = 8.5

2. Define alternative this specifies one-tailed or


two-tailed & location of rejection region
Ha: m 8.5
3. Look up Z values for rejection region.
For = .01, find z = 2.58
4. Calculate average of data. y = 9.257
12

8.5

Example 8.8 continued


5.

Calculate standard deviation of data.


s = 1.203

6.

Convert observed data into Z-score

7.

y m0
9.256 8.5
=
= 4.03
z s n 1.203

41

8.

Compare to Z rejection region


Decision is to reject or not reject H0?
13

8.5

Decision
Figure 8.6
Rejection region for
Example 8.8

14

8.6

The Observed Significance Level


for a Test

The observed significance level or p-value,


for a specific statistical test is the probability
(assuming Ho is true) of observing a value of the
test statistic that is at least as contradictory to
the null hypothesis, and supportive of the
alternative hypothesis, as the one computed
from the sample data
Not to be confused with p from Binomial

15

8.6

Large Sample Tests

Let z0 = computed value of test statistic.


Identify probability that corresponds to zc

Determine: p-value =
P (z > z0 ) if upper-tailed
P (z < z0 ) if lower-tailed
2 P (z > |z0|) if two-tailed
If p-value exceeds , there is insufficient
evidence to reject Ho
If p-value is less than the maximum value ,
reject Ho
16

8.6

Example 8.10
Determine p-value = P (z > z0 ) for uppertailed test.
P (z > 1.12) = .5 - .3686 = 0.1314

17

8.6

Review - Example 8.9 page 351


1. Define Hypothesis H0: m = 1
2. Define alternative this specifies one-tailed or
two-tailed & location of rejection region.
Ha:m > 1
3. Look up t values for rejection region and
degrees of freedom. For = .05 and sample
size of 20, find t.05, 19 = 1.729
4. Calculate average of data. ybar = 2.143
18

8.6

Example 8.9 continued


5. Calculate standard deviation of data.
s = 1.736
6. Convert observed average into t-score

y1 m 0
T=
s n
= (2.143 - 1)/(1.7/20) = 2.95
7. Compare to t rejection region. Make decision.
Decision is to reject or not reject H0?
19

8.6

Observed Significance Level

Test statistic t = 2.95


Find corresponding p-value
What portion of the curve is beyond t19 = 2.95?
From Table 7, its between 2.861 and 3.579 for
.005 and .001 respectively.
May approximate to the higher value of .005
Since p-value (.005) is less than value (.05),
reject Ho
20

8.6

Small Sample Test


Let t0 = computed value of test statistic.
Identify probability that corresponds to t0
t tables are incomplete.
Determine p-value =
P

(t > t0 ) if upper-tailed
P (t < t0 ) if lower-tailed
2 P (t > |t0|) if two-tailed
21

8.7

Testing the Difference Between Two


Population Means: Independent Samples
Hypothesis
H0: 1 - 2 = 0
H a : 1 > 2
or 1 - 2 > 0
Could have 1 - 2 = D0 non-zero value
Key challenge as in estimation
Determine standard deviation of difference
We assume Independent Samples

22

8.7

Large Sample Test


One-Tailed Test
H0: 1 - 2 = D0
Ha: 1 - 2 > D0
(or Ha: 1 - 2 < D0)

Two-Tailed Test
H0: 1 - 2 = D0
Ha: 1 - 2 D0

23

8.7

Hypothesis About 1 - 2 continued

Test Statistic: Z

y1 y2 D0
Z=
y y
1

Rejection region:
One-Tailed Test z > z
(or z < -z )
Two-Tailed Test z > z/2
Assumptions
Large samples
Independent samples

y1 y2 D0

s12 s22

n1 n2

24

8.7

Example 8.13

New vs. Old Process


H0: 1 - 2 = D0
Ha: 1 - 2 < D0
Find -z.05 = -1.645

y1 y2 D0
Calculate Z:
Z=

s12 s22

n1 n2

Decision? Accept Ho
25

8.7

Small Sample Test:


t Distribution

One-Tailed Test
H0: 1 - 2 = D0
Ha: 1 - 2 > D0 (or Ha: 1 - 2 < D0)

Two-Tailed Test
H0: 1 - 2 = D0
Ha: 1 - 2 D0

26

8.7

Small Sample Test: t Distribution


continued

Test Statistic:
Rejection region
One-Tailed

Test

t > t, n1 + n2 - 2
(or t < -t )
Two-Tailed

Test

t > t/2, n1 + n2 - 2

T=

y1 y2 D0
1 1
s
n1 n2
2
p

Assumptions:
1. normal populations
2. independent samples
3. equal variance
27

8.7

Pooled Standard Deviation sp

2
p

n1 1s
=

n2 1s
n1 n2 2
2
1

2
1

2
2

where we assume =

2
2

28

8.7

No Common Variance

Page 361: no common variance but


equal sized samples use unpooled
estimate of standard deviation but
complicated formula for degrees of
freedom

29

8.8

Test: Difference MATCHED pairs

Relatively straightforward:
Convert

all data to the difference d and


treat it as a single variable.
Use either large or small sample formula.

30

8.8

MATCHED Pairs
Convert all of your data to difference
between two values of matched pair.
Carry out all of your analysis on this new
column of data.
Calculate its average value
Calculate its standard deviation

31

8.8

Hypothesis Matched Pair

One-Tailed Test
H0: d = D0
Ha: d > D0 (or Ha: d < D0)

Two-Tailed Test
H0: d = D0
Ha: d D0
32

8.8

Matched Pair Large Sample


d D0
Z=
sd n

Test Statistic for n>30:

Rejection region
One-Tailed Test z > z (or z < -z )
Two-Tailed Test z > z/2

33

8.8

Matched Pair Small Sample


d D0
T=
sd n

Test Statistic for n<30:

Rejection region
One-Tailed Test t > t, n-1 (or t < -t )
Two-Tailed Test t > t/2, n-1

34

8.8

Example 8.15
H0: d = D0
Ha: d > D0

T = d D0 sd

n = 3.01

One-Tailed Test t > t, 5 = 2.015


Decision?
Reject H0
See Figure 8.17 p.366
- review Minitab printout
35

8.9

Testing a Population Proportion

One-Tailed Test
H0: p = p0
Ha: p > p0
(or Ha: p < p0)

Two-Tailed Test
H0: p = p0
Ha: p p0
36

8.9

Population Proportion

Test Statistic:

p p0
z=
p0 q0
n

Rejection region
One-Tailed Test z > z (or z < -z )
Two-Tailed Test z > z/2
Assumption:

np 4, nq 4
37

8.9

Example 8.16

Hypothesis
p p0
z=
H0: p = .95
p0 q0
Ha: p < .95
n
Test Statistic:
= (.9 - .95)/[(.95*.05)/60] = -1.78
Rejection region z < -z = -1.645
Decision?
Reject

Ho

38

8.10

Testing the Difference between two


Population Proportions

One-Tailed Test
H0: p1 - p2 = D0
Ha: p1 - p2 > D0 (or Ha: p1 - p2 < D0)

Two-Tailed Test
H0: p1 - p2 = D0
Ha: p1 - p2 D0

39

8.10

Difference in Population Proportions

Test Statistic:

p1 p 2 D0
z=
p p

where

p p
1

p1q1 p 2 q 2

n1
n2

and rejection region is


|z| > z /2
40

8.10

Difference in Population Proportions

Rejection region
One-Tailed Test: z > z (or z < -z )
Two-Tailed Test: z > z/2

To justify normality assumption:

n1 p1 4, n1q1 4
n2 p 2 4, n2 q2 4

41

8.10

If D0 = 0

When D0 = 0 p1 = p2 = p
standard

deviation formula simplifies

Test Statistic:

p1 p 2 D0
z=
p p
1

where

p p
1

1 1
p q
n1 n2

and rejection region is


|z| > z /2
42

8.10

Example 8.17

Hypothesis
H0: p1 - p2 = 0
Ha: p1 - p2 < 0
Test Statistic:

p1 p 2 0
z=
p p
1

where
p p
1

1 1
p q
n1 n2
43

8.10

Example 8.17 continued


p1 = 652 / 2000 = .326
p 2 = 576 / 1500 = .384
p = ( 652 576 )/( 2000 1500 ) = .351
1 1
p q =
n1 n2

p p
1

.351 .649

1
1

= 0.0163
2000 1500

p1 p 2 0 .326 .384 0 0.058


z=
=
=
= 3.56
p p
1

0.0163

0.0163

so test statistic z = -3.56


44

8.10

Example 8.17 continued


Rejection region
One-Tailed Test z < -z = -1.645
Test statistic z = -3.56
Decision? Reject Ho since Z is less than -Z

45

8.11

Testing a Population Variance


Chi-square 2 when sample is selected
from a normal population
From last chapter:
2 = (n-1)s2/2
Chi-Square distribution (Asymmetric) with
n-1 degrees of freedom

46

8.11

Confidence Intervals and Hypothesis


Testing on Population Variance
(1-)100% Confidence Interval for 2 is
(n-1)s2/ 2 /2 2 (n-1)s2/ 2(1- /2)
(page 306)

Assumption: Population has approximate


normal distribution
What would you expect test statistic to be for
H0: 2 = 02 Ha: 2 > 02 ? (see p.376)
47

Confidence Intervals and Hypothesis


Testing on Population Variance
H0 : = 0

H0 : = 0

Ha : 0

Ha : 0

0
2

0 1

H0 : 2 = 0

Ha : 0

or

0
2

2
1 2

Where:

20 = (n-1)s2/ 02

2
2

8.11

Example 8.18
H0: 02 = .01 Ha: 2 < .01
20 = (n-1)s2/ 02
Smaller value of s2 we observe stronger
the evidence in favor of alternate
hypothesis
So, reject H0 for small values of test
statistic

49

8.12

Testing the Ratio of Two Population


Variances

Hypothesis
One-Tailed H0: 12 / 22 = 1
Ha: 12 / 22 > 1 (or Ha: 12 / 22 < 1)
Two-Tailed H0: 12 / 22 = 1
H0: 12 / 22 1

50

8.12

Test Statistic
F-Distribution

One-sided F = s12/s22
(or F = s22/s12)

Two-sided F = Larger s2/Smaller s2


Rejection region

One-sided F > F

Two-sided F > F /2

51

8.12

Example 8.19 (p.380)


H0: 12 / 22 = 1
H0: 12 / 22 1

Only upper-tail values of F are in table so always


put larger variance on top
F = larger s2/smaller s2 = s22/s12 = 2.58

What are degrees of freedom for this example?


n1 = 18 n2 = 13
Review the rest of the problem on your own
52

Vous aimerez peut-être aussi