You are on page 1of 10

10.

3 Interval Estimation and Hypothesis Tests for Paired Samples

Assumptions

• Paired samples are dependent samples

• The first sample values is match with second sample values

Example

– Testing a new paint mix vs an old one

– Testing difference in gas mileage comparing regular and premium gas

Interval Estimation and Hypothesis Tests for Paired Samples

Paired differences:

𝒅 = 𝒙𝟏 − 𝒙𝟐

Point of estimate for population mean paired differences (mean paired differences):
∑ 𝒅𝒊
̅=
𝒅
𝒏

Sample standard deviation for paired samples:

̅)
∑(𝒅𝒊 − 𝒅
𝒔𝒅 = √
𝒏

Confidence interval estimate of population mean paired sample

𝒔𝒅
̅ ± 𝒕𝜶,𝒅𝒇=𝒏−𝟏
𝒅
√𝒏

Ms. Khaznah Mohammed Al Khaldi – MATH 118 –Sem 442


Example (1)

A consumer magazine wishes to estimate the difference in mean mpg for vehicles that use ethanol fuel
versus non-ethanol fuel. Four vehicles were selected randomly and each vehicle was tested using
ethanol and non-ethanol fuel each car was driven 200 miles on an identical route.

Develop a 95% confidence interval estimate for the mean paired difference in mpg resulting from the
two fuels. The sample data and paired differences are shown as follows:

Ethanol Regular 𝑑𝑖 = 𝑥1 − 𝑥2
15 14 1
14 13 1
18 23 -5
16 22 -6
Total -9

Solution

𝑛 =4, ∑ 𝑑𝑖 = −9

The point of estimate (mean paired differences):


∑ 𝒅𝒊 9
̅=
𝒅 = − = −2.25
𝒏 4
Sample standard deviation

Ethanol Regular 𝑑𝑖 = 𝑥1 − 𝑥2 𝑑𝑖 − 𝑑̅ 2
(𝑑𝑖 − 𝑑̅)
15 14 1 1 − (−2.25) =3.25 10.56
14 13 1 3.25 10.56
18 23 -5 3.25 7.56
16 22 -6 -2.75 14.06
Total -9 42.75
̅)
∑(𝒅𝒊 − 𝒅 42.75
𝒔𝒅 = √ = √ = 3.26
𝒏 4

Confidence interval estimate


𝒔𝒅
̅ ± 𝒕𝜶,𝒅𝒇=𝒏−𝟏
𝒅
√𝒏
3.26
−2.25 ± 𝑡0.95,𝑑𝑓=3
√4
3.26
−2.25 ± (3.1824)
√4
−7.43 𝑚𝑝𝑔 − − − − − − − −2.93 𝑚𝑝𝑔

Ms. Khaznah Mohammed Al Khaldi – MATH 118 –Sem 442


Statistic test for paired sample
̅ − 𝝁𝒅
𝒅
𝒕𝒕𝒆𝒔𝒕 = 𝒔𝒅
√𝒏

The hypothesis testing for paired sample

Ms. Khaznah Mohammed Al Khaldi – MATH 118 –Sem 442


Example (2)

Suppose an independent test agency wishes to conduct a test to determine whether name-brand ink
cartridges generate more color pages on average than competing generic ink cartridges.

The test is conducted using paired samples. This means that the same people will use both types of
cartridges, and the pages printed in each case will be recorded 𝛼 = 0.01

𝐻𝑜 : 𝜇𝑑 ≤ 0
𝐻𝑎 : 𝜇𝑑 > 0__________one tail test (upper) , CV: +

Name-Brand Generic 𝑑𝑖 = 𝑥1 − 𝑥2 Compare between


32 20 12
28 31 -3 ̅− 𝜇𝑑
𝑑
37 28 9 𝑡𝑡𝑒𝑠𝑡 = 𝑠𝑑 and 𝑡𝛼,𝑑𝑓
20 26 √𝑛
-6
37 26 11
36 33 3
Total 26
Mean paired differences
∑ 𝒅𝒊 26
̅=
𝒅 = = 4.33
𝒏 6
Standard deviation of the paired differences

Name-Brand Generic 𝑑𝑖 = 𝑥1 − 𝑥2 𝑑𝑖 − 𝑑̅ (𝑑𝑖 − 𝑑̅)


2

32 20 12 7.67 58.82
28 31 -3 -7.33 53.72
37 28 9 4.67 21.80
20 26 -6 -10.33 106.70
37 26 11 6.67 44.48
36 33 3 -1.33 1.76
Total 26 287.28
̅)
∑(𝒅𝒊 − 𝒅 287.28
𝒔𝒅 = √ = √ = 6.91
𝒏 6

Test statistic:
̅ − 𝝁𝒅
𝒅 4.33 − 0
𝒕𝒕𝒆𝒔𝒕 = 𝒔𝒅 = 6.91 = 1.53
√𝒏 √6
Critical value:

𝒕𝜶,𝒅𝒇=𝒏−𝟏 = 𝑡0.01,5 = 3.3649

Ms. Khaznah Mohammed Al Khaldi – MATH 118 –Sem 442


Conclusion:

𝑡𝑡𝑒𝑠𝑡 = 1.53 < 𝑡𝑐𝑣 = 3.3649


Don’t reject the null hypothesis OR Accept the null hypothesis.

- There is enough( sufficient ) evidence to conclude that the population paired sample mean is
less than or equal zero

OR

- There is not enough( insufficient ) evidence to conclude that the population paired sample mean
is greater than zero

10.4 Estimation and Hypothesis Tests for Two Population Proportions

Assumptions

- ̅𝟏 ≥ 𝟓
𝒏𝟏 𝒑 ̅𝟏 ) ≥ 𝟓
→ 𝒏𝟏 (𝟏 − 𝒑

- ̅𝟐 ≥ 𝟓
𝒏𝟏 𝒑 ̅𝟐 ) ≥ 𝟓
→ 𝒏𝟏 (𝟏 − 𝒑

The point of estimate:

̅𝟏 − 𝒑
𝒑 ̅𝟐

Confidence interval estimate for 𝑝1 − 𝑝2

𝒑̅ 𝟏 (𝟏 − 𝒑
̅𝟏 ) 𝒑̅ 𝟐 (𝟏 − 𝒑
̅𝟐 )
(𝒑 ̅ 𝟐 ) ± 𝒛𝜶 √
̅𝟏 − 𝒑 +
𝒏𝟏 𝒏𝟐

Ms. Khaznah Mohammed Al Khaldi – MATH 118 –Sem 442


Example (3)

An outdoor sports publication wishes estimate the difference between male and female bicycle
enthusiasts in terms of how they rate the quality of new high-end mountain bike. A random sample of
425 men and 370 women were asked to rate the bike and the editors counted the number of each
gender who rated the bike as “very high” quality. The following shows the results:

Men Women
n1 = 425 n2 = 370
x1 = 240 x2 = 196
The sample proportions 𝑧𝛼 = 1.96
𝒙𝟏 240 𝒙𝟐 196
̅𝒑̅̅𝟏̅ = = = 0.564 ̅𝒑̅̅𝟐̅ = = = 0.529
𝒏𝟏 425 𝒏𝟐 370

The point of estimate for population proportion

̅𝒑̅̅𝟏̅ − ̅𝒑̅̅𝟐̅ = 0.564 − 0.529 = 0.035

Estimate 95% of confidence interval estimate

𝒑̅ 𝟏 (𝟏 − 𝒑
̅𝟏 ) 𝒑̅ 𝟐 (𝟏 − 𝒑
̅𝟐 )
(𝒑 ̅ 𝟐 ) ± 𝒛𝜶 √
̅𝟏 − 𝒑 +
𝒏𝟏 𝒏𝟐

0.564(1 − 0.564) 0.529(1 − 0.529)


0.035 ± 1.96 √ +
425 370

0.035 ± 1.96 (0.035)

−0.0336____________________________0.1036

Ms. Khaznah Mohammed Al Khaldi – MATH 118 –Sem 442


Pooled estimator for overall proportion:

̅ 𝟏 + 𝒏𝟐 𝒑
𝒏𝟏 𝒑 ̅ 𝟐 𝒙𝟏 + 𝒙𝟐
̅=
𝒑 =
𝒏𝟏 + 𝒏𝟐 𝒏𝟏 + 𝒏𝟐

Z test statistic for 𝑝1 − 𝑝2

(𝒑 ̅ 𝟐 ) − (𝒑𝟏 − 𝒑𝟐 )
̅𝟏 − 𝒑
𝒛=
𝟏 𝟏
̅ (𝟏 − 𝒑
√𝒑 ̅) ( + )
𝒏 𝟏 𝒏𝟐

Ms. Khaznah Mohammed Al Khaldi – MATH 118 –Sem 442


Example:

The Transportation Security Administration (TSA) is responsible for transportation security at all U.S.
airports. The TSA is evaluating two suppliers of a body-scanning system it is considering purchasing. Both
companies have designed scanners with the ability to detect weapons that are made of nonmetallic
materials. The TSA is interested in determining whether there is a difference in the proportions of
nonmetallic weapons detected by scanners from the two suppliers. Test the hypothesis.

𝛼 = 0.02

Supplier 1 Supplier 2
n1 = 200 n2 = 200
x1 = 186 x2 = 168

The hypothesis

𝐻𝑜 : 𝑝1 − 𝑝2 = 0
𝐻𝑎 : 𝑝1 − 𝑝2 ≠ 0 _________ two tails, CV=+/-

Sample proportions
𝒙𝟏 186 𝒙𝟐 168
̅𝒑̅̅𝟏̅ = = = 0.93 ̅𝒑̅̅𝟐̅ = = = 0.84
𝒏𝟏 200 𝒏𝟐 200
Pooled estimator
𝒙𝟏 + 𝒙𝟐 186 + 168
̅=
𝒑 = = 0.885
𝒏𝟏 + 𝒏𝟐 200 + 200
Test statistic
(𝒑 ̅ 𝟐 ) − (𝒑𝟏 − 𝒑𝟐 )
̅𝟏 − 𝒑
𝒛=
𝟏 𝟏
̅ (𝟏 − 𝒑
√𝒑 ̅) ( + )
𝒏 𝟏 𝒏𝟐
(0.93 − 0.84) − 0
𝑧𝑡𝑒𝑠𝑡 = = 2.82
√0.885(1 − 0.885) ( 1 + 1 )
200 200
Critical value
𝛼
- Area = 0.5 − = 0.5 − 0.01 = 0.49
2
- 𝑧𝛼 = 𝑟𝑜𝑤 + 𝑐𝑜𝑙 = ± 2.32
Conclusion

𝑧𝛼 = 2.32 < 𝑧𝑡𝑒𝑠𝑡 = 2.82


Reject the null hypothesis OR don’t accept the null hypothesis

Ms. Khaznah Mohammed Al Khaldi – MATH 118 –Sem 442


Ms. Khaznah Mohammed Al Khaldi – MATH 118 –Sem 442
Ms. Khaznah Mohammed Al Khaldi – MATH 118 –Sem 442

You might also like