Chapter 3
Chapter 3
Random Variable
Random variable
– A numerical value to each outcome of a particular experiment
-3 -2 -1 0 1 2 3
Random Variable
Example 1 : Machine Breakdowns
– Sample space : S = {electrical, mechanical, misuse}
– Each of these failures may be associated with a repair cost
– State space : {50, 200, 350}
– Cost is a random variable : 50, 200, and 350
Random Variable
Example 2 : Ship arrive at the port transporting 470 tones food, 500 tones
medical supply, 200 tones construction materials.
– Sample space :
– State space :
– Random variable :
Discrete and Continuous Variables
A random variable is discrete if it has a finite or countable
number of possible outcomes that can be listed.
0 2 4 6 8 10
0 2 4 6 8 10
Discrete and Continuous Variables
Other examples include:
Random Variables
Example 3:
Decide if the random variable x is discrete or continuous.
1 p(x=1)=1/6
Sample Space :{1,2,3,4,5,6) - X
2 p(x=2)=1/6
3 p(x=3)=1/6
4 p(x=4)=1/6
5 p(x=5)=1/6
6 p(x=6)=1/6
Example 4: Role of a Dice
p(x)
P(x) = 1
all x
1/6
x
1 2 3 4 5 6
Cumulative Distribution Function (CDF)
x P(x≤A)
1 P(x≤1)=1/6
2 P(x≤2)=2/6
3 P(x≤3)=3/6
4 P(x≤4)=4/6
5 P(x≤5)=5/6
6 P(x≤6)=6/6
Cumulative Distribution Function (CDF)
1.0 P(x)
5/6
2/3
1/2
1/3
1/6
1 2 3 4 5 6 x
Cumulative Distribution Function (CDF)
P(x≥5) = 1 – P(x≤4)
= 1– 4/6
= 2/6 = 1/3
Exercise 1
x f(x)
9 0.25
10 0.25
11 0.25
12 0.25
P(x) = 1
all x
Yes, probability function!
ii. f (x)= (3-x)/2 for x=1,2,3,4
x f(x)
1 (3-1)/2
= 1.0
2 (3-2)/2
= 0.5
3 (3-3)/2
=0
4 (3-4)/2 Though this sums to 1, you
can’t have a negative
= - 0.5
probability; therefore, it’s
P(x) = 1
all x
not a probability function.
iii. f (x)= (x2+x+1)/25 for x=0,1,2,3
x f(x)
0 1/25
1 3/25
2 7/25
3 13/25
P(x) = 1
all x
Doesn’t sum to 1. Thus, it’s
not a probability function.
Exercise 2
The number of times that Rohan wakes up in the night is a random
variable represented by x. The probability distribution for x is:
x 1 2 3 4 5
P(x) 0.1 0.1 0.4 0.3 0.1
f ( x) = e − x
+ +
−x −x 1
e = −e = 0 +1 =1
0
0 x
Continuous Variables
▪ The area under a bell curve is always 1
+ 1 x− 2
1 − ( )
− 2
e 2 dx =1
Continuous Variables
The 2010 U.S. Census found the chance of a household being a certain size.
The data is in table below:
1 2 3 4 5 6
0.1 0.1 0.1 0.1 0.1 0.5
Example 7
Consider the simple experiment of rolling a single dice once. Illustrate the
probability distribution table and calculate the mean value (μ)
2
Variance (𝜎 )
• To calculate the Variance:
1. square each value and multiply by its probability
2. sum them up to get Σx2p
3. subtract the square of the Expected Value μ2
Example 8
1 2 3 4 5 6
0.1 0.1 0.1 0.1 0.1 0.5
Example 9
1 2 3 4 5 6
0.1 0.1 0.1 0.1 0.1 0.5
Example 11
1. Construct the probability distribution table for the discrete random value
2. Calculate the mean value of X
3. Calculate the variance, hence the standard deviation
Exercise 4
The 2010 U.S. Census found the chance of a household being a certain size.
The data is in the table below:
Size of 1 2 3 4 5 6 ≥7
Household
Probability 26.7% 33.6% 15.8% 13.7% 6.3% 2.4% 1.5%