3.
4 CONDITIONAL PROBABILITY MASS FUNCTION
EEE251 Probability Methods in Engineering
Lecture 8
Instructor: Bakhtiar Ali
Department of Electrical Engineering.
COMSATS Institute of Information Technology, Islamabad
Bakhtiar Ali 1/13
3.4 CONDITIONAL PROBABILITY MASS FUNCTION 3.4.2 Conditional Expected Value
3.4 CONDITIONAL PROBABILITY MASS FUNCTION
In many situations we have partial information about a
random variable X or about the outcome of its underlying
random experiment. We are interested in how this information
changes the probability of events involving the random
variable.
The conditional probability mass function of X is defined by
the conditional probability:
pX (x|C) = P [X = x|C] for x a real number.
Applying the definition of conditional probability we have:
P [{X = x} ∩ C]
pX (x|C) = .
P [C]
Bakhtiar Ali 2/13
3.4 CONDITIONAL PROBABILITY MASS FUNCTION 3.4.2 Conditional Expected Value
Example
The minute hand in a clock is spun and the outcome ζ is the minute where the hand
comes to rest. Let X be the hour where the hand comes to rest. Find the pmf of X.
Find the conditional pmf of X, given
B = {f irst 4 hours};
D = {1 < ζ ≤ 11}.
Solution:
We assume that the hand is equally likely to rest at any of the minutes in the range
S = {1, 2, . . . , 60}, so P [ζ = k] = 1/60, for k in S. X takes on values from SX .
Since B = {1, 2, . . . , 12} and pX (j) = 1/12 for j in SX . Since B = {1, 2, 3, 4}
P [{X = j} ∩ B] P [X ∈ {j} ∩ {1, 2, 3, 4}]
pX (j|B) = = .
P [B] P [X ∈ {1, 2, 3, 4}]
(
P [X = j] 1
= if j ∈ {1, 2, 3, 4}
= 1/3 4
0 otherwise
Bakhtiar Ali 3/13
3.4 CONDITIONAL PROBABILITY MASS FUNCTION 3.4.2 Conditional Expected Value
Example
The minute hand in a clock is spun and the outcome ζ is the minute where the hand
comes to rest. Let X be the hour where the hand comes to rest. Find the pmf of X.
Find the conditional pmf of X given
B = {f irst 4 .hours};
D = {1 < ζ ≤ 11}.
Solution:
We assume that the hand is equally likely to rest at any of the minutes in the range
S = {1, 2, . . . , 60}, so P [ζ = k] = 1/60, for k in S. X takes on values from SX .
Since B = {1, 2, . . . , 12} and pX (j) = 1/12 for j in SX .
P [{X = j} ∩ D] P [ζ : X(ζ) = j and ζ ∈ {2, . . . , 11}]
pX (j|D) = = .
P [D] P [ζ ∈ {2, . . . , 11}]
P [ζ ∈ {2, 3, 4, 5}] 4
= for j = 1
10/60 10
P [ζ ∈ {6, 7, 8, 9, 10}]
5
= = for j = 2
10/60 10
P [ζ ∈ {11}] = 1
for j = 3
10/60 10
Bakhtiar Ali 4/13
3.4 CONDITIONAL PROBABILITY MASS FUNCTION 3.4.2 Conditional Expected Value
Example
Let X be the time required to transmit a message, where X is a
uniform random variable with SX = {1, 2, . . . , M }. Suppose that a
message has already been transmitting for k time units, find the
probability that the remaining transmission time is j time units.
Solution:
We are given C = {X > k},
P [X = k + j]
pX (k + j|X > k) =
P [X > k]
1
M 1
= M −k
= for k + 1 ≤ k + j ≤ M
M
M −k
Bakhtiar Ali 5/13
3.4 CONDITIONAL PROBABILITY MASS FUNCTION 3.4.2 Conditional Expected Value
3.4.2 Conditional Expected Value
Let X be a discrete random variable, and suppose that we
know that event B has occurred. The conditional expected
value of X given B isXdefined as: X
mX|B = E[X|B] = xpX (x|B) = xk pX (xK |B)
x∈SX k
The conditional variance of X given B is defined as:
∞
X
V AR[X|B] = E[(X − m2X|B |B)] = (xk − m2X|B pX (xk |B)
k=1
= E[X 2 |B] − m2X|B
Bakhtiar Ali 6/13
3.4 CONDITIONAL PROBABILITY MASS FUNCTION 3.4.2 Conditional Expected Value
Example
A die is tossed and the random variable X is defined as the
number of full pairs of dots in the face showing up.
a. Describe the underlying space S of this random experiment and
specify the probabilities of its elementary events.
b. Show the mapping from S to SX the range of X.
c. Find the probabilities for the various values of X.
d. Repeat parts a, b, and c, if Y is the number of full or partial
pairs of dots in the face showing up.
e. Explain why P [X = 0] and P [Y = 0] are not equal.
Bakhtiar Ali 7/13
3.4 CONDITIONAL PROBABILITY MASS FUNCTION 3.4.2 Conditional Expected Value
Example
The loose minute hand of a clock is spun hard. The coordinates
(x, y) of the point where the tip of the hand comes to rest is
noted. Z is defined as the sgn function of the product of x and y,
where sgn(t) is 1 if t > 0 0 if t = 0 and −1 if t < 0.
a. Describe the underlying space S of this random experiment and
specify the probabilities of its events.
b. Show the mapping from S to SX , the range of X.
c. Find the probabilities for the various values of X.
Bakhtiar Ali 8/13
3.4 CONDITIONAL PROBABILITY MASS FUNCTION 3.4.2 Conditional Expected Value
Example
A data source generates hexadecimal characters. Let X be the
integer value corresponding to a hex character. Suppose that the
four binary digits in the character are independent and each is
equally likely to be 0 or 1.
a. Describe the underlying space S of this random experiment and
specify the probabilities of its events.
b. Show the mapping from S to SX , the range of X.
c. Find the probabilities for the various values of X.
d. Let Y be the integer value of a hex character but suppose that
the most significant bit is three times as likely to be a ”0” as a
”1”. Find the probabilities for the values of Y .
Bakhtiar Ali 9/13
3.4 CONDITIONAL PROBABILITY MASS FUNCTION 3.4.2 Conditional Expected Value
Example
Two transmitters send messages through bursts of radio signals to
an antenna. During each time slot each transmitter sends a
message with probability 1/2. Simultaneous transmissions result in
loss of the messages. Let X be the number of time slots until the
first message gets through.
a. Describe the underlying space S of this random experiment and
specify the probabilities of its events.
b. Show the mapping from S to SX , the range of X.
c. Find the probabilities for the various values of X.
Bakhtiar Ali 10/13
3.4 CONDITIONAL PROBABILITY MASS FUNCTION 3.4.2 Conditional Expected Value
Example
An information source produces binary triplets
{000, 001, 010, 011, 100, 101, 110, 111} with corresponding
probabilities {1/4, 1/4, 1/8, 1/8, 1/16, 1/16, 1/16, 1/16}.A
binary code assigns a codeword of length −log2 pk to triplet k. Let
X be the length of the string assigned to the output of the
information source.
a. Show the mapping from S to SX , the range of X.
b. Find the probabilities for the various values of X.
Bakhtiar Ali 11/13
3.4 CONDITIONAL PROBABILITY MASS FUNCTION 3.4.2 Conditional Expected Value
Example
An urn contains 9 $1 bills and one $50 bill. Let the random
variable X be the total amount that results when two bills are
drawn from the urn without replacement.
a. Describe the underlying space S of this random experiment and
specify the probabilities of its events.
b. Show the mapping from S to SX , the range of X.
c. Find the probabilities for the various values of X.
Bakhtiar Ali 12/13
3.4 CONDITIONAL PROBABILITY MASS FUNCTION 3.4.2 Conditional Expected Value
Example
An urn contains 9 $1 bills and one $50 bill. Let the random
variable X be the total amount that results when two bills are
drawn from the urn with replacement.
a. Describe the underlying space S of this random experiment and
specify the probabilities of its events.
b. Show the mapping from S to SX , the range of X.
c. Find the probabilities for the various values of X.
Bakhtiar Ali 13/13