Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

MAK211E Probability and Statistics

Applied Statistics and


Probability for Engineers
Sixth Edition
Douglas C. Montgomery • George C. Runger

Chapter 8

İTÜ MAK211E Probability and Statistics 2023 Fall 1


Statistical Intervals for a Single Sample (Chap 8)
• Confidence Interval
• Tolerance Interval
• Prediction Interval
• Confidence Interval on the Mean, Variance Known
• Confidence Interval on the Mean, Variance Unknown
• Confidence Interval on the Variance
• Large-Sample Conf. Inter. for a Population Proportion
• Guidelines for Constructing Confidence Intervals

İTÜ MAK211E Probability and Statistics 2023 Fall 2


Confidence Interval
An interval estimate for a population parameter

Example: Average height of a population


Use small number of people and estimate an interval
with a given probability

Average height will be between 173 and 181 cm with


95% probability

İTÜ MAK211E Probability and Statistics 2023 Fall 3


Tolerance Interval
Bounds a selected proportion of a distribution

Example: Average height of a population


Use small number of people and estimate an interval
with a given probability

80% of people will be between 168 and 186 cm

İTÜ MAK211E Probability and Statistics 2023 Fall 4


Prediction Interval

Bounds future observations from the population or distribution

Example: Average height of a population


Use small number of people and estimate an interval with a given probability

The next person will be between 168 and 186 cm with 80% probability

The Prediction interval for large sample size goes to the Tolerance interval

İTÜ MAK211E Probability and Statistics 2023 Fall 5


Confidence Interval on the Mean, Variance Known
Random sample 𝑋1 , 𝑋2 , … , 𝑋𝑛 from a normal distribution with unknown mean μ and known
variance σ2 . The sample mean 𝑋ത is normally distributed with mean μ and variance σ2 /𝑛

𝑋ത − μ
𝑍=
σ/ 𝑛
is the Standard Normal Distribution

Confidence Interval

𝑃 𝐿 ≤μ≤𝑈 =1−α 𝑤ℎ𝑒𝑟𝑒 0 ≤ α ≤ 1

1 − α is confidence coefficient
𝑋ത − μ
𝑃 −𝑧α/2 ≤ ≤ 𝑧α/2 = 1 − α
σ/ 𝑛

𝑃 𝑋ത − 𝑧α/2 σ/ 𝑛 ≤ μ ≤ 𝑋ത + 𝑧α/2 σ/ 𝑛 = 1 − α

İTÜ MAK211E Probability and Statistics 2023 Fall 6


Confidence Interval on the Mean, Variance Known
Example: Sample heights 170, 172,175, 177, 177, 177, 179, 182, 184 cm

Population mean μ is not known but population standard deviation σ = 6 cm

Sample size 𝑛 = 9
Sample mean 𝑋ത = 177 𝑐𝑚
Sample standard deviation 𝑆 = 4.4 cm

α = 0.05 → 𝑧α/2 = 1.96

𝑃 𝑋ത − 𝑧α/2 σ/ 𝑛 ≤ μ ≤ 𝑋ത + 𝑧α/2 σ/ 𝑛 = 1 − α

𝑃 177 − 1.96 ∗ 2 ≤ μ ≤ 177 + 1.96 ∗ 2 = 0.95

Average height of the population will be between 173 and 181 cm with 95% probability

İTÜ MAK211E Probability and Statistics 2023 Fall 7


Confidence Interval on the Mean, Variance Known
To calculate 95% Confidence Interval
from standard normal distribution

α
= 0.025
2

1 − 0.025 = 0.975

𝑧α/2 = 1.96

ϕ 1.96 = 0.975002

İTÜ MAK211E Probability and Statistics 2023 Fall 8


Confidence Interval on the Mean, Variance Known
Choice of Sample Size n

Error
𝐸 = |𝑋ത − μ|

2
𝑛 = 𝑧α/2 σ/𝐸

Example:
𝐸 = 2 𝑐𝑚 σ = 6 𝑐𝑚 α = 0.05 → 𝑧α/2 = 1.96

𝑛 = 1.96 ∗ 6/2 2 = 34.57 ~ 35

𝐸 = 4 𝑐𝑚 σ = 6 𝑐𝑚 α = 0.05 → 𝑧α/2 = 1.96

𝑛 = 1.96 ∗ 6/4 2 = 8.64 ~ 9

İTÜ MAK211E Probability and Statistics 2023 Fall 9


Confidence Interval on the Mean, Variance Known
One sided Confidence Bounds

Upper Confidence Bound


𝑃 μ ≤ 𝑋ത + 𝑧α σ/ 𝑛 = 1 − α

Lower Confidence Bound


𝑃 𝑋ത − 𝑧α σ/ 𝑛 ≤ μ = 1 − α

Example: Sample heights 170, 172,175, 177, 177, 177, 179, 182, 184 cm

Population mean μ is not known but population standard deviation σ = 6 cm


Sample size 𝑛 = 9
Sample mean 𝑋ത = 177 𝑐𝑚
α = 0.05 → 1 − α = 0.95 → 𝑧α = 1.64

𝑃 μ ≤ 177 + 1.64 ∗ 2 = 0.95

Average height is less than 180.28 cm with 95% probability

İTÜ MAK211E Probability and Statistics 2023 Fall 10


Confidence Interval on the Mean, Variance Known
General Method for Confidence Interval for an unknown parameter θ

Consider random sample 𝑋1 , 𝑋2 , … , 𝑋𝑛 and a statistic g(𝑋1 , 𝑋2 , … , 𝑋𝑛 , θ) whose probability distribution


does not depend on θ or any other unknown parameter.
Example:
𝑋ത − μ
θ=μ g 𝑋1 , 𝑋2 , … , 𝑋𝑛 , θ =
σ/ 𝑛

𝑃 𝐶𝐿 ≤ g 𝑋1 , 𝑋2 , … , 𝑋𝑛 , θ ≤ 𝐶𝑈 = 1 − α
Example:
𝐶𝐿 = −𝑧α/2 𝐶𝑈 = 𝑧α/2

𝑃 L(𝑋1 , 𝑋2 , … , 𝑋𝑛 ) ≤ θ ≤ U(𝑋1 , 𝑋2 , … , 𝑋𝑛 ) = 1 − α

Example:
𝑃 𝑋ത − 𝑧α/2 σ/ 𝑛 ≤ μ ≤ 𝑋ത + 𝑧α/2 σ/ 𝑛 = 1 − α

İTÜ MAK211E Probability and Statistics 2023 Fall 11


Confidence Interval on the Mean, Variance Known(?)
Large Sample Confidence Interval for μ

𝑆 Sample Standard Deviation


𝑋ത − μ
𝑍=
𝑆/ 𝑛

𝑃 𝑋ത − 𝑧α/2 𝑆/ 𝑛 ≤ μ ≤ 𝑋ത + 𝑧α/2 𝑆/ 𝑛 = 1 − α

Good approximation when

𝑛 > 40

İTÜ MAK211E Probability and Statistics 2023 Fall 12


Confidence Interval on the Mean, Variance Unknown
Random sample 𝑋1 , 𝑋2 , … , 𝑋𝑛 from a normal distribution with unknown mean μ and unknown variance σ2 .

𝑛 small
𝑋ത Sample Mean
𝑆 Sample Standard Deviation
𝑋ത − μ
𝑇=
𝑆/ 𝑛

t distribution with 𝑘 = 𝑛 − 1 degrees of freedom.

𝑘+1
Г 1
2
𝑓 𝑥 = 𝑘+1 −∞<𝑥 <∞
𝑘
π𝑘Г 2 𝑥2 2
+1
𝑘

İTÜ MAK211E Probability and Statistics 2023 Fall 13


Student’s t distribution
t distribution with 𝑘 degrees of freedom.

1
Г is Gamma function: Г 𝑛 = 𝑛−1 ! Г = π
2

𝑘+1
Г 1
2
𝑓 𝑥 = 𝑘+1 −∞<𝑥 <∞
𝑘
π𝑘Г 2 𝑥2 2
+1
𝑘

E 𝑋 =0 𝑘>1

𝑘
V 𝑋 = 𝑘>2
𝑘−2

İTÜ MAK211E Probability and Statistics 2023 Fall 14


Student’s t distribution
t distribution with 𝑘 degrees of freedom.
𝑘+1
Г 1
2
𝑓 𝑥 = 𝑘+1 −∞<𝑥 <∞
𝑘
π𝑘Г 2 𝑥2 2
+1
𝑘

1
𝑘=1 𝑓 𝑥 =
π(𝑥 2 + 1)

3
1 2
𝑘=2 𝑓 𝑥 =
𝑥2 + 2

Standard normal distribution in the limit


𝑥2
−2
𝑒
𝑘→∞ 𝑓 𝑥 →

İTÜ MAK211E Probability and Statistics 2023 Fall 15


Student’s t distribution
t distribution with 𝑘 degrees of freedom.

1
𝑘=1 𝑓 𝑥 =
π(𝑥 2 + 1)

3
1 2
𝑘=2 𝑓 𝑥 =
𝑥2 + 2

𝑃 𝑇1 > 1.0 = 0.25

𝑃 𝑇2 > 1.88562 = 0.1

İTÜ MAK211E Probability and Statistics 2023 Fall 16


Confidence Interval on the Mean, Variance Unknown
Small Sample Confidence Interval for μ
𝑋ത − μ
𝑇=
𝑆/ 𝑛

𝑃 𝑋ത − 𝑡α/2 𝑆/ 𝑛 ≤ μ ≤ 𝑋ത + 𝑡α/2 𝑆/ 𝑛 = 1 − α

Example:
{8.6, 9.4, 7.9, 6.8, 8.3, 7.3, 9.2, 9.6, 8.7, 11.4, 10.3, 5.4, 8.1, 5.5, 6.9}

𝑛 = 15, 𝑋ത = 8.227, 𝑆 = 1.672


1 − α = 0.95 α = 0.05 α/2 = 0.025
𝑘 = 𝑛 − 1 = 14, 𝑡α/2 = 2.145

𝑡𝛼 𝑆 2.145 ∗ 1.672
2
= = 0.926
𝑛 15
8.227 − 0.926 ≤ μ ≤ 8.227 + 0.926

7.301 ≤ μ ≤ 9.153
With 95% confidence
İTÜ MAK211E Probability and Statistics 2023 Fall 17
Confidence Interval on the Variance
Random sample 𝑋1 , 𝑋2 , … , 𝑋𝑛 from a normal distribution with mean μ, variance σ2 and sample variance 𝑆 2

Random variable
2
𝑛 − 1 𝑆2
𝑋 =
σ2

𝜒 2 distribution with 𝑘 = 𝑛 − 1 degrees of freedom

1 𝑘/2 −1 𝑒 −𝑥/2
𝑓 𝑥 = 𝑥 𝑥>0
2𝑘/2 Г 𝑘/2

E 𝑋2 = 𝑘

V 𝑋 2 = 2𝑘

İTÜ MAK211E Probability and Statistics 2023 Fall 18


2
𝜒 distribution
1 𝑘/2 −1 𝑒 −𝑥/2
𝑓 𝑥 = 𝑥 𝑥>0
2𝑘/2 Г 𝑘/2

𝑒 −𝑥/2
𝑘=1→ 𝑓 𝑥 =
2π𝑥

𝑒 −𝑥/2
𝑘=2→ 𝑓 𝑥 =
2

İTÜ MAK211E Probability and Statistics 2023 Fall 19


Confidence Interval on the Variance
2
𝑛 − 1 𝑆2
𝑋 =
σ2
2 2
𝑃 𝜒1−α/2,𝑛−1 ≤ 𝑋 2 ≤ 𝜒α/2,𝑛−1 =1−α

2 𝑛 − 1 𝑆2 2
𝑃 𝜒1−α/2,𝑛−1 ≤ ≤ 𝜒α/2,𝑛−1 = 1−α
σ2

𝑛 − 1 𝑆2 2
𝑛 − 1 𝑆2
𝑃 2 ≤σ ≤ 2 =1−α
𝜒α/2,𝑛−1 𝜒1−α/2,𝑛−1

One sided
2
𝑛 − 1 𝑆
𝑃 σ2 ≤ 2 =1−α
𝜒1−α,𝑛−1

𝑛 − 1 𝑆2
𝑃 2 ≤ σ2 = 1 − α
𝜒α,𝑛−1

İTÜ MAK211E Probability and Statistics 2023 Fall 20


Confidence Interval on the Variance
Example:
𝑛 − 1 𝑆2
𝑃 σ2 ≤ 2 =1−α
𝜒1−α,𝑛−1

𝑛 = 20, 𝑆 2 = 0.0153,1 − α = 0.95

2
𝜒0.95,19 = 10.12

19 ∗ 0.0153
σ2 ≤ = 0.02872
10.12

σ ≤ 0.1695

İTÜ MAK211E Probability and Statistics 2023 Fall 21


Large-Sample Confidence Interval for a Population Proportion
Normal approximation for a binomial proportion

Random sample size 𝑛 from large population and 𝑋 observation belongs to a class

𝑋
𝑃෠ = 𝑖𝑠 𝑎𝑛 𝑒𝑠𝑡𝑖𝑚𝑎𝑡𝑜𝑟 𝑓𝑜𝑟 𝑝
𝑛

For large 𝑛
𝑋 − 𝑛𝑝 𝑋/𝑛 − 𝑝 𝑃෠ − 𝑝
𝑍= = =
𝑛𝑝 1 − 𝑝 𝑝 1 − 𝑝 /𝑛 𝑝 1 − 𝑝 /𝑛

Is approximately standard normal distribution

İTÜ MAK211E Probability and Statistics 2023 Fall 22


Large-Sample Confidence Interval for a Population Proportion
Approximate Confidence Interval for a binomial proportion

𝑃෠ − 𝑝
𝑍=
𝑝 1 − 𝑝 /𝑛
Confidence interval for 𝑝
𝑃 −𝑧α/2 ≤ 𝑍 ≤ 𝑧α/2 ≅ 1 − α

𝑃෠ − 𝑝
𝑃 −𝑧α/2 ≤ ≤ 𝑧α/2 ≅ 1 − α
𝑝 1 − 𝑝 /𝑛

𝑝 1−𝑝 𝑝 1−𝑝
𝑃 𝑃෠ − 𝑧𝛼 ≤ 𝑝 ≤ 𝑃෠ + 𝑧𝛼 ≅ 1−α
2 𝑛 2 𝑛

𝑃෠ 1 − 𝑃෠ 𝑃෠ 1 − 𝑃෠
𝑃 𝑃෠ − 𝑧𝛼 ≤ 𝑝 ≤ 𝑃෠ + 𝑧𝛼 ≅1−α
2 𝑛 2 𝑛
İTÜ MAK211E Probability and Statistics 2023 Fall 23
Large-Sample Confidence Interval for a Population Proportion

𝑃෠ 1 − 𝑃෠ 𝑃෠ 1 − 𝑃෠
𝑃 𝑃෠ − 𝑧𝛼 ≤ 𝑝 ≤ 𝑃෠ + 𝑧𝛼 ≅1−α
2 𝑛 2 𝑛
Example:

𝑛 = 85, 𝑋 = 10, 1 − α = 0.95

𝑋 10
𝑃෠ = =
𝑛 85

10 10 10 10
10 1 − 10 1 −
𝑃 − 1.96 85 85 ≤𝑝≤ + 1.96 85 85 ≅ 0.95
85 85 85 85

0.05 ≤ 𝑝 ≤ 0.22
With 95% confidence

İTÜ MAK211E Probability and Statistics 2023 Fall 24


Large-Sample Confidence Interval for a Population Proportion
One sided

𝑃෠ 1 − 𝑃෠
𝑃 𝑝 ≤ 𝑃෠ + 𝑧𝛼 ≅1−α
𝑛

𝑃෠ 1 − 𝑃෠
𝑃 𝑃෠ − 𝑧𝛼 ≤𝑝 ≅1−α
𝑛

İTÜ MAK211E Probability and Statistics 2023 Fall 25


Large-Sample Confidence Interval for a Population Proportion
Sample size for a specified error E

𝑝 1−𝑝 𝑧𝛼/2 2
𝐸 = 𝑧𝛼/2 → 𝑛= 𝑝 1−𝑝
𝑛 𝐸

If 𝑝 is unknown than we can use 𝑃෠

1
Or 𝑛𝑚𝑎𝑥 when 𝑝 = 2

𝑧𝛼/2 2
𝑛= 0.25
𝐸

İTÜ MAK211E Probability and Statistics 2023 Fall 26


Large-Sample Confidence Interval for a Population Proportion
Election Poll: How many people do I need to make less than 1% error with 95% confidence

𝛼 = 0.05 → 𝑧𝛼/2 = 1.96, 𝐸 = 0.01

1
a𝑠𝑠𝑢𝑚𝑖𝑛𝑔 𝑝 = 2

21 2
𝑧𝛼/2 1.96 1
𝑛= = = 9604
𝐸 4 0.01 4

𝐸 = 0.001 → 𝑛 = 960400

If you want to make less then 0.1% percent error with 95% confidence you need 1 million people!

İTÜ MAK211E Probability and Statistics 2023 Fall 27


Guidelines for Constructing Confidence Intervals

İTÜ MAK211E Probability and Statistics 2023 Fall 28

You might also like