chapter 2: random variables (cont d)site.iugaza.edu.ps/ymadhoun/files/2016/09/lecture-08.pdf ·...
TRANSCRIPT
Civil Engineering Department: Engineering Statistics (ECIV 2005)
Engr. Yasser M. Almadhoun Page 1
Chapter 2: Random Variables (Cont’d)
Section 2.2: Continuous Random Variables
Problem (1): A random variable X takes values between 4 and 6 with a probability
density function:
𝑓(𝑥) =1
𝑥 𝑙𝑛(1.5) 𝑓𝑜𝑟 4 ≤ 𝑥 ≤ 6
𝑓(𝑥) = 0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
(a) Make a sketch of the probability density function.
(b) Check that the total area under the probability density function is
equal to 1.
(c) What is P(4.5 ≤ X ≤ 5.5)?
(d) Construct and sketch the cumulative distribution function.
(problem 2.2.2 in textbook)
Solution:
𝒙
𝒇(𝒙)
Civil Engineering Department: Engineering Statistics (ECIV 2005)
Engr. Yasser M. Almadhoun Page 2
𝐴𝑟𝑒𝑎 𝑢𝑛𝑑𝑒𝑟 𝑡ℎ𝑒 𝑃𝐷𝐹 = ∫ 𝑓(𝑥)6
4
= ∫1
𝑥 𝑙𝑛(1.5)
6
4
= [ln(𝑥)
𝑙𝑛(1.5)]
4
6
= [ln(6)
𝑙𝑛(1.5)−
ln(4)
𝑙𝑛(1.5)] = 1.0 (𝑂𝑘)
≤ ≤ =
𝑃(4.5 ≤ 𝑋 ≤ 5.5) = ∫ 𝑓(𝑥)5.5
4.5
= ∫1
𝑥 𝑙𝑛(1.5)
5.5
4.5
= [𝑙𝑛(𝑥)
𝑙𝑛(1.5)]
4.5
5.5
= [ln(5.5)
𝑙𝑛(1.5)−
ln(4.5)
𝑙𝑛(1.5)] = 0.4949
𝐹(𝑥) = ∫ 𝑓(𝑥)𝑥
4
= ∫1
𝑦 𝑙𝑛(1.5)
𝑥
4
𝑑𝑦 = [ln(𝑦)
𝑙𝑛(1.5)]
4
𝑋
= [ln(𝑋)
𝑙𝑛(1.5)−
ln(4)
𝑙𝑛(1.5)]
𝐹(𝑥) =ln(𝑥) − ln(4)
ln(1.5) 𝑓𝑜𝑟 4 ≤ 𝑥 ≤ 6
𝒙
𝑭(𝒙)
Civil Engineering Department: Engineering Statistics (ECIV 2005)
Engr. Yasser M. Almadhoun Page 3
Problem (2): A random variable X takes values between –2 and 3 with a probability
density function:
15
64+
𝑥
64 − 2 ≤ 𝑥 ≤ 0
𝑓(𝑥) = 3
8+ 𝑐𝑥 0 ≤ 𝑥 ≤ 3
0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
(a) Find the value of c and sketch the probability density function.
(b) What is P(−1 ≤ X ≤ 1)?
(c) Construct and sketch the cumulative distribution function.
(problem 2.2.3 in textbook)
Solution:
𝐴𝑟𝑒𝑎 𝑢𝑛𝑑𝑒𝑟 𝑡ℎ𝑒 𝑃𝐷𝐹 = ∫ 𝑓(𝑥)0
−2
+ ∫ 𝑓(𝑥)3
0
1.0 = ∫ (15
64+
𝑥
64)
0
−2
+ ∫ (3
8+ 𝑐𝑥)
3
0
1.0 = [15
64𝑥 +
𝑥2
128]
−2
0
+ [3
8𝑥 +
𝑐𝑥2
2]
0
3
1.0 = [(15
64(0) +
(0)2
128) − (
15
64(−2) +
(−2)2
128)]
+ [(3
8(3) +
𝑐 × (3)2
2) − (
3
8(0) +
𝑐 × (0)2
2)]
𝑐 = −1
8
15
64+
𝑥
64 − 2 ≤ 𝑥 ≤ 0
𝑓(𝑥) = 3
8−
𝑥
8 0 ≤ 𝑥 ≤ 3
0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
Civil Engineering Department: Engineering Statistics (ECIV 2005)
Engr. Yasser M. Almadhoun Page 4
𝒙
𝒇(𝒙)
− ≤ ≤
𝑃(−1 ≤ 𝑋 ≤ 1) = ∫ (15
64+
𝑥
64)
0
−1
+ ∫ (3
8−
𝑥
8)
1
0
=69
128
∫ (15
64+
𝑦
64)
𝑥
−2
=15
64𝑥 +
𝑥2
128+
7
16 − 2 ≤ 𝑥 ≤ 0
𝐹(𝑥) = 7
16+ ∫ (
3
8−
𝑦
8)
𝑥
0
= 7
16+
3
8𝑥 −
𝑥2
16 0 ≤ 𝑥 ≤ 3
0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
𝒙
𝑭(𝒙)
Civil Engineering Department: Engineering Statistics (ECIV 2005)
Engr. Yasser M. Almadhoun Page 5
Problem (3): A random variable X takes values between 0 and 4 with a cumulative
distribution function:
𝐹(𝑥) =𝑥2
16 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ 4
(a) Sketch the cumulative distribution function.
(b) What is P(X ≤ 2)?
(c) What is P(1 ≤ X ≤ 3)?
(d) Construct and sketch the probability density function.
(problem 2.2.4 in textbook)
Solution:
𝒙
𝑭(𝒙)
≤ = ≤
𝐹(𝑋 = 2) =22
16= 0.25
≤ ≤ = = ≤ ≤
𝑃(1 ≤ 𝑋 ≤ 3) = 𝐹(𝑋 = 3) − 𝐹(𝑋 = 1) =32
16−
12
16= 0.50
Civil Engineering Department: Engineering Statistics (ECIV 2005)
Engr. Yasser M. Almadhoun Page 6
𝑓(𝑥) =𝑑𝐹(𝑥)
𝑑𝑥=
𝑑(𝑥2/16)
𝑑𝑥=
2𝑥
16=
𝑥
8 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ 4
𝒙
𝒇(𝒙)
Problem (4):
A random variable X takes values between 0 and ∞ with a cumulative
distribution function:
𝐹(𝑥) = 𝐴 + 𝐵𝑒−𝑥 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ ∞
(a) Find the values of A and B and sketch the cumulative distribution
function.
(b) What is P(2 ≤ X ≤ 3)?
(c) Construct and sketch the probability density function.
(problem 2.2.5 in textbook)
Solution:
𝐹(∞) = 1.0
𝐴 + 𝐵 𝑒−𝑥 = 1.0
𝐴 = 1.0
𝐹(0) = 0.0
𝐴 + 𝐵 𝑒−𝑥 = 0.0
Civil Engineering Department: Engineering Statistics (ECIV 2005)
Engr. Yasser M. Almadhoun Page 7
1 + 𝐵 = 0.0
𝐵 = −1.0
𝐹(𝑥) = 1 − 𝑒−𝑥 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ ∞
𝒙
𝑭(𝒙)
≤ ≤ = = ≤ ≤
𝑃(2 ≤ 𝑋 ≤ 3) = 𝐹(𝑋 = 3) − 𝐹(𝑋 = 2)
= (1 − 𝑒−3) − (1 − 𝑒−2)
= 0.9502 − 0.8647 = 0.0855
𝑓(𝑥) =𝑑𝐹(𝑥)
𝑑𝑥=
𝑑(1 − 𝑒−𝑥)
𝑑𝑥= 𝑒−𝑥 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ ∞
𝑓(𝑥) = 𝑒−𝑥 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ ∞
𝒙
𝒇(𝒙)
Civil Engineering Department: Engineering Statistics (ECIV 2005)
Engr. Yasser M. Almadhoun Page 8
Problem (5): A random variable X takes values between 0 and ∞ with a cumulative
distribution function:
𝐹(𝑥) = 𝐴 + 𝐵𝑒−𝑥 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ ∞
(a) Find the value of both A and B.
(b) What is the probability that the random variable X takes a value
between 1 and 7.
(c) Find the probability density function.
(Question 4 (7 points): in Midterm Exam 2010)
Solution:
𝐹(∞) = 1.0
𝐴 + 𝐵 𝑒−𝑥 = 1.0
𝐴 = 1.0
𝐹(0) = 0.0
𝐴 + 𝐵𝑒−𝑥 = 0.0
1 + 𝐵 = 0.0
𝐵 = −1.0
𝐹(𝑥) = 1 − 𝑒−𝑥 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ ∞
Civil Engineering Department: Engineering Statistics (ECIV 2005)
Engr. Yasser M. Almadhoun Page 9
𝒙
𝑭(𝒙)
≤ ≤ = = ≤ ≤
𝑃(1 ≤ 𝑋 ≤ 7) = 𝐹(𝑋 = 7) − 𝐹(𝑋 = 1)
= (1 − 𝑒−7) − (1 − 𝑒−1)
= 0.9991 − 0.6321 = 0.3670
𝑓(𝑥) =𝑑𝐹(𝑥)
𝑑𝑥=
𝑑(1 − 𝑒−𝑥)
𝑑𝑥= 𝑒−𝑥 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ ∞
𝑓(𝑥) = 𝑒−𝑥 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ ∞
𝒙
𝒇(𝒙)
Civil Engineering Department: Engineering Statistics (ECIV 2005)
Engr. Yasser M. Almadhoun Page 10
Problem (6): Suppose that the random variable X is the time taken by a garage to
service a car. These times are distributed between 0 and 10 hours with a
cumulative distribution function:
𝐹(𝑥) = 𝐴 + 𝐵 𝑙𝑛(3𝑥 + 2) 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ 10.
(a) Find the values of A and B and sketch the cumulative distribution
function.
(b) What is the probability that a repair job takes longer than two
hours?
(c) Construct and sketch the probability density function.
(problem 2.2.7 in textbook)
Solution:
𝐹(10) = 1.0
𝐴 + 𝐵 𝑙𝑛(3 × 10 + 2) = 1.0
𝐴 + 𝐵 ln (32) = 1.0
𝐹(0) = 0.0
𝐴 + 𝐵 𝑙𝑛(3 × 0 + 2) = 0.0
𝐴 + 𝐵 ln (2) = 0.0
𝐴 = −0.25
Civil Engineering Department: Engineering Statistics (ECIV 2005)
Engr. Yasser M. Almadhoun Page 11
𝐵 = 0.3607
𝐹(𝑥) = −0.25 + 0.3607 𝑙𝑛(3𝑥 + 2) 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ 10
𝒙
𝑭(𝒙)
≤
𝑃(𝑋 > 2) = 1 − 𝐹(𝑋 = 2)
= 1 − [−0.25 + 0.3607 𝑙𝑛(3 × 2 + 2)]
= 1 − 0.5007 = 0.4993
𝑓(𝑥) =𝑑𝐹(𝑥)
𝑑𝑥=
𝑑(−0.25 + 0.3607 𝑙𝑛(3𝑥 + 2))
𝑑𝑥=
0.3607 × 3
3𝑥 + 2
𝑓(𝑥) =1.0821
3𝑥 + 2 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ 10
𝒙
𝒇(𝒙)
Civil Engineering Department: Engineering Statistics (ECIV 2005)
Engr. Yasser M. Almadhoun Page 12
Problem (7): The resistance X of an electrical component has a probability density
function:
𝑓 (𝑥) = 𝐴𝑥(130 − 𝑥2)
for resistance values in the range 10 ≤ x ≤ 11.
(a) Calculate the value of the constant A.
(b) Calculate the cumulative distribution function.
(c) What is the probability that the electrical component has a
resistance between 10.25 and 10.5?
(problem 2.2.11 in textbook)
Solution:
𝐴𝑟𝑒𝑎 𝑢𝑛𝑑𝑒𝑟 𝑃𝐷𝐹 = ∫ 𝑓 (𝑥)11
10
= ∫ 𝐴𝑥(130 − 𝑥2)11
10
= 1.0
∫ (130𝐴𝑥 − 𝑥2𝐴𝑥)11
10
= 1.0
[130𝐴𝑥2
2−
𝐴𝑥4
4]
10
11
= 1.0
[130𝐴(11)2
2−
𝐴(11)4
4] − [
130𝐴(10)2
2−
𝐴(10)4
4] = 1.0
Civil Engineering Department: Engineering Statistics (ECIV 2005)
Engr. Yasser M. Almadhoun Page 13
𝐴 =4
819
𝑓(𝑥) =4𝑥
819(130 − 𝑥2) 𝑓𝑜𝑟 10 ≤ 𝑥 ≤ 11
𝐹(𝑥) = ∫ 𝑓(𝑥)𝑥
10
= ∫4𝑦
819(130 − 𝑦2)
𝑥
10
𝐹(𝑥) = [130 (
4819) 𝑦2
2−
(4
819) 𝑦4
4]
10
𝑥
𝐹(𝑥) =130 (
4819) 𝑥2
2−
(4
819) 𝑥4
4−
16000
819 𝑓𝑜𝑟 10 ≤ 𝑥 ≤ 11
≤ ≤ ≤ ≤
𝑃(10.25 ≤ 𝑋 ≤ 10.5) = 𝐹(𝑋 = 10.5) − 𝐹(𝑋 = 10.25)
= 𝑓(𝑋 ≤ 10.5) − 𝑓(𝑋 ≤ 10.25)
= (130 (
4819) 10.52
2−
(4
819) 10.54
4−
16000
819)
− (130 (
4819) 10.252
2−
(4
819) 10.254
4−
16000
819)
= 0.6226 − 0.3396
= 0.2830
Civil Engineering Department: Engineering Statistics (ECIV 2005)
Engr. Yasser M. Almadhoun Page 14
Problem (8): The resistance X of an electrical component has a probability density
function:
𝑓 (𝑥) = 𝐴(2𝑥 + 1) 𝑓𝑜𝑟 1 ≤ 𝑥 ≤ 2
(a) Find the value of A?
(b) Find the cumulative ditribution function?
(Question 1: in Midterm Exam 2005)
Solution:
∫ 𝑓 (𝑥)2
1
= ∫ 𝐴(2𝑥 + 1)2
1
= 1.0
[𝐴(𝑥2 + 𝑥)]12 = 1.0
[𝐴(22 + 2) − 𝐴(12 + 1)] = 1.0
𝐴 =1
4
𝑓(𝑥) =1
4(2𝑥 + 1) 𝑓𝑜𝑟 1 ≤ 𝑥 ≤ 2
𝐹(𝑥) = ∫1
4(2𝑦 + 1)
𝑥
1
=1
4(𝑥2 + 𝑥) −
1
2
𝒙
𝑭(𝒙)