You are on page 1of 78

Random variables.

Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

P ROBABILITY AND S TATISTICS


C HAPTER 1: I NTRODUCTION TO PROBABILITY

Dr. Phan Thi Huong

HoChiMinh City University of Technology


Faculty of Applied Science, Department of Applied Mathematics
Email: huongphan@hcmut.edu.vn

HCM city — 2021.


Dr. Phan Thi Huong Probability and Statistics
Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

O UTLINE

1 R ANDOM VARIABLES .

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

O UTLINE

1 R ANDOM VARIABLES .

2 D ENSITY FUNCTION .

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

O UTLINE

1 R ANDOM VARIABLES .

2 D ENSITY FUNCTION .

3 C UMULATIVE D ISTRIBUTION F UNCTION

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

O UTLINE

1 R ANDOM VARIABLES .

2 D ENSITY FUNCTION .

3 C UMULATIVE D ISTRIBUTION F UNCTION

4 E XPECTATION

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

O UTLINE

1 R ANDOM VARIABLES .

2 D ENSITY FUNCTION .

3 C UMULATIVE D ISTRIBUTION F UNCTION

4 E XPECTATION

5 VARIANCE AND STANDARD DEVIATION

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

O UTLINE

1 R ANDOM VARIABLES .

2 D ENSITY FUNCTION .

3 C UMULATIVE D ISTRIBUTION F UNCTION

4 E XPECTATION

5 VARIANCE AND STANDARD DEVIATION

6 J OINT DISTRIBUTION

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

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.
Density function.
Cumulative Distribution Function Discrete random variables.
Expectation Continuous random variables
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION

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

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

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function Discrete random variables.
Expectation Continuous random variables
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION

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

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

P ROPOSITION 2.1 (C HARACTERISTIC PROPERTIES )


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

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function Discrete random variables.
Expectation Continuous random variables
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION
E XAMPLE 2.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.
Density function.
Cumulative Distribution Function Discrete random variables.
Expectation Continuous random variables
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION
E XAMPLE 2.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.
Density function.
Cumulative Distribution Function Discrete random variables.
Expectation Continuous random variables
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION

E XAMPLE 2.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.
Density function.
Cumulative Distribution Function Discrete random variables.
Expectation Continuous random variables
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION

E XAMPLE 2.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.
Density function.
Cumulative Distribution Function Discrete random variables.
Expectation Continuous random variables
Variance and standard deviation
Joint distribution

C ONTINUOUS D ISTRIBUTION
D EFINITION 2.2
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(b ≤ X ≤ a) = a f (x)d x = area under f(x) from a to b.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function Discrete random variables.
Expectation Continuous random variables
Variance and standard deviation
Joint distribution

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.
Density function.
Cumulative Distribution Function Discrete random variables.
Expectation Continuous random variables
Variance and standard deviation
Joint distribution

C ONTINUOUS D ISTRIBUTION

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

E XAMPLE 2.4
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.
Density function.
Cumulative Distribution Function Discrete random variables.
Expectation Continuous random variables
Variance and standard deviation
Joint distribution

C ONTINUOUS D ISTRIBUTION

E XAMPLE 2.5
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.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION

D EFINITION 3.1
The cumulative distribution function 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.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION

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

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION

P ROPOSITION 3.1
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.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION

P ROPOSITION 3.1
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.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION

P ROPOSITION 3.1
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.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION

P ROPOSITION 3.1
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.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION

P ROPOSITION 3.1
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.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION

E XAMPLE 3.1
A day’s production of 850 parts contains 50 defective parts. Two
parts are selected at random without replacement. Let the random
variable X equal the number of defective parts in the sample. Find
the cumulative distribution function of X .

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

D ISCRETE D ISTRIBUTION

E XAMPLE 3.2
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) Find the probability mass function of X .

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

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.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

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.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

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(b < X < a) = P(b < X ≤ a) = P(b ≤ X < a) = P(b ≤ X ≤ a) =
F (b) − F (a)

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

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(b < X < a) = P(b < X ≤ a) = P(b ≤ X < a) = P(b ≤ X ≤ a) =
F (b) − F (a)
2
d
F 0 (x) = F (x) = f (x)
dx
Dr. Phan Thi Huong Probability and Statistics
Random variables.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

C ONTINUOUS DISTRIBUTION

E XAMPLE 3.3

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.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

C ONTINUOUS DISTRIBUTION

F IGURE 1: The cumulative distribution function of example (3.3).

Note: The cumulative distribution function of a continuous random


variable is a continuous function.
Dr. Phan Thi Huong Probability and Statistics
Random variables.
Density function.
Cumulative Distribution Function Discrete Distribution
Expectation Continuous distribution
Variance and standard deviation
Joint distribution

C ONTINUOUS DISTRIBUTION

E XAMPLE 3.4
Assume that the lifespan of a new released product (hours) follows
the given density function
(
a
x2
if x ≥ 100
f (x) =
0 if x < 100

where a ∈ R.
(A) Determine the value of a such that f (x) is defined.
(B) Find the c.d.f of X .
(C) The project 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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

E XPECTATION

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

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

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

E XPECTATION

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

E(X ) =
X
x f (x) (discrete)
x
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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

E XPECTATION

I NTERPRETATION OF M EAN

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

E XPECTATION
E XAMPLE 4.1
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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

E XPECTATION

E XAMPLE 4.2
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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

T HE SECOND MOMENT OF RANDOM VARIABLES

E XAMPLE 4.3
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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

T HE SECOND MOMENT OF RANDOM VARIABLES

E XAMPLE 4.3
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 4.4
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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

E XPECTATION OF FUNCTION OF A RANDOM VARIABLE

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

Eg (X ) =
X
g (x) f (x) (discrete)
x
Z ∞
Eg (X ) = g (x) f (x)d x (continuous).
−∞

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

E XPECTATION OF FUNCTION OF A RANDOM VARIABLE

E XAMPLE 4.5
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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

E XPECTATION OF FUNCTION OF A RANDOM VARIABLE

E XAMPLE 4.6
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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

VARIANCE AND STANDARD DEVIATION

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

VARIANCE AND STANDARD DEVIATION


E XAMPLE 5.1
Let consider 3 random variables U , V and W which are defined by

U = 0, with probability 1
(
−1, with probability 1/2
V=
1, with probability 1/2
(
−10, with probability 1/2
V=
10, with probability 1/2

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

VARIANCE AND STANDARD DEVIATION


E XAMPLE 5.1
Let consider 3 random variables U , V and W which are defined by

U = 0, with probability 1
(
−1, with probability 1/2
V=
1, with probability 1/2
(
−10, with probability 1/2
V=
10, with probability 1/2
==> Whereas all three random variables have expected value 0,
there is clearly less spread in the values of U than in V and less
spread in the values of V than in W .
Dr. Phan Thi Huong Probability and Statistics
Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

VARIANCE AND STANDARD DEVIATION


D EFINITION 5.1

The variance of an r.v. X is Var (X ) = E(X − µ)2 .

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

VARIANCE AND STANDARD DEVIATION


D EFINITION 5.1

The variance of an r.v. X is Var (X ) = E(X − µ)2 .


Variance measures dispersion around the mean.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

VARIANCE AND STANDARD DEVIATION


D EFINITION 5.1

The variance of an r.v. X is Var (X ) = E(X − µ)2 .


Variance measures dispersion around the mean.
X is discrete
Var (X ) = (u − µ)2 f (u).
X
u

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

VARIANCE AND STANDARD DEVIATION


D EFINITION 5.1

The variance of an r.v. X is Var (X ) = E(X − µ)2 .


Variance measures dispersion around the mean.
X is discrete
Var (X ) = (u − µ)2 f (u).
X
u

X is continuous
Z ∞
Var (X ) = (u − µ)2 f (u)d u.
−∞

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

VARIANCE AND STANDARD DEVIATION


D EFINITION 5.1

The variance of an r.v. X is Var (X ) = E(X − µ)2 .


Variance measures dispersion around the mean.
X is discrete
Var (X ) = (u − µ)2 f (u).
X
u

X is continuous
Z ∞
Var (X ) = (u − µ)2 f (u)d u.
−∞

The standard deviation is


p
SD(X ) = Var (X ).
Dr. Phan Thi Huong Probability and Statistics
Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

VARIANCE AND STANDARD DEVIATION


1 Computational formula

Var (X ) = E(X 2 ) − (E X )2

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

VARIANCE AND STANDARD DEVIATION


1 Computational formula

Var (X ) = E(X 2 ) − (E X )2

2 Var (c) = 0 where c is a constant.

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

VARIANCE AND STANDARD DEVIATION


1 Computational formula

Var (X ) = E(X 2 ) − (E X )2

2 Var (c) = 0 where c is a constant.


3 Variance and standard deviation are not linear

Var (a X + b) = a 2 Var (X ) and SD(aX + b) = aSD(X )

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

VARIANCE AND STANDARD DEVIATION


1 Computational formula

Var (X ) = E(X 2 ) − (E X )2

2 Var (c) = 0 where c is a constant.


3 Variance and standard deviation are not linear

Var (a X + b) = a 2 Var (X ) and SD(aX + b) = aSD(X )

4 If X and X are independent then

Var (X + Y ) = Var (X ) + Var (Y )

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

VARIANCE AND STANDARD DEVIATION

E XAMPLE 5.2
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 Var (X ) and SD(X ) at values of a and b found in question
(a).
(C) Find the c.d.f of X .

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

VARIANCE AND STANDARD DEVIATION

E XAMPLE 5.3
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 ), Var (X ).

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

J OINT DISTRIBUTION

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


meaning that there is more than one random variable.

E XAMPLE 6.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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

J OINT P ROBABILITY M ASS F UNCTION

D EFINITION 6.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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

J OINT P ROBABILITY M ASS F UNCTION

D EFINITION 6.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 6.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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

J OINT P ROBABILITY M ASS F UNCTION


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 Total
1 0.01 0.02 0.25 0.28
2 0.02 0.03 0.20 0.25
3 0.02 0.10 0.05 0.17
4 0.15 0.10 0.05 0.30
Total 0.20 0.25 0.55 1.00
Determine
A P (X < 3, Y ≤ 2).
B P (X < 3|Y ≤ 2).
C P (Y ≤ 2|X < 3).
Dr. Phan Thi Huong Probability and Statistics
Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

J OINT P ROBABILITY D ENSITY F UNCTION

D EFINITION 6.2
The joint probability density function for the continuous random
variables X and Y , denotes as f X Y (u, v), satisfies the following
properties Ï
P ((X , Y ) ∈ A) = f X Y (u, v)d ud v.
A

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

J OINT P ROBABILITY D ENSITY F UNCTION

D EFINITION 6.2
The joint probability density function for the continuous random
variables X and Y , denotes as f X Y (u, v), satisfies the following
properties Ï
P ((X , Y ) ∈ A) = f X Y (u, v)d ud v.
A

P ROPOSITION 6.2 (C HARACTERISTIC PROPERTIES )


1 f X Y (u, v) ≥ 0.
R∞ R∞
−∞ −∞ f X Y (u, v)d ud v = 1.
2

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

J OINT P ROBABILITY D ENSITY F UNCTION

E XAMPLE 6.1
Let the random variable X denote the time until a computer server
connects to your machine (in milliseconds), and let Y denote the
time until the server authorizes you as a valid user (in milliseconds).
X and Y measure the wait from a common starting point (u < v).
The joint probability density function for X and Y is

f X Y (u, v) = ke −0.001u−0.002v ,

for 0 < u < v < ∞.


A Identify k.
B Calculate P (X ≤ 1000, Y ≤ 2000).

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

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
X
f X (u) = f X Y (u, v).
v

Dr. Phan Thi Huong Probability and Statistics


Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

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
X
f X (u) = 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.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

M ARGINAL P ROBABILITY D ISTRIBUTIONS ( DISCRETE )


E XAMPLE 6.2
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 Marginal f_Y(y)
1 0.01 0.02 0.25 0.28
2 0.02 0.03 0.20 0.25
3 0.02 0.10 0.05 0.17
4 0.15 0.10 0.05 0.30
Marginal f_X(x) 0.20 0.25 0.55 1.00

Compute the mean and the variance of X and Y .


Dr. Phan Thi Huong Probability and Statistics
Random variables.
Density function.
Cumulative Distribution Function
Expectation
Variance and standard deviation
Joint distribution

M ARGINAL P ROBABILITY D ISTRIBUTIONS ( CONTINUOUS )

If the joint probability density function of random variables X and


Y is f X Y (u, v), then

The marginal probability density functions of X :


Z ∞
f X (u) = f X Y (u, v)d v,
−∞

The marginal probability density functions of Y :


Z ∞
f Y (v) = f X Y (u, v)d u.
−∞

Dr. Phan Thi Huong Probability and Statistics

You might also like