Chap 13
Chap 13
0.4
0.3
0.2
0.1
0.0
-4 -3 -2 -1 0 1 2 3 4
µ0
µ0 − zα / 2σ / n µ0 + zα / 2σ / n
For the one-sided alternative µ > µ0 , the critical region is x ≥ µ0 + zα (σ / n ) or Z ≥ zα . For the
one-sided alternative µ < µ0 , the critical region is x ≤ µ0 − zα (σ / n ) or Z ≤ − zα . See Figures
13.2 and 13.3 on pages 353-354. These can be summarized to obtain
Choice of H 0 and H1 :
Consider the following statements-
(1) Average age of CMU students is more than 18 years. Symbolically, µ > 18
(2) Average age of CMU students is 18 years. Symbolically, µ = 18
Statement (1) is said to be compound (or composite) while statement (2) is simple. When dealing
with compound hypotheses, the hypothesis involving equality is the null (or H 0 ) hypothesis.
For statement (1) µ > 18, its complement is µ ≤ 18. Hence we obtain
H 0 : µ ≤ 18 {or H 0 : µ = 18} and H1 : µ > 18
For statement (2) µ = 18, its complement is µ ≠ 18. We obtain H 0 : µ = 18 and H1 : µ ≠ 18
Conclusion: If H 0 is rejected, conclude that the claim in H1 is true. Remember to use the
language of the original problem. If the decision is FTR H 0 , conclude that there is no sufficient
evidence to support the statement in H1 . If we FTR H 0 , we do not conclude that H 0 is true
since the probability of Type II error, which is the one we are liable to, is generally unknown.
X − µ0
For test about µ, σ unknown and n < 30, the test statistic is t = . The rejection region is
s/ n
similar to the previous one. We replace Z with t.
X1 − X 2 − δ
If σ 1 = σ 2 = σ is unknown and n1 and n2 are small, we use the test statistic t = ,
s p 1/ n1 + 1/ n2
(n1 − 1) s12 + (n2 − 1) s22
where s 2p = , the pooled sample variance.
n1 + n2 − 2
The above has a t distribution with n1 + n2 − 2 degrees of freedom. Such a test is called a two-
sample t-test. The above test statistics can be obtained by using the likelihood ratio test in
Chapter 12.
Page 3 of 6
Example
Problem 13.25 page 376
Definition: The p-value is the probability that the test statistic is more extreme than its observed
value. It is the probability of seeing a result from a random sample that is as extreme as or more
extreme than your sample result if the null hypothesis ( H 0 ) is true.
• If p-value < α, we reject H 0 . If p-value ≥ α , we FTR H 0 .
• For two-tailed test, compute the p-value on one tail and multiply your result by 2.
In exploratory data analysis, we are not really concerned with making inferences. We use the p-
values as measures of the strength of evidence. See an illustration on page 356.
Related (or Paired) Samples: If the samples are related, take the differences d= i yi − xi . If the
sample size n is large, use a Z test on the differences and if n is small, use a t-test on the
differences.
Examples:
Problem 13.6 page 365
the rejection region is X ≤ kα′ / 2 or X ≥ kα / 2 . It is much less tedious to use the p-value approach
to carry out the above test, especially when the sample size n is small.
X − nθ 0
If n is large, we can base the test on the statistic Z = , which is N(0, 1). The
nθ 0 (1 − θ 0 )
rejection regions will be Z ≥ zα , Z ≤ − zα and | Z |≥ zα / 2 for the alternatives H1 : θ > θ 0 ,
H1 : θ < θ 0 and H1 : θ ≠ θ 0 respectively.
x + x + + xk k
( X − n θˆ) 2
If θ 0 is not specified, we estimate it by θˆ = 1 2 . Thus, χ 2 = ∑ i i has a
n1 + n2 + + nk i =1 niθ (1 − θ )
ˆ ˆ
chi-square distribution with k – 1 degrees of freedom. The critical region is χ 2 ≥ χα2 ,k −1 .
We refer to the entries as the observed cell frequencies fij . The expected cell frequencies eij can
be computed as e = n θˆ and =
i1 e n (1 − θˆ) . We form the chi-square statistic
i i2 i
k 2 ( fij − eij ) 2
Examples
Problem 13.12 page 370
Usually, the observed frequencies fij are given. We compute the expected frequencies eij by
f i . f. j
eij = , where fi. is the row total, f. j is the column total and f is the grand total. Thus,
f
r c ( fij − eij ) 2
χ = ∑∑
2
has a chi-square distribution with (r – 1)(c – 1) degrees of freedom. Reject
=i 1 =j 1 eij
H 0 if χ 2 ≥ χα2 ,( r −1)( c −1) . The above test is used when eij ≥ 5 . For cases where eij < 5, we combine
some of the adjacent cells.
Example
Problem 13.77 page 380
Example
Problem 13.82 page 380