0% found this document useful (0 votes)
8 views

Chap 13

Uploaded by

Andrew Martins
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Chap 13

Uploaded by

Andrew Martins
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Page 1 of 6

Chapter 13 Hypothesis Testing Applications

The test H 0 : θ = θ 0 against H1 : θ ≠ θ 0 is called a two-tailed test. The test H 0 : θ = θ 0 against


H1 : θ < θ 0 (or H1 : θ > θ 0 ) is called a one-tailed test. For the two-tailed alternative µ ≠ µ0 , the
likelihood ratio technique led to the critical region | x − µ0 |≥ zα / 2 (σ / n ) or
x ≤ µ0 − zα / 2 (σ / n ) and x ≥ µ0 + zα / 2 (σ / n ) .
X − µ0
The above critical region can be written as Z ≤ − zα / 2 or Z ≥ zα / 2 where Z = .
σ/ n

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

Alternative Rejection region


H1 : µ < µ 0 Z ≤ − zα
H1 : µ > µ 0 Z ≥ zα
H1 : µ ≠ µ 0 | Z |≥ zα / 2

Test Procedure [5 - step]


1. State the null hypothesis ( H 0 ) and the alternative hypothesis ( H1 ).
2. Choose an appropriate test statistic.
3. Use the sampling distribution of the test statistic to determine a critical region of size α.
4. Compute the observed value of the test statistic and make a decision
5. Give an appropriate conclusion in terms of the original problem.
Page 2 of 6

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.

Section 13.2 Tests Concerning Means


The test statistic corresponds to the one we used to construct the confidence intervals. For test
X − µ0
about µ, the mean of a normal population (σ is known), the test statistic is Z = .
σ/ n

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.

Section 13.3 Tests Concerning Differences Between Means


δ against H1 : µ1 − µ2 ≠ δ , where σ 1 and σ 2 are known, the test statistic is
To test H 0 : µ1 − µ2 =
X1 − X 2 − δ
Z= . If σ 1 and σ 2 are unknown but n1 and n2 ≥ 30, we use the above and
σ 12 / n1 + σ 22 / n2
replace σ 1 and σ 2 with s1 and s2 respectively.

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.

Example: Find the p-value for Problem 13.25

Problem 13.29 page 377

Problem 13.36 page 377

Problem 13.42 page 378

Problem 13.43 page 378

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.

Section 13.4 Tests Concerning Variances


The test statistic for H 0 : σ 2 = σ 02 is χ =
2
(n − 1) s 2 / σ 02 which has a chi-square distribution with
(n – 1) degrees of freedom. The following are the rejection regions:
Alternative Rejection region
H1 : σ < σ 0
2 2
χ 2 ≤ χ12−α ,n −1
H1 : σ 2 > σ 02 χ 2 ≥ χα2 ,n −1
H1 : σ 2 ≠ σ 02 χ 2 ≤ χ12−α / 2,n −1 or χ 2 ≥ χα2 / 2,n −1

To test H 0 : σ 12 = σ 22 against one-sided alternatives H1 : σ 12 > σ 22 or H1 : σ 12 < σ 22 , the test statistic


s12 s22
is F and the rejection regions are respectively ≥ Fα , n1 −1, n2 −1 and ≥ Fα ,n2 −1,n1 −1 . To test
s22 s12
Page 4 of 6

H 0 : σ 12 = σ 22 against the two-sided alternative H1 : σ 12 ≠ σ 22 , define the test statistic as


larger of s12 and s22
F= 2 2
. The rejection region is F ≥ Fα / 2,n1 −1,n2 −1 if s12 ≥ s22 and it is
smaller of s1 and s2
F ≥ Fα / 2,n2 −1,n1 −1 if s12 < s22 .

Examples:
Problem 13.6 page 365

Problem 13.47 page 378

Problem 13.54 page 378

Section 13.5 Tests Concerning Proportions


The binomial parameter θ is the probability of a success and its point estimate is θˆ = x / n . To
test H 0 : θ = θ 0 , the test statistic is X, the number of success in a random sample of size n. For
one-sided alternative H1 : θ > θ 0 , the critical region of size α is X ≥ kα where kα is the smallest
n
integer for which ∑ b( y; n,θ ) ≤ α . The corresponding region for H
y = kα
0 1 : θ < θ 0 is X ≤ kα′ , where
kα′
kα′ is the largest integer for which ∑ b( y; n,θ ) ≤ α . For the two-sided alternative H
y =0
0 1 : θ ≠ θ0 ,

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.

Section 13.6 Tests Concerning Differences Among k Proportions


We wish to test
H 0 : θ=
1 θ=
2 = θ= k θ 0 against H1 : at least one of the θ ’s does not equal θ 0 .
X i − niθi k
( X − n θ )2
For each θi (i = 1, 2, …, k), Z i = is N(0, 1). Therefore, χ 2 = ∑ i i 0 has a
niθi (1 − θi ) i =1 niθ 0 (1 − θ 0 )

chi-square distribution with k degrees of freedom.


Page 5 of 6

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 .

Consider the following table:


Sample Success Failure
1 x1 n1 − x1
2 x2 n2 − x2
  
k xk nk − xk

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

χ 2 = ∑∑ which has a chi-square distribution with k – 1 degrees of freedom.


=i 1 =j 1 eij

Examples
Problem 13.12 page 370

Problem 13.59 page 379

Problem 13.67 page 379

Problem 13.74 page 379

Section 13.7 Analysis of an r by c Table


Given a two-way classification, one may want to test for the independence of the two
classifications. This test is also similar to testing if r random samples come from r identical
multinomial populations. In general, for multinomial populations we set up
H 0 : θ1=
j θ 2=
j = θ rj (for j = 1, 2, .., c) against H1 : Not all the θ ’s are equal (for at least one j)

For the test of independence, we set up


H 0 : They are independent (A and B are independent) against H1 : Not independent
The above can also be written as
H 0 : θij= θi. ∗ θ. j (for i = 1, 2, .., r and for j = 1, 2, .., c) against
H1 : θij ≠ θi. ∗ θ. j for at least one pair of values of i and j.
Page 6 of 6

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

Section 13.8 Goodness of Fit


We use a chi-square test to determine if a given data is from a specified distribution. We
m
( fi − ei ) 2
compute the expected frequencies under H 0 and use the statistic χ = ∑
2
. Reject H 0 if
i =1 ei
χ 2 ≥ χα2 ,m −1−t where m is the number of classes and t is the number of independent parameters
estimated.

Example
Problem 13.82 page 380

You might also like