Chapter 3
Chapter 3
Chapter 3
Example: Flip a coin three times, let X be the number of heads in three
tosses.
S Rx
X(S)
HHH 3
HHT 2
HTH 2
HTT 1
THH 2
THT 1
TTH 1
TTT 0
X = {0, 1, 2, 3}
3
Random variable
Notice that:
each possible outcome is assigned a single numeric value,
all outcomes are assigned numeric values, and
the value assigned varies across the outcomes.
The count of the number of heads is a random variable
Probability Distribution
The probability distribution for a random variable describes how the
probabilities are distributed over the values of the random variable.
4
Types of Random Variables
• Depending upon the numerical values it can assume, a random variable can
be classified into two major divisions.
Discrete Random Variable and
• Example: Roll two six sided dice. Let X be a random variable defined as
sum of the numbers shown up. Construct a probability Distribution of X?
Die 2
1 2 3 4 5 6
1 (1,1) 2 (1,2) (1,3) 4 (1,4) 5 (1,5) 6 (1,6) 7
3
Die 1 2 (2 ,1) 3 (2,2) 4 (2, 3) 5 (2, 4) 6 (2,5 ) 7 (2, 6) 8
3 (3, 1) 4 (3, 2) 5 (3, 3) 6 (3, 4) 7 (3, 5) 8 (3, 6) 9
4 (4, 1) 5 (4, 2) 6 (4, 3) 7 (4, 4) 8 (4, 5) 9 (4, 6) 10
5 (5, 1) 6 (5, 2) 7 (5, 3) 8 (5, 4) 9 (5, 5) 10 (5, 6) 11
6 (6, 1) 7 (6, 2) 8 (6, 3) 9 (6, 4) 10 (6, 5) 11 (6, 6) 12
X 2 3 4 5 6 7 8 9 10 11 12
P(X=x) 361 2
36
3
36
4
36
5
36
6
36
5
36
4
36
3
36
2
36
1
36
8
3.3. Continuous Random Variable
a ) f x 0 for all x
b) f x dx 1
b
pa x b f x dx
a
10
Probability Density Function (pdf) of Continuous Random Variables
Remark
Probability at a point is zero
a
px a f x dx 0
a
b
pa x b pa x b pa x b pa x b f x dx
a
11
Probability Density Function (pdf) of Continuous Random Variables
f x dx 1
RX
1
1
2x
11
1 12
Probability Density Function (pdf) of Continuous Random Variables
b. find P(0.5<x<0.75)
0.75
p0.5 x 0.75 2 xdx x
2 0.75
0.5
0.5
0.752 0.52
0.3125
13
Probability Density Function (pdf) of Continuous Random Variables
f x dx 1
RX
1
cx 2 dx 1
0
1
cx 2 1
1
2 1 0
1
c b. Find P(X≥1/2)
x3 1
3 0
c3 14
Conditional Probability in the Case of Continuous Random Variables
Recall that for the case of discrete random variables the conditional
probability is given by:
The same formulation holds true for the case of continuous random variables
except that A and B take range of values (intervals) rather than discrete values.
15
Conditional Probability in the Case of Continuous Random Variables
6 x1 x , if 0 x 1
f x
0, otherwise
Compute
1 1 2
P x | x
2 3 3
16
Conditional Probability in the Case of Continuous Random Variables
Solution
Required: P(A/B)
1
1 1 2
1
pA B p x 6 x1 x dx 3x 2 x 1
2 3 2
3 2 1 3
3
1 2
1
3
1
2
1
3
3 2 3 2
2 2 3 3
0.2407
17
Conditional Probability in the Case of Continuous Random Variables
Solution
3 3 1 3
3
2 2 2
3
1
2
1
3
3 2 3 2
3 3 3 3
Then 0.4815
pA B
pA / B
p B
0.2407
0.4999
0.4815
18
Cumulative distribution function and its properties
The cumulative probability function, denoted F(x), shows the probability that X
is less than or equal to x
F x P X x
Notation: Cumulative distribution function is usually denoted by upper case
alphabets.
Theorems
If X is a discrete random variable, then
F x P X x P x j x j x
j
If X is a continuous random variable, then
x
F x P X x f (u )du
19
Cumulative distribution function and its properties
Example 1: Let S={HH, HT, TH, TT} and X: the number of heads. Clearly, X is a
discrete random variable. Find the CDF of X.
X 0 1 2
P(X=x) 1 2 1
4 4 4
Solution
The possible values for X are 0, 1, and 2.
0, if x 0
1 / 4, if 0 x 1
F x
3 / 4, if 1 x 2
1, if x 2
20
Cumulative distribution function and its properties
Example 2: Find the cdf of the random variable X whose pdf is given by
x, if 0 x 1
f x 2 x , 1 x 2
0, otherwise
Solution
By definition CDF, F(X), is P(X≤x)
x
F x f t dt
21
Cumulative distribution function and its properties
Example 2: Find the cdf of the random variable X whose pdf is given by
Solution
For x≤0
x x
F x f t dt 0dt 0
For 0≤x<1
x x x
1 2 1 2
F x f t dt 0 tdt t x
2 0 2
22
Cumulative distribution function and its properties
Example 2: Find the cdf of the random variable X whose pdf is given by
Solution
For 1≤x<2
x 0 1 x
F x f t dt 0dt t dt 2 t dt
0 1
1 x
0 1 1
0 t 2 2t t 2
2 0 2 1
1 1 1
0 2 x x 2 2
2 2 2
1 2
2x x 1
2
23
Cumulative distribution function and its properties
Example 2: Find the CDF of the random variable X whose pdf is given by
Solution x 0 1 2 x
F x f t dt 0dt t dt 2 t dt 0dt
For x≥2
0 1 2
1 2
0 1 1
0 t 2 2t t 2 0
2 0 2 1
Hence the CDF of X is
0, if x0
1 x2 , if 0 x 1
2
F x
2 x 1 x 2 1, if 1 x 2
2
1, if 2
24
Cumulative distribution function and its properties
Theorem:
If X is a continuous random variable, then we have
d
f x F x
dx
p x j F x j F x j 1
25
Cumulative distribution function and its properties
Example: Suppose X is a continuous random variable with cdf
0, if x 0
F x
1 e x , if x 0
f x 1 e x
d
dx
e x , if x 0
f x
0, otherwise
26
Cont…
• Suppose X is a continuous random variable
with pdf.
• f(x)= if 0≤x<1
0 otherwise
Find CDF of the random variable X
Cont…
• Suppose X is a discrete random variable with
pdf
X -2 -1 0 1 2
P(x) 1/5 1/6 1/5 1/15 11/30
1
f x ( 2 x 1)
144
for x = 1, 2, 3, ..., 12 then find the cumulative distribution function of X.
Cont.
• The space of the random variable X is given by
RX = {1, 2, 3, ..., 12}
• F(1) = 1/144
• F(2) =4/144
………………
………………
• F(12)=1
Cont.
• If the space of the random variable X is given by RX = {x1 < x2 < x3 < · · ·
<xn}, then
f(x1) = F(x1)
f(x2) = F(x2) - F(x1)
f(x3) = F(x3) - F(x2)
.. ........
.. ........
f(xn) = F(xn) - F(xn-1).
Cont.
• Example: Find the probability density function of the random variable X
whose cumulative distribution function is
0.00, if x 1
0.25, if 1 x 1
F x 0.5, if 1 x 3
0.75, if 3 x 5
1 if 5
Cont.
• f(-1) = 0.25
f(1) = 0.50 - 0.25 = 0.25
f(3) = 0.75 - 0.50 = 0.25
f(5) = 1.00 - 0.75 = 0.25.
Cont.
• Example: What is the probability density function of the random variable
whose cdf is
=
Cont…
• f(x)= if 0≤x<1
0 , Otherwise
a. Find the values of c if f(x) is pdf.
b. Find CDF of X