0% found this document useful (0 votes)
27 views78 pages

Chapter2 Random Variable

The document outlines the key topics in a chapter on random variables and random vectors, including: random variables and their notation for discrete and continuous cases; probability mass functions for discrete random variables; and expectation and variance of random variables. The chapter will cover random variables, distributions of discrete and continuous random variables, expectation and variance, and discrete random vectors.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views78 pages

Chapter2 Random Variable

The document outlines the key topics in a chapter on random variables and random vectors, including: random variables and their notation for discrete and continuous cases; probability mass functions for discrete random variables; and expectation and variance of random variables. The chapter will cover random variables, distributions of discrete and continuous random variables, expectation and variance, and discrete random vectors.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 78

Random variables.

Distributions of discrete random variables.


Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROBABILITY AND S TATISTICS


C HAPTER 2: R ANDOM VARIABLES AND RANDOM VECTORS

Dr. Phan Thi Huong

HoChiMinh City University of Technology


Faculty of Applied Science, Department of Applied Mathematics
Email: [email protected]

HCM city — 2021.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

O UTLINE

1 R ANDOM VARIABLES .

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

O UTLINE

1 R ANDOM VARIABLES .

2 D ISTRIBUTIONS OF DISCRETE RANDOM VARIABLES .

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

O UTLINE

1 R ANDOM VARIABLES .

2 D ISTRIBUTIONS OF DISCRETE RANDOM VARIABLES .

3 D ISTRIBUTIONS OF CONTINUOUS RANDOM VARIABLES

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

O UTLINE

1 R ANDOM VARIABLES .

2 D ISTRIBUTIONS OF DISCRETE RANDOM VARIABLES .

3 D ISTRIBUTIONS OF CONTINUOUS RANDOM VARIABLES

4 E XPECTATION AND VARIANCE

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

O UTLINE

1 R ANDOM VARIABLES .

2 D ISTRIBUTIONS OF DISCRETE RANDOM VARIABLES .

3 D ISTRIBUTIONS OF CONTINUOUS RANDOM VARIABLES

4 E XPECTATION AND VARIANCE

5 D ISCRETE RANDOM VECTORS

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

R ANDOM VARIABLE AND ITS N OTATION

D EFINITION 1.1
A variable that associates a number X (ω) with the outcome ω of a
random experiment is called a random variable.

X :Ω → R
ω → X (ω)

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

R ANDOM VARIABLE AND ITS N OTATION

D EFINITION 1.1
A variable that associates a number X (ω) with the outcome ω of a
random experiment is called a random variable.

X :Ω → R
ω → X (ω)

Uppercase letters (X , Y , Z ): Random variables.


Lowercase letters (x, y, z): Measured values of random
variables (after the experiment is conducted), e.g., x = 70
milliamperes.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

R ANDOM VARIABLE AND ITS N OTATION

D EFINITION 1.2
A discrete random variable is a random variable with a finite or
countably infinite range. Its values are obtained by counting.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

R ANDOM VARIABLE AND ITS N OTATION

D EFINITION 1.2
A discrete random variable is a random variable with a finite or
countably infinite range. Its values are obtained by counting.

Number of scratches on a surface.


Number of defective parts among 100 tested.
Number of transmitted bits received in error.
Number of common stock shares traded per day.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

R ANDOM VARIABLE AND ITS N OTATION

D EFINITION 1.3
A continuous random variable is a random variable with an interval
(either finite or infinite) of real numbers for its range. Its values are
obtained by measuring.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

R ANDOM VARIABLE AND ITS N OTATION

D EFINITION 1.3
A continuous random variable is a random variable with an interval
(either finite or infinite) of real numbers for its range. Its values are
obtained by measuring.

Electrical current and voltage.


Physical measurements, e.g., length, weight, time,
temperature, pressure.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROBABILITY MASS FUNCTION

D EFINITION 2.1
For a discrete random variable X with possible values
x 1 , x 2 , . . . , x n , . . . a probability mass function (p.m.f ) is a function
such that

P (X = u) if u ∈ {x 1 , . . . , x n , . . .}
½
f (u) =
0 if u ∉ {x 1 , . . . , x n , . . .}

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROBABILITY MASS FUNCTION

D EFINITION 2.1
For a discrete random variable X with possible values
x 1 , x 2 , . . . , x n , . . . a probability mass function (p.m.f ) is a function
such that

P (X = u) if u ∈ {x 1 , . . . , x n , . . .}
½
f (u) =
0 if u ∉ {x 1 , . . . , x n , . . .}

P ROPOSITION 2.1 (C HARACTERISTIC PROPERTIES )


A discrete function f is a probability mass function iff
P
1 f (u) ≥ 0 for all u. 2
u f (u) = 1.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROBABILITY MASS FUNCTION

D EFINITION 2.1
For a discrete random variable X with possible values
x 1 , x 2 , . . . , x n , . . . a probability mass function (p.m.f ) is a function
such that

P (X = u) if u ∈ {x 1 , . . . , x n , . . .}
½
f (u) =
0 if u ∉ {x 1 , . . . , x n , . . .}

P ROPOSITION 2.1 (C HARACTERISTIC PROPERTIES )


A discrete function f is a probability mass function iff
P
1 f (u) ≥ 0 for all u. 2
u f (u) = 1.
Note: For any event A, P(X ∈ A) =
P
u∈A f (u).
Dr. Phan Thi Huong Probability and Statistics
Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XAMPLE 1
There is a chance that a bit transmitted through a digital
transmission channel is received in error. Let X denote the number
of bits received in error in 4 bits transmitted. Suppose that the
probabilities are

P(X =0) = 0.6561


P(X =1) = 0.2916
P(X =2) = 0.0486
P(X =3) = 0.0036
P(X =4) = 0.0001
Total 1.0000

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XAMPLE 1
There is a chance that a bit transmitted through a digital
transmission channel is received in error. Let X denote the number
of bits received in error in 4 bits transmitted. Suppose that the
probabilities are

0.6
P(X =0) = 0.6561
P(X =1) = 0.2916
0.4
P(X =2) = 0.0486
P(X =3) = 0.0036 0.2
P(X =4) = 0.0001
Total 1.0000 0
0 2 4

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XAMPLE 2
Suppose that a random variable X has a discrete distribution with
the following p.m.f.
(
cu, u = 1, · · · , 5
f (u) =
0, otherwise

(A) Determine the value of the constant c.


(B) Find P(X ∈ [0, 3]).

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XAMPLE 3
Computers in a shipment of 100 units contain a portable hard drive,
solid-state memory, or both, according to the following table:
Portable Hard Drive
Solid-state memory Yes No
Yes 15 80
No 4 1
Two computers are selected randomly, with replacement, from the
the shipment. What is the probability mass function of the number
of computers in the sample having both Portable Hard Drive and
Solid-state memory?

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XAMPLE 4
A discrete r.v X has the p.m.f as below

X −1 0 1 2
P 0.1 0.3 0.4 0.2

(A) Find the p.m.f of the r.v Y = 2X + 3.


(B) Find the p.m.f of the r.v Z = X 2 .

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

C UMULATIVE DISTRIBUTION FUNCTION

D EFINITION 2.2
The cumulative distribution function (c.d.f) of a discrete random
variable X, denoted as F (x), is

F (x) = P(X ≤ x) =
X
f (x i )
x i ≤x

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROPOSITION 2.2
For a discrete random variable X , F (x) satisfies the following
properties.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROPOSITION 2.2
For a discrete random variable X , F (x) satisfies the following
properties.
1 0 ≤ F (x) ≤ 1.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROPOSITION 2.2
For a discrete random variable X , F (x) satisfies the following
properties.
1 0 ≤ F (x) ≤ 1.
2 If x ≤ y, then F (x) ≤ F (y).

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROPOSITION 2.2
For a discrete random variable X , F (x) satisfies the following
properties.
1 0 ≤ F (x) ≤ 1.
2 If x ≤ y, then F (x) ≤ F (y).
3 F is right continuous: limu→a + F (u) = F (a).

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROPOSITION 2.2
For a discrete random variable X , F (x) satisfies the following
properties.
1 0 ≤ F (x) ≤ 1.
2 If x ≤ y, then F (x) ≤ F (y).
3 F is right continuous: limu→a + F (u) = F (a).
4 F (−∞) = lim F (x) = 0, F (+∞) = lim F (x) = 1.
x→−∞ x→+∞

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROPOSITION 2.2
For a discrete random variable X , F (x) satisfies the following
properties.
1 0 ≤ F (x) ≤ 1.
2 If x ≤ y, then F (x) ≤ F (y).
3 F is right continuous: limu→a + F (u) = F (a).
4 F (−∞) = lim F (x) = 0, F (+∞) = lim F (x) = 1.
x→−∞ x→+∞
5 P (a < X ≤ b) = F (b) − F (a) for all a, b ∈ R and a ≤ b.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XAMPLE 5
Let X be a discrete random variable which is identified by the
following c.d.f.


0, x < −2


0.2, −2 ≤ x < 0
F (x) =


0.7, 0 ≤ x < 2

1, 2 ≤ x

(A) Compute F (2).


(B) Compute P(−2 < X ≤ 2).
(C) Compute P(1.5 ≤ X ≤ 3).

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROBABILITY DENSITY FUNCTION


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

Rb
3 P(a ≤ X ≤ b) = a f (x)d x = area under f(x) from a to b.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

C ONTINUOUS D ISTRIBUTION

Note: P (a ≤ X ≤ b) = P (a < X ≤ b) = P (a ≤ X < b) = P (a < X < b)

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

C ONTINUOUS D ISTRIBUTION

Note: P (a ≤ X ≤ b) = P (a < X ≤ b) = P (a ≤ X < b) = P (a < X < b)

E XAMPLE 6
Suppose that the p.d.f. of X is as
(
cu, 0 < u < 4
f (u) =
0, otherwise

Find c. Then determine P (1 ≤ X ≤ 2) and P (X > 2).

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

C ONTINUOUS D ISTRIBUTION

E XAMPLE 7
The amount of time in hours that a computer functions before
breaking down is a continuous random variable with probability
density function
(
λe −u/100 , u ≥ 0
f (u) =
0, otherwise

Compute the probability that a computer will function


A between 50 and 150 hours before breaking down?
B for fewer than 100 hours?

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

C ONTINUOUS DISTRIBUTION

D EFINITION 3.2
The cumulative distribution function of a continuous random
variable X is Z x
F (x) = P (X ≤ x) = f (u)d u
−∞
for all −∞ ≤ x ≤ ∞.
Note:

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

C ONTINUOUS DISTRIBUTION

D EFINITION 3.2
The cumulative distribution function of a continuous random
variable X is Z x
F (x) = P (X ≤ x) = f (u)d u
−∞
for all −∞ ≤ x ≤ ∞.
Note:

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

C ONTINUOUS DISTRIBUTION

D EFINITION 3.2
The cumulative distribution function of a continuous random
variable X is Z x
F (x) = P (X ≤ x) = f (u)d u
−∞
for all −∞ ≤ x ≤ ∞.
Note:
1 P(a < X < b) = P(a < X ≤ b) = P(a ≤ X < b) = P(a ≤ X ≤ b) =
F (b) − F (a)

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

C ONTINUOUS DISTRIBUTION

D EFINITION 3.2
The cumulative distribution function of a continuous random
variable X is Z x
F (x) = P (X ≤ x) = f (u)d u
−∞
for all −∞ ≤ x ≤ ∞.
Note:
1 P(a < X < b) = P(a < X ≤ b) = P(a ≤ X < b) = P(a ≤ X ≤ b) =
F (b) − F (a)
2
d
F 0 (x) = F (x) = f (x)
dx

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

C ONTINUOUS DISTRIBUTION

E XAMPLE 8

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.
(A) Find the the c.d.f of X .
(B) What is the probability that a current measurement is less than
5 milliamperes?

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

C ONTINUOUS DISTRIBUTION

E XAMPLE 9
Assume that the lifespan of a new released product (hours) follows
the given c.d.f
(
a
− a if x ≥ 100
F (x) = 100 x
0 if x < 100
where a ∈ R.
(A) Find the p.d.f. of X .
(B) Determine the value of a such that f (x) is defined.
(C) The product will be classified as type A if its lifespan is at least
400 hours. Find the portion of type A.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XPECTATION

D EFINITION 4.1
The expected value (mean) of a random variable X is

E(X ) = x i P(X = x i )
X X
x i f (x i ) = (discrete)
i i
Z ∞
E(X ) = x f (x)d x (continuous).
−∞

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XPECTATION

D EFINITION 4.1
The expected value (mean) of a random variable X is

E(X ) = x i P(X = x i )
X X
x i f (x i ) = (discrete)
i i
Z ∞
E(X ) = x f (x)d x (continuous).
−∞

Other names: Expected value, Mean, Mean value, Average value.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XPECTATION

D EFINITION 4.1
The expected value (mean) of a random variable X is

E(X ) = x i P(X = x i )
X X
x i f (x i ) = (discrete)
i i
Z ∞
E(X ) = x f (x)d x (continuous).
−∞

Other names: Expected value, Mean, Mean value, Average value.


Other notation: µ = E(X )

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XPECTATION

I NTERPRETATION OF M EAN

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XPECTATION

I NTERPRETATION OF M EAN
A weighted average of the possible values of X , with each value
weighted by the probability that X assumes it. ==> E(X )
describes the "center" or the "balance" point of the
distribution.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XPECTATION

I NTERPRETATION OF M EAN
A weighted average of the possible values of X , with each value
weighted by the probability that X assumes it. ==> E(X )
describes the "center" or the "balance" point of the
distribution.
The average value of X over a large number of replications of
the experiment is approximately E[X ].

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XPECTATION

P ROPOSITION 4.1
Properties of Expectation
1 E(C ) = C .
2 Expectation is linear: E(aX + b) = a E(X ) + b and
E(X + Y ) = E(X ) + E(Y )
3 If X and Y are two independent variables, then
E(X Y ) = E(X )E(Y ).

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XPECTATION
E XAMPLE 10
A roulette wheel has the numbers 1 through 36, as well as 0 and 00.
If you bet $1 that an odd number comes up, you win or lose $1
according to whether that event occurs. If X denotes your net gain,
find E(X ).

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XPECTATION

E XAMPLE 11
Find E[X ] when the density function of X is
(
2u, 0 ≤ u ≤ 1
f (u) =
0, otherwise

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

T HE SECOND MOMENT OF RANDOM VARIABLES

D EFINITION 4.2
The expected value of a random variable X 2 is called the second
moment of X that is computed by

E(X 2 ) = u 2 f (u)
X
(discrete)
u
Z ∞
E(X 2 ) = u 2 f (u)d u (continuous).
−∞

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

T HE SECOND MOMENT OF RANDOM VARIABLES

E XAMPLE 12
Let X denote a random variable that takes on any of the values -1, 0,
and 1 with respective probabilities

P (X = −1) = 0.2, P (X = 0) = 0.5, P (X = 1) = 0.3

Compute E(X 2 ).

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

T HE SECOND MOMENT OF RANDOM VARIABLES

E XAMPLE 12
Let X denote a random variable that takes on any of the values -1, 0,
and 1 with respective probabilities

P (X = −1) = 0.2, P (X = 0) = 0.5, P (X = 1) = 0.3

Compute E(X 2 ).

E XAMPLE 13
Let X be the current measured in mA. The PDF is f (x) = 0.05 for
0 ≤ x ≤ 20. What is the expected value of power when the resistance
is 100 ohms? Use the result that power in watts P = 10−6 R I 2 , where
I is the current in milliamperes and R is the resistance in ohms.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XPECTATION OF FUNCTION OF A RANDOM VARIABLE

P ROPOSITION 4.2
In general, for any function g (u) and random variable X :

E[g (X )] =
X
g (x) f (x) (discrete)
x
Z ∞
E[g (X )] = g (x) f (x)d x (continuous).
−∞

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XPECTATION OF FUNCTION OF A RANDOM VARIABLE

E XAMPLE 14
There is a chance that a bit transmitted through a digital
transmission channel is received in error. X is the number of bits
received in error of the next 4 transmitted. The probabilities are

P (X = 0) = 0.6561, P (X = 2) = 0.0486, P (X = 4) = 0.0001,


P (X = 1) = 0.2916, P (X = 3) = 0.0036,

What is the expected value of the cube of the number of bits in


error?

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XPECTATION OF FUNCTION OF A RANDOM VARIABLE

E XAMPLE 15
The time, in hours, it takes to locate and repair an electrical
breakdown in a certain factory is a random variable X whose
density function is given by
(
1, if 0 < u < 1
f (u) =
0, otherwise

If the cost involved in a breakdown of duration X is X 3 , what is the


expected cost of such a breakdown?

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

VARIANCE AND STANDARD DEVIATION

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

VARIANCE AND STANDARD DEVIATION

D EFINITION 4.3 ( VARIANCE )


The variance of a r.v X is V (X ), defined by

V (X ) = E (X − E (X ))2 = E(X 2 ) − E(X )2 (1)

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

VARIANCE AND STANDARD DEVIATION

D EFINITION 4.3 ( VARIANCE )


The variance of a r.v X is V (X ), defined by

V (X ) = E (X − E (X ))2 = E(X 2 ) − E(X )2 (1)

D EFINITION 4.4 (S TANDARD DEVIATION )


The standard deviation of a r.v X is σ(X ), defined by V(X ).
p
σ(X ) = V(X )

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

VARIANCE AND STANDARD DEVIATION

P ROPOSITION 4.3
If X is a discrete r.v, the variance of X is:
à !
∞ ∞
2
V (X ) = (x i − E(X )) f (x i ) = x i f (x i ) − E(X )2
2
X X
i =1 i =1

If X is a continuous r.v, the variance of X is:

Z+∞ Z+∞
2
V (X ) = (x − E(X )) f (x)d x = x 2 f (x)d x − E(X )2
−∞ −∞

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROPOSITION 4.4
Properties of Variance
1 V(c) = 0 where c is a constant.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROPOSITION 4.4
Properties of Variance
1 V(c) = 0 where c is a constant.
2 Variance and standard deviation are not linear

V(a X + b) = a 2 V(X ) and σ(aX + b) = aσ(X )

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROPOSITION 4.4
Properties of Variance
1 V(c) = 0 where c is a constant.
2 Variance and standard deviation are not linear

V(a X + b) = a 2 V(X ) and σ(aX + b) = aσ(X )

3 If X and Y are independent then

V(X + Y ) = V(X ) + V(Y )

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

M EDIAN

D EFINITION 4.5
For a continuous r.v, X , defined by the p.d.f f , the median
md (X ) = m can be found by solving
Z m
f (x)d x = 0.5
−∞

.
For a discrete r.v, X , the median md (X ) = m is a value such that

P(X ≤ m) ≥ 0.5 and P(X ≥ m) ≥ 0.5

Median measures center tendency of a distribution.


In case of continuous distribution, median is a value that
divide the pdf into two equal regions.
Dr. Phan Thi Huong Probability and Statistics
Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XAMPLE 16
Let consider X be a discrete random variable with the given
distribution.
X a 0.1 0.3 0.4 2
P 0.3 0.2 0.2 b 0.1

(A) Find a and b given that E(X ) = 0.3.


(B) Find V(X ) and σ(X ) at values of a and b found in question (a).
(C) Find P(0.1 ≤ X ≤ 1).
(D) Find md (X ).

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

VARIANCE AND STANDARD DEVIATION

E XAMPLE 17
Suppose X has the following pdf, where c is a constant to be
determined (
c(1 − u 2 ), −1 ≤ u ≤ 1
f (u) =
0, otherwise
Compute E(X ), V(X ), and md (X ).

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

J OINT DISTRIBUTION

In many random experiments, more than one quantity is measured,


meaning that there is more than one random variable.

E XAMPLE 5.1 (C ELL PHONE FLASH UNIT )


A flash unit is chosen randomly from a production line; its recharge
time X (seconds) and flash intensity Y (watt-seconds) are measured.

To make probability statements about several random variables, we


need their joint probability distribution.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

J OINT P ROBABILITY M ASS F UNCTION

D EFINITION 5.1
The joint probability mass function of the discrete random
variables X and Y denoted as f X Y (u, v) satisfies

f X Y (u, v) = P (X = u, Y = v).

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

J OINT P ROBABILITY M ASS F UNCTION

D EFINITION 5.1
The joint probability mass function of the discrete random
variables X and Y denoted as f X Y (u, v) satisfies

f X Y (u, v) = P (X = u, Y = v).

P ROPOSITION 5.1 (C HARACTERISTIC PROPERTIES )


1 f X Y (x, y) ≥ 0 for all x, y.
P P
2
x y f X Y (x, y) = 1

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

D ISCRETE RANDOM VECTORS

A joint probability mass function of two discrete random variables


X và Y can be illustrated by a table as below
Y/X x1 x2 ... xn sum of rows
y1 P(X = x 1 , Y = y 1 ) P(X = x 2 , Y = y 1 ) ... P(X = x n , Y = y 1 ) P(Y = y 1 )
y2 P(X = x 1 , Y = y 2 ) P(X = x 2 , Y = y 2 ) ... P(X = x n , Y = y n ) P(Y = y 2 )
...
yn P(X = x 1 , Y = y n ) P(X = x 2 , Y = y n ) ... P(X = x n , Y = y n ) P(Y = y n )
Sum of columns P(X = x 1 ) P(X = x 2 ) ... P(X = x n ) 1

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

J OINT P ROBABILITY M ASS F UNCTION

E XAMPLE 18
A mobile web site is accessed from a smart phone; X is the signal
strength, in number of bars, and Y is response time, to the nearest
second.
y = Response time x = Number of Bars
(nearest second) of Signal Strength Determine
1 2 3 Total
1 0.01 0.02 0.25 0.28
A P (X < 3, Y ≤ 2).
2 0.02 0.03 0.20 0.25 B P (X < 3|Y ≤ 2).
3 0.02 0.10 0.05 0.17
4 0.15 0.10 0.05 0.30 C P (Y ≤ 2|X < 3).
Total 0.20 0.25 0.55 1.00

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

M ARGINAL P ROBABILITY D ISTRIBUTIONS ( DISCRETE )

The marginal probability distribution for X

f X (u) = P (X = u)
X
= P (X = u, Y = v)
v
X
= f X Y (u, v)
v

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

M ARGINAL P ROBABILITY D ISTRIBUTIONS ( DISCRETE )

The marginal probability distribution for X

f X (u) = P (X = u)
X
= P (X = u, Y = v)
v
X
= f X Y (u, v)
v

Themarginal probability distribution for Y


X
f Y (v) = f X Y (u, v).
u

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

D EFINITION 5.2
Considering a random vector (X , Y ), if X has the marginal
probability distribution f X (x), then

E(X ) =
X
x i f X (x i )
i =1

and
à !
∞ ∞
2
V(X ) = (x i − E(X )) f X (x i ) = x i2 f X (x i ) − E(X )2
X X
i =1 i =1

Similar formulas for Y .

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

D EFINITION 5.3
If a random vector (X , Y ) has the joint probability mass function
f X Y (x, y), then
E(X Y ) =
XX
x i y j f X Y (x i , y j )
i j


E(h(X , Y )) =
XX
h(x i , y j ) f X Y (x i , y j )
i j

Covariance of (X, Y):

Cov(X , Y ) = σ X Y = E [(X − E(X ))(Y − E(Y ))] = E(X Y ) − E (X )E (Y )

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

I NTERPRETION OF COVARIANCE :
Covariance is a measure of linear relationship between the random
variables.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

P ROPERTIES OF COVARIANCE :
1 Cov(X , X ) = V(X )
2 Cov(X , aY + b) = a Cov(X , Y )
3 Cov(X , Y + Z ) = Cov(X , Y ) + Cov(X , Z )
4 If X and Y independent, Cov(X , Y ) = 0.

D EFINITION 5.4
Correlation between X and Y is
Cov(X , Y ) σX Y
Cor (X , Y ) = ρ X Y = p =
V(X )V(Y ) σ X σY

Note: −1 ≤ ρ X Y ≤ 1. The correlation ρ X Y is a measure of linear


relationship between X and Y .

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

D EFINITION 5.5 ( C ONDITIONAL PROBABILITY DISTRIBUTION )


Given random variables X and Y with the joint probability
distribution f X Y (x, y), a conditional probability distribution of X at
Y = y i is defined as

P (X = x, Y = y i ) f X Y (x, y i )
f X |y i = P (X = x|Y = y i ) = =
P (Y = y i ) f Y (y i )

Similarly,

P (X = x i , Y = y) f X Y (x i , y)
f Y |xi = P (Y = y|X = x i ) = = .
P (X = x i ) f X (x i )

Hence, the conditional expectation is



E X |y i (X ) =
X
x i f X |y i (x i ).
i =1

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

D EFINITION 5.6
For random variables X and Y , if any one of the following
properties is true, the others are also true, and X and Y are
independent.
1 f X Y (x, y) = f X (x) f Y (y) for all x and y.
2 f Y |x (y) = f Y (y) for all x and y with f X (x) > 0.
3 f X |y (x) = f X (x) for all x and y with f Y (y) > 0.
4 P (X ∈ A, Y ∈ B ) = P (X ∈ A)P (Y ∈ B ) for any sets A and B in the
range of X and Y, respectively.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

E XAMPLE 19
Given random variables X and Y with the joint probability
distribution f X Y (x, y) as below

X =x
Y =y 1 2 3
0 0.1 0.15 a
1 0.2 b 0.4

(A) Find a and b, given that E(Y ) = 0.7.


(B) Find E(X Y ).
(C) Find Cov(X , Y ) and Cor (X , Y ). Give a comment about
relationship between X and Y .
(D) Find E X |Y =0 .
(E) Are X and Y independent?
Dr. Phan Thi Huong Probability and Statistics
Random variables.
Distributions of discrete random variables.
Distributions of continuous random variables
Expectation and variance
Discrete random vectors

M ARGINAL P ROBABILITY D ISTRIBUTIONS ( DISCRETE )

E XAMPLE 20
A mobile web site is accessed from a smart phone; X is the signal
strength, in number of bars, and Y is response time, to the nearest
second.
y = Response time x = Number of Bars
(nearest second) of Signal Strength
1 2 3
1 0.01 0.02 0.25
2 0.02 0.03 0.20
3 0.02 0.10 0.05
4 0.15 0.10 0.05
(A) Compute the mean and the variance of X .
(B) Compute E(X Y ).
(C) Are X and Y independent?
Dr. Phan Thi Huong Probability and Statistics

You might also like