Math E x a m feb 23 8 am

profilefariha
3.IntroductiontoEstimationTwoSample1.pdf

Advanced Business Statistics

▪ Introduction to Estimation (Two Sample)

Winter 2022

Instructor: Ahmad Teymouri All rights Reserved

Agenda

Introduction to Estimation of the Deference of Means

(Two Sample)

❑ When 𝜎1 and 𝜎2 are known

❑ When 𝜎1 and 𝜎2 are unknown

• Considering equal variances

• Considering unequal variances

❑ For Proportion

Instructor: Ahmad Teymouri All rights Reserved

Review – Population Mean Estimation for One Sample

Sample

Population

𝜇 = ത𝑋 ± 𝑧𝛼 2

𝛿

𝑛

𝜇 = ത𝑋 ± 𝑡𝛼 2

𝑠

𝑛

𝑝 = Ƹ𝑝 − 𝑍𝛼 2

Ƹ𝑝 1 − Ƹ𝑝 /𝑛

Population

Mean

Estimation

δ known

δ unknown

Proportion

𝑛 = (𝑍𝛼 2

𝛿

𝐵 )2

𝑛 = ( 𝑍𝛼 2

Ƹ𝑝(1 − Ƹ𝑝)

𝐵 )2

Instructor: Ahmad Teymouri All rights Reserved

Two Populations - Two Samples

Sample 1

Population 1

Sample 2

Population 2

Average salary of

retired people in

Ontario

Average salary of

retired people in

Quebec

Instructor: Ahmad Teymouri All rights Reserved

Inference about the Difference between Two Means To estimate the difference between two population means, we draw

random independent samples from each of two populations.

Population 1 Population 2

Parameters:

𝝁𝟏 and 𝜹𝟏

Parameters:

𝝁𝟐 and 𝜹𝟐

Statistics: ഥ𝑿𝟏 and 𝒔𝟏

Statistics: ഥ𝑿𝟐 and 𝒔𝟐

Sample

Size: 𝒏𝟏

Sample

Size: 𝒏𝟐

Instructor: Ahmad Teymouri All rights Reserved

Estimate Difference Population Means: 𝝈𝟏and 𝝈𝟐are known When standard deviation of both populations are known, the following equation

can be applied to estimate the difference between populations’ mean.

𝜇1 − 𝜇2 = ( ത𝑋1 − ത𝑋2) ± 𝑧𝛼 2

(𝛿1) 2

𝑛1 + (𝛿2)

2

𝑛2

ത𝑋1 − ത𝑋2 − 𝑧𝛼 2

(𝛿1) 2

𝑛1 + (𝛿2)

2

𝑛2

Therefore:

ത𝑋1 − ത𝑋2 + 𝑧𝛼 2

(𝛿1) 2

𝑛1 + (𝛿2)

2

𝑛2

Standard Error

Lower Confidence Level (LCL)

Upper Confidence Level (UCL)

Instructor: Ahmad Teymouri All rights Reserved

Estimate Difference Population Means: 𝝈𝟏and 𝝈𝟐are known

We rarely estimate difference population mean with using previous formula

mainly because the population variances are usually unknown.

But, it is necessary to estimate the standard error:

𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝐸𝑟𝑟𝑜𝑟 = (𝛿1)

2

𝑛1 + (𝛿2)

2

𝑛2

Instructor: Ahmad Teymouri All rights Reserved

Example 1

A baby-food producer company, ABC, claims that its product helps babies to

gain weight faster than a leading competitor’s product, XYZ. A survey was

designed by a MBA student as follow two steps:

• Mothers were asked which product (ABC or XYZ) they intended to

feed their babies.

• There were 38 mothers feeding babies with ABC and 29 mentioned

that they would feed their babies XYZ.

• Mothers were asked to keep track of their babies’ weight gains over

the next 3 months.

• Each baby’s weight gain (in gram) was recorded. ( refer to Excel Data)

Assume, according to historical data, the standard deviation of babies’ weight

who were fed by ABC is 150 gram and by XYZ is 90 gram.

Estimate with 95% confidence the difference between the mean weight gains

of ABC and XYZ.

Instructor: Ahmad Teymouri All rights Reserved

Example 1

ത𝑋1 = σ𝑥1 𝑛1

= 94,078

38 = 2,476

𝛿1 = 150

1 − 𝛼 = 0.95

𝛼 = 0.05

𝛼

2 = 0.025

𝑍0.025 = 1.96

standard deviation of populations are known, we use z for estimation:

ത𝑋2 = σ𝑥2 𝑛2

= 66,605

29 = 2,297

𝛿2 = 90

𝑛1 = 38

𝑛2 = 29

from Z table

𝜇1 − 𝜇2 = ( ത𝑋1 − ത𝑋2) ± 𝑧𝛼 2

(𝛿1) 2

𝑛1 + (𝛿2)

2

𝑛2

𝜇1 − 𝜇2 = (2,476 − 2,297) ± 1.96 (150)2

38 + (90)2

29

121 < 𝜇1 − 𝜇2 < 237

with 95% confidence, the difference between the

mean weight gains of ABC and XYZ is lower than

237 gram and higher than 121 gram.

Instructor: Ahmad Teymouri All rights Reserved

Estimate Difference Population Means: 𝝈𝟏and 𝝈𝟐are unknown

In many situations, standard deviation of populations are unknown. Therefore,

the difference of population means depends on whether the two unknown

population variances are equal or not.

• 𝜎1 2 = 𝜎2

2

• 𝜎1 2 ≠ 𝜎2

2

For both situations, student t distribution is applied. However, the formula is

different.

Instructor: Ahmad Teymouri All rights Reserved

Estimate Difference Population Means: 𝝈𝟏and 𝝈𝟐are unknown

𝜇1 − 𝜇2 = ത𝑋1 − ത𝑋2 ± 𝑡𝛼 2

𝑠𝑝 2

1

𝑛1 +

1

𝑛2

Standard Error

= 𝑛1 + 𝑛2 − 2 𝑑𝑒𝑔𝑟𝑒𝑒 𝑜𝑓 𝑓𝑟𝑒𝑒𝑑𝑜𝑚𝑠𝑝

2 = (𝑛1 − 1)𝑠1

2 + (𝑛2 − 1)𝑠2

2

𝑛1 + 𝑛2 − 2

Pooled

Variance

𝜇1 − 𝜇2 = ത𝑋1 − ത𝑋2 ± 𝑡𝛼 2

𝑠1 2

𝑛1 + 𝑠2

2

𝑛2

Standard Error

𝑑𝑒𝑔𝑟𝑒𝑒 𝑜𝑓 𝑓𝑟𝑒𝑒𝑑𝑜𝑚 = ( 𝑠1

2

𝑛1 +

𝑠2 2

𝑛2 )2

( 𝑠1

2

𝑛1 )2

𝑛1 − 1 +

( 𝑠2

2

𝑛2 )2

𝑛2 − 1

𝜎1 2 ≠ 𝜎2

2

𝜎1 2 = 𝜎2

2

Instructor: Ahmad Teymouri All rights Reserved

Example 2

A large car manufacturer developed a mandatory training program for its

workers in 4 countries. In assessing the effectiveness of this program, an

operation manager designed a survey by measuring two factors:

• Workers’ improved performance (saving time, second).

• age of each worker, 21-to-30 and 31-to-40 age groups.

The survey measured 200 workers’ improved performance in each age group,

the data was listed in the Excel file. Estimate with 90% confidence the

difference in improved performance mean of the two age groups, 21-to-30 and

31-to-40. Assume the variances of the improved performance for workers 21-

to-30 and 31-to-40 are equal 𝜎1 2 = 𝜎2

2.

Instructor: Ahmad Teymouri All rights Reserved

Example 2

ത𝑋1 = σ 𝑥1 𝑛1

= 17,575

200 = 87.87

𝑆1 = 13.38

1 − 𝛼 = 0.90

𝛼 = 0.10

𝛼

2 = 0.05

𝑡0.05 = 1.645

standard deviation of populations are unknown (assume equal)

we use t for estimation:

ത𝑋2 = σ𝑥2 𝑛2

= 10,254

200 = 51.22

𝑆2 = 17.06

𝑛1 = 200

𝑛2 = 200

from t table

𝜇1 − 𝜇2 = ( ത𝑋1 − ത𝑋2) ± 𝑡𝛼 2

𝑠𝑝 2

1

𝑛1 +

1

𝑛2

𝑠𝑝 2 =

(𝑛1 − 1)𝑠1 2 + (𝑛2 − 1)𝑠2

2

𝑛1 + 𝑛2 − 2

𝑠𝑝 2 =

(200 − 1)(13.38)2+(200 − 1)(17.06)2

200 + 200 − 2 = 234

= 𝑛1 + 𝑛2 − 200 + 200 − 2 = 398 𝑑𝑒𝑔𝑟𝑒𝑒 𝑜𝑓 𝑓𝑟𝑒𝑒𝑑𝑜𝑚

Instructor: Ahmad Teymouri All rights Reserved

Example 2

𝜇1 − 𝜇2 = (87.87 − 51.22) ± 1.645 234 1

200 +

1

200

34.13 < 𝜇1 − 𝜇2 < 39.17

with 90% confidence, the difference in improved performance mean of the two

age groups, 21-to-30 and 31-to-40, is lower than 39.17 second and higher than

34.13 second.

Instructor: Ahmad Teymouri All rights Reserved

Example 3

A business analyst designed a survey to determine the effect of gender on the

automobile insurance rate. A random sample of young men and women was

listed in the Excel file. 178 men and 211 women were asked how many

kilometers he or she had driven in the past year. Estimate with 90% confidence

the difference between mean distance driven by male and female drivers.

Assume the variances of the distance driven by men and women drivers are not

equal 𝜎1 2 ≠ 𝜎2

2.

Instructor: Ahmad Teymouri All rights Reserved

Example 3

ത𝑋1 = σ𝑥1 𝑛1

= 3,589,962

178 = 20,168

𝑆1 = 3,609

1 − 𝛼 = 0.90

𝛼 = 0.10

𝛼

2 = 0.05

𝑡0.05 = 1.645

standard deviation of populations are unknown (assume unequal)

we use t for estimation:

ത𝑋2 = σ𝑥2 𝑛2

= 3,913,864

210 = 18,549

𝑆2 = 3,386

𝑛1 = 178

𝑛2 = 211

from t table

𝜇1 − 𝜇2 = ത𝑋1 − ത𝑋2 ± 𝑡𝛼 2

𝑠1 2

𝑛1 + 𝑠2

2

𝑛2

= ( 𝑠1

2

𝑛1 +

𝑠2 2

𝑛2 )2

( 𝑠1

2

𝑛1 )2

𝑛1 − 1 +

( 𝑠2

2

𝑛2 )2

𝑛2 − 1

𝑑𝑒𝑔𝑟𝑒𝑒 𝑜𝑓 𝑓𝑟𝑒𝑒𝑑𝑜𝑚

= ( 3,6092

178 +

3,3862

211 )2

( 3,6092

178 )2

178 − 1 +

( 3,3862

211 )2

211 − 1

𝑑𝑒𝑔𝑟𝑒𝑒 𝑜𝑓 𝑓𝑟𝑒𝑒𝑑𝑜𝑚

= 367

Instructor: Ahmad Teymouri All rights Reserved

Example 3

𝜇1 − 𝜇2 = 20,168 − 18,549 ± 1.645 3,6092

178 +

3,3862

211

1,032 < 𝜇1 − 𝜇2 < 2,207

with 90% confidence, the difference between mean distance driven by male and

female drivers is lower than 2,207 km and higher than 1,032 km.

Instructor: Ahmad Teymouri All rights Reserved

Estimate Difference Population Proportions

In some cases, the objective is to determine the difference between proportion

of two populations, 𝑝1−𝑝2.

To draw inferences about 𝑝1and 𝑝2, a sample of size 𝑛1from population 1 and a

sample of size 𝑛2 from population 2 are taken.

Population 1 Population 2

Parameter: 𝒑𝟏 Parameter: 𝒑𝟐

Statistics: ෝ𝒑𝟏 Statistics: ෝ𝒑𝟐

Sample

Size: 𝒏𝟏

Sample

Size: 𝒏𝟐

ෝ𝒑𝟏 = 𝒙𝟏 𝒏𝟏

ෝ𝒑𝟐 = 𝒙𝟐 𝒏𝟐

For each sample, the

number of successes is

represented by x, which

we label 𝒙𝟏 and 𝒙𝟐 , respectively.

Instructor: Ahmad Teymouri All rights Reserved

Estimate Difference Population Proportions

The confidence interval estimator of 𝑝1−𝑝2 is computed by the

following formula:

𝑝1−𝑝2 = ( Ƹ𝑝1− Ƹ𝑝2) ± 𝑍𝛼 2

Ƹ𝑝1(1 − Ƹ𝑝1)

𝑛1 +

Ƹ𝑝2(1 − Ƹ𝑝2)

𝑛2

Standard Error

Instructor: Ahmad Teymouri All rights Reserved

Example 4

Selling extended warranties for products is a profitable business for many

stores. The extended warranty is offered for both regular and sale prices. A

store manager has recently conducted a survey about the difference in

proportion of customers who bought extended warranty. The below table shows

the results:

Estimate with 95% confidence the difference in proportion of extended

warranties bought for regular price and sale price.

Sale Price Regular Price

Sample size 354 478

Number who bought

extended warranty

111 105

Instructor: Ahmad Teymouri All rights Reserved

Example 4

𝑥1 = 111

1 − 𝛼 = 0.95

𝛼 = 0.05

𝛼

2 = 0.025

𝑍0.025 = 1.96

𝑥2 = 105

𝑛1 = 354

𝑛2 = 478

from Z table

question is about determining the difference between proportion of two

populations.

𝑝1−𝑝2 = ( Ƹ𝑝1− Ƹ𝑝2) ± 𝑍𝛼 2

Ƹ𝑝1(1 − Ƹ𝑝1)

𝑛1 +

Ƹ𝑝2(1 − Ƹ𝑝2)

𝑛2

𝑝1−𝑝2 = (0.31 − 0.22) ± 1.96 0.31(1 − 0.31)

354 + 0.22(1 − 0.22)

478

0.06 < 𝑝1−𝑝2 < 0.12

with 95% confidence, the difference in proportion of

extended warranties bought for regular price and

sale price is lower than 12% and higher than 6%.

Instructor: Ahmad Teymouri All rights Reserved

Data Analysis Plus - Microsoft Excel

As we explained before, we can use Data Analysis Plus” Add-Ins in Microsoft

Excel.

Instructor: Ahmad Teymouri All rights Reserved

Data Analysis Plus - Microsoft Excel

Let’s answer example 2 with data analysis plus Add-Ins.

Instructor: Ahmad Teymouri All rights Reserved

Data Analysis Plus - Microsoft Excel

Instructor: Ahmad Teymouri All rights Reserved

Data Analysis Plus - Microsoft Excel

Instructor: Ahmad Teymouri All rights Reserved

Data Analysis Plus - Microsoft Excel

Let’s answer example 3 with data analysis plus Add-Ins.

Instructor: Ahmad Teymouri All rights Reserved

Data Analysis Plus - Microsoft Excel

Instructor: Ahmad Teymouri All rights Reserved

Data Analysis Plus - Microsoft Excel

Instructor: Ahmad Teymouri All rights Reserved

Data Analysis Plus - Microsoft Excel

Let’s answer example 4 with data analysis plus Add-Ins.

Instructor: Ahmad Teymouri All rights Reserved

Data Analysis Plus - Microsoft Excel

Instructor: Ahmad Teymouri All rights Reserved

Data Analysis Plus - Microsoft Excel

Instructor: Ahmad Teymouri All rights Reserved

References

• Business Statistics in Practice: Second Canadian Edition, Bowerman,

O'Connell, et al. McGraw-Hill, Third Canadian Edition

• G. Keller (2017) Statistics for Management and Economics (Abbreviated),

11th Edition, South-Western (students can also use the 8th edition of the

same textbook).

• M. Middleton (1997) Data Analysis Using Microsoft Excel, Duxbury. (A good

reference for basic statistical work with Excel.)

Thank you