What values of Z 0 should we reject H 0

Download Report

Transcript What values of Z 0 should we reject H 0

Inference on the Mean of a Population
&4-4 (&8-2)
-Variance Known


H0: m = m0
H1: m  m0 , where m0 is a specified constant.
Sample mean is the unbiased point estimator for
population mean.
If X 1 , X 2 ,  , X n are samples drawn from a distributi on


2

with mean m and variance  , then X ~ N m ,
.
n
2
Therefore, if H 0 is true ( m  m 0 ), then
X  m0
Z0 
~ N 0,1
 n
Horng-Chyi Horng
Statistics II
41
The Reasoning

For H0 to be true, the value of Z0 can not be too large or
too small.

Recall that 68.3% of Z0 should fall within (-1, +1)
95.4% of Z0 should fall within (-2, +2)
99.7% of Z0 should fall within (-3, +3)

What values of Z0 should we reject H0? (based on a value)
What values of Z0 should we conclude that there is not
enough evidence to reject H0?
Horng-Chyi Horng
Statistics II
42
Horng-Chyi Horng
Statistics II
43
Example 8-2
Aircrew escape systems are powered by a solid
propellant. The burning rate of this propellant is an
important product characteristic. Specifications require
that the mean burning rate must be 50 cm/s. We know
that the standard deviation of burning rate is 2 cm/s.
The experimenter decides to specify a type I error
probability or significance level of α = 0.05. He selects
a random sample of n = 25 and obtains a sample average
of the burning rate of x = 51.3 cm/s. What conclusions
should be drawn?
Horng-Chyi Horng
Statistics II
44
Horng-Chyi Horng
Statistics II
45
Hypothesis Testing on m
- Variance Known
H1
Test Statistic
m  m0
m > m0
Z0 
X  m0

n
m < m0
Horng-Chyi Horng
Reject H0 if
Z0 > za or Z0 < - za
Z0 > za
Z0 < -za
Statistics II
46
P-Values in Hypothesis Tests(I)


Where Z0 is the test statistic, and (z) is the standard
normal cumulative function.
In example 8-2, Z0 = 3.25, P-Value = 2[1-(3.25)] =
0.0012
Horng-Chyi Horng
Statistics II
47
P-Values of Hypothesis Testing on m
- Variance Known
H1
m  m0
m > m0
Test Statistic
X  m0
Z0 
 n
m < m0
Horng-Chyi Horng
P-Value
P = 2 * P(Z  |Z0|)
P = P(Z  Z0 )
P = P(Z Z0 )
Statistics II
48
P-Values in Hypothesis Tests(II)

a-value is the maximum type I error allowed, while Pvalue is the real type I error calculated from the sample.

a-value is preset, while P-value is calculated from the
sample.

When P-value is less than a-value, we can safely make the
conclusion “Reject H0”. By doing so, the error we are
subjected to (P-value) is less than the maximum error
allowed (a-value).
Horng-Chyi Horng
Statistics II
49
Type II Error
- Fail to reject H0 while H0 is false
Horng-Chyi Horng
Statistics II
50
How to calculate Type II Error? (I)
(H0: m = m0 Vs. H1: m  m0)

Under the circumstance of type II error, H0 is false.
Supposed that the true value of the mean is m = m0 + d,
where d > 0. The distribution of Z0 is:
X  m 0 X  m 0  d 
d
Z0 


 n
 n
 n
 N 0, 1 
d

n
 d

Therefore, Z 0 ~ N 
, 1
 n 
Horng-Chyi Horng
Statistics II
51
How to calculate Type II Error? (II)
- refer to section &4.3 (&8.1)


Type II error occurred when (fail to reject H0 while H0 is
false)
 d

 Za  Z 0  Za where Z 0 ~ N 
, 1
2
2
 / n 
Therefore,
  P Za / 2  Z 0  Za / 2 
d
d
d 


Z

Z

Z



a /2
0
a /2
/ n 
/ n 
/ n
 P


1
1
1




d
d 

 P  Za / 2 
 Z  Za / 2 

/ n
/ n

d 
d 


  Za / 2 



Z


 a /2

/ n
/ n


Horng-Chyi Horng
Statistics II
52
The Sample Size (I)

Given values of a and d, find the required sample size n to
achieve a particular level of ..
d 
d 


Since    Za / 2 
    Za / 2 

/ n
/ n


d 

  Za / 2 
 when d  0
/ n

Let     Z  
Then,  Z   Za / 2 
Horng-Chyi Horng
d
/ n
2

Za / 2  Z    2
n
d 2 Statistics II
whe re d  m  m 0
53
The Sample Size (II)


Two-sided Hypothesis Testing
One-sided Hypothesis Testing
Horng-Chyi Horng
Statistics II
54
Example 8-3
Horng-Chyi Horng
Statistics II
55
The Operating Characteristic Curves
- Normal test (z-test)


Use to performing sample size or type II error calculations.
The parameter d is defined as:
d

| m  m0 |

|d |

so that it can be used for allproblems regardless
of the
values of m0 and .
Chart VI a,b,c,d are for Z-test.
Horng-Chyi Horng
Statistics II
56
Example 8-5
Horng-Chyi Horng
Statistics II
57
Horng-Chyi Horng
Statistics II
58
Horng-Chyi Horng
Statistics II
59
Large Sample Test


If n  30, then the sample variance s2 will be close to 2 for
most samples.
Therefore, if population variance 2 is unknown but n  30,
we can substitute  with s in the test procedure with little
harmful effect.
Horng-Chyi Horng
Statistics II
60
Large Sample Hypothesis Testing on m
- Variance Unknown but n  30
H1
Test Statistic
m  m0
m > m0
Z0 
X  m0
s n
m < m0
Horng-Chyi Horng
Reject H0 if
Z0 > za or Z0 < - za
Z0 > za
Z0 < -za
Statistics II
61
Statistical Vs. Practical Significance


Practical Significance = 50.5-50 = 0.5
Statistical Significance P-Value for each sample size n.
Horng-Chyi Horng
Statistics II
62
Notes

be careful when interpreting the results from hypothesis
testing when the sample size is large, because any small
departure from the hypothesized value m0 will probably be
detected, even when the difference is of little or no
practical significance.

In general, two types of conclusion can be drawn:
1. At a = 0.**, we have enough evidence to reject H0.
2. At a = 0.**, we do not have enough evidence to reject
H0.
Horng-Chyi Horng
Statistics II
63
Confidence Interval on the Mean (I)

Point Vs. Interval Estimation

The general form of interval estimate is
L  m  U
in which we always attach a possible error a such that
P(L  m  U) = 1-a
That is, we have 1-a confidence that the true value of m
will fall within [L, U].

Interval Estimate is also called Confidence Interval (C.I.).
Horng-Chyi Horng
Statistics II
64
Confidence Interval on the Mean (II)

L is called the lower-confidence limit and
U is the upper-confidence limit.

Two-sided C.I. Vs. One-sided C.I.
Horng-Chyi Horng
Statistics II
65
Construction of the C.I.

From Central Limit Theory,


2

If X ~ m ,   and n  25, X ~ N m ,
.
n
2

Use standardization and the properties of Z,
X m
Z 
and P za / 2  Z  za / 2   1  a
 n


X m
 P  za / 2 
 za / 2   1  a
 n




 P X  za / 2 / n  m  X  za / 2 / n  1  a
Horng-Chyi Horng
Statistics II
66
Formula for C.I. on the Mean with Variance Known

Used when
1. Variance known
2. n  30, use s to estimate .
Horng-Chyi Horng
Statistics II
67
Example 8-6
Consider the rocket propellant problem in Example 8-2.
Find a 95% C.I. on the mean burning rate?
95% C.I => a = 0.05,
za/2 = z0.025 = 1.96
Horng-Chyi Horng
Statistics II
68
Notes - C.I.



Relationship between Hypothesis Testing and C.I.s
Confidence level (1-a) and precision of estimation (C.I. *
1/2)
Sample size and C.I.s
Horng-Chyi Horng
Statistics II
69
Choice of Sample Size to Achieve Precision of Estimation
Horng-Chyi Horng
Statistics II
70
Example 8-7
Horng-Chyi Horng
Statistics II
71
One-Sided C.I.s on the Mean
Horng-Chyi Horng
Statistics II
72
Inference on the Mean of a Population
&4-5 (&8-3)
-Variance Unknown


H0: m = m0
H1: m  m0 , where m0 is a specified constant.
Variance unknown, therefore, use s instead of  in the test
statistic.

If n is large enough ( 30), we can use the test procedure
in &4-4 (&8-2). However, n is usually small. In this case,
T0 will not follow the standard normal distribution.
Horng-Chyi Horng
Statistics II
73
Inference on the Mean of a Population
-Variance Unknown

Let X1, X2, …, Xn be a random sample for a normal
distribution with unknown mean m and unknown variance
2. The quantity
has a t distribution with n - 1 degrees of freedom.
Horng-Chyi Horng
Statistics II
74
pdf of t distributi on :
k  1 / 2
1
f x  

 k 1 / 2
k k / 2 x 2 / k  1
k is the number of degrees of freedom.

Horng-Chyi Horng
 
Statistics II
75
The Reasoning



For H0 to be true, the value of T0 can not be too large or
too small.
What values of T0 should we reject H0? (based on a value)
What values of T0 should we conclude that there is not
enough evidence to reject H0?
Although when n  30, we can use Z0 in section &8-2 to
perform the testing instead. We prefer using T0 to more
accurately reflect the real testing result if t-table is
available.
Horng-Chyi Horng
Statistics II
76
Horng-Chyi Horng
Statistics II
77
Example 8-8
Horng-Chyi Horng
Statistics II
78
Horng-Chyi Horng
Statistics II
79
Testing for Normality (Example 8-8)
- t-test assumes that the data are a random sample from a
normal population
(1) Box Plot
Plot
Horng-Chyi Horng
(2) Normality Probability
Statistics II
80
Hypothesis Testing on m
- Variance Unknown
H1
m  m0
m > m0
Test Statistic
X  m0
T0 
s n
m < m0
Horng-Chyi Horng
Reject H0 if
T0 > ta or T0 < - ta
T0 > ta
T0 < -ta
Statistics II
81
Finding P-Values

Steps:
1. Find the degrees of freedom (k = n-1)in the t-table.
2. Compare T0 to the values in that row and find the closest
one.
3. Look the a value associated with the one you pick. The
p-value of your test is equal to this a value.

In example 8-8, T0 = 4.90, k = n-1 = 21, P-Value < 0.0005
because the t value associated with (k = 21, a = 0.0005) is
3.819.
Horng-Chyi Horng
Statistics II
82
P-Values of Hypothesis Testing on m
- Variance Unknown
H1
m  m0
m > m0
Test Statistic
X  m0
T0 
s n
m < m0
Horng-Chyi Horng
P-Value
P = 2 * P(tn-1  |T0|)
P = P(tn-1  T0 )
P = P(tn-1 T0 )
Statistics II
83
The Operating Characteristic Curves
- t-test


Use to performing sample size or type II error calculations.
The parameter d is defined as:
d

| m  m0 |

|d |

so that it can be used for allproblems regardless
of the
values of m0 and .
Chart VI e,f,g,h are used in t-test. (pp. A14-A15)
Horng-Chyi Horng
Statistics II
84
Example 8-9

In example 8-8, if the mean load at failure differs from 10
MPa by as much as 1 MPa, is the sample size n = 22
adequate to ensure that H0 will be rejected with
probability at least 0.8?
s = 3.55, therefore, d = 1.0/3.55 = 0.28.
Appendix Chart VI g, for d = 0.28, n = 22 =>  = 0.68
The probability of rejecting H0: m = 10 if the true mean exceeds this by 1.0
MPa (reject H0 while H0 is false) is approximately 1 -  = 0.32, which is too
small. Therefore n = 22 is not enough.
At the same chart, d = 0.28,  = 0.2 (1-=0.8) => n = 75
Horng-Chyi Horng
Statistics II
85
Horng-Chyi Horng
Statistics II
86
Construction of the C.I. on the Mean
- Variance Unknown

T  X m

In general, the distribution of
is t with n-1 d.f.

Use the properties of t with n-1 d.f.,

s
n

 P ta / 2,n 1  T  ta / 2,n 1   1  a


X m
 P  ta / 2,n 1 
 ta / 2,n 1   1  a
s n




 P X  ta / 2,n 1s / n  m  X  ta / 2,n 1s / n  1  a
Horng-Chyi Horng
Statistics II
87
Formula for C.I. on the Mean with Variance Unknown
Horng-Chyi Horng
Statistics II
88
Example 8-10
Reconsider the tensile adhesive problem in Example 8-8.
Find a 95% C.I. on the mean?

N = 22, sample mean = 13.71, s = 3.55, ta/2,n-1 = t0.025,21 =
2.080
X  ta / 2,n1s / n  m  X  ta / 2,n1s / n
13.71 - 2.080 (3.55) / 22  m  13.71 + 2.080 (3.55) / 22
13.71 - 1.57  m  13.71 + 1.57
12.14  m  15.28
The 95% C.I. On the mean is [12.14, 15.28]
Horng-Chyi Horng
Statistics II
89
Final Note for the Inference on the Mean
Variance Sample Size
Population Type
Testing Method
Z
Z
Chebyshev’s
Inequality
T or Z
T
Non-parametric
Known
N > 30
N < 30
All
Normal
Non-normal
Unknown
N > 30
N < 30
All
Normal
Non-normal
Horng-Chyi Horng
Statistics II
90