0% found this document useful (0 votes)
4 views

Chapter 2 Random Variables

Uploaded by

dungbeotb17
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Chapter 2 Random Variables

Uploaded by

dungbeotb17
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Chapter 2: Random variables

Phan Thi Khanh Van

E-mail: [email protected]

January 9, 2025

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 1 / 34


Table of Contents

1 Random variables. Cumulative, probability mass functions and probability density


functions
Discrete Random Variables
Continuous random variable

2 Some characteristics of random variables.


Characteristics of discrete random variables.
Characteristics of continuous random variables.

3 Discrete random vectors and their characteristics

4 Conditional expectation

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 2 / 34


Random experiment
An experiment that results in different outcomes, even when repeated under the same
conditions every time is called a random experiment.

Flip a coin: 2 possible outcomes: H, T

Roll a die: 6 possible outcomes: 1, 2, 3, 4, 5, 6

Count the number of calls dropped due to errors over a particular time period:
N = 1, 2, 3...., countably infinite number of outcomes.

Investigate the time difference between 2 messages arriving at a message center:


0 ≤ t, uncountably infinite number of outcomes.

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 3 / 34


Random variable
Random variable is a function that assigns a real number to each outcome in the
sample space of a random experiment.

Flip 3 coins at the same time:


HHH 3 heads: x =3
HHT 2 heads: x =2
HTH 2 heads: x =2
HTT 1 head: x =1
THH 2 heads: x =2
THT 1 head: x =1
TTH 1 head: x =1
TTT 0 heads: x =0
Random variable: X : Ω → {0, 1, 2, 3} ⊂ R.
The range of the random variable X is {0, 1, 2, 3}, a discrete set, X is called a discrete
random variable.

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 4 / 34


Discrete and Continuous Random Variables
A discrete random variable is a random variable with a finite (or countably infinite)
range.
A continuous random variable is a random variable with an interval (either finite or
infinite) of real numbers for its range.

Weight of a watermelon: Continuous

Marital status: NO

Time taken to get a fire. Continuous

Number of emergency calls in a hour: Discrete

Length of a tulip stem: Continuous

Color of a tulip flower: NO

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 5 / 34


Discrete random variable. Probability Distributions and Probability Mass
Function

Flip 3 coins, consider the number of heads:


x 0 1 2 3
1 3 3 1 - Probability Distribution
P(X = x) 8 8 8 8

f (0) = P(X = 0) = 18 ,
3
f (1) = 8
= f (2),
1
f (3) = 8
.
f (0) + f (1) + f (2) + f (3) = 1
f : Probability Mass Function
(PMF).

Probability Distributions
The probability distribution of a random variable X is a description of the probabilities
associated with the possible values of X .

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 6 / 34


Probability Mass Function (PMF)
For a discrete random variable X with possible values x1 , x2 , ..., xn , a probability mass
function is a function such that
f (xi ) ≥ 0
Pn
f (xi ) = 1
i=1
f (xi ) = P(X = xi )

Camera flash tests


The time to recharge the flash is tested in three cell-phone cameras. The probability that
a camera passes the test is 0.8, and the cameras perform independently. Consider the
number of cameras that pass the test.

Let X be the number of cameras that pass the test. The distribution of X is as follows
X 0 1 2 3
f (x) = P(X = x) 0.23 C31 0.22 0.8 C32 0.2 ∗ 0.82 0.83

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 7 / 34


Discrete random variables. Cumulative Distribution Function (CDF)

Consider the number of cameras that pass the test


x 0 1 2 3
f (x) = P(X = x) 0.008 0.096 0.384 0.512
Consider: F (2.5) = P(X ≤ 2.5)= 0.008 + 0.096 + 0.384 = 0.488

P(X ≤ x)
F (x) =

0, if x < 0,

0.008, if 0 ≤ x < 1,



= 0.104, if 1 ≤ x < 2,

0.488, if 2 ≤ x < 3,





1, if x ≥ 3

- Cumulative Distribution
Function (CDF)

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 8 / 34


Cumulative Distribution Functions (CDF)
The CDF of a discrete random variable X is defined as
P
F (x) = P(X ≤ x) = f (xi )
xi ≤x


0, if x


< 0,
0.008, if 0 ≤ x < 1,



F (x) = 0.104, if 1 ≤ x < 2,

0.488, if 2 ≤ x < 3,




1, if x ≥3

Properties of Cumulative Distribution Functions


For a discrete random variable X , F (x) satisfies the following properties
P
F (x) = P(X ≤ x) = f (xi ). 0 ≤ F (x) ≤ 1.
xi ≤x
If x ≤ y , then F (x) ≤ F (y ).

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 9 / 34


Example
Consider a discrete random variable X : Ω → {1, 2, 3, 4}.
PMF: f (xi ) = c.xi , where xi = 1, 2, 3, 4, c = const.

a. Find c. c. Find P(X ≤ 3).


b. Find CDF F (x). d. Find P(X ≤ 3|X ≥ 2).
P
a. We have: f (xi ) = c(1 + 2 + 3 + 4) = 10c = 1, therefore, c = 0.1.
X 1 2 3 4
f (x) = P(X = x) 0.1 0.2 0.3 0.4
b.


0, if x < 1,

0.1, if 1 ≤ x < 2,



F (x) = P(X ≤ x) = 0.3, if 2 ≤ x < 3,

0.6, if 3 ≤ x < 4,





1, if x ≥4

c. P(X ≤ 3) = P(X = 1) + P(X = 2) + P(X = 3) = 0.6


P(2 ≤ X ≤ 3) 5
d. P(X ≤ 3|X ≥ 2) = = 9.
P(X ≥ 2)
(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 10 / 34
CDF and PMF

Now, suppose that we have the CDF F (x), how can we define PMF f (x)?


0, if x < 0,

0.008, if 0 ≤ x < 1,



F (x) = 0.104, if 1 ≤ x < 2,

0.488, if 2 ≤ x < 3,




1, if x ≥3

Note: If F (x) is continuous at x, then f (x) = P(X = x) = 0.

From the graph, we have that F (x) is only not continuous at 4 points: 0, 1, 2, 3 : possible
value of X .

f (0)= 0.008 − 0 = 0.008; f (2)= 0.488 − 0.104 = 0.384;


f (1)= 0.104 − 0.008 = 0.096; f (3)= 1 − 0.488 = 0.512.
(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 11 / 34
Continuous random variables: Probability Density Functions

Probability Density Functions (PDF)


For a continuous random variable X , a probability density function is a function such
that
1 f (x) ≥ 0
R∞
2 f (x)dx = 1
−∞

Rb
3 P(a ≤ x ≤ b) = f (x)dx = area under f (x) from a to b for any a, b.
a

Remarks
For a continuous random variable X , P(X = x) = 0 for every x.
P(a ≤ X ≤ b) = P(a < X < b).
(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 12 / 34
Electric Current
Let the continuous random variable X denote the current measured in a thin copper wire
in milliamperes. Assume that the range of X is [4.9, 5.1] mA, and assume that the
probability density function of X is f (x) = 5 for 4.9 ≤ x ≤ 5.1. What is the probability
that a current measurement is less than 5 milliamperes?

Z5 Z5
P(X < 5) = f (x)dx = 5dx = 0.5.
−∞ 4.9

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 13 / 34


Hole Diameter
X denotes the diameter of a hole drilled in a sheet metal component. The target
diameter is 12.5 millimeters. Historical data show that the distribution of X can be
modeled by a probability density function f (x) = 20e −20(x−12.5) , for x ≥ 12.5. If a part
with a diameter greater than 12.60 mm is scrapped, what proportion of parts is scrapped?

Z∞
P(X > 12.6) = 20e −20(x−12.5) dx = e −2 .
12.6

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 14 / 34


Cumulative Distribution Functions (CDF)
The cumulative distribution function of a continuous random variable X is
Rx
F (x) = P(X ≤ x) = f (u)du, for −∞ < x < ∞.
−∞

dF (x)
Property: = f (x) (as long as the derivative exists).
dx

Example
Define the Probability
( density function PDF , given the cumulative distribution function
0, if x < 0,
CDF : F (x) = 2
1 − e −x , if x > 0.
(
0, if x < 0,
PDF: f (x) = 2
2xe −x , if x > 0.

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 15 / 34


(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 16 / 34
Example
Let X : Ω → [0, 4] be a continuous random variable with the PDF:

0,
 if x ∈
/ [2, 4]
f (x) = c.x, if x ∈ [0, 2]

1 − cx if x ∈ [2, 4].

a. Find c. c. Find P(X > 3).


b. Find the CDF F (x). d. Find P(X ≤ 3|X ≥ 1).
R∞ R2 R4
a. We have f (x)dx = 1⇔ cxdx + (1 − cx)dx = 1⇔ c = 0.25.
−∞ 0 2
b.


0, if x < 0,
0.25 R x tdt = 0.125x 2 ,

if 0 ≤ x ≤ 2,
F (x) = R02 Rx


0.25 0 tdt + 2 (1 − 0.25t)dt = −0.125x 2 + x − 1, if 2 ≤ x ≤ 4,

1, if x > 4.

c. P(X > 3) = 1 − P(X ≤ 3) = 1 − F (3) = 0.125.


P(1 ≤ X ≤ 3) F (3)−F (1) 0.875−0.125
d. P(X ≤ 3|X ≥ 1) = = 1−F (1) = 1−0.125
= 0.8571.
P(X ≥ 1)
(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 17 / 34
Mean, variance, standard deviation

Consumer spending of an American family in 2013-2018


Year 2013 2014 2015 2016 2017 2018
Spending $54, 720 $51, 095 $60, 000 $55, 524 $70, 373 $60, 000

54.72 + 51.095 + ... + 60


Mean: µ = = 58.619 (thousand $)
6
(54.72 − µ) + (51.095 − µ)2 + ... + (60 − µ)2
2
Variance: σ 2 = = 32.227 (thousand $)2
√ 6
Standard deviation: σ = σ 2 = 6.1014 (thousand $)

Messages
The number of e-mail messages received per hour has the following distribution:
x = ] of messages 10 11 12 13 14 15
f (x) = P(X = x) 0.08 0.15 0.3 0.2 0.2 0.07

P
Expected value (mean/expectation): E(X ) = xf (x)= 12.5 (message).
x
Variance: V(X ) = (x − µ) f (x) = 1.85 (message 2 )
2
P
x p √
Standard deviation: σ = V(x)= 1.85 = 1.3601 (message)
(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 18 / 34
Expectation (mean/expected value)
The mean or expected value of the discrete random variable X , denoted as µ or E(X ), is
P P
E(X ) = xf (x) = xP(X = x).
x x

Variance and standard deviation


The variance of X , denoted as σ 2 or V(X ), is
σ 2 = V(x) = E(X − µ)2 = (x − µ)2 f (x) =
P 2
x f (x) − µ2
P
x x

The standard deviation of X , denoted as σ is


p
σ = V(X ).
The variance and the standard deviation measures how far a set of data is spread out.
The standard deviation represents a ”typical” deviation from the mean (we often use σ
because it has the same unit with the random variable.).

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 19 / 34


(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 20 / 34
Example
We want to test 5000 people to filter out those with COVID 19. Knowing that the
portion of people with COVID is p = 5%. We have 2 methods as follows:
1. Test each person: Need 5000 test kits.
2. Test by pooling a sample of a group of 5 people, if the result is negative, stop testing,
if the result is positive, test each person again.
Calculate the average number of tests of method 2, compare with method 1.

Let X be the number of tests needed for a group of 5 people. We have the XS
distribution table:
x 1 6
f (x) 0.955 1 − 0.955

E(X ) = 1 ∗ 0.955 + 6 ∗ (1 − 0.955 ) = 2.1311.


Average number of tests for 5000 people: 1000 ∗ E(X ) ≈ 2131.
Comparing, we see that the second method is more cost-effective, especially when the
probability p is small.

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 21 / 34


Mean, Variance, Standard Deviation of continuous random variables.
Suppose that X is a continuous random variable with probability density function f (x).
R∞
Mean: µ = E(X ) = xf (x)dx
−∞
R∞ R∞
Variance: σ 2 = V(x) = (x − µ)2 f (x)dx = x 2 f (x)dx − µ2 = E(X 2 ) − (E(X ))2
−∞ −∞

Standard deviation: σ = σ2 .

Example
The PDF of the weight of packages delivered by a post office is f (x) = 70/(69x 2 ) for
1 < x < 70 pounds.
(a)) Determine the probability that the weight of a package exceeds 50 pounds.
(b) Determine the mean and variance of weight.
(c) If the shipping cost is $2.50 per pound, what is the average shipping cost of a
package?
R70 70
(a) P(X > 50)= 2
dx = 0.0058
50 69x
R70 70 R70 70
(b) E(X ) = x. 2
dx= 4.3101; V (x) = x 2 . dx − 4.31012 = 51.4233
1 69x 1 69x 2
(c) E(cost)= 2.5 × 4.3101 = 10.7752 ($)
(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 22 / 34
Expectation of a Function of a Random Variable

Expected Value of a Function of a Random Variable


If X is a discrete random variable with PMF f (x), then
P 2
h (x)f (x) − (E[h(X )])2
P
E[h(X )] = h(x)f (x), V[h(X )] =
x x
If X is a continuous random variable with PDF f (x), then
R∞ R∞ 2
E[h(X )] = h(x)f (x)dx, V[h(X )] = h (x)f (x)dx − (E(h[X ])2 .
−∞ −∞

Properties of Expectation and Variance


1 Let a and b be constants, g and h be functions. For any random variable X :
E[ag (X ) + bh(X )] = aE[g (X )] + bE[h(X )], V[ag (X ) + b] = a2 V[g (X )]
2 In particular
E(aX + b) = aE(X ) + b, V(aX + b) = a2 V(x)

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 23 / 34


Mod: Mod(X)
If X is a discrete random variable, then Mod(X ) is the poitn where PMF f (x) has
maximum value.
If X is continuous, then Mod(X ) is the point where PDF f (x) has maximum value.

Median: Md(X)
is the point such that satisfies:
If X lis discrete, then
P(M ≤ Md) ≥ 0.5 and P(X ≥ Md) ≥ 0.5
If X is continuous then
P(X ≤ Md) = P(X ≥ Md) = 0.5

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 24 / 34


Flipping coins
Let X be the number of heads if we flip 3 coins.
X 0 1 2 3
P(X = x) 0.125 0.375 0.375 0.125
P(X ≤ x) 0.125 0.5 0.875 1

Mod(X ) = 1, 2. For Md(X ) we can take a value that is between 1 and 2. Regularly:
Md = 1+2
2
= 1.5.

Electric current
Let X be the current measured in a thin copper wire in miliamperes: f (x) = 5 for
4.9 ≤ x ≤ 5.1. Find E(X ), Mod(X ), Md(X ).

We have E(X ) = Md(X ) = 5. For Mod(X ) we can take an arbitrary value in [4.9, 5.1].

Hole Diameter
X denotes the diameter of a hole drilled in a sheet metal component with PDF
f (x) = 20e −20(x−12.5) , where x ≥ 12.5. Find E(X ), Mod(X ), Md(X ).

R∞
E(X ) = 20 xe −20(x−12.5) dx = 12.55. Mod(X ) = 12.5
12.5
R∞
P(X ≤ Md) = 20 Md e −20(x−12.5) dx = 0.5 ⇔ e 250−20Md = 0.5 ⇔ Md ≈ 12.5347.
(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 25 / 34
Example
The scores in Calculus 1 of 20 students are given in the following table
6, 5, 7, 8, 6, 9, 8, 3, 7, 6, 4, 7, 4, 7, 6, 7, 6, 5, 4, 3.
a. Find the probability distribution of the score of a student in this course.
b. Evaluate E(X ), Mod(X ), Md(X ).
c. Evaluate V(X + 1), E(X 2 + 1).

a. Prob. distribution:
X 3 4 5 6 7 8 9
P(X = x) 0.1 0.15 0.1 0.25 0.25 0.1 0.05
P(X ≤ x) 0.1 0.25 0.35 0.6 0.85 0.95 1
P
b. E(X ) = xi f (xi ) = 5.9. Mod(X ): there are two values 6 và 7.
Md(X ) = 6 because P(X ≤ 6) = 0.6, P(X ≥ 6) = 0.65.
P 2
c. V(X + 1) = V(X ) = xi f (xi ) − (E(X ))2 = 2.69.
E(X 2 + 1) = (xi2 + 1)f (xi )= 38.5.
P

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 26 / 34


Mobile Response Time

The response time is the speed of page downloads and it is critical for a mobile Web site.
Let X denote the number of bars of service, and let Y denote the response time (to the
nearest second) for a particular user and site. Consider 1000 page downloads, the number
of downloads in each category is given as below
x = ] of Bars of Signal Strength
y = Response time 1 2 3
4 150 100 50
3 20 100 50
2 20 30 200
1 10 20 250
- joint events.
(X , Y ) is a discrete random vector. Divide all data by 1000, we obtain
x = Number of Bars of Signal Strength
y = Response time 1 2 3
4 0.15 0.1 0.05
3 0.02 0.1 0.05
2 0.02 0.03 0.2
1 0.01 0.02 0.25
- joint probability distribution,(2 random variables: bivariate distribution).
(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 27 / 34
Discrete random vectors (2 random variables)
Let Ω be a sample space. A pair of discrete random variables (X , Y ) defined on Ω is
called a discrete random vector.

Joint Probability Mass Function


The joint probability mass function of the discrete random variables X and Y , denoted as
fXY (x, y ), satisfies

1 fXY (x, y ) ≥ 0 3 fXY (x, y ) = P(X = x, Y = y )


PP
2 fXY (x, y ) = 1
X Y

x = Number of Bars of Signal Strength


y = Response time 1 2 3 fY = P(Y = y )
4 0.15 0.1 0.05 0.3
3 0.02 0.1 0.05 0.17
2 0.02 0.03 0.2 0.25
1 0.01 0.02 0.25 0.28
fX = P(X = x) 0.2 0.25 0.55

Marginal Distribution
The individual probability distribution of a random variable is called its marginal
probability distribution.. Notation: fX , fY .
(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 28 / 34
Conditional probability distributions

Given that X = 1
x = Number of Bars of Signal Strength
y = Response time 1 2 3 fY
4 0.15 0.1 0.05 0.3
3 0.02 0.1 0.05 0.17
2 0.02 0.03 0.2 0.25
1 0.01 0.02 0.25 0.28
fX 0.2 0.25 0.55
0.15 0.02
P(Y = 4|X = 1) = = 0.75. P(Y = 2|X = 1) = = 0.1.
0.2 0.2
0.02 0.01
P(Y = 3|X = 1) = = 0.1. P(Y = 1|X = 1) = = 0.05.
0.2 0.2
P(X = x, Y = y ) fXY (x, y )
fY |x (y ) = = - Conditional PMF.
P(X = x) fX (x)

Conditional probability mass function


For discrete random vector (X , Y ), the conditional probability mass function of Y
given X = x is
P(X = x, Y = y ) fXY (x, y )
fY |x (y ) = = , for fX (x) > 0.
P(X = x) fX (x)

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 29 / 34


Conditional expectation and Variance
The conditional expectation of Y given X = x, denoted as E (Y |x) or µY |x , is
P
E (Y |x) = yfY |x (y )
y

The conditional variance of Y given X = x, denoted as V (Y |x), is


V (Y |x) = E [(Y − µY |x )2 ] = (y − µY |x )2 .fY |x (y )
P
y
P 2
= y .fY |x (y ) − µ2Y |x
y

Conditional probability distributions of Y given X = x, fY |x (y ):


x = Number of Bars of Signal Strength
y = Response time 1 2 3
4 0.75 0.4 0.091
3 0.1 0.4 0.91
2 0.1 0.12 0.364
1 0.05 0.08 0.454
Total 1 1 1
E (Y |x = 1)= 4 × 0.75 + 3 × 0.1 + 2 × 0.1 + 1 × 0.05
= 3.55 (second)
V (Y |x = 1)= 42 × 0.75 + 32 × 0.1 + 22 × 0.1 + 0.05 − 3.552
= 0.7475 (second 2 ).
(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 30 / 34
Independent random variables

An orthopedic physician’s practice considers the number of errors in a bill and the
number of X-rays listed on the bill. Let the random variables X and Y denote the
number of errors and the number of X-rays on a bill, respectively.
x = Number of errors
y = Number of X-rays 0 1 2 fY
3 0.1275 0.034 0.0085 0.17
2 0.1875 0.05 0.0125 0.25
1 0.21 0.056 0.014 0.28
0 0.225 0.060 0.015 0.3
fX 0.75 0.2 0.05
The conditional probability mass function fY |x of Y given X = x:
x = Number of errors
y = Number of X-rays 0 1 2 fY
3 0.17 0.17 0.17 0.17
2 0.25 0.25 0.25 0.25
1 0.28 0.28 0.28 0.28
0 0.3 0.3 0.3 0.3
fX 0.75 0.2 0.05
From the table, we have that fY |x (y ) = fY (y ) for any y : X and Y are independent
random(Phan
variables.
Thi Khanh Van) Chapter 2: Random variables January 9, 2025 31 / 34
Independence
Two random variables X and Y are called independent , if one of the following
equivalent properties is true
1 fXY (x, y ) = fX (x)fY (y ), ∀x, y
2 fY |x (y ) = fY (y ), ∀x, y : fX (x) > 0
3 fX |y (x) = fX (x), ∀x, y : fY (y ) > 0
4 P(X ∈ A, Y ∈ B) = P(X ∈ A)P(Y ∈ B),
for any sets A, B in the range of X , Y , resp.

Properties
If X and Y are two independent random variables, we have:
E(XY ) = E(X )E(Y ), V(aX ± bY ) = a2 V(X ) + b 2 V(Y ).

Mean and variance of a linear combination


E(Y ) = E(c1 X1 + c2 X2 + .... + cp Xp ) = c1 E(X1 ) + c2 E(X2 ) + ... + cp E(Xp ).
If X1 , X2 ...Xp are independent random variables, then
V(Y ) = c12 V(X1 ) + c22 V(X2 ) + ... + cp2 V(Xp ).

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 32 / 34


Example
Let X and Y be two random variables with the joint PMF as follows
X=x
Y=y 1 2 3
0 0.1 0.15 a
1 0.2 b 0.4
a. Find a and b, E(Y ) = 0.7. c. Find E(Y |X = 1)
b. Are X and Y independent? d. Find E(XY ).

a. We have E(Y ) = 0 × fY (0) + 1 × fY (1) = 0.6 + b = 0.7 ⇒ b = 0.1.


P
On the other hand, fXY (xi , yj ) = 1 ⇒ 0.85 + a + b = 1 ⇒ a = 0.05.
X=x
Y=y 1 2 3 fY
0 0.1 0.15 0.05 0.3
1 0.2 0.1 0.4 0.7
fX 0.3 0.25 0.45
b. fX (1) = 0.3, fY (0) = 0.3, fXY (1, 0) 6= fY (0) × fX (1), X and Y are not independent.
c. E(Y |X = 1) = 0 × fY |X =1 (0) + 1 × fY |X =1 (1)= 1 ∗ 32 = 23 .
P
d. E(XY ) = xi yj fXY (xi , yj )= 1 × 1 × 0.2 + 1 × 2 × 0.1 + 1 × 3 × 0.4 = 1.6.
(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 33 / 34
Thank you for your attention!

(Phan Thi Khanh Van) Chapter 2: Random variables January 9, 2025 34 / 34

You might also like