Docsity

Comparing Population Means: Two-Sample t-Tests and Standard Deviations, Exams of Statistics

Partial preview of the text

Download Comparing Population Means: Two-Sample t-Tests and Standard Deviations and more Exams Statistics in PDF only on Docsity!

Two-sample problems forpopulation means

BPS chapter 19

© 2006 W.H. Freeman and Company

Objectives (BPS chapter 19) Comparing two population means

‡^

Two-sample

t^ procedures

‡^

Examples of two-sample

t^ procedures

‡^

Using technology ‡^

Robustness again ‡^

Details of the

t^ approximation

‡^

Avoid the pooled two-sample

t^ procedures

‡^

Avoid inference about standard deviations ‡^

The

F^

test for comparing two standard deviations

SE

=^

(^2) s (^1) n^1 +^

(^2) s (^2) n^2

2 s 1 + n 1

2 s 2 n^2

df

μ−^1

μ^2

x −^1

x^^2

The two-sample

t^ statistic follows approximately the

t^ distribution with a

standard error SE (spread) reflectingvariation from both samples: Conservatively, the degreesof freedom is equal to thesmallest of (

n −^1

1,^ n

t^ =

( x^1

−^ x

)^ − 2

(^ μ^1

−^ μ

) 2

SE

Two-sample

t -test

The null hypothesis is that both population means

μ^1

and

μ^2

are equal,

thus their difference is equal to zero.

H :^0

μ^1

=^ μ

μ^1

−^ μ

with either a one-sided or a two-sided alternative hypothesis. We find how many standard errors (SE) awayfrom (

μ^ −^1

μ^ ) is (^2

1

−^

) by standardizing with t: 2

Because in a two-sample test

H^0

poses (

μ^ -^1

μ^ ) =^2

0, we simply use

with df = smallest(

n^1

−^ 1,

n^2

−^ 1)

t^ =

x^1

−^

x^^2 (^2) s (^1) n^1 +^

(^2) s (^2) n^2

x^

x

s 9.3 15.

30

No

30

Yes

n

FVC

Parental smoking

The difference in sample averagesfollows approximately the

t^ distribution:

We calculate the t statistic:

t^ 0,

(^2) ssmoke n smoke

s + (^2) no n no

⎛ ⎜⎜ ⎝

⎞ ⎟,^ ⎟^ ⎠

df^

29

2 2

2 2

= t

s n

s n

x

x

t

no no smokesmoke

no smoke

In Table C, for df 29 we find:| t | > 3.659 =>

p^

< 0.0005 (one-sided)

It’s a very significant difference, we reject

H^0

.

H :^0

μsmoke

=^ μ

no^

<=> (

μsmoke

−^ μ

) = 0no

H :a

μsmoke

<^ μ

no^

<=> (

μsmoke

−^ μ

) < 0 (one sided)no

Lung capacity is significantly impaired in children of smoking parents.

x

Two sample

t -confidence interval

Because we have two independent samples we use the differencebetween both sample averages (

1

−^

) to estimate ( 2

μ^1

−^ μ

C

t *

− t *

m^

SE^ m

=^

(^2) s 1 + n^1

(^2) s (^2) n^2

Practical use of

t :^

t *****

‡^ C is the area between

− t

  • and

t *.

‡^ We find

t * in the line of Table C

for df = smallest (

n −^1

1;^ n

−1) and 2

the column for confidence level C. ‡The margin of error

m^

is:

SE t s n s n t m^

2 2 2 2 1 1

=

=

x^

x

Can directed reading activities in the classroom help improve reading ability?A class of 21 third-graders participates in these activities for 8 weeks while acontrol classroom of 23 third-graders follows the same curriculum without theactivities. After the 8 weeks, all children take a reading test (scores in table).^ 95% confidence interval for (

μ −^1

μ ), with df = 20 conservatively^2

Æ

t * = 2.086:

With 95% confidence, (mu1 – mu2) falls within 9

. 96 ± 8.99 or 1.0 to 18.9.

(^99). 8 (^31). 4

(^086). 2

; ) (:

2 2 2 2 1 1

2 1

≈

=

=

± −^

s n s n t m m x x CI

Robustness The two-sample statistic is the most robust when both sample sizes areequal and both sample distributions are similar. But even when wedeviate from this, two-sample tests tend to remain quite robust.As a guideline, a combined sample size (

n^1

+^ n

) of 40 or more will 2

allow you to work even with the most skewed distributions.

(^72). 8 (^31). 4

*^024. 2

2 2 2 2 1 1

≈

=

= m

s n s n t m

t-Test: Two-Sample Assuming Unequal Variances

Treatment group

Control group

Mean

Variance

Observations

21

23

Hypothesized Mean Difference

df^

38

t Stat

P(T<=t) one-tail

t Critical one-tail

P(T<=t) two-tail

t Critical two-tail

Independent Samples Test

.^

42

.^

.^

Equal variancesassumedEqual variancesnot assumed

ReadingScore

F^

Sig. Levene's Test forEquality of Variances

t^

df^

Sig. (2-tailed)

MeanDifference

Std. ErrorDifference

Lower

Upper 95% ConfidenceInterval of theDifference

t-test for Equality of Means

Excel SPSS

Table C

95% confidence interval for the reading ability study using the more precisedegrees of freedom:

t*

Excel menu/tools/data_analysis

Æ

or =TTEST

( array

, array

, tails

, type

)

‡^ Array

is the first data set. ‡^ Array

is the second data set. ‡^ Tails

specifies the nature of the alternative hypothesis(1: one-tailed; 2: two-tailed). ‡^ Type

is the kind of

t -test to perform

(1: paired; 2: two-sample equal variance; 3: two-sample unequal variance).

Which type of test? One sample, paired samples, twosamples? ‡^ Comparing vitamin content of bread,immediately after baking versus 3days later (the same loaves are usedon day one and 3 days later). ‡^ Comparing vitamin content of bread,immediately after baking versus 3days later (tests made onindependent loaves). ‡^ Average fuel efficiency for 2005vehicles is 21 miles per gallon. Isaverage fuel efficiency higher in thenew generation “green vehicles?”

‡^ Is blood pressure altered by use ofan oral contraceptive? Comparing agroup of women not using an oralcontraceptive with a group taking it. ‡^ Review insurance records for dollaramount paid after fire damage inhouses equipped with a fireextinguisher versus houses withoutone. Was there a difference in theaverage dollar amount paid?

Comparing two standard deviations It is also possible to compare two population standard deviations

σ^1

and

σ^2

by

comparing the standard deviations of two SRSs. However, the procedures arenot robust at all against deviations from normality.When

(^2) s 1 and

(^2) s 2 are sample variances from independent SRSs of sizes

n 1 and

n 2 drawn from normal populations, the

F- statistic

F^ =

(^2) s 1 / s^2

2

has the

F^ distribution with

n^1

−^ 1 and

n^2

−^ 1 degrees of freedom when

H^0

:^ σ^1

=

σ^2

is true. The

F- value is then compared with critical values from Table D for the

P -value

with a one-sided alternative; this

P -value is doubled for a two-sided alternative.