0% found this document useful (0 votes)
11 views206 pages

PS - Module 2 Aartyh

Module 2 of the Probability and Statistics course covers the concept of random variables, including discrete and continuous types, their probability functions, and cumulative distribution functions. It also discusses joint probability distributions for two-dimensional random variables, providing definitions and properties, along with various problems for practical application. The module includes examples and exercises to reinforce understanding of these statistical concepts.

Uploaded by

p2130671
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)
11 views206 pages

PS - Module 2 Aartyh

Module 2 of the Probability and Statistics course covers the concept of random variables, including discrete and continuous types, their probability functions, and cumulative distribution functions. It also discusses joint probability distributions for two-dimensional random variables, providing definitions and properties, along with various problems for practical application. The module includes examples and exercises to reinforce understanding of these statistical concepts.

Uploaded by

p2130671
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/ 206

Module 2

Probability and Statistics - BMAT202L


Module 2 - Random Variables

Aarthy B

Division of Mathematics,
School of Advanced Sciences,
Vellore Institute of Technology, Chennai.

February 4, 2024
Module 2

Overview

1 Introduction

2 Problems

3 Joint probability distribution

4 Mathematical Expectation

5 Covariance

6 Moment Generating Function


Module 2
Introduction

Introduction

Random variable is a mathematical concept that assigns


numerical values to outcomes of a sample space.
There are two types of Random Variables: Discrete and
Continuous.
A random variable is considered a discrete random variable
when it takes specific, or distinct values within an interval.
Example: The number of printing mistakes in each page of a
book.
If the random variable takes a continuous range of values,
then it is classified as a continuous random variable.
Example: The height and weight of an individual.
Module 2
Introduction

Discrete Random Variable

A random variable X is said to be discrete if it takes on a finite


number of values. The probability function associated with it is
said to be Probability Mass Function P(X = Xi ) = pi if

0 ≤ pi ≤ 1
n
P
pi = 1
i=1
Module 2
Introduction

Example of Discrete Random Variable

Let S = {0, 1, 2}.

xi 0 1 2
P(X = Xi ) P1 0.3 0.5

To find the value of P1 = P(X = 0), we know that the sum of all
probabilities is equal to 1.

(i.e), P1 + 0.3 + 0.5 = 1


=⇒ P1 = 0.2
Module 2
Introduction

Continuous Random Variable

If X is a continuous random variable, then


P(x − dx dx
2 ≤ x ≤ x + 2 ) is called as Probability Density
Function if it satisfies the following conditions:

f (x) ≥ 0, x ∈ R
R∞
f (x)dx = 1
−∞
Module 2
Introduction

Example of Continuous Random Variable


Suppose that X is a continuous random variable whose probability
density function is given by
(
C (4x − 2x 2 ), 0 < x < 2
0, otherwise

Since
R ∞ f is a probability density function, we must have that
−∞ f (x)dx = 1, implying that
Z 2
C (4x − 2x 2 )dx = 1
0
3
=⇒ C =
8
Module 2
Introduction

Cumulative Distribution Function

If X is a random variable (discrete or continuous), P(X ≤ x) is


called as Cumulative distribution function if
P(X ≤ x) = FX (x).
If X is a discrete random variable,
X
P(X ≤ xj ) = pi
xi ≤xj

If X is a continuous random variable,


Z x
P(X ≤ x) = f (x)dx
−∞
Module 2
Introduction

Properties of Cumulative Distribution Function

FX (−∞) = P(X ≤ −∞) = P(∅) = 0


FX (∞) = P(X ≤ ∞) = P(S) = 1
P(X > x) = 1 − FX (x)
If x1 < x2 , then FX (x1 ) < FX (x2 )
FX (x2 ) − FX (x1 ) = P(x1 ≤ x ≤ x2 )
Module 2
Introduction

Relation between Cumulative distribution and Density


function

d
[FX (x)] = f (x)
dx

f (x) ≥ 0
R∞
−∞ f (x)dx = 1
R x2
x1 f (x)dx = P(x1 ≤ x ≤ x2 )
Module 2
Problems

Problem 1

Let X denote the number of heads in a single toss of 4 coins.


Determine (i) P(X < 2) and (ii) P(1 < X ≤ 3).
Module 2
Problems

Problem 2
A random variable X has the following probability distribution:
Module 2
Problems

Problem 2 Contd.
Module 2
Problems

Problem 3
A random variable X has the following probability distribution:
Module 2
Problems

Problem 3 Contd.
Module 2
Problems

Problem 3 Contd.
Module 2
Problems

Problem 4

If a random variable has the probability density f (x) as


Module 2
Problems

Problem 4 Contd.
Module 2
Problems

Problem 5

A random variable X gives measurements x between 0 and 1 with


a probability function
Module 2
Problems

Problem 5 Contd.
Module 2
Problems

Problem 5 Contd.
Module 2
Problems

Problem 6

A continuous random variable X has the distribution function


Module 2
Problems

Problem 6 Contd.
Module 2
Problems

Problem 6 Contd.
Module 2
Problems

Problem 7

If the probability density function of a random variable X is given


by
Module 2
Problems

Problem 7 Contd.
Module 2
Problems

Problem 7 Contd.
Module 2
Problems

Problem 8
If probability density function is
Module 2
Problems

Problem 8 Contd.
Module 2
Problems

Problem 9

Find the constant K such that


Module 2
Problems

Problem 9 Contd.
Module 2
Problems

Problem 9 Contd.
Module 2
Problems

Problem 10
If the probability density function of a random variable X is given
by
Module 2
Problems

Problem 10 Contd.
Module 2
Problems

Problem 11
Module 2
Problems

Problem 11 Contd.
Module 2
Problems

Problem 12
Module 2
Problems

Problem 12 Contd.
Module 2
Problems

Problem 12 Contd.
Module 2
Problems

Problem 12 Contd.
Module 2
Problems

Problem 13
Module 2
Problems

Problem 13 Contd.
Module 2
Problems

Problem 13 Contd.
Module 2
Problems

Problem 14
Module 2
Problems

Problem 14 Contd.
Module 2
Problems

Problem 15
Module 2
Problems

Problem 15 Contd.
Module 2
Problems

Problem 15 Contd.
Module 2
Problems

Problem 15 Contd.
Module 2
Problems

Problem 16
Module 2
Problems

Problem 16 Contd.
Module 2
Problems

Problem 16 Contd.
Module 2
Problems

Problem 16 Contd.
Module 2
Problems

Problem 17
Module 2
Problems

Problem 17 Contd.
Module 2
Problems

Problem 17 Contd.
Module 2
Problems

Problem 17 Contd.
Module 2
Problems

Problem 17 Contd.
Module 2
Joint probability distribution

Two dimensional random variable

Let S denote the sample space associated with an random


experiment Let X (S) and Y (S) be two functions each assigning a
real number to every outcome s ∈ S, then (X , Y ) is called as
2-Dimensional Random variable.
Example: Throwing a coin twice define X as number of heads
observed in the 1st toss and Y as number of heads observed in the
2nd toss. The sample space of 2-D Random variable is
{(1, 1), (1, 0), (0, 1), (0, 0)}.
Module 2
Joint probability distribution

Joint probability law

Two random variables X , Y are said to be jointly distributed if


they are defined on the same probability space.
Module 2
Joint probability distribution

Joint probability distribution function

Let (X , Y ) denote 2-dimensional discrete random variable and let


P(xi , yj ) be a real number associated with each (xi , yj ) where
i, j = 1, 2, 3, · · · , ∞ then P(xi , yj ) is called as joint probability
distribution function of (X , Y ) if it satisfies the following
conditions:
P(xi , yj ) ≥ 0 ∀ i, j
∞ P
P ∞
P(xi , yj ) = 1
j=1 i=1
Then the set {xi , yj , P(xi , yj )} is called the joint probability
distribution function.
Module 2
Joint probability distribution

Joint probability density function

If (X , Y ) denote 2-dimensional continuous random variable, then


f (x, y ) is called as joint probability density function if it satisfies
the following conditions:
f (x, y ) ≥ 0
R∞ R∞
−∞ −∞ f (x, y )dxdy = 1
Module 2
Joint probability distribution

Problem 1
Module 2
Joint probability distribution

Problem 1 Contd.
Module 2
Joint probability distribution

Problem 1 Contd.
Module 2
Joint probability distribution

Problem 2

Consider the J.P.M.F.


(
x+y
P(x, y ) = 12 , if x = 1, 2 and y = 1, 2
0, otherwise

Find Marginal PMF, Conditional PMF about x and y ,


P(X + Y ≤ 3) and P(X > Y ).
Module 2
Joint probability distribution

Problem 2 Contd.

Solution:
Y /X 1 2 P(Y )
2 3 5
1 12 12 12
3 4 7
2 12 12 12
5 7
P(X ) 12 12 1

i) M.D.F of X :

Y /X 1 2
5 7
P(X ) 12 12
Module 2
Joint probability distribution

Problem 2 Contd.

M.D.F of Y :
Y P(Y )
5
1 12
7
2 12

ii) Conditional Probability about Y :

X 1 2
2 3
P(X |Y = 1) 5 5
3 4
P(X |Y = 2) 7 7
Module 2
Joint probability distribution

Problem 2 Contd.

Conditional Probability about X :

Y P(Y |X = 1) P(Y |X = 2)
2 3
1 5 5
3 4
2 7 7

iii) P(X + Y ≤ 3)

X +Y 2 3
2 6
P(X + Y ) 12 12
3
iv) P(X > Y ) = P(X = 2, Y = 1) = 12
Module 2
Joint probability distribution

Problem 3
Find k for the function f (x, y ) = k(1 − x)(1 − y ), if 0 ≤ x, y ≤ 1.
Solution:
Z1 Z1
f (x, y )dxdy = 1
0 0
Z1 Z1
=⇒ k(1 − x)(1 − y )dxdy = 1
0 0
Z1 Z1
=⇒ k (1 − y )dy (1 − x)dx = 1
0 0
Module 2
Joint probability distribution

Problem 3 Contd.

Z1
 x 2 1
=⇒ k (1 − y )dy x − =1
2 0
0
Z1
k
=⇒ (1 − y )dy = 1
2
0
1
y2

=⇒ y− =1
2 0
k
=⇒ =1
4
=⇒ k = 4
Module 2
Joint probability distribution

Problem 4
Consider the function f (x, y ) = e −(x+y ) , if x ≥ 0, y ≥ 0. Find the
Marginal density about X and Y . Also, check whether X and Y
are independent.
Solution:
i) M.D.F of X :
Z∞
fX (x) = f (x, y )dy
0
Zy
fX (x) = e −(x+y ) dy
0
Module 2
Joint probability distribution

Problem 4 Contd.

Zy
fX (x) = e −x e −y dy
0
fX (x) = e −x

Similarly, M.D.F of Y is

fY (y ) = e −y
Module 2
Joint probability distribution

Problem 4 Contd.

ii)

fX (x) = e −x and fY (y ) = e −y

=⇒ fX (x) × fY (y ) = e −(x+y ) = f (x, y )


Module 2
Joint probability distribution

Problem 5

2 2
Consider the function f (x, y ) = kxye −(x +y ) , if x ≥ 0, y ≥ 0. Find
k, the Marginal density about X and Y and f (X |Y ). Also, check
whether X and Y are independent.
Solution:
Z∞ Z∞
i) f (x, y )dxdy = 1
0 0
Z∞ Z∞
2 +y 2 )
=⇒ kxye −(x dxdy = 1
0 0
Module 2
Joint probability distribution

Problem 5 Contd.

Z∞ Z∞
−y 2 2
=⇒ k ye dy xe −x dy = 1
0 0
Z∞ Z∞
k −y 2
=⇒ ye dy e −t dt = 1(Put x 2 = t)
2
0 0
Z∞
k 2
=⇒ ye −y dy = 1
2
0
k
=⇒ =1
4
=⇒ k = 4
Module 2
Joint probability distribution

Problem 5 Contd.

f (x, y )
ii) f (X |Y ) =
f (y )
Z∞
fY (y ) = f (x, y )dx
0
Z∞
−y 2 2
fY (y ) = 4ye xe −x dx
0
−y 2
=⇒ fY (y ) = 2ye
2
∴ f (X |Y ) = 2xe −x
Module 2
Joint probability distribution

Problem 5 Contd.

iii) Similar to fY (y ),
2
fX (x) = 2xe −x
2 +y 2 )
=⇒ fX (x) × fY (y ) = 4xye −(x = f (x, y )
Module 2
Joint probability distribution

Problem 6
Module 2
Joint probability distribution

Problem 6 Contd.
Module 2
Joint probability distribution

Problem 6 Contd.
Module 2
Joint probability distribution

Problem 6 Contd.
Module 2
Joint probability distribution

Problem 6 Contd.
Module 2
Joint probability distribution

Problem 7

Suppose the random variables X and Y have the joint density


function defined by
Module 2
Joint probability distribution

Problem 7 Contd.
Module 2
Joint probability distribution

Problem 7 Contd.
Module 2
Joint probability distribution

Problem 8
Module 2
Joint probability distribution

Problem 8 Contd.
Module 2
Joint probability distribution

Problem 8 Contd.
Module 2
Joint probability distribution

Problem 9
Module 2
Joint probability distribution

Problem 9 Contd.
Module 2
Joint probability distribution

Problem 10

For the following bivariate (two dimensional) probability


distribution of X and Y , find
Module 2
Joint probability distribution

Problem 10 Contd.
Module 2
Joint probability distribution

Problem 10 Contd.
Module 2
Joint probability distribution

Problem 11

The joint density function of w and z is given by


Module 2
Joint probability distribution

Problem 11 Contd.
Module 2
Joint probability distribution

Problem 11 Contd.
Module 2
Joint probability distribution

Problem 12

The Joint Probability Distribution of a pair of random variables is


given by the following table:

Y |X 1 2 3
1 1/12 1/6 0
2 0 1/9 1/5
3 1/18 1/4 2/15

i) Evaluate marginal distribution function.


ii) Evaluate conditional probability of Y given X = 2.
iii) Obtain P((X + Y ) < 5).
Module 2
Joint probability distribution

Problem 12 Cond.

Solution:

Y |X 1 2 3 P(Y )
1 1/12 1/6 0 3/12
2 0 1/9 1/5 14/45
3 1/18 1/4 2/15 79/180
P(X ) 5/36 19/36 5/15 1

i) M.D.F of X :

X 1 2 3
P(X ) 5/36 19/36 5/15
Module 2
Joint probability distribution

Problem 12 Contd.
ii) Conditional probability of Y given X = 2

P(Y = y |X = 2)
P(Y |X = 2) =
P(X = 2)
P(Y = 1|X = 2) 6
i) =
P(X = 2) 19
P(Y = 2|X = 2) 4
ii) =
P(X = 2) 19
P(Y = 3|X = 2) 9
iii) =
P(X = 2) 19

Y 1 2 3
P(Y = y |X = 2) 6/19 4/19 9/19
Module 2
Joint probability distribution

Problem 12 Contd.

iii)

P((X + Y ) < 5) = P(X = 1, Y = 1) + P(X = 1, Y = 2)


+ P(X = 1, Y = 3) + P(X = 2, Y = 1)
+ P(X = 2, Y = 2) + P(X = 3, Y = 1)
15
=
36
Module 2
Joint probability distribution

Problem 13

For the following Joint Probability Distribution of (X , Y ):

Y |X 1 2 3 4
1 1/20 1/20 1/10 1/10
2 1/10 1/10 1/10 1/10
3 1/10 1/10 1/20 1/20

i) Find the probability that Y = 2 given X = 4.


ii) Find the probability that Y = 2.
iii) Examine the two events X = 4 and Y = 2 are independent.
Module 2
Joint probability distribution

Problem 13 contd.
Y |X 1 2 3 4 P(Y )
1 1/20 1/20 1/10 1/10 6/20
2 1/10 1/10 1/10 1/10 4/10
3 1/10 1/10 1/20 1/20 6/20
P(X ) 5/20 5/20 5/20 5/20 1

i)

P(Y = 2, X = 4)
P(Y = 2|X = 4) =
P(X = 4)
1/10
=
5/20
2
=
5
Module 2
Joint probability distribution

Problem 13 contd.

2
ii) P(Y = 2) = 5
iii)

1
P(X = 4, Y = 2) =
10

1 2
P(Y = 2) =
P(X = 4) =
4 5
1
=⇒ P(X = 4) × P(Y = 2) = = P(X = 4, Y = 2)
10
∴ X = 4 and Y = 2 are independent.
Module 2
Joint probability distribution

Problem 14
For the following Joint Probability Distribution of (X , Y ):

Y |X 1 2 3
1 0.1 0.1 0.2
2 0.2 0.3 0.1

Find
i) Marginal distribution.
ii) Conditional probability of X given Y = 1.
iii) P((X + Y ) < 4).
iv) F (2, 2).
v) F (3, 2).
vi) FX (3).
vii) FY (1).
Module 2
Joint probability distribution

Problem 14 contd.

i)

Y |X 1 2 3 P(Y )
1 0.1 0.1 0.2 0.4
2 0.2 0.3 0.1 0.6
P(X ) 0.3 0.4 0.3 1
Module 2
Joint probability distribution

Problem 14 contd.
ii) Conditional probability of X given Y = 1

P(X = x|Y = 1)
P(X |Y = 1) =
P(Y = 1)
P(X = 1|Y = 1) 1
i) =
P(Y = 1) 4
P(X = 2|Y = 1) 1
ii) =
P(Y = 1) 4
P(X = 3|Y = 1) 1
iii) =
P(Y = 1) 2

X 1 2 3
P(X = x|Y = 1) 1/4 1/4 1/2
Module 2
Joint probability distribution

Problem 14 contd.
iii)

P((X + Y ) < 4) = P(X = 1, Y = 1) + P(X = 1, Y = 2)


+ P(X = 2, Y = 1)
= 0.4

iv)

F (2, 2) = P(X ≤ 2, Y ≤ 2)
= P(X = 1, Y = 1) + P(X = 1, Y = 2)
+ P(X = 2, Y = 1) + P(X = 2, Y = 2)
= 0.7
Module 2
Joint probability distribution

Problem 14 contd.

v)

F (3, 2) = P(X ≤ 3, Y ≤ 2)
= P(X = 1, Y = 1) + P(X = 1, Y = 2) + P(X = 1, Y = 3)
+ P(X = 2, Y = 1) + P(X = 2, Y = 2) + P(X = 2, Y = 3)
=1

vi)

FX (3) = P(X ≤ 3, Y = y )
=1
Module 2
Joint probability distribution

Problem 14 contd.

vii)

FY (1) = P(X ≤ x, Y = 1)
= 0.4
Module 2
Joint probability distribution

Problem 15

Two discrete random variables X and Y have


P(X = 0, Y = 0) = 2/9, P(X = 0, Y = 1) = 1/9,
P(X = 1, Y = 0) = 1/9 and P(X = 1, Y = 1) = 5/9.
i) Are X and Y independent?
ii) Find the joint and marginal distribution function.
Module 2
Joint probability distribution

Problem 15 contd.
Y |X 0 1 P(Y )
0 2/9 1/9 3/9
1 1/9 5/9 6/9
P(X ) 3/9 6/9 1

i)

2
P(X = 0, Y = 0) =
9

3 3
P(X = 0) =
P(Y = 0) =
9 9
1
=⇒ P(X = 0) × P(Y = 0) = ̸= P(X = 0, Y = 0)
9
Module 2
Joint probability distribution

Problem 15 contd.
ii) Marginal distribution is given in the table.
iii) For joint distribution, find F (0, 0), F (0, 1), F (1, 0) and F (1, 1).

2
F (0, 0) = P(X ≤ 0, Y ≤ 0) =
9
3
F (0, 1) = P(X ≤ 0, Y ≤ 1) =
9
3
F (1, 0) = P(X ≤ 1, Y ≤ 0) =
9
F (1, 1) = P(X ≤ 1, Y ≤ 1) = 1

X ≤0 X ≤1
2 3
Y ≤0 9 9
3
Y ≤1 9 1
Module 2
Joint probability distribution

Practice Problems I

1 Find the p.m.f. of number of sixes when a die is thrown twice.


2 Find the p.m.f. of number of heads when a coin is tossed
thrice.
3 A bag contains 3 red and 4 black balls. If two balls are
selected at random. Find the probability of getting red balls
by
a.) with replacement
b.) without replacement
4 Verify whether the random variables X and Y having the joint
p.d.f. are independent.
i.) f (x, y ) = 4xy , 0 < x < 1, 0 < y < 1.
ii.) f (x, y ) = 8xy , 0 < x < 1, 0 < y < x.
Module 2
Joint probability distribution

Practice Problems II
5 The joint p.d.f. of two random variables X and Y is
1
f (x, y ) = (6 − x − y )
8
, 0 < x < 2, 2 < y < 4. Find
i.) Marginal p.d.f.’s of X and Y .
ii.) Conditional distributions of X and Y .
iii.) Are X and Y are independent?
6 The joint p.d.f. of X and Y is

f (x, y ) = kx(x − y ), 0 < x < 2, −x < y < x

. Find
i.) the value of k.
ii.) Marginal p.d.f. of X and Y .
iii.) Conditional Distributions of X and Y .
Module 2
Joint probability distribution

Practice Problems III

7 The joint p.d.f. of X and Y is

f (x, y ) = Ae −(x+y ) , 0 ≤ x ≤ y , 0 ≤ y < ∞

. Find
i.) the value of A.
ii.) Are X and Y are independent?
8 If
2 +y 2 )
f (x, y ) = 4xye −(x , x ≥ 0, y ≥ 0
. Test whether X and Y are independent. Also, find the
conditional distributions.
Module 2
Joint probability distribution

Practice Problems IV
9 If
9(1 + x + y )
f (x, y ) = , 0 < x < ∞, 0 < y < ∞
2(1 + x)4 (1 + y )4

. Find
i.) Marginal p.d.f. of X and Y .
ii.) Conditional Distributions of X and Y .
10 The joint p.d.f. of two random variables X and Y is
1
f (x, y ) = (6 − x − y )
8
, 0 < x < 2, 2 < y < 4. Find
i.) P(X < 1, Y < 3)
ii.) P(X + Y < 3)
iii.) P(X < 1 | Y < 3)
Module 2
Joint probability distribution

Practice Problems V

11 Consider the J.P.D.F.


(
Le −(x+y ) , if 0 ≤ x ≤ y and 0 ≤ y ≤ ∞
f (x, y ) =
0, otherwise

Find L and check whether X and Y are independent.


12 Consider the J.P.D.F.
(
Ce −(2x+3y ) , if 0 ≤ y ≤ x < ∞
f (x, y ) =
0, otherwise

Find C and check whether X and Y are independent.


Module 2
Joint probability distribution

Practice Problems VI
13 Consider the J.P.D.F.
(
5 2
f (x, y ) = 16 x y , if 0 < y < x < 2
0, otherwise

Find Marignal PDF’s, f (X |Y ) and check whether X and Y


are independent.
14 Consider the J.P.D.F.
(
1+xy
4 , if |x| ≤ 1, |y | ≤ 1
f (x, y ) =
0, otherwise

Find Marignal PDF’s, Conditional probability and check


whether X and Y are independent.
Module 2
Joint probability distribution

Practice Problems VII

15 The following table gives the joint probability distribution of


X and Y . Find the Marginal PDF of X and Y .
Y /X 1 2 3
1 0.1 0.1 0.2
2 0.2 0.3 0.1
16 Consider the J.P.D.F. f (x, y ) = k(xy + y 2 ), if x ∈ [0, 1] and
y ∈ [0, 2]. Find
i.) Find k.
ii.) P(Y > 1).
iii.) P(X > 12 , Y < 1).
iv.) P(X + Y ≤ 1).
Module 2
Joint probability distribution

Practice Problems VIII

17 Consider the J.P.D.F.


(
8
9 xy , if 1 ≤ x ≤ y ≤ 2
f (x, y ) =
0, otherwise

Find Marignal PDF’s, f (X |Y ), f (Y |X ) and check whether X


and Y are independent.
Module 2
Mathematical Expectation

Mathematical Expectation
Module 2
Mathematical Expectation

Variance
Module 2
Mathematical Expectation

Variance Properties
Module 2
Mathematical Expectation

Problem 1
Module 2
Mathematical Expectation

Problem 1 Contd.
Module 2
Mathematical Expectation

Problem 2
Module 2
Mathematical Expectation

Problem 2 Contd.
Module 2
Mathematical Expectation

Problem 2 Contd.
Module 2
Mathematical Expectation

Problem 3
Calculate expectation and variance of X , if the probability
distribution of the random variable X is given by,
Module 2
Mathematical Expectation

Problem 4
A variate X has the following probability distribution:
Module 2
Mathematical Expectation

Problem 5
Module 2
Mathematical Expectation

Problem 6
For the continuous probability function f (x) = kx 2 e −x when
x ≥ 0, find (i) k (ii) Mean (iii) Variance
Module 2
Mathematical Expectation

Problem 6 Contd.
Module 2
Mathematical Expectation

Problem 6 Contd.
Module 2
Mathematical Expectation

Problem 7
Suppose a continuous random variable X has the probability
density f (x) = K (1 − x 2 ) for 0 < x < 1 and f (x) = 0, otherwise.
Find (i) k (ii) Mean (iii) Variance.
Module 2
Mathematical Expectation

Problem 7 Contd.
Module 2
Mathematical Expectation

Problem 8
Module 2
Mathematical Expectation

Problem 8 Contd.
Module 2
Mathematical Expectation

Problem 9
The cumulative distribution function for a continuous random
variable X is
Module 2
Mathematical Expectation

Problem 9 Contd.
Module 2
Mathematical Expectation

Problem 10

If X is the continuous random variable whose density function is


Module 2
Mathematical Expectation

Problem 10 Contd.
Module 2
Mathematical Expectation

Problem 10 Contd.
Module 2
Mathematical Expectation

Practice Problems I
1 Determine the mean and variance of the random variable X
having the following probability distribution.

2 Six men and five women apply for an executive position in a


small company. Two of the applicants are selected for an
interview. Let X denote the number of women in the interview
pool. We have found the probability mass function of X.

How many women do you expect in the interview pool?


Module 2
Mathematical Expectation

Practice Problems II
3 Suppose the probability mass function of the discrete random
variable is

What is the value of E (3X + 2X 2 )?


4 Consider a random variable X with probability density function
Module 2
Mathematical Expectation

Practice Problems III

5 The time to failure in thousands of hours of an important


piece of electronic equipment used in a manufactured DVD
player has the density function.

Find the expected life of the piece of equipment.


Module 2
Mathematical Expectation

Practice Problems IV
6 A commuter train arrives punctually at a station every 25
minutes. Each morning, a commuter leaves his house and
casually walks to the train station. Let X denote the amount
of time, in minutes, that commuter waits for the train from
the time he reaches the train station. It is known that the
probability density function of X is

Obtain and interpret the expected value of the random


variable X.
Module 2
Mathematical Expectation

Practice Problems V

7 Suppose the life in hours of a radio tube has the probability


density function

Find the mean of the life of a radio tube.


Module 2
Covariance

Covariance and its Properties


If X and Y are two random variables, then the covariance between
them is
COV (X , Y ) = E [XY ] − E [X ]E [Y ]
Properties
COV (aX , bY ) = abCOV (X , Y )
COV (X + a, Y + b) = COV (X , Y )
COV (aX + b, cY + d) = acCOV (X , Y )
COV (X + Y , Z ) = COV (X , Z ) + COV (Y , Z )
COV (aX + bY , cX + dY ) =
acVar (X ) + bdVar (Y ) + (ad + bc)COV (X , Y )
If X and Y are the random variables, then COV (X , X ) = σ 2 .
Module 2
Covariance

Problem 1

Problem 1
If X has mean 4, variance 9, while Y has mean −2 and variance 5
and the two variables are independent. Find
a.) E [XY ]
b.) E [XY 2 ]

Solution
Given E (X ) = 4, Var (X ) = 9, E (Y ) = −2, Var (Y ) = 5.

Since they are independent, we have E (XY ) = E (X )E (Y ) = −8.


E (XY 2 ) = E (X )E (Y 2 ) = 36.
E [Y 2 ] = var (Y ) + E [Y ]2
Module 2
Covariance

Problem 2

Let X and Y have the joint p.m.f


x + 2y
P(X , Y ) = , x = 1, 2; y = 1, 2
2
. Find the COV (X , Y ).
Module 2
Covariance

Problem 3

Let X and Y have the joint p.m.f

Y \X 0 1 2
3 9 3
0 28 28 28
3 3
1 14 14 0
1
2 28 0 0

Find the COV (X , Y ).


Module 2
Covariance

Problem 4

The joint p.d.f. of two random variables X and Y is

f (x, y ) = 3(x + y ); x ∈ [0, 1]; y ∈ [0, 1] and x + y ≤ 1

. Find the COV (X , Y ).


Module 2
Covariance

Problem 4 Contd.

1−x
Z
fx (X ) = f (x, y )dy
0
1−x
Z 1−x
Z
= 3(x + y )dy = 3 (x + y )dy
0 0
" #1−x " #
y2 (1 − x)2
= 3 xy + = 3 x(1 − x) +
2 2
" #0
2
(1 − x )
=3 .
2
Module 2
Covariance

Problem 4 Contd. " #


(1−y 2 )
Similarly fy (Y ) = 3 2

Z1
E [X ] = xfx (X )dx
0
Z1
3
= x(1 − x 2 )dx
2
0
Z1
3
= (x − x 3 )dx
2
0
" #1
3 x2 x4 3
= − = .
2 2 4 8
0
Module 2
Covariance

Problem 4 Contd.
" #
(1−y 2 )
Similarly E [Y ] = 3 2

1−y
Z1 Z
E (XY ) = xyf (X , Y )dxdy
0 0
1−y
Z1 Z
= xy 3(x + y )dxdy
0 0
1
Z Z 1−y

=3 (x 2 y + xy 2 )dxdy
0 0
Module 2
Covariance

Problem 4 Contd.

1−y
Z1 Z Z1 " 3 #1−y
x y x 2y 2
E (XY ) = 3 (x 2 y + xy 2 )dxdy = 3 + dy
3 2
0 0 0 0
Z1 " #1−y
(1 − y )3 y (1 − y )2 y 2
=3 + dy
3 2
0 0
" Z1 Z1 h #
1h i 1 2 i
=3 y − 3y 2 + 3y 3 − y 4 dy + 4 3
y + y − 2y dy
3 2
0 0
1
= .
10
Module 2
Covariance

Problem 4 Contd.

COV (X , Y ) = E [XY ] − E [X ]E [Y ]
!
1 3 3
= − ∗
10 8 8
1 9
= −
10 64
−13
= .
320
Module 2
Covariance

Problem 5 Try

The joint p.d.f. of two random variables X and Y is

f (x, y ) = 8xy ; x ∈ [0, 1]; y ∈ [0, 1] and 0 otherwise.

Find the COV (X , Y ).


Module 2
Covariance

Problem 6

If f (x) = e −x , x ∈ [0, ∞]. Find the mean variance and the third
moment about the origin.
Module 2
Covariance

Problem 6 Contd.
Let the r th raw moment be
Z∞

µr = x r f (x)dx
0
Z∞
= x r e −x dx
0
= Γ(r + 1) = r !.

If r = 1, µ1 = 1 and thus mean is 1.
′ ′
 ′ 2
If r = 2, µ2 = 2 and variance Var = µ2 − µ1 = 2 − 1 = 1.
If r = 3, µ13 = 6.
Module 2
Covariance

Problem 7

If f (x) = y0 (x(2 − x)), x ∈ [0, 2]. Find the following:


i.) y0 .
ii.) Mean and variance
iii.) Median
iv.) Mode
v.) Mean deviation about mean.
Module 2
Covariance

Problem 7 contd.
i.)

Z2
=⇒ y0 x(2 − x)dx = 1
0
Z2
=⇒ y0 (2x − x 2 )dx = 1
0
" #2
2x 2 x 3
=⇒ y0 − =1
2 3
0
" #
8 3
=⇒ y0 4 − = 1. Thus y0 = .
3 4
Module 2
Covariance

Problem 7 contd.
ii.) To find mean and variance. Let us find through the moments.

Z2

µr = x r f (x)dx
0
Z2
= x r y0 (2x − x 2 )dx
0
Z2
3
= x r (2x − x 2 )dx
4
0
Z2 !
3
= 2x r +1 − x r +2 dx
4
0
Module 2
Covariance

Problem 7 contd.

" #2
′ 3 2x r +2 x r +3
µr = −
4 r +2 r +3
0
" #
3 2×2 r +2 2 r +3
= −
4 r +2 r +3
" #
3 r +3 1 1
= 2 −
4 r +2 r +3
" #
3 r +3 1
= × (2 ) .
4 (r + 2)(r + 3)
Module 2
Covariance

Problem 7 contd.
If r = 1, then
 
′ 3 4 1
µ1 = × 2
4 3∗4
= 1.
If r = 2, then
 
′ 3 5 1
µ2 = × 2
4 4∗5
6
= .
5
 2
′ ′
Var = µ2 − µ1
6 1
= − 12 = .
5 5
Module 2
Covariance

Problem 7 contd.
iii.) For median we have P(X ≤ M) = P(x > M) = 12 . Consider

ZM ZM
P(X ≤ M) = f (x)dx = y0 (2x − x 2 )dx
0 0
ZM
3
= (2x − x 2 )dx
4
0
" #M
3 2x 2 x 3
= − = 3M 2 − M 3 − 2 = 0.
4 2 3
0
√ √
The values for M are 1, 1 ± 3. But 1 ± 3∈
/ [0, 2]. Thus the
median is 1.
Module 2
Covariance

Problem 7 contd.

iv.) Let f (x) = 43 (2x − x 2 ).



f (x) = 34 (2 − 2x) = 0, we have x = 1.
′′
Then f (x) = 43 (−2) = −3 2 < 0. Thus the maximum attained.
Hence the mode is 1.
Module 2
Covariance

Problem 7 contd.
v.)

Z2
M.D. about Mean = |x − mean|f (x)dx
0
Z2
3
= |x − 1|x(2 − x)dx
4
0
Z1 Z2
3 3
= |x − 1|x(2 − x)dx + |x − 1|x(2 − x)dx
4 4
0 1
Z1 Z2
3 3
= (1 − x)x(2 − x)dx + (x − 1)x(2 − x)dx
4 4
0 1
Module 2
Covariance

Problem 7 contd.

v.)

Z1 Z2
3 3
M.D. about Mean = (x 3 − 3x 2 + 2x)dx + (3x 2 − x 3 − 2x)dx
4 4
0 1
" #1 " #2
3 x 4 3x 3 2x 2 3 33 x 4 2x 2
= − + + − −
4 4 3 2 4 3 4 2
" # "0 1
#
3 1 3 16 1
= −1+1 + (8 − − 4) − (1 − − 1)
4 4 4 4 4
3
= .
8
Module 2
Covariance

Problem 8

If f (x) = k(x − x 2 ), x ∈ [0, 1]. Find the k, mean, and mode.


Module 2
Covariance

Problem 8 Contd.
i.)

Z1
=⇒ k(x − x 2 )dx = 1
0
Z1
=⇒ k (x − x 2 )dx = 1
0
" #1
x2 x3
=⇒ k − =1
2 3
0
" #
1 1
=⇒ k − = 1. Thus k = 6.
2 3
Module 2
Covariance

Problem 8 Contd.
ii.)

Z1
E [X ] = xf (x)dx
0
Z1
=6 x(x − x 2 )dx
0
" #1
x3 x4
=6 −
3 4
0
1
= .
2
1
Mode is also 2 (TRY).
Module 2
Covariance

Problem 9 (TRY)

(
sin(x)
2 , if 0 ≤ x ≤ π
Consider f (x) =
0, otherwise
Find the following:
i.) Mean
ii.) Mode
iii.) Median
iv.) P(0 ≤ x ≤ π2 ).
Module 2
Moment Generating Function

Moment Generating Function


Module 2
Moment Generating Function

Moment Generating Function


Module 2
Moment Generating Function

Problem 1
Module 2
Moment Generating Function

Problem 1 Contd.
Module 2
Moment Generating Function

Problem 1 Contd.
Module 2
Moment Generating Function

Problem 2
A random variable X has the probability function
f (x) = 21x , x = 1, 2, 3, · · ·
i) Find M.G.F
ii) Mean
Solution:

M.G.F = MX (t) = E (e tx )
X∞
= e tx f (x)
x=1

X 1
= e tx
2x
x=1
∞  t x
X e
=
2
x=1
Module 2
Moment Generating Function

Problem 2 Contd.
  t 2  t 3
et

e e
= + + + ···
2 2 2
 t 2
et et
 
e
= 1+ + + ···
2 2 2
 t −1
et

e
= 1−
2 2
e 2 − e −1
t t
 
=
2 2
t
 
e 2
=
2 2 − et
et
=⇒ MX (t) =
2 − et
Module 2
Moment Generating Function

Problem 2 Contd.

  t 
d e
Mean(X̄ ) =
dt 2 − e t t=0
(2 − e t )e t − e t (−e −t )
 
=
(2 − e t )2 t=0
(2 − e 0 )e 0 − e 0 (−e 0 )
=
(2 − e 0 )2
=2
Module 2
Moment Generating Function

Problem 3
The M.G.F of a random variable X is given by
et 4e 3t 2e 4t 4e 5t
MX (t) = + + +
3 15 15 15
Find the P.D.F of X .
Solution:
For discrete random variable,
MX (t) = E (e tx )
X
= e txi P(xi )
i

Hence,
x 1 3 4 5
P(x) 1/3 4/15 2/15 4/15
Module 2
Moment Generating Function

Problem 4
Find the M.G.F of a random variable whose moments are
µ′r = (r + 1)!3r and hence find its mean.
Solution:
The M.G.F is
∞ r
X t
MX (t) = µ′r
r!
r =0

X (r + 1)!3r t r
=
r!
r =0

X (r + 1)!(3t)r
=
r!
r =0
1
= 1 + 2(3t) + 3(3t)2 + · · · =
(1 − 3t)2
Module 2
Moment Generating Function

Problem 4 Contd.

 
d
Mean(X̄ ) = (MX (t))
dt t=0
 
d −2
= [1 − 3t]
dt t=0
= −2[[1 − 3t]−2 (−3)]t=0
= [6(1 − 3t)−3 ]t=0
= 6(1 − 0)−3
=⇒ µ′1 = 6
Module 2
Moment Generating Function

Problem 5

Find the M.G.F of


(
ke −kx , if x > 0
f (x) =
0, otherwise

Also find
i) Mean
ii) Variance
iii) µ′3
iv) µ′4
Module 2
Moment Generating Function

Problem 5 Contd.

M.G.F = MX (t) = E (e tx )
Z ∞
= e tx f (x)dx
Z−∞∞
= e tx ke −kx dx
0
Z ∞
=k e tx e −kx dx
0
Z ∞
=k e −(k−t)x dx
0
 −(k−t)x ∞
e −∞ e0
 
e
=k =k −
−(k − t) 0 −(k − t) −(k − t)
k
=⇒ MX (t) =
k −t
Module 2
Moment Generating Function

Problem 5 Contd.

  
d k
Mean µ′1 =
dt k − t t=0
 
(k − t)(0) − k(−1)
=
(k − t)2 t=o
1
=
k

d2
  
k
= µ′2
dt 2 k −t t=0
2
=⇒ = 2
k
Module 2
Moment Generating Function

Problem 5 Contd.

Var (X ) = µ′2 − (µ′1 )2


2 1
= 2 − ( )2
k k
1
= 2
k

d3
  
k 6
µ′3 = =
dt 3 k −t k3
 4 t=0
d k 24
µ′4 = =
dt 4 k −t t=0 k4
Module 2
Moment Generating Function

Problem 6

A random variable X has the density function


(
2e −2x , if x ≤ 0
f (x) =
0, otherwise

Find
i) M.G.F
ii) Four moments about the origin
iii) Mean and Variance
Module 2
Moment Generating Function

Problem 6 Contd.

M.G.F = MX (t) = E (e tx )
Z ∞
= e tx f (x)dx
Z−∞∞
= e tx 2e −2x dx
0
Z ∞
=2 e tx e −2x dx
0
Z ∞
=2 e −(2−t)x dx
0
 −(2−t)x ∞
e −∞ e0
 
e
=2 =2 −
−(2 − t) 0 −(2 − t) −(2 − t)
2
=⇒ MX (t) = if |t| < 2
2−t
Module 2
Moment Generating Function

Problem 6 Contd.

t −1
 
MX (t) = 1 −
2
 2  3  r
t t t t
=1+ + + + ··· + + ··· (1)
2 2 2 2

r th moment about the origin

µ′r = r ! × coefficient of t r in (1)


r!
= r
2
Module 2
Moment Generating Function

Problem 6 Contd.

1
r = 1 =⇒ µ′1 =
2
′ 1
r = 2 =⇒ µ2 =
2
3
r = 3 =⇒ µ′3 =
4
′ 3
r = 4 =⇒ µ4 =
2

1
Mean =
2
Var (X ) = µ′2 − (µ′1 )2
1 1 1
= − =
2 4 4
Module 2
Moment Generating Function

Problem 7
Find the M.G.F of the random variable X having P.D.F

x,
 if 0 ≤ x < 1
f (x) = 2 − x, if 1 ≤ x < 2

0, otherwise

Solution:

Z ∞
MX (t) = e tx f (x)dx
−∞
Z1 Z 2 Z ∞
tx tx
= xe dx + (2 − x)e dx + 0e tx dx
0 1 2
Module 2
Moment Generating Function

Problem 7 contd.

  tx   tx 1   tx   tx 2
e e e e
= x − 2
+ (2 − x) − (−1) 2
t t t t
 t t
 0 2t t t
 1
e e 1 e e e
= − 2 + 2 + 0+ 2 − − 2
t t t t t t
t
1 − 2e + e 2t
=
t2
(e − 1)2
t
=⇒ M.G .F =
t2
Module 2
Moment Generating Function

Problem 8

Prove that the moment generating function of a random variable


X defined by the density function
Module 2
Moment Generating Function

Problem 8 Contd.
Module 2
Moment Generating Function

Problem 8 Contd.
Module 2
Moment Generating Function

Problem 9
Module 2
Moment Generating Function

Problem 9 Contd.
Module 2
Moment Generating Function

Problem 9 Contd.
Module 2
Moment Generating Function

Problem 10
Module 2
Moment Generating Function

Problem 10 Contd.
Module 2
Moment Generating Function

Practice Problems I
1 Find the probability distribution of the total number of heads
obtained in four tosses of a balanced coin. Hence obtain the
m.g.f of X , mean and variance of X .
2 Let the random variable X have the p.d.f.
( −x
1 2
e , if x > 0
f (x) = 2
0, otherwise

. Find the m.g.f., mean and variance of X .


3 Let the random variable X have the p.d.f.
( −x
1 3
e , if x > 0
f (x) = 3
0, otherwise

. Find the P(X > 3), moment generating function, mean and
variance of X .
Module 2
Moment Generating Function

Practice Problems II

4 Find the moment generating function of a random variable X


having the p.d.f.
( −x
x 2
e , if x > 0
f (x) = 4
0, otherwise

. Also, deduce the first four moments about the origin.


5 If a random variable X has the moment generating function
3
MX (t) = 3−t . Obtain the standard deviation of X .

You might also like