You are on page 1of 21

𝑙𝑒𝑠𝑠𝑜𝑛 9 𝐶𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠 𝑟𝑎𝑛𝑑𝑜𝑚 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒

We are finish in Discrete Random Variables. Now, we will discuss Continuous random
variables and their probability distribution
Continuous Random Variable
A continuous random variable is a random variable where the data can take infinitely
many values. A random variable X which can assume all real values within a given
interval is known as continuous random variable. Thus, the possible values of a
continuous random variable are unaccountably infinite. For example, a random
variable measuring the time taken for something to be done is continuous since there
are an infinite number of possible times that can be taken.
Formulas for Continuous random variable
For any continuous random variable with probability density function 𝑓 𝑥 , we have that

𝑓 𝑥 𝑑𝑥 = 1
𝑎𝑙𝑙 𝑥

Example 1:
X is a continuous random variable with probability density function given by 𝑓 𝑥 = 𝑐𝑥
for 0 ≤ 𝑥 ≤ 1, where c is a constant. Find c
𝑐 𝑐
If we integrate 𝑓 𝑥 between 0 and 1 we get . Hence = 1 (from the useful fact
2 2
above!), giving c =2
𝑡𝑎𝑘𝑒 𝑐𝑥𝑑𝑥 = 𝑐 𝑥𝑑𝑥
𝑠𝑢𝑝𝑝𝑜𝑟𝑡𝑖𝑛𝑔 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 𝑛
𝑢 𝑑𝑢 =
𝑢𝑛:1
+𝐶
𝑛+1
1
𝑐𝑥 2 1
𝑐𝑥𝑑𝑥 = for 0 ≤ 𝑥 ≤ 1 =𝑐
𝑥 1+1
=
𝑐𝑥 2
0 2 1:1 2
0
𝑏
1
𝑐𝑥 2 1
𝑐𝑥𝑑𝑥 = 𝑓 𝑥 𝑑𝑥 = 𝐹 𝑏 − 𝐹(𝑎)
0 2
0 𝑎
𝑐 12 𝑐 02
= −
2 2
𝑐
= −0
2
𝑐
= 1 𝑓𝑟𝑜𝑚 𝑡𝑕𝑒 𝑓𝑎𝑐𝑡 𝑓 𝑥 𝑑𝑥 = 1
2
𝒄=𝟐
Expectation and Variance of Continuous random variables
To find the expectation of continuous random variables, we integrate rather than
sum, i.e.
If X is a continuous random variable with pdf 𝑓 𝑥 , then the expected value (or mean)
of X is given by

𝜇 = 𝜇𝑥 = 𝐸 𝑋 = 𝒙 ∗ 𝑓 𝑥 𝑑𝑥
;∞
For the variance of a continuous random variable, the definition is the same and we
can still use the alternative formula given; only we now integrate to calculate the
value. 𝑉𝑎𝑟 𝑋 = 𝐸 𝑋 2 − 𝜇2

= 𝑥 2 ∗ 𝑓 𝑥 𝑑𝑥 − 𝜇2
;∞
Example 2: Consider the given continuous random variable denote the time a person
waits for an elevator to arrive. The Probability Density Function (pdf) of X was given.

Let the random variable X denote the time a person waits for an elevator to
arrive. Suppose the longest one would need to wait for the elevator is 2 minutes, so
that the possible values of X (in minutes) are given by the interval [0,2]. A possible
pdf for X is given by
𝑥 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ 1
𝑓 𝑥 = 2 − 𝑥 𝑓𝑜𝑟 1 < 𝑥 ≤ 2
0 𝑜𝑡𝑕𝑒𝑟𝑤𝑖𝑠𝑒

Applying expected value of X:


𝐸 𝑋 = 𝒙 ∗ 𝑓 𝑥 𝑑𝑥
;∞
1 2

𝐸 𝑋 = 𝒙 ∗ 𝑥𝑑𝑥 + 𝒙 ∗ 2 − 𝑥 𝑑𝑥
0 1
𝑓𝑜𝑟 0 ≤ 𝑥 ≤ 1 𝑓𝑜𝑟 1 < 𝑥 ≤ 2
1 2

𝐸 𝑋 = 𝑥 ∗ 𝑥𝑑𝑥 + 𝑥 ∗ 2 − 𝑥 𝑑𝑥 → 𝑎𝑝𝑝𝑙𝑦 𝑑𝑖𝑠𝑡𝑟𝑖𝑏𝑢𝑡𝑖𝑣𝑒 𝑙𝑎𝑤


0 1
1 2

= 𝑥 2 𝑑𝑥 + 2𝑥 − 𝑥 2 𝑑𝑥
0 1
2
1

= 𝑢𝑛 𝑑𝑢 + 2𝑢𝑛 𝑑𝑢 − 𝑢𝑛 𝑑𝑢
1
0
𝑥 2:1 1 𝑥1:1 𝑥 2:1 2
= + 2 −
2+1 1 + 1 2+1
0 1
𝑥3 1 𝑥 3 2
= + 𝑥2 −
3 3
0 1
𝑥3 1 𝑥 3 2 For the second definite integrals (2)
= + 𝑥2 − 2
3 3 𝑥3 2
0 1
2𝑥 − 𝑥2 𝑑𝑥 = 𝑥2 −
𝟏 𝟐 3
1 1
For the first definite integrals (1) 𝑏3 𝑎3
= 𝑏2 − − 𝑎2 −
𝑏 3 3

𝑓 𝑥 𝑑𝑥 = 𝐹 𝑏 − 𝐹(𝑎) 23 13
= 22 − 2
− 1 −
𝑎 3 3
1
𝑥3 4 2
𝑥 2 𝑑𝑥 = = −
3 3 3
0 𝟐
𝑏3 𝑎3
= − = (2)
3 3 𝟑
13 03
= −
3 3
𝟏
= (1)
𝟑
Let the random variable X denote the time a person waits for an
𝑥3 1 2
𝑥3 2 elevator to arrive. Suppose the longest one would need to wait for
= + 𝑥 − the elevator is 2 minutes, so that the possible values of X (in
3 3 minutes) are given by the interval [0,2].
0 1
𝟏 𝟐 Thus, we expect a person will wait 1 minute for the elevator
on average. The graph shows the expected value as the center
𝟏 𝟐 of mass of the pdf
= + 𝑥 𝑓𝑜𝑟 0 ≤ 𝑥 ≤ 1
𝟑 𝟑
𝑓 𝑥 = 2 − 𝑥 𝑓𝑜𝑟 1 < 𝑥 ≤ 2
=𝟏 0 𝑜𝑡𝑕𝑒𝑟𝑤𝑖𝑠𝑒

Probability density function (pdf)

The red arrow represents the center of mass, or the expected value of X
Now we calculate the variance and standard deviation of X, by first finding the expected
value of 𝑋 2

𝐸 𝑋2 = 𝒙𝟐 ∗ 𝑓 𝑥 𝑑𝑥
;∞
1 2

𝐸 𝑋 = 𝒙𝟐 ∗ 𝑥𝑑𝑥 + 𝒙𝟐 ∗ 2 − 𝑥 𝑑𝑥 → 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑦
0 1
1 2

= 𝑥 3 𝑑𝑥 + 2𝑥 2 − 𝑥 3 𝑑𝑥
0 1
1 2

𝑢𝑛 𝑑𝑢 + 2𝑢𝑛 𝑑𝑢 − 𝑢𝑛 𝑑𝑢
0 1

𝑥 3+1
1 𝑥 2:1 𝑥 3:1 2
= + 2 −
3:1 2+1 3+1
0 1
𝑥 3+1
1
𝑥 2+1 𝑥 3+1
2 𝒃4 𝒂4 4 5
= + 2 − = − = −
3:1 2:1 3:1 4 4 3 12
0 1
𝟏4 𝟎4 𝟏𝟏
1 2 = − = (2)
𝑥4 2𝑥 3 𝑥4 4 4 𝟏𝟐
= + −
4 3 4 1 11 𝟕
0 0 𝟏
= (1) 𝐸 𝑋2 = + =
𝟏 𝟐
𝟒 4 12 𝟔
For the second definite integrals
For the first definite integrals 𝟐
2𝑥 3 𝑥 4 2
𝑏
2𝑥 2 − 𝑥 3 𝑑𝑥 = −
𝑓 𝑥 𝑑𝑥 = 𝐹 𝑏 − 𝐹(𝑎) 3 4
𝟏 1
𝑎
2𝑏 3 𝑏 4 2𝑎 3 𝑎4
𝟏
4 1
= − − −
𝑥 3 4 3 4
𝑥 3 𝑑𝑥 =
4
0 2(𝟐)3 (𝟐)4 2(𝟏)3 (𝟏)4
𝟎 = − − −
3 4 3 4
Thus, we have
1
𝑉𝑎𝑟 𝑋 = 𝐸 𝑋2 − 𝜇2 → 𝑆𝐷 = 𝑉𝑎𝑟(𝑋) = ≈ 𝟎. 𝟒𝟎𝟖
6
7
= −1
6
𝟏
=
𝟔
EXAMPLE 3:

Let X be a continuous random variable with


pdf given by
𝑐𝑥 2 𝑓𝑜𝑟 𝑥 ≤ 1
𝑓 𝑥 =
0 𝑜𝑡𝑕𝑒𝑟𝑤𝑖𝑠𝑒

a. Find the constant C


b. Find EX
c. Var(X)
1
d. Find 𝑃 𝑋 ≥
2
SOLUTION:
𝑓 𝑥 = 𝑐𝑥 2 𝑓𝑜𝑟 𝑥 𝑖𝑠 𝑖𝑠 𝑒𝑞𝑢𝑎𝑙 𝑜𝑟 𝑙𝑒𝑠𝑠 𝑡𝑕𝑎𝑛 1 𝑓𝑜𝑟 𝑥 ≤ 1
Remember the fact 𝑓 𝑥 𝑑𝑥 = 1
𝑏

1= 𝑓 𝑥 𝑑𝑥 𝑓 𝑥 𝑑𝑥 = 𝐹 𝑏 − 𝐹(𝑎)
;∞ 𝑎
𝟏
𝑐 13 𝑐 −13
1= −
1= 𝑐𝑥 2 𝑑𝑥 3 3
;𝟏
1 1
𝟏 1= 𝑐+ 𝑐
𝑢𝑛:1
1= 𝑐 𝑥 2 𝑑𝑥 → 𝑢𝑛 𝑑𝑢 = +𝐶 3 3
𝑛+1
;𝟏 2
1= 𝑐
𝑐𝑥 2:1 3
1=
2+1 3 = 2𝑐
𝑐𝑥 3 𝟏 𝟑
1= 𝒄=
𝟐
3
−𝟏
b. to find 𝐸 𝑋 = 𝜇, we can write 𝑏

𝑓 𝑥 𝑑𝑥 = 𝐹 𝑏 − 𝐹(𝑎)
𝐸 𝑋 = 𝒙 ∗ 𝑓 𝑥 𝑑𝑥 𝑎
;∞ 𝟏

3 3 4 3 4
= 𝒙 ∗ 𝑐𝑥 2 𝑑𝑥 𝑥 3 𝑑𝑥 = 𝒃 − 𝒂
2 8 8
;𝟏
;∞ 3 3
∞ = (𝟏)4 − (−𝟏)4
8 8
= 𝑐𝑥 3 𝑑𝑥 3 3
= −
;∞ 8 8
1 𝑬 𝑿 = 𝟎
3 𝑢𝑛:1
= 𝑥 3 𝑑𝑥 → 𝑢𝑛 𝑑𝑢 =
𝑛+1
+𝐶
2
;1

3 𝑥4 1
=
2 4
−1
3 1
𝐸 𝑋 = 𝑥4
8
−1
C. Variance 4:! 1
3 𝑥
𝑉𝑎𝑟 𝑋 = 𝐸𝑋 2 − 𝑢2 𝐸𝑋 2 =
2 4+1
−1
For 𝐸𝑋 2
3 𝑥5 1
∞ =
2 5
−1
𝐸𝑋 2 = 𝒙𝟐 ∗ 𝑓 𝑥 𝑑𝑥
;∞
3 5 1
= 𝑥
1 10
−1
𝐸𝑋 2 = 𝒙𝟐 ∗ 𝑐𝑥 2 𝑑𝑥 → 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑦 𝑏
;1
𝑓 𝑥 𝑑𝑥 = 𝐹 𝑏 − 𝐹(𝑎) 3 3
1 = +
𝑎 10 10
= 𝑐𝑥 4 𝑑𝑥 𝟏
3 3 5 3 5 6
;1 𝑥 4 𝑑𝑥 = 𝒃 − 𝒂 =
1 2 10 10 10
;𝟏
3 𝑢𝑛:1 3 3 𝟑
= 𝑥 4 𝑑𝑥 → 𝑢𝑛 𝑑𝑢 = +𝐶
= 5
𝟏 − −𝟏 5 𝟐
𝑬𝑿 =
2 𝑛+1
10 10 𝟓
;1
𝑉𝑎𝑟 𝑋 = 𝐸𝑋 2 − 𝑢2 1
1 3
3 2 = 𝑥 1
= − 0 2
5 2
𝟑
𝑽𝒂𝒓(𝑿) = 1
𝟓 1 3
= 𝑥 1
1 2
d. To find 𝑃 𝑋 ≥ , we can write
2 2
1 𝑏
1 1 1
1 3 = −
𝑃 𝑋≥ = 𝑥 2 𝑑𝑥 𝑓 𝑥 𝑑𝑥 = 𝐹 𝑏 − 𝐹(𝑎) 2 2 8
2 2
1 𝑎 𝟏
2 3 1 3 1 3 1 1
1 𝑥 2 𝑑𝑥 = 𝑏 − 𝑎 = −
3 𝑥3
2 2 2 2 16
= 𝟏
2 3 1 𝟐
𝟏 3 𝟏 𝟕
2 3 1 1 1 𝑷 𝑿≥ =
2 3
𝑥 𝑑𝑥 = (𝟏) − 𝟐 𝟏𝟔
2 2 2 2
𝟏
𝟐
Example 4:
The bid that a competitor makes on a real estate property is estimated to be
somewhere between o and 3 million dollars. Specifically, the bit X is viewed to be a
continuous random variable with density function
𝑐 9 − 𝑥 2 for 0 < 𝑥 < 3
𝑓 𝑥 =
0 𝑜𝑡𝑕𝑒𝑟𝑤𝑖𝑠𝑒
You make a bid without knowing the competitor’s bid .
Questions:
1. Find the value of c that makes 𝑓 𝑥 a legitimate density function?
Solution; 3
∞ 1=𝑐 9 − 𝑥 2 𝑑𝑥 → 𝑡𝑎𝑘𝑒 𝑡𝑕𝑒 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑙𝑠
1= 𝑓 𝑥 𝑑𝑥 ;0
;∞ 1 3 3
3 1 = 𝑐 9𝑥 − 𝑥
1= 𝑐 9 − 𝑥 2 𝑑𝑥 3
0
;0
for 0 < 𝑥 < 3
1 3 3
1 = 𝑐 9𝑥 − 𝑥
3
0
1=𝑐 𝐹 𝑏 −𝐹 𝑎

1 1
1=𝑐 9(3) − (3) − 9(0) − (0)3
3
3 3
1 = 𝑐 27 − 9
1 = 18𝑐
𝟏
𝒄=
𝟏𝟖
2. Find the cumulative distribution function 𝑓 𝑥 . Use the cumulative distribution to
determine the probability that you lose the bid if you make a bid of 2 million? 1 million?

Solution 0 < 𝑥 < 3 → 𝑇𝑕𝑒 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑥 𝑖𝑠 𝑔𝑟𝑒𝑎𝑡𝑒𝑟 𝑡𝑕𝑎𝑛 0 𝑏𝑢𝑡 𝑙𝑒𝑠𝑠 𝑡𝑕𝑎𝑛 3
𝑥 𝑃 𝑋 > 1 = 1 − 𝐹(1)
𝐹 𝑥 = 𝑐𝑓 𝑥 𝑑𝑥
;∞ 𝑥 𝑥3
𝑥 = 1− −
1 2 54
= 9 − 𝑥 2 𝑑𝑥 → 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑒
;0 18 1 1
= 1− −
2 54
1 1 2 𝟐𝟖
= 𝑑𝑥 − 𝑥 𝑑𝑥 =
2 18 𝟓𝟒
𝑥 𝑥3
= − for 0 < 𝑥 < 3 Hence 𝑃 𝑋 > 2 = 1 − 𝐹(2)
2 54
2 8
= 1− −
2 54
𝟖
=
𝟓𝟒
3. Find the expected value and standard deviation for the competitor’s bid. What is
the probability that the competitor’s bid is within one standard deviation of the mean?

Solution:
∞ 3
9 − 𝑥2
𝐸 𝑋 = 𝒙𝑓 𝑥 𝑑𝑥 = 𝒙 𝑑𝑥
18
;∞ 0
𝑥2 𝑥4 3 𝟗
= − = = 𝟏. 𝟏𝟐𝟓

43
72 0 𝟖
9 − 𝑥 2
𝐸 𝑋2 = 𝑥 2 𝑓 𝑥 𝑑𝑥 = 𝑥 2 𝑑𝑥
18
;∞ 0
𝑥3 𝑥5 3 2
= − = 4.5 − = 𝟏. 𝟖
6 90 0 7
2
9
𝑉𝑎𝑟 𝑋 = 1.8 − ≈. 𝟓𝟑𝟒𝟑𝟕𝟓
8
𝑆𝐷 = 𝑉𝑎𝑟(𝑥) = 𝟎. 𝟕𝟑𝟏
Finally, one standard deviation of the mean is

1.125 – 0.731 = 0.394


1.125 + 0.731 = 1.856

𝑥 𝑥 3 1.856
𝐹 1.856 − 𝐹 0.394 = −
2 54
0.394

1.856 1.8563 0.394 0.3943


= − − −
2 54 2 54

= 0.8096 − 0.1959

= 𝟎. 𝟔𝟏𝟑𝟕

You might also like