Docsity

Estimating Difference in Means: Known & Unknown Variances - Prof. Ofer Harel, Study notes of Statistics

Partial preview of the text

Download Estimating Difference in Means: Known & Unknown Variances - Prof. Ofer Harel and more Study notes Statistics in PDF only on Docsity!

Introduction to Applied Statistics

Stat 5005 – Chapter 6

Ofer Harel

Department of Statistics University of Connecticut

Chapter 6 – p. 1/

Two-Sample inference

In many problems, more than one population is involved. Sometimes we are concerned with estimating the difference, μ

1

μ

2

, between two population means

μ

1

and

μ

2

For

example,

We might want to estimate the differential height betweenfreshman males and females at Uconn. We might want to compare the performance of two brandsof snow tires. We might be interested in knowing if male students aremore easily bored than their female counterparts. We might want to compare the scores obtained by Uconnand Yale students on a statistical test.

Chapter 6 – p. 2/

Two-Sample inference

Using the CLT we can find the sampling distribution of

y

1

and

y

2

to be

y

1

N

μ

1

, σ

(^21)

/n

1

and

y

2

N

μ

2

, σ

2 2

/n

2

respectively

Therefore, the distribution of

y

1

y

2

is normal with

μ

¯ y

1

−

¯ y

2

μ

1

μ

2

σ

2

¯ y

1

−

¯ y

2

σ

2 ¯y

1

σ

2 ¯y

2

σ

(^21)

n

1

σ

22 n

2

and standard error

σ

¯ y

1

−

¯ y

2

σ

(^21)

n

1

σ

22

n

2

Chapter 6 – p. 4/

Two-Sample CI when variances are known

Let

X

11

, X

1

n

1

be

n

1

random sample from a normal

distribution with unknown mean

μ

1

and known variance

σ

(^21)

This sample constitutes population 1

Let

X

1

be the sample

mean of the sample from population 1. Let

X

21

, X

2

n

2

be

n

2

random sample from a normal

distribution with unknown mean

μ

2

and known variance

σ

(^22)

This sample constitutes population 2

Let

X

2

be the sample

mean of the sample from population 2. We assume that the two samples are independent. We have:

E

X

1

X

2

μ

1

μ

2

Hence,

X

1

X

2

is an unbiased estimator of

μ

1

μ

2

Chapter 6 – p. 5/

Two-Sample CI when variances are known

Here we no longer assume that population 1 and population2 are normally distributed or approximately normallydistributed. We rely heavily on large-sample theory (Central LimitTheorem). Again the confidence interval

¯x

1

¯x

2

z

α/

2

σ

(^21)

n

1

σ

(^22)

n

2

forms a realization of a large-sample of CI for

μ

1

μ

2

with

approximate confidence level

α

Chapter 6 – p. 7/

Two-Sample CI,

are unknown

Here we assume that population 1 and population 2 arenormally distributed or approximately normally distributed

with

common unknown variance

Under the assumption that

σ

1

σ

2

σ

, we have

V ar

X

1

X

2

σ

2

n

1

n

2

Under the normality assumption, it follows that

n

1

S

(^21)

σ

2

χ

2 n

1

−

1

and

n

2

S

(^22)

σ

2

χ

2 n

2

−

1

Chapter 6 – p. 8/

Two-Sample CI,

are unknown

E

S

(^2) p

(

n

1

−

E

S

(^21)

  • (

n

2

−

E

S

(^22)

n

1

n

2

−

2

σ

2

V ar

S

(^2) p

(

n

1

−

2

V ar

S

(^21)

  • (

n

2

−

2

V ar

S

(^22)

n

1

n

2

−

2

2

2

σ

4

n

1

n

2

−

2

It can be shown that

n

1

n

2

S

(^2) p

σ

2

χ

2 n

1

n

2

−

2

Hence,

the sampling distribution of the statistic

T

X

1

X

2

μ

1

μ

2

S

p

1 n

1

1 n

2

T

n

1

n

2

−

2

Chapter 6 – p. 10/

Two-Sample CI,

are unknown

The interval

¯x

1

¯x

2

t

α/

2

, n

1

n

2

−

2

s

p

n

1

n

2

forms a realization of a large-sample of CI for

μ

1

μ

2

with

confidence level

α

Chapter 6 – p. 11/

Two-Sample CI,

are unknown

Example 2:

A civil engineer wishes to measure the

compressive strength of two different types of concrete. Arandom sample of 10 specimens of each type yielded thefollowing data (in psi)

Type 1:

Type 2:

If we assume that the samples are normal with a commonvariance, construct a 95 percent two-sided confidenceinterval for

μ

1

μ

2

, the difference in means.

Chapter 6 – p. 13/

Hypotheses Testing: Two-Sample Case

We can also test a hypothesis about the difference of twomeans. Here the setup begins with

two independent populations

and

one would like to compare these two populations. The goal is to test if the difference between means orproportions from two independent populations aresignificantly different.

Chapter 6 – p. 14/

Testing mean Difference:

Known Variances

Possible Hypotheses: a.)

H

0

μ

1

μ

2

and

H

a

μ

1

μ

2

(two-tailed

test)

b.)

H

0

μ

1

μ

2

and

H

a

μ

1

μ

2

(upper-tailed

test)

c.)

H

0

μ

1

μ

2

and

H

a

μ

1

μ

2

(lower-tailed

test)

The value of

and

α

are specified by the user.

Test Statistic:

z

obs

x

1

¯x

2

σ

(^21)

n

1

σ

(^22)

n

2

Chapter 6 – p. 16/

Testing mean Difference:

Known Variances

Rejection Regions: a.)

Reject

H

0

if

z

obs

z

α/

2

or if

p-value

×

P

Z

z

obs

α

b.)

Reject

H

0

if

z

obs

z

α

or if p-value

P

Z

z

obs

α

c.)

Reject

H

0

if

z

obs

z

α

or if p-value

P

Z

z

obs

α Chapter 6 – p. 17/

Testing mean Difference:

unknown

Rejection Regions: a.)

Reject

H

0

if

t

obs

t

α/

2

, n

1

n

2

−

2

or if

p-value

×

P

T

n

1

n

2

−

2

t

obs

α

b.)

Reject

H

0

if

t

obs

t

α, n

1

n

2

−

2

or if

p-value

P

T

n

1

n

2

−

2

t

obs

α

c.)

Reject

H

0

if

t

obs

t

α, n

1

n

2

−

2

or if

p-value

P

T

n

1

n

2

−

2

t

obs

α

Chapter 6 – p. 19/

Testing mean Difference:

unknown

Example 3:

Let

μ

1

and

μ

2

denote true stopping distances (feet)

for two different types of cars traveling at 50mph. Assumingnormality and

σ

(^21)

σ

2 2

, test

H

0

μ

1

μ

2

versus

H

0

μ

1

μ

2

at level 0.05 using the following data:

n

1

¯x

1

, s

1

, n

1

¯x

2

, s

1

Chapter 6 – p. 20/