Chap7-12

31
Chapter 7: Testing Statistical Hypothesis Something happened. Was that due to chance, or something else? Example 7.1. A female bank employee believes that her salary is low as a result of sex discrimination. To substantiate her belief, she collects information on the salaries of her male counterparts in the banking business and finds that their salaries have a mean of $34,000 and a sd of $2,000. Her salary is $27,000. Does this information support her claim of sex discrimination? Solution: To answer the question, she calculated the Z-score of her own salary with respect to those of her male counterparts: Z = 000 , 2 $ 000 , 34 $ 000 , 27 $ = –3.5. Thus the women's salary is 3.5 sds below the mean of male salary. If men's salary distribution is bell-shaped, then very few salaries should have Z–score less than –3, hence there seems to be sex discrimination. School of Economis, SMU Chapter 7 STAT151, Term II 11-12 1 Zhenlin Yang, SMU

description

Chap7-12

Transcript of Chap7-12

Chapter 7: Testing Statistical Hypothesis

Something happened. Was that due to chance, or something else?

Example 7.1. A female bank employee believes that her salary is low as a result of sex discrimination. To substantiate her belief, she collects information on the salaries of her male counterparts in the banking business and finds that their salaries have a mean of $34,000 and a sd of $2,000. Her salary is $27,000. Does this information support her claim of sex discrimination?

Solution: To answer the question, she calculated the Z-score of her own salary with respect to those of her male counterparts:

Z = 000,2$

000,34$000,27$ − = –3.5.

Thus the women's salary is 3.5 sds below the mean of male salary. If men's salary distribution is bell-shaped, then very few salaries should have Z–score less than –3, hence there seems to be sex discrimination.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 1 Zhenlin Yang, SMU

Idea of Hypothesis Testing: Argue by contradiction! a) First you believe a statement is true,

b) Then you try to provide evidence against it,

c) If the evidence is "strong enough", what you believed does not stand, otherwise it does, or precisely you are unable to turn it down.

• To clarify the idea, suppose you are interested in ‘knowing’ the mean μ of a normal population with variance 1. A statement or a claim is made:

The unknown true value of μ is 10

• To check this claim, you decide to draw a random sample of size 25 from the population. Theories tell you that if the above claim is true, then the sample mean X ~ N(10, 0.22). Hence, the value of X you observed should not be ‘too’ far from 10, or the difference X − 10 should not be too big!

• You observed X = 9.5. Then you immediately reject the claim because if the claim is true, P{ X ≤ 9.5} = P{Z ≤ − 2.5} = 0.0062! Too small a chance!

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 2 Zhenlin Yang, SMU

Learning Objectives

Tests for the Mean of a Normal Population ⎯ Z-Test ⎯ t-Test

Tests for the Mean of a Non-Normal Population ⎯ Mean of a General Population ⎯ Binomial Proportion

Chi-Squared Test for the Variance a Normal Population

Tests for Comparing the Means of Two Normal Populations

⎯ Z-Test ⎯ t-Test ⎯ Paired-t Test

F-Test for Comparing Variances of Two Normal Populations

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 3 Zhenlin Yang, SMU

7.1. Tests for One Population

Parallel to the setup and the developments of the confidence intervals, various testing procedures can easily be developed. For each of the procedures presented below, it should be very helpful to refer back to the setup of the corresponding confidence interval presented in Chapter 6.

Z-Test for the mean of a normal population, σ known

Null Hypothesis: Ho: μ = μ0;

Test Statistic: Z = n

μ0− ~H0

N(0, 1)

Alternative Hypothesis Reject Ho at the α significance level if μ ≠ μ0 Z > Zα 2 or Z < – Zα 2

μ > μ0 Z > Zα

μ < μ0 Z < – Zα

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 4 Zhenlin Yang, SMU

Example 7.2. The average daily sales per store for a large chain stores is $10,000, with a standard deviation of $750. A particular store has its sales recorded for ten days, for which the average sales is $9,500. Use 1% level of significance to test whether this store has lower than average sales.

Solution:

i) Ho: μ = 10,000, Ha: μ < 10,000.

ii) n = 10, σ = 750, X = 9,500, α = 0.01, Zα = 2.326.

Rejection region: Z < – 2.326

iii) Z = n

μ0− = 10750

000,10500,9 − = –2.108 > – 2.326

iv) Do not reject Ho at α = 0.01 level of significance.

No sufficient evidence to show that this store has lower than average sales.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 5 Zhenlin Yang, SMU

Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight

Elements of Hypothesis Testing

1. Null Hypothesis (Ho): A theory about the values of population parameter(s), representing the status qua, accepted until proven false.

2. Alternative Hypothesis (Ha): A theory that contradicts Ho, which is favored upon existence of sufficient evidence.

3. Test Statistic: A sample statistic used to decide whether to reject Ho, which is a measure of the difference between the data (evidence) and what is expected under the null hypothesis.

4. Rejection Region: The numerical values of test statistic for which Ho is rejected. This region is chosen by the researcher so that the probability is α that it will contain the test statistic when Ho is true, thereby leading to a wrong rejection called Type I error.

The value of α is usually chosen to be small (e.g., 0.01, 0.05, 0.10), and is referred to as level of significance.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 6 Zhenlin Yang, SMU

Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight

5. Assumptions: Any assumptions made about the population(s) for the test to be valid.

6. Experiment and Calculation of test statistic: The sampling experiment is performed and the numerical value of the test statistic is determined.

7. Conclusion: If the value of the test statistic falls in the rejection region, reject Ho and conclude that Ha is true. If the test statistic does not fall in the rejection region, we reserve the judgment about which Ho is true.

• While it is possible to wrongly reject Ho when it is true – leading to a wrong decision called a Type I error, it is possible to wrongly accept Ho when it is false – leading to a wrong decision called a Type II error.

• The probability of a Type I error is a pre-chosen value α (.1, .05, or .01), whereas the probability of a Type II error, denoted by β, is an unknown number and has to be calculated based on a given true parameter value – a specific alternative.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 7 Zhenlin Yang, SMU

Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight

Observed Significance Level: p–Value

Definition 7.1. (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 data.

Usage of p–value: If p–value of a test is less than the chosen value of α, then reject the null hypothesis.

Example 7.2 (Cont’d). Continuing on Example 7.2, find

(a) the p–value of the test, and the probability of a Type I error,

(b) the probability of a Type II error when, in fact, the average daily sales of this store is $9,700, and

(c) the probability of a Type II error when, in fact, the average daily sales of this store is $9,200.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 8 Zhenlin Yang, SMU

Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight
Sony Vaio
Highlight

Solution:

(a) p–value = P{n

μ0− < –2.108 | Ho is true} = 0.0175.

P{Type I error} =P{ Reject H0 | H0 is true} = α = .01.

(b) Since Ha is true, in the sense that the true mean μ = 9,700,

P{Type II error} = P{Accept H0: μ = 10,000 | Ha is true with μ = 9,700 }

= P{n

μ0− ≥ – 2.326| μ = 9700}

= P{ X ≥ μ 0 – 2.326 nσ |μ = 9700}

= P{ X ≥ 9,448 | μ = 9700}

= P{n

700,9− ≥ 10750700,9448,9 − }

= P{Z ≥ –1.06} = 0.8554.

(c) Now Ha: μ = 9,200. Similar to (b), P{Type II error} = 0.1469.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 9 Zhenlin Yang, SMU

For testing the mean of a normal population with population variance unspecified, the following t–test is valid.

t-Test for the mean of a normal population, σ unknown

Null Hypothesis Ho: μ = μ0;

Test Statistic t = ns

X 0μ− ~H0

tn–1

Alternative Hypothesis Reject Ho at the α significance level if μ ≠ μ0 t > tn−1(α 2) or t < – tn−1(α 2)

μ > μ0 t > tn−1(α )

μ < μ0 t < – tn−1(α )

Example 7.3. The average time required to perform certain task is known (from extensive past experience) to be 12.5 minutes. Ten new employees are hired and trained. During a testing period, their times for completion of the task were as follows: 9.3, 12.1, 15.7, 10.3, 12.2, 14.8, 15.1, 13.2, 15.9, 14.5. If

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 10 Zhenlin Yang, SMU

these times are assumed to come from a normal population, test the hypothesis that these employees are no different from the average, using α = 5%.

Solution:

i) Ho: μ = 12.5, Ha: μ ≠ 12.5.

ii) X = 13.31, s = 2.28. For α = 0.05 and d.f. = n – 1 = 9, t9 (. 025 ) = 2.262.

iii) Rejection region: t > )025(.9t or t < – )025(.9t .

iv) t = ns

X 0μ− = 1028.2

5.1231.13 − = 1.13.

v) Do not reject Ho as 1.13 is not in the rejection region. The data do not indicate that the average time for these ten workers to perform their task is any different from the average time for the other workers.

t-test is particularly useful for testing the mean of a normal population when sample size n is small. When n is large, it essentially becomes the Z-test, and in this case it is not critical whether the population is normal or not.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 11 Zhenlin Yang, SMU

Tests for the Mean of a Non-Normal Population

• For testing the mean of a non-normal population with standard deviation σ (known or unknown which is then replaced by s), the Z-test given above applies if the sample size ≥ 30.

• For the special non-normal population, the binomial, testing procedure is summarized as follows.

Z-Test for a Population Proportion: IF n π̂ ≥ 5 and n(1−π̂ ) ≥ 5, Null Hypothesis Ho: π = π 0

Test Statistic Z = n)1(

ˆ

00

0

ππππ

−−

0

.~H

approx N(0, 1)

Alternative Hypothesis Reject Ho at the α significance level if π ≠ π0 Z > Zα 2 or Z < – Zα 2 π > π0 Z > Zα π < π0 Z < – Zα

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 12 Zhenlin Yang, SMU

Example 7.4. A manufacturing company is thinking of moving its plant from City X to City Y. The wages of skilled technicians in City X are $10.00/hour. It wishes to test the hypothesis that the average wages of skilled technicians in City Y are the same as in City X, versus an alternative hypothesis (put forward by the plant manager) that the average wage is lower. A random sample of 100 skilled technicians is taken, and their average wage is found to be $9.80/hour, with SD s = $0.50. Test the hypothesis at 5% level of significance.

Solution: i) Ho: μ = 10.00, Ha: μ < 10.00. ii) n = 100, X = 9.80, s = 0.50, α = 0.05, Zα = 1.65. Rejection region: Z < –1.65.

Note that although σ is unknown, n is large enough for us to use Z-test.

iii) Z = ns

X 0μ− = 10050.0

00.1080.9 − = – 4 < –1.65.

We reject Ho, and conclude that the average wage in City Y is lower than $10.00/hour.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 13 Zhenlin Yang, SMU

Example 7.5. From past sales records, it is known that 30% of the population buys Brand X toothpaste. A new advertising campaign is completed, and to test its effectiveness, 1000 people are asked whether they buy Brand X toothpaste now. If 334 answer yes, does this indicate that the advertising campaign has been successful? Perform a relevant test using 5% level of significance.

Solution: i) Ho: π = 0.30, Ha: π > 0.30.

ii) n = 1000, π̂ = 334/1000 = 0.334, Z0.05= 1.65. Rejection region: Z > 1.65.

Note that n π̂ ≥ 5 and n(1−π̂ ) ≥ 5. Use of Z-test is justified.

iii) n)1( 00 ππ − = 10007.03.0 × = 0.01449.

Z = n)1(

ˆ

00

0

ππππ

−− =

01449.03.0334.0 −

= 2.35.

iv) Since Z > 1.65, we reject H0 at α = .05 and conclude that the advertising campaign has been successful.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 14 Zhenlin Yang, SMU

Relationship between Tests and Confidence Intervals

It is apparent now that there is a connection between testing and C.I. For instance, to test Ho: μ = μ0 vs Ha: μ ≠ μ0 at 5% level of significance, with σ known, we know that the acceptance region is

–1.96 ≤ n

μ0− ≤ 1.96,

while a 95% C.I. for μ is

nX

nX σμσ 96.196.1 +≤≤−

which can be rearranged as

–1.96 ≤ n

μ− ≤ 1.96.

Accepting Ho at α level of significance is equivalent to μ0 being inside the 100(1−α)% C.I. for μ. Rejecting Ho is equivalent to μ0 being outside the C.I.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 15 Zhenlin Yang, SMU

Reconsider Example 7.3. Construct a 95% C.I. for the population mean of the new employees. Compare the result with that of Example 7.3.

The 95% C.I. for μ: ⎭⎬⎫

⎩⎨⎧ ± − n

stX n )2(1 α =⎭⎬⎫

⎩⎨⎧ ±

1028.2262.231.13

= {13.31 ± 1.63} = {11.68, 14.94},

The C.I. covers the hypothesized value μ0 = 12.5 of Example 7.3, which was not rejected by the two-sided test of 5% level, hence, showing the equivalence between hypothesis testing and confidence interval construction.

A Summary of Concepts True condition Decision Ho is true Ho is false Accept Ho Correct decision Type II error Probability = 1–α Probability = β Reject Ho Type I error Correct decision Probability = α Probability = (1–β)

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 16 Zhenlin Yang, SMU

Note: (1−β) is the probability of rejecting Ho when it is false. It is also called Power of the Test. Chi-Square Test for the Variance of a Normal Population

Chi-Square Test for a Normal Population Variance

Null Hypothesis Ho: 20

2 σσ =

Test Statistic χ2 = (n −1) s2

σ02 ~

H0

χ n−12

Alternative Hypothesis Reject Ho at the α significance level if σ2 ≠ σ 0

2 χ2 > )2(21 αχ −n or χ2 < )21(2

1 αχ −−n

σ2 > σ 02 χ2 > )(2

1 αχ −n

σ2 < σ 02 χ2 < )1(2

1 αχ −−n

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 17 Zhenlin Yang, SMU

Example 7.6. A laboratory uses a standard method for detecting the impurity level in its product. This method is precise but expansive. A newer and cheaper method is suggested, but it is believed to be less precise. From the past records, the variance of the standard method is 7%. Twenty observations are obtained with the new method and are believed to be normally distributed. If the value of s2 is 8%, perform a relevant test at the 5% level of significance.

Solution: Ho: σ2= 7, Ha: σ2 > 7.

20

2)1( σsn − = 19×8/7 = 21.71

)05(.219χ = 30.144.

As 21.71 < 30.144, we do not reject Ho at 5% level of significance.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 18 Zhenlin Yang, SMU

7.2. Tests for Comparing Two Populations

We want test whether two means are equal, whether one mean exceeds the other by a certain amount, etc. Refer to two-sample Z– and t– C.I.s. Suppose two independent random samples are drawn, one from each population.

Z-Test for Two Normal Population Means (Variances Known)

Null Hypothesis Ho: μ1– μ2 = δ, where δ is a known value

Test Statistic Z = 2

221

21

21

nnXX

σσδ

+−−

0

~H

N(0, 1)

Alternative Hypothesis Reject Ho at the α significance level if μ1– μ2 ≠ δ Z > Zα 2 or Z < – Zα 2

μ1– μ2 > δ Z > Zα

μ1– μ2 < δ Z < – Zα

• An important situation is when δ = 0: whether the two means are equal.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 19 Zhenlin Yang, SMU

Example 7.7. To compare the mean calcium concentrations at two stations (downstream and upstream), random samples of 20 and 15 measurements are taken respectively at the downstream station and the upstream station. The resulted means are 21.3 and 14.2 milligrams per cubic decameter. It is known that the two populations are normal with sds 1.8 and 2.4 respectively, and the two samples are independent.

(a) Do the data provide sufficient evidence at 1% level that the mean calcium concentration is higher at the downstream station than at the upstream station?

(b) If the evidence in (a) is sufficient, do the data also suggest at 1% level of significance that the mean calcium concentration at downstream station exceeds that of the upstream station by more than 5?

(c) Find a 98% C.I. for μ1 – μ2. Discuss the connections between the results

in (b) and (c).

Solution: (a) Ho: μ1 – μ2= 0, Ha: μ1 – μ2 > 0, α = 0.01, Z0.01 = 2.326

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 20 Zhenlin Yang, SMU

Z = 154.2208.1 22

21

+− XX =

154.2208.12.143.21

22 +

−= 9.6.

Since Z > Z0.01, reject Ho at 0.01 level of significance. Data do provide sufficient evidence to indicate . . .

(b) Ho: μ1 – μ2 = 5, Ha: μ1 – μ2 > 5

Z = 154.2208.1

522

21

+−− XX =

154.2208.152.143.21

22 +

−−= 2.84

Since Z > Z0.01, reject Ho at 0.01 level of significance. Data do suggest at .01 level that the mean calcium concentration at the downstream station exceeds that of upstream by more than 5 milligrams per cubic decameter.

(c) 98% C.I. for μ1 – μ2: 2221

2101.021 nnZXX σσ +±− = . . . = {5.4, 8.8}

We are 99% confident that the mean calcium concentration at downstream station exceeds that of upstream station by at least 5.4 milligrams per cubic decameter. The conclusions from (b) and (c) are consistent.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 21 Zhenlin Yang, SMU

Tests for comparing two non-normal population means

When both sample sizes are larger than 30, the above two-sample Z-test can be applied to compare means of any two independent populations. When the population variances are unknown, replace them by sample variances (?). Example 7.8. Reconsider Example 6.16. Perform a test of the hypothesis that the average starting salaries offered to new B.A. recipients at two universities are same against the alternative hypothesis that they are different. Use α = 0.05. Is the conclusion consistent with that of Example 6.16?

Solution: H0: μ1 = μ2, Ha: μ1 ≠ μ2

n1 = 42, n2 = 48, 1X = 1360, 2X =1320, s1 = 320, s2 = 375,

α = 0.05, Z0.025 = 1.96.

Z = 2

221

21

21

nsnsXX

+− =

483754232013201360

22 +−

= 0.546.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 22 Zhenlin Yang, SMU

Since –1.96 < 0.546 < 1.96, we do not reject Ho at α = 0.05 level of significance. Conclude no difference in mean salaries, consistent with the result of Example 6.16.

Z-Test for Comparing Two Proportions

Null Hypothesis Ho: π1 = π2 = π

Test Statistic: Z = ( )21

21

11)ˆ1(ˆˆˆ

nn +−−

ππππ

0

.~H

approx N(0, 1)

where 21

2211 ˆˆˆnnnn

++= πππ , the pooled estimate of π under H0.

Alternative Hypothesis Reject Ho at the α significance level if π1 ≠ π2 Z > Zα 2 or Z < – Zα 2

π1 > π2 Z > Zα

π1 < π2 Z < – Zα

Assumptions: n1 1π̂ , n1(1− 1π̂ ), n2 2π̂ , and n2(1− 2π̂ ) are all no less than 5.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 23 Zhenlin Yang, SMU

Note: In the denominator of the test statistic, a pooled estimator of the common π under H0 is used (why?). In the C.I. construction, however, individual 1π̂ and

2π̂ are used.

Example 7.9. Consider Example 6.17. Carry out a test at 5% level of significance to see whether the data show sufficient evidence against the hypothesis that men and women equally prefer candidate Smith. Is the result consistent with the result of Example 6.17? Explain.

Solution: Ho: π1 = π2, Ha: π1 ≠ π2.

21

2211 ˆˆˆnnnn

++= πππ =

2001009242

++

= 0.4467.

Z = ( )21

21

11)ˆ1(ˆˆˆ

nn +−−

ππππ = ( )11 200100)4467.01(4467.0

2009210042−− +−

−= – 0.6569.

Do not reject Ho at α = 0.05 level of significance.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 24 Zhenlin Yang, SMU

Therefore, men and women equally prefer candidate Smith.

The result is consistent with the C.I. in Example 6.17 since the C.I. covers the value of 0, which is the hypothesized value for the difference of the true proportions.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 25 Zhenlin Yang, SMU

Tests for comparing two normal population means (variances unknown but equal, sample sizes are small)

When variances are unknown, the common practice is to assume they are equal, and apply the pooled t-test.

Pooled t-Test for Two Normal Population Means

Null Hypothesis Ho: μ1– μ2 = δ; Assumption: Variances equal

Test Statistic t = ( )

12

11p

21

−− +

−−

nns

XX δ

0

~H

221 −+nnt

Alternative Hypothesis Reject Ho at the α significance level if μ1– μ2 ≠ δ t > )2(ανt or t < – )2(ανt

μ1– μ2 > δ t > t ν (α )

μ1– μ2 < δ t < – t ν (α ) , v = n1 + n2 – 2

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 26 Zhenlin Yang, SMU

Example 7.10: A market research firm wishes to know if the mean number of hours of TV viewing per week is the same for teenage boys as for teenage girls. They selected randomly 20 boys and 12 girls and found the followings: 1X = 24.5, s1

2 = 64, 2X = 28.7, and s22 = 71. Perform a relevant test under the

assumption that the populations are normal with unknown but equal variances.

Solution:

i) Ho: μ1 = μ2 vs Ha: μ1 ≠ μ2

ii) n1 = 20, n2 = 12, d.f. = n1+ n2–2 = 30. For α = 0.05, t30 (0.025) = 2.042

iii) 21220

711164192

−+×+×=ps = 66.5667, t =

)121201(5667.667.284.25+×

− = –1.1077.

iv) Since –2.042 < –1.1077 < 2.042, we do not reject Ho at 5% level. v) Conclude that the mean number of hours of TV viewing per week is the

same for teenage boys as for girls.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 27 Zhenlin Yang, SMU

F-Test for Comparing Variances of Two Independent Normal Populations

From the F-interval, we know that to compare σ 12 with σ 2

2 , i.e., to make inference about 2

221 σσ , we use 2

221 ss . In terms of testing, we have the F–test.

F-Test for Two Normal Population Variances

Null Hypothesis H0: )1or ( 22

21

22

21 == σσσσ

Test Statistic F = 22

21 ss

0

~H

1,1 21 −− nnF

Alternative Hypothesis Reject Ho at the α significance level if 2

1σ ≠ 22σ F > 2αF or F < 21 α−F

21σ > 2

2σ F > αF

21σ < 2

2σ F < α−1F where 21 α−F and 2αF are the lower and upper 2α point of 1,1 21 −− nnF

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 28 Zhenlin Yang, SMU

Example 7.11. In Example 7.10, a pooled-t test was used to see whether the mean number of hours of TV viewing per week is the same for teenage boys as for teenage girls, based on the assumption that two population variances are equal. Check this assumption by performing an F-test with α = .05.

Solution: Ho: 21σ = 2

2σ ( 22

21 σσ =1), Ha: 2

1σ ≠ 22σ .

21s = 64, 2

2s = 71, n1 = 20, n2 = 12.

For α = 0.05, 025.0F (19,11) = 3.24,

975.0F (19,11) = 1/ 025.0F (11,19) = 1/2.77 = 0.361.

Acceptance region: {0.3610, 3.2400}

22

21 ss = 64/71 = 0.9014.

Since this observed value of the test statistic falls into the acceptance region, we do not reject the Ho at 5% level of significance. Data do not show violation of equal variance assumption.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 29 Zhenlin Yang, SMU

The Paired t-Test In Chapter 6, a method for comparing the means of two dependent normal populations: the paired t-confidence interval, was given. Based on the same set up, we obtain a paired t-test.

Paired t-Test for Means of Two Dependent Normal Populations

Null Hypothesis H0: μd (=μ1– μ2) = δ

Test Statistic t = ns

d

d

δ−

0

~H

tn−1

Alternative Hypothesis Reject Ho at the α significance level if μd ≠ δ t > tn−1(α 2) or t < – tn−1(α 2)

μd > δ t > tn−1(α )

μd < δ t < – tn−1(α ) where d1, d2, . . . , dn are the (sample) pair differences, with mean and variance

defined as ∑=

=n

iid

nd

1

1 and 2ds = ∑

=

−−

n

ii dd

n 1

2)(1

1 .

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 30 Zhenlin Yang, SMU

Example 7.12. Manufacturers wish to determine whether an adjustment to a machine setting will improve mean output by more than 10 units. They selected randomly 15 machines and recorded the outputs before and after adjustment. The 15 pairs of outputs give d =13.3, and sd = 4.2. Perform a

relevant test.

Solution: Ho: μd = 10, vs Ha: μd >10.

t = ns

d

d

10− =

152.4103.13 −

= 3.04,

t14 (. 05) = 1.761.

Reject Ho at 5% level of significance. Data gives sufficient evidence that an adjustment to a machine setting will improve mean output by more than 10 units.

School of Economis, SMU Chapter 7

STAT151, Term II 11-12 31 Zhenlin Yang, SMU