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

Module-2 (Correction and Regression)

The document discusses random variables and probability distributions. It defines a random variable as a variable that assigns a numerical value to each outcome in a sample space. Random variables can be discrete or continuous. Probability distributions describe the probabilities of various outcomes for random variables. Discrete random variables have probability mass functions, while continuous random variables have probability density functions. Examples are provided to illustrate discrete and continuous probability distributions.

Uploaded by

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

Module-2 (Correction and Regression)

The document discusses random variables and probability distributions. It defines a random variable as a variable that assigns a numerical value to each outcome in a sample space. Random variables can be discrete or continuous. Probability distributions describe the probabilities of various outcomes for random variables. Discrete random variables have probability mass functions, while continuous random variables have probability density functions. Examples are provided to illustrate discrete and continuous probability distributions.

Uploaded by

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

Module-2: Randaom Variables

Statistics is concerned with making inferences about populations and


population characteristics. Experiments are conducted with results that
are subject to chance. The testing of a number of electronic components
is an example of a statistical experiment, a term that is used to describe
any process by which several chance observations are generated. It is often
important to allocate a numerical description to the outcome.

For example, the sample space giving a detailed description of each


possible outcome when three electronic components are tested may be
written S = {NNN, NND, NDN, DNN, NDD, DND, DDN, DDD}, where
N denotes nondefective and D denotes defective.

. Module-2 . 2 / 122
One is naturally concerned with the number of defectives that occur.
Thus, each point in the sample space will be assigned a numerical value of
0, 1, 2, or 3. These values are, of course, random quantities determined by
the outcome of the experiment. They may be viewed as values assumed by
the random variable X , the number of defective items when three
electronic components are tested.

A random variable is a variable that associates a real number with each


element in the sample space.

. Module-2 . 3 / 122
Example

Two balls are drawn in succession without replacement from an urn


containing 4 red balls(R) and 3 black balls(B). The possible outcomes
S = {RR, RB, BR, BB}. Then we define a function X from S to real
number R, where X represent the number of red balls for every sample of
S

. Module-2 . 4 / 122
The variable X , representing the number of red balls in a sample of S.
Define X : S −→ R by

X (s1 ) = 2

X (s2 ) = 1

X (s3 ) = 1

X (s4 ) = 0

where si ∈ S, i = 1, 2, 3, 4.
Thus the variable X is called a random variable with the values x is 0, 1, 2.

. Module-2 . 5 / 122
If a sample space contains a finite number of possibilities or an unending
sequence with as many elements as there are whole numbers, it is called a
discrete sample space.

If a sample space contains an infinite number of possibilities equal to the


number of points on a line segment, it is called a continuous sample space.

A random variable is called a discrete random variable if its set of possible


outcomes is countable.

When a random variable can take on values on a continuous scale, it is


called a continuous random variable.

. Module-2 . 6 / 122
Discrete Probability Distributions

A discrete random variable assumes each of its values with a certain


probability.
In case of tossing a coin two times, the possible outcomes are
S = {HH, HT , TH, TT }. The variable X , representing the number of
heads in s ∈ S. Now, we define by X : S −→ R as

X (s1 ) = 2

X (s2 ) = 1

X (s3 ) = 1

X (s4 ) = 0.

. Module-2 . 7 / 122
Thus the random variable X and the values of x with the probability
values of x is given below table.

X 0 1 2
1 1 1
P(x)=P(X=x) 4 2 4

The set of ordered pairs (x, P(x)) is called the probability mass function,
probability function, or probability distribution of the discrete random
variable X .

. Module-2 . 8 / 122
Probability mass function

The set of ordered pairs (x, P(x)) is a probability mass function,


probability function, or probability distribution of the discrete random
variable X if, for each possible outcome x,

P(x) ≥ 0
P
P(x) = 1.
x

. Module-2 . 9 / 122
Example

A shipment of 20 similar laptop computers to a retail outlet contains 3


that are defective. If a school makes a random purchase of 2 of these
computers, find the probability distribution for the number of defectives.
Solution
Let X be a random variable whose values x are the possible numbers of
defective computers purchased by the school. Now,
(3)(17)
P(X = 0) = 0 20 2 = 68
95
(2)
(3)(17) 51
P(X = 1) = 1 20 1 = 190
(2)
(3)(17) 3
P(X = 2) = 2 20 0 = 190
(2)

. Module-2 . 10 / 122
Thus, the probability distribution of X is given below table.

X 0 1 2
68 51 3
P(x)=P(X=x) 95 190 190

. Module-2 . 11 / 122
Continuous Probability Distributions

A continuous random variable has a probability of 0 of assuming exactly


any of its values. Consequently, its probability distribution cannot be given
in tabular form.

Let us discuss a random variable whose values are the heights of all people
over 21 years of age.
Between any two values, say 163.5 and 164.5 centimeters, or even 163.99
and 164.01 centimeters, there are an infinite number of heights, one of
which is 164 centimeters.

. Module-2 . 12 / 122
The probability of selecting a person at random who is exactly 164
centimeters tall and not one of the infinitely large set of heights so close to
164 centimeters that you cannot humanly measure the difference is
remote, and thus we assign a probability of 0 to the event.
This is not the case, however, if we talk about the probability of selecting
a person who is at least 163 centimeters but not more than 165
centimeters tall.
Now we are dealing with an interval rather than a point value of our
random variable.

. Module-2 . 13 / 122
We shall concern ourselves with computing probabilities for various
intervals of continuous random variables such as
P(a < X < b), P(W ≥ c), and so forth. Note that when X is continuous,
P(a < X ≤ b) = P(a < X < b) + P(X = b) = P(a < X < b). That is, it
does not matter whether we include an endpoint of the interval or not.
This is not true, though, when X is discrete.

A probability density function is constructed so that the area under its


curve bounded by the x-axis is equal to 1 when computed over the range
of X for which f (x) is defined.

. Module-2 . 14 / 122
Should this range of X be a finite interval, it is always possible to extend
the interval to include the entire set of real numbers by defining f (x) to be
zero at all points in the extended portions of the interval.

In the following Figure, the probability that X assumes a value between a


and b is equal to the shaded area under the density function between the
ordinates at x = a and x = b, and from integral calculus is given by
Z b
P(a < X < b) = f (x)dx.
a

. Module-2 . 15 / 122
. Module-2 . 16 / 122
Probability density function

The function f (x) is a probability density function (pdf) for the continuous
random variable X , defined over the set of real numbers, if
fZ(x) ≥ 0, for all x ∈ R,

f (x)dx = 1.
−∞

Example
Suppose that the error in the reaction temperature, in C, for a controlled
laboratory experiment is a continuous random variable X having the
probability density function

 x 2 , −1 < x < 2

3
f (x) =
0.

elsewhere.
. Module-2 . 17 / 122
Example Cont...

1 Verify that f (x) is a density function.


2 Find P(0 < X ≤ 1).

Solution
For(1),
Obviously, f (x) ≥ 0. To verify condition
Z ∞
f (x)dx = 1.
−∞

. Module-2 . 18 / 122
Example Cont...

Now,
Z ∞ Z −∞ Z 2 Z ∞
f (x)dx = f (x)dx + f (x)dx + f (x)dx
−∞ −1 −1 2
2
x2
Z
=0+ dx + 0
−1 3
2
x3

=
3×3 −1
8 (−1)
= −
9 9
8 (1)
= +
9 9
= 1.

. Module-2 . 19 / 122
Example Cont...

For(2),
Z 1
P(0 < X ≤ 1) = f (x)dx
0
1
x2
Z
= dx
0 3
 3 1
x
=
3×3 0
1
= −0
9
1
= .
9

. Module-2 . 20 / 122
Cumulative distribution function

The cumulative distribution function F (x) of a random variable X with


probability distribution P(x) and probability desity function f (x) is

P


 P(X = t), If X is discrete
t≤x
F (x) = P(X ≤ x) = Z x
f (x)dx, If X is continuous



−∞

Let F (x) be a cumulative distribution function of a continuous random


d(F (x))
variable X . Then P(a < X < b) = F (b) − F (a) and f (x) = dx , if the
derivative exists.

. Module-2 . 21 / 122
Problem

A random variable X has the following probability mass function is given

X -2 -1 0 1 2 3
P(X) 0.1 k 0.2 2k 0.3 k

1 Find k.
2 Evaluate P(X ≤ 2) and P(−1 ≤ X ≤ 2).
3 Find the cumulative distribution function.

. Module-2 . 22 / 122
Solution

P
For(1), since P(x) is p.m.f, and P(x) = 1. , it follows that we get
x

X
P(x) = 1
x

0.1 + k + 0.2 + 2k + 0.3 + k = 1

0.6 + 4k = 1

4k = 0.4
0.4
k=
4
k = 0.1

. Module-2 . 23 / 122
Solution Cont...

X -2 -1 0 1 2 3
P(X) 0.1 0.1 0.2 0.2 0.3 0.1

For(2),

P(X ≤ 2) = P(X = −2) + P(X = −1) + P(X = 0) + P(X = 1) + P(X = 2)

= 0.1 + 0.1 + 0.2 + 0.2 + 0.3

= 0.9

OR
. Module-2 . 24 / 122
Solution Cont...

P(X ≤ 2) = 1 − P(X > 2)

= 1 − P(X = 3)

= 1 − 0.1

= 0.9

Now,

P(−1 ≤ X ≤ 2) = P(X = −1) + P(x = 0) + P(x = 1) + P(x = 2)

= 0.1 + 0.2 + 0.2 + 0.3

= 0.8
. Module-2 . 25 / 122
Solution Cont...

P
F (x) = P(X ≤ x) = P(X = t).
t≤x


P(X ≤ −2) = 0.1, If x = −2







P(X ≤ −1) = 0.2, If x = −1







P(X ≤ 0) = 0.4,

If x = 0
F (x) =
P(X ≤ 1) = 0.6, If x = 1







P(X ≤ 2) = 0.9, If x = 2







P(X ≤ 3) = 1,

If x = 3.

. Module-2 . 26 / 122
Problem

A random variable X has the following probability mass function is given

X 0 1 2 3 4 5 6 7
P(X) 0 k 2k 2k 3k k2 2k 2 7k 2 +k

1 Find k.
2 Evaluate P(X ≤ 6), P(X ≥ 6) and P((1.5 < X < 4.5)/(X > 2))
3 Find the cumulative distribution function.

. Module-2 . 27 / 122
Problem

Let X be a continuous random variable with probability density function


(pdf) is 
2x, 0 < x < 1

f (x) =
0.

elsewhere.

1 Find P(X ≤ 0.4), P(X ≥ 34 ) and P(X ≥ 12 .)


2 Evaluate P( 12 < X ≤ 34 ) and P(X > 43 /X > 12 ).
3 Find the cumulative distribution function.

. Module-2 . 28 / 122
Solution

P((X > 34 ) ∩ (X > 21 ))


 
3 1
For(2), P X > /X > =
4 2 P(X > 12 )
P(X > 34 )
=
P(X > 12 )
Z 1
2xdx
3
= Z 41
2xdx
1
2
 2 1
x 3 7
7
4 16
= = = .
[x 2 ]11 3
4
12
2

. Module-2 . 29 / 122
Problem

The Department of Energy (DOE) puts projects out on bid and generally
estimates what a reasonable bid should be. Call the estimate b. The DOE
has determined that the density function of the winning (low) bid is

5 2
8b , 5b ≤ y ≤ 2b


f (y ) =
0.

elsewhere.

Find F (y ) and use it to determine the probability that the winning bid is
less than the DOE’s preliminary estimate b.

. Module-2 . 30 / 122
Solution

Z y
To find F (y ),F (y ) = P(Y ≤ y ) = f (y )dy .
−∞
Z 2b h i2b
5y 5y
For 25 b ≤ y ≤ 2b, then P(Y ≤ y ) = 5
8b dy = 8b 2
= 8b − 14 .
2
b 5
b
5
Thus, 



0, y ≤ 25 b

F (y ) = 5y 1 2
 8b − 4 , 5b ≤ y ≤ 2b


y ≥ 2b.

1.

. Module-2 . 31 / 122
Two dimensional random Variables

Our study of random variables and their probability distributions in the


preceding sections was restricted to one-dimensional sample spaces, in that
we recorded outcomes of an experiment as values assumed by a single
random variable.

There will be situations, however, where we may find it desirable to record


the simultaneous outcomes of several random variables.

For example, we might measure the amount of precipitate P and volume


V of gas released from a controlled chemical experiment, giving rise to a
two-dimensional sample space consisting of the outcomes (p, v ), or we
might be interested in the hardness H and tensile strength T of
cold-drawn copper, resulting in the outcomes (h, t).
. Module-2 . 32 / 122
Two dimensional random Variables

In a study to determine the likelihood of success in college based on high


school data, we might use a threedimensional sample space and record for
each individual his or her aptitude test score, high school class rank, and
grade-point average at the end of freshman year in college.

For example, if an 18-wheeler is to have its tires serviced and X represents


the number of miles these tires have been driven and Y represents the
number of tires that need to be replaced, then p(30000, 5) is the
probability that the tires are used over 30,000 miles and the truck needs 5
new tires.

. Module-2 . 33 / 122
Joint probability distribution

Definition
The function p(x, y ) is a joint probability distribution or probability mass
function of the discrete random variables X and Y if
1 p(x, y ) ≥ 0, for all (x, y ),
PP
2 p(x, y ) = 1,
x y
where p(x, y ) = P(X = x, Y = y ).

. Module-2 . 34 / 122
Problem

Two ballpoint pens are selected at random from a box that contains 3 blue
pens, 2 red pens, and 3 green pens. If X is the number of blue pens
selected and Y is the number of red pens selected, find
1 the joint probability function p(x, y ).
2 P (X + Y ≤ 1).

. Module-2 . 35 / 122
Solution

For(1),
The possible pairs of values (x, y ) are (0, 0), (0, 1), (1, 0), (1, 1), (0, 2), and
(2, 0).
Now, p(0, 1), for example, represents the probability that a red and a
green pen are selected. The total number of equally likely ways of
selecting any 2 pens from the 8 is 82 = 28


The number of ways of selecting 1 red from 2 red pens and 1 green from 3
green pens is 21 31 = 6.
 

6 3
Hence, p(0, 1) = 28 = 14 .
Similar calculations yield the probabilities for the other cases, which are
presented in following table.
. Module-2 . 36 / 122
Solution Cont...

x
p(x, y ) Row Totals
0 1 2
3 9 3 15
0 28 28 28 28
3 3 3
y 1 14 14 0 7
1 1
2 28 0 0 28
5 15 3
Column Totals 14 28 28 1

For (2), P(X + Y ≤ 1) = p(0, 0) + p(0, 1) + p(1, 0)


3 3 9
= + +
28 14 28
9
= .
14
. Module-2 . 37 / 122
Joint probability density function

Definition
The function f (x, y ) is a joint probability density function of the
continuous random variables X and Y if
1 f (x, y ) ≥ 0, for all (x, y ),
Z ∞Z ∞
2 f (x, y )dxdy = 1.
−∞ −∞

. Module-2 . 38 / 122
Problem

A privately owned business operates both a drive-in facility and a walk-in


facility. On a randomly selected day, let X and Y , respectively, be the
proportions of the time that the drive-in and the walk-in facilities are in
use, and suppose that the joint density function of these random variables
is 
 2 (2x + 3y ), 0 ≤ x ≤ 1, 0 ≤ y ≤ 1

5
f (x, y ) =
0,

elesewhere.

1 Verify f (x, y ) is a probability density function

Find P 0 < X < 12 , 14 < Y < 12



2

. Module-2 . 39 / 122
Solution
Z ∞ Z ∞
For(1), f (x, y )dxdy = 1.
−∞ −∞

Z ∞ Z ∞ Z 1Z 1
2
f (x, y )dxdy = (2x + 3y )dxdy
−∞ −∞ 0 0 5
Z 1 2 x=1
2x 6xy
= + dy
0 5 5 x=0
Z 1 
2 6y
= + dy
0 5 5
y =1
3y 2

2y
= +
5 5 y =0
2 3
= +
5 5
= 1.
. Module-2 . 40 / 122
Solution Cont...

For(2), P 0 < X < 12 , 14 < Y < 1



2

  Z 1 Z 1
1 1 1 2 2 2
P 0<X < , <Y < = (2x + 3y )dxdy
2 4 2 1
0 5
4
Z 1 2 x= 12
2 2x 6xy
= + dy
1 5 5 x=0
4
Z 1 
2 1 3y
= + dy
1 10 5
4
y = 21
3y 2

y
= +
10 10 y = 1
 4  
1 1 3 1 3 13
= + − + = .
10 2 4 4 16 160
. Module-2 . 41 / 122
The marginal distributions

The marginal distributions of X alone and of Y alone are


P P
PX (x) = p(x, y ) and PY (y ) = p(x, y ), if (X , Y ) discrete case, and
y x

Z ∞ Z ∞
fX (x) = f (x, y )dy and fY (y ) = f (x, y )dx,if (X , Y ) continuous
−∞ −∞
case.

. Module-2 . 42 / 122
The conditional distributions for discrete case

Let X and Y be two discrete random variables. The conditional


distribution of the random variable Y given that X = x is
p(x, y )
P(Y /X ) = , provided PX (x) > 0
PX (x)

Similarly, the conditional distribution of X given that Y = y is


p(x, y )
P(X /Y ) = , provided PY (y ) > 0.
PY (y )

. Module-2 . 43 / 122
The conditional distributions for continuous case

Let X and Y be two continuous random variables. The conditional


distribution of the random variable Y given that X = x is
f (x, y )
f (y /x) = , provided fX (x) > 0
fX (x)

Similarly, the conditional distribution of X given that Y = y is


f (x, y )
f (x/y ) = , provided fY (y ) > 0.
fY (y )

. Module-2 . 44 / 122
Remark

If we wish to find the probability that the discrete random variable X falls
between a and b when it is known that the discrete variable Y = y , we
evaluate
P
P(a < X < b|Y = y ) = P(X |Y ),
a<x<b
where the summation extends over all values of X between a and b.
When X and Y are continuous,
Z b we evaluate
P(a < X < b|Y = y ) = f (x|y )dx. Similarlly,
aP
P(a < Y < b|X = x) = P(Y |X ), for (X , Y ) is discrete case
a<y <b
Z b
P(a < Y < b|X = x) = f (y |x)dy , for (X , Y ) is continuous case
a

. Module-2 . 45 / 122
Problem

The joint probability mass function of two dimensional random variables


(X , Y ) is

x
p(x, y )
0 1 2
3 9 3
0 28 28 28
3 3
y 1 14 14 0
1
2 28 0 0

1 Find the marginal distributions functions of X and Y


2 Find the conditional distribution function of X given Y = 1.

. Module-2 . 46 / 122
Solution

x
p(x, y ) PY (y )
0 1 2
3 9 3 15
0 28 28 28 28
3 3 3
y 1 14 14 0 7
1 1
2 28 0 0 28
5 15 3
PX (x) 14 28 28 1

5

 , x =0
 14


The marginal distributions functions of X is PX (x) = 15 , x =1
 28


3,

x = 2.
28

. Module-2 . 47 / 122
Solution Cont...


15

 28

 , y =0

The marginal distributions functions of Y is PY (y ) = 3 , y =1
 7


1,

y = 2.
28

For(2),To find the conditional distribution of X , given that Y = 1.


p(x, y )
We need to find P(X /Y ) = , provided PY (y ) > 0., where y = 1.
PY (y )
p(x, 1)
That is, to find P(X /1) =
PY (1)
x=2
3 3
+ 0 = 37 .
P
First we have find PY (1) = p(x, 1) = 14 + 14
x=0
. Module-2 . 48 / 122
Solution Cont...

p(x, 1)
Now,P(X /1) = = 37 p(x, 1), x = 0, 1, 2
PY (1)
Therefore,
  
p(0, 1) 7 7 3 1
P(0/1) = = p(0, 1) = =
PY (1) 3 3 14 2
  
p(1, 1) 7 7 3 1
P(1/1) = = p(1, 1) = =
PY (1) 3 3 14 2
 
p(2, 1) 7 7
P(2/1) = = p(2, 1) = (0) = 0.
PY (1) 3 3

. Module-2 . 49 / 122
Solution Cont...

The conditional distribution of X , given that Y = 1, is



1

 , x =0
2


P(X /1) = 1 , x =1
 2



0, x = 2.

. Module-2 . 50 / 122
Problem

The joint probability mass function of two dimensional random variables


(X , Y ) is
y
p(x, y )
1 2 3 4
4 2 5 1
1 36 36 36 36
1 3 1 2
2 36 36 36 36
x 3 3 1 1
3 36 36 36 36
2 1 1 5
4 36 36 36 36

1 Find the marginal distributions functions of X and Y


2 Find the conditional distribution function of X given Y = y
3 Find the conditional distribution function of Y given X = x.
. Module-2 . 51 / 122
Solution

For(1),

y
p(x, y ) PX (x)
1 2 3 4
4 2 5 1 12
1 36 36 36 36 36
1 3 2 1 7
2 36 36 36 36 36
x 3 3 1 1 8
3 36 36 36 36 36
2 1 1 5 9
4 36 36 36 36 36
10 9 9 8
PY (y ) 36 36 36 36 1

. Module-2 . 52 / 122
Solution Cont...

The marginal distribution function of X is



 12 ,

x =1


 36


7,

x =2
36
PX (x) =
8
36 , x =3






9,

x = 4.

36

. Module-2 . 53 / 122
Solution Cont...

The marginal distribution function of Y is



 10 , y = 1



 36


9, y =2

36
PY (y ) =
9
36 , y = 3






 8 , y = 4.


36

. Module-2 . 54 / 122
Problem

The joint probability mass function of two dimensional random variables


(X , Y ) is

x
p(x, y )
-1 0 1
1 2 1
0 15 15 15
3 2 1
y 1 15 15 15
2 1 2
2 15 15 15

1 Find the marginal distributions functions of X and Y


2 Find the conditional distribution function of X given Y = y
3 Find the conditional distribution function of Y given X = x.
. Module-2 . 55 / 122
Problem

The joint probability mass function of two dimensional random variables


(X , Y ) is p(x, y ) = k(2x + 3y ), x = 0, 1, 2 and y = 1, 2, 3.

1 Find k.
2 Find the marginal distributions functions of X and Y
3 Find the conditional distribution function of X given Y = y
4 Find the conditional distribution function of Y given X = x.
5 Find P(X + Y > 3).

. Module-2 . 56 / 122
Problem

The joint probability mass function of two dimensional random variables


x+y
(X , Y ) is p(x, y ) = 21 , x = 1, 2, 3 and y = 1, 2

1 Find the marginal distributions functions of X and Y


2 Find the conditional distribution function of X given Y = y
3 Find the conditional distribution function of Y given X = x.
4 Find P(X + Y > 3). and P(X < 3).

. Module-2 . 57 / 122
Problem

The joint density for the random variables (X , Y ), where X is the


temperature change and Y is the proportion of the spectrum that shifts
for a certain atomic particle, is

10xy 2 , 0 < x < y < 1

f (x, y ) =
0,

elesewhere.

1 Find fx (x), fY (y ) and f (y |x).


2 Find the probability that the spectrum shifts more than half of the
total observations, given that the temperature is increased by 0.25
unit.
. Module-2 . 58 / 122
Solution

For(1),The marginal desity function of X is


Z ∞
fX (x) = f (x, y )dy
−∞
Z 1
= 10xy 2 dy
x
y =1
10xy 3

=
3 y =x
10x 10xx 3
= −
3 3
10x 10x 4
= −
3 3
10x(1 − x 3 )
= , 0 < x < 1.
3
. Module-2 . 59 / 122
Solution Cont...

The marginal desity function of Y is


Z ∞
fY (y ) = f (x, y )dx
Z−∞ y
= 10xy 2 dx
0
x=y
10x 2 y 2

=
2 x=0
10y 4
= −0
2
= 5y 4 , 0 < y < 1.

. Module-2 . 60 / 122
Solution Cont...

The conditional distribution functions of Y and X is

f (x, y )
f (y |x) =
fX (x)
10xy 2
= 10x(1−x 3 )
3
3y 2
= , 0 < x < y < 1.
1 − x3
f (x, y )
f (x|y ) =
fY (y )
10xy 2 2x
= = 2 , 0 < x < y < 1.
5y 4 y

. Module-2 . 61 / 122
Solution Cont...

For(2),
  Z 1
1
P Y > |X = 0.25 = f (y |x = 0.25)dy
2 1
2
Z 1
3y 2
= dy
1 1 − (0.25)3
2
1
3y 3

=
3(1 − 0.016) 1
2
 3 1
y
=
0.98 1
 2 
1 1 7
= 1− = = 0.89
0.98 8 7.84

. Module-2 . 62 / 122
Problem

Given the joint density function



 x(1+3y 2 ) ,

0 ≤ x ≤ 2, 0 ≤ y ≤ 1
4
f (x, y ) =
0,

elesewhere.

1 Find fx (x), fY (y ), f (x|y ) and f (y |x).

Evaluate P 14 < X < 12 |Y = 31 .



2

. Module-2 . 63 / 122
Problem

The joint probability density function of two dimensional continuous


random variables (X , Y ) is

 2 (2x + 3y ), 0 ≤ x ≤ 1, 0 ≤ y ≤ 1

5
f (x, y ) =
0,

elesewhere.

1 Find fx (x) and fY (y ).


2 Find f (x|y ) and f (y |x).

. Module-2 . 64 / 122
Problem

Given the joint density function



xy 2 + x2
8 , 0 ≤ x ≤ 2, 0 ≤ y ≤ 1

f (x, y ) =
0,

elesewhere.

1 Compute P(X > 1), P(Y < 12 ), P(X > 1|Y < 12 ) and
P(Y < 21 |X > 1)
2 Evaluate P(X < Y ) and P(X + Y ≤ 1).

. Module-2 . 65 / 122
Solution

Z 1Z 2
P(X > 1) = f (x, y )dxdy
0 1
Z 1Z 2
x2

= xy 2 + dxdy
0 1 8
Z 1 2 2 2
x y x3
= + dy
0 2 24 1
Z 1    2 
2 1 y 1
= 2y + − + dy
0 3 2 24
19
=
24

. Module-2 . 66 / 122
Solution Cont...

1
Z Z 2
1 2
P(Y < ) = f (x, y )dxdy
2 0 0
1
2
x2
Z Z 
2
= xy 2 +
dxdy
0 0 8
Z 1 2 2 2
2 x y x3
= + dy
0 2 24 0
Z 1 
2
2 1
= 2y + dy
0 3
 3 1
2y y 2 1
= + =
3 3 0 4

. Module-2 . 67 / 122
Solution Cont...
P(X >1,Y < 12 )
We know that P(X > 1|Y < 21 ) = P(Y < 21 )
.

1
Z Z 2
1 2
P(X > 1, Y < ) = f (x, y )dxdy
2 0 1
1
2
x2
Z Z 
2
2
= xy + dxdy
0 1 8
Z 1 2 2 2
2 x y x3
= + dy
0 2 24 1
Z 1    2 
2 1 y 1
= 2y 2 + − + dy
0 3 2 24
5
=
24
. Module-2 . 68 / 122
Solution Cont...

1 P(X > 1, Y < 12 )


Therefore, P(X > 1|Y < ) =
2 P(Y < 21 )
5
24
= 1
4
5
= ,
6
1 P(X > 1, Y < 12 )
and P(Y < |X > 1) =
2 P(X > 1)
5
24
= 19
24
5
= .
19
. Module-2 . 69 / 122
Solution Cont...

For(2),
Z 1Z y
P(X < Y ) = f (x, y )dxdy
0 0
Z 1Z y 
x2

2
= xy + dxdy
0 0 8
Z 1 2 2 y
x y x3
= + dy
0 2 24 0
Z 1 4
y3

y
= + dy
0 2 24
 5 1
y y4 53
= + =
10 96 0 480

. Module-2 . 70 / 122
Solution Cont...

Z 1 Z 1−y
P(X + Y ≤ 1) = f (x, y )dxdy
0 0
Z 1 Z 1−y 
x2

= xy 2 + dxdy
0 0 8
Z 1 2 2 1−y
x y x3
= + dy
0 2 24 0
Z 1
(1 − y )2 y 2 (1 − y )3

= + dy
0 2 24
13
=
480

. Module-2 . 71 / 122
Problem

Given the joint density function



8xy , 0 < x < 1, 0 < y < x

f (x, y ) =
0,

elesewhere.

1 Find fx (x), fY (y ), f (x|y ) and f (y |x).

Evaluate P Y < 18 |X < 21 .



2

. Module-2 . 72 / 122
Statistical Independence

Let X and Y be two random variables, discrete (continuous), with joint


probability mass (density) function) p(x, y ) (f (x, y ) and marginal
distributions PX (x) and PY (y ), (fX (x) and fY (y )) respectively. The
random variables X and Y are said to be statistically independent if and
only if p(x, y ) = PX (x)PY (y ),for all (x, y ) within their range.
(f (x, y ) = fX (x)fY (y ),for all (x, y ) within their range.)

. Module-2 . 73 / 122
Problem

Given the joint density function



 x 3y 3 ,

0 ≤ x ≤ 2, 0 ≤ y ≤ 2.
16
f (x, y ) =
0,

elesewhere.

Show that the random variables X and Y are independent.

. Module-2 . 74 / 122
Problem

The joint probability mass function of two dimensional random variables


(X , Y ) is

x
p(x, y )
0 1 2
3 9 3
0 28 28 28
3 3
y 1 14 14 0
1
2 28 0 0

Show that the random variables X and Y are not independent.

. Module-2 . 75 / 122
Mean of a Random Variable (Mathematical Expectation)

Assuming that one fair coin was tossed twice, we find that the sample
space for our experiment is S = {HH, HT , TH, TT }.
Denote by X the number of heads. Since the 4 sample points are all
equally likely, it follows that
P(X = 0) = P(TT ) = 41 , P(X = 1) = P(TH) + P(HT ) = 12 , and
P(X = 2) = P(HH) = 41 , where a typical element, say TH, indicates that
the first toss resulted in a tail followed by a head on the second toss. Now,
these probabilities are just the relative frequencies for the given events in
the long run. Therefore, Mean = (0) 41 + (1) 12 + (2) 14 = 1.
  

. Module-2 . 76 / 122
This result means that a person who tosses 2 coins over and over again
will, on the average, get 1 head per toss.
Definition:
Let X be a random variable with probability distribution. The mean, or
P
expectedZvalue, of X is E (X ) = xp(x) if X is discrete, and

E (X ) = xf (x)dx if X is continuous.
−∞

. Module-2 . 77 / 122
Problem

A lot containing 7 components is sampled by a quality inspector; the lot


contains 4 good components and 3 defective components. A sample of 3
is taken by the inspector. Find the expected value of the number of good
components in this sample.
Solution : Let X represent the number of good components in the sample.
The probability distribution of X is
p(0) = 1/35, p(1) = 12/35, p(2) = 18/35, and p(3) = 4/35.
       
1 12 18 4
E (X ) = (0) + (1) + (2) + (3)
35 35 35 35
1
= .
7

Thus, . of size 3 is selected Module-2


at random over and . 78 / 122
Problem

Let X be the random variable that denotes the life in hours of a certain
electronic device. The probability density function is

 20,000

3 , x > 100
x
f (x) =
0,

elsewhere.

Find the expected Zlife of this type of device.



Solution :E (X ) = xf (x)dx.
Z ∞  100 
20, 000
E (X ) = (x) dx = 200. Therefore, we can expect this type
100 x3
of device to last, on average, 200 hours.

. Module-2 . 79 / 122
Let X be a random variable with probability distribution.
Then E (X 2 ) is

E (X 2 ) = x 2 p(x),
P
if X is discrete, and
Z ∞
E (X 2 ) = x 2 f (x)dx, if X is continuous.
−∞

Similarly, we can define E (Y 2 ). In generally, we can define E (X r ), r ≥ 1


and E (Y r ), r ≥ 1. for the discrete and continuous random variables X and
Y.

. Module-2 . 80 / 122
Expected Value of a new random variable Y = g (X )

Theorem:Let X be a random variable with probability distribution. The


expected value of the random variable Y = g (X ) is
P
E (Y = g (X )) = g (X )P(X = x), if X is discrete, and
Z ∞
E (Y = g (X )) = g (X )f (x)dx, if X is continuous.
−∞

. Module-2 . 81 / 122
Problem

Suppose that the number of cars X that pass through a car wash between
4:00 P.M. and 5:00 P.M. on any sunny Friday has the following probability
distribution:

X 4 5 6 7 8 9
1 1 1 1 1 1
P(X=x) 12 12 4 4 6 6

Let Y = 2X − 1 represent the amount of money, in INR (Rs), paid to the


attendant by the manager. Find the attendant’s expected earnings for this
particular time period.

. Module-2 . 82 / 122
Solution

By the above Theorem, the attendant can expect to receive

x=9
X
E (Y = 2X − 1) = (2x − 1)P(X = x)
x=4
       
1 1 1 1
= (7) + (9) + (11) + (13)
12 12 4 4
   
1 1
+ (15) + (17)
6 6
= Rs.12.67

. Module-2 . 83 / 122
Problem

Let X be a random variable with density function



 x 2 , −1 < x < 2

3
f (x) =
0,

elsewhere.

Find the expected value of Y = 4X + 3.


Solution:
By the above Theorem,

2 2
(4x + 3)(x 2 )
Z Z
1
E (Y = 4X + 3) = dx = (4x 3 + 3x 2 )dx = 8.
−1 3 −1 3

. Module-2 . 84 / 122
Mathematical Expectation Properties

E [(aX + b)] = aE (x) + b

Var [(aX + b)] = a2 Var (X )

The variables X and Y are independent if E (XY ) = E (X )E (Y )

Cov (X , Y ) = E (XY ) − E (X )E (Y )
Cov (X ,Y )
Correlation between X and Y is ρ(X , Y ) = σx σy , where σx is a
standard deviation of X and σy is a standard deviation of Y .

If the variables X and Y are independent, then


Cov (X , Y ) = E (XY ) − E (X )E (Y ) = 0 and hence ρ(X , Y ) = 0.

−1 ≤ ρ(X , Y ) ≤ 1.

. Module-2 . 85 / 122
Definition

Let X and Y be random variables with joint probability distribution. The


mean, or expected value, of the random variable Z = g (X , Y ) is
P P
E (Z ) = g (X , Y )p(x, y ), if (X , Y ) is discrete, and
X =x Y =y
Z ∞Z ∞
E (Z ) = g (X , Y )f (x, y )dxdy , if (X , Y ) is continuous.
−∞ −∞

. Module-2 . 86 / 122
Note-1

If g (X , Y ) = X in the above Definition, we have



P P P
xp(x, y ) = xPx (x), discrete case,




X =x Y =y X =x
Z ∞Z ∞ Z ∞
E (X ) =

 xf (x, y )dydx = xfX (x)dx, continuous case.
 −∞ −∞ −∞

where PX (x)(fX (x)) is the marginal distribution of X (marginal density


function of the random variable X ) Therefore, in calculating E (X ) over a
two-dimensional space, one may use either the joint probability distribution
of X and Y or the marginal distribution of X . (marginal density function
of the random variable x).
. Module-2 . 87 / 122
Note-2

Similarly, we define If g (X , Y ) = Y in the above Definition, we have



P P P
yp(x, y ) = yPY (y ), discrete case,




X =x Y =y Y =y
Z ∞Z ∞ ∞
E (Y ) =
Z

 yf (x, y )dxdy = yfY (y )dy , continuous case.
 −∞ −∞ −∞

where PY (y )(fY (y )) is the marginal distribution of the random variable Y


(marginal density function of the random variable Y ).

. Module-2 . 88 / 122
The expectation of X 2 is

P P 2 P 2
x p(x, y ) = x Px (x), discrete case,




X =x Y =y X =x
E (X 2 ) =
Z ∞Z ∞ Z ∞
 x 2 f (x, y )dydx = x 2 fX (x)dx, continuous case.

 −∞ −∞ −∞

Similarly, we can define E (Y 2 ). In generally, we can define E (X r ), r ≥ 1

and E (Y r ), r ≥ 1. for the discrete and continuous random variables X and


Y.

. Module-2 . 89 / 122
Problem

Let X and Y be the random variables with joint probability distribution


indicated in the following Table.

x
p(x, y )
0 1 2
3 9 3
0 28 28 28
3 3
y 1 14 14 0
1
2 28 0 0

Find E (X ), E (Y ) and E (XY ).

. Module-2 . 90 / 122
Solution

The marginal distribution function of X and Y is

x
p(x, y ) PY (y )
0 1 2
3 9 3 15
0 28 28 28 28
3 3 3
y 1 14 14 0 7
1 1
2 28 0 0 28
5 15 3
PX (x) 14 28 28 1

To find E (X ) and E (Y ) using joint probality mass function and marginal


distribution of X and Y (Exercise.)

. Module-2 . 91 / 122
Solution Cont...

y =2
x=2 X
X
E (XY ) = xyp(x, y )
x=0 y =0

= (0)(0)p(0, 0) + (0)(1)p(0, 1) + (0)(2)p(0, 2)

+ (1)(0)p(1, 0) + (1)(1)p(1, 1) + (1)(2)p(1, 2)

+ (2)(0)p(2, 0) + (2)(1)p(2, 1) + (2)(2)p(2, 2)

= 0 + 0 + 0 + 0 + p(1, 1) + 2p(1, 2) + 0 + 2p(2, 1) + 4p(2, 2)


3
=0+ + (2)(0) + 0 + (2)(0) + 4(0)
14
3
= .
14
. Module-2 . 92 / 122
Problem
Y

Find E X for the density function

 x(1+3y 2 ) ,

0 < x < 2, 0 < y < 1
4
f (x, y ) =
0,

elsewhere.

Solution:We have
  Z 2Z 1
Y y
E = f (x, y )dxdy
X 0 0 x
Z 1Z 2 
y (1 + 3y 2 )

= dxdy
0 0 4
Z 1
y + 3y 3

5
= dy = .
0 2 8
. Module-2 . 93 / 122
Problem

The joint probability mass function of two dimensional random variables


x+y
(X , Y ) is p(x, y ) = 21 , x = 1, 2, 3 and y = 1, 2.

1 Find the mean of X and Y


2 Find the variance of X and Y
3 Find the standard deviation of X and Y .
4 Find the covariance of X and Y .
5 Find the correlation bewteen X and Y .

. Module-2 . 94 / 122
Solution

The joint probability mass function of two dimensional random variables


(X , Y ) is

y
p(x, y )
1 2
2 3
1 21 21
3 4
x 2 21 21
4 5
3 21 21

. Module-2 . 95 / 122
Solution Cont...

3 X
X 2
For (1), E (X ) = xp(x, y )
x=1 y =1

= (1)p(1, 1) + (1)p(1, 2) + (2)p(2, 1) + (2)p(2, 2)

+ (3)p(3, 1) + (3)p(3, 2)
       
2 3 3 4
= (1) + (1) + (2) + (2)
21 21 21 21
   
4 5
+ (3) + (3)
21 21
46
= .
21

. Module-2 . 96 / 122
Solution Cont...

3 X
X 2
E (Y ) = yp(x, y )
x=1 y =1

= (1)p(1, 1) + (1)p(2, 1) + (1)p(3, 1)

+ (2)p(1, 2) + (2)p(2, 2) + (2)p(3, 2)


     
2 3 4
= (1) + (1) + (1)
21 21 21
     
3 4 5
+ (2) + (2) + (2)
21 21 21
33
= .
21

. Module-2 . 97 / 122
Solution Cont...

3 X
X 2
For (2), E (X 2 ) = x 2 p(x, y )
x=1 y =1

= (12 )p(1, 1) + (12 )p(1, 2) + (22 )p(2, 1) + (22 )p(2, 2)

+ (33 )p(3, 1) + (32 )p(3, 2)


       
2 3 3 4
= (1) + (1) + (4) + (4)
21 21 21 21
   
4 5
+ (9) + (9)
21 21
114
= .
21

. Module-2 . 98 / 122
Solution Cont...

3 X
X 2
E (Y 2 ) = y 2 p(x, y )
x=1 y =1

= (12 )p(1, 1) + (12 )p(2, 1) + (12 )p(3, 1)

+ (22 )p(1, 2) + (22 )p(2, 2) + (22 )p(3, 2)


     
2 3 4
= (1) + (1) + (1)
21 21 21
     
3 4 5
+ (4) + (4) + (4)
21 21 21
57
= .
21

. Module-2 . 99 / 122
Solution Cont...

σx2 = Var(X) = E (X 2 ) − [E (X )]2


 2
114 46 2394 2116
= − = −
21 21 441 441
278
= .
441
σy2 = Var(Y) = E (Y 2 ) − [E (Y )]2
 2
57 33 1197 1089
= − = −
21 21 441 441
108
= .
441

. Module-2 . 100 / 122


Solution Cont...

r
p 278
For (3), σx = Var (X ) = = 0.794
441
r
p 108
σy = Var (Y ) = = 0.495
441

For(4), Cov(X,Y) = E (XY ) − E (X )E (Y ).


First we have to find E (XY ).

. Module-2 . 101 / 122


Solution Cont...

3 X
X 2
E (XY ) = xyp(x, y )
x=1 y =1

= (1)(1)p(1, 1) + (1)(2)p(1, 2) + (2)(1)p(2, 1) + (2)(2)p(2, 2)

+ (3)(1)p(3, 1) + (3)(2)p(3, 2)

= (1)p(1, 1) + (2)p(1, 2) + (2)p(2, 1) + (4)p(2, 2)

+ (3)p(3, 1) + (6)p(3, 2)
       
2 3 3 4
= (1) + (2) + (2) + (4)
21 21 21 21
   
4 5 72
+ (3) + (6) = .
21 21 21
. Module-2 . 102 / 122
Solution Cont...

Therefore, Cov(X,Y) = E (XY ) − E (X )E (Y )


  
72 46 33
= −
21 21 21
1512 1518
= −
441 441
−6
=
441
= −0.0136

. Module-2 . 103 / 122


Solution Cont...

Cov(X,Y)
For (5), ρ(X , Y ) =
(σx )(σy )
−0.0136
=
(0.794)(0.495)
−0.0136
=
0.393
= −0.035

. Module-2 . 104 / 122


Problem

Let X and Y be the random variables with joint probability distribution


indicated in the following Table.

x
p(x, y )
0 1 2
3 9 3
0 28 28 28
3 3
y 1 14 14 0
1
2 28 0 0

Find the covariance of X and Y .

Find the correlation between X and Y .

. Module-2 . 105 / 122


Problem

The fraction X of male runners and the fraction Y of female runners who
compete in marathon races are described by the joint density function

8xy , 0≤y ≤x ≤1

f (x, y ) =
0,

elesewhere.

1 Find the covariance of X and Y .


2 Find the correlation between X and Y .

. Module-2 . 106 / 122


Solution

We first compute the marginal density functions of X and Y (Exercise).


They are 
4x 3 , 0 ≤ x ≤ 1,

fX (x) =
0,

elsewhere.

4y (1 − y 2 ),

0 ≤ y ≤ 1,
fY (y ) =
0,

elsewhere.

. Module-2 . 107 / 122


Solution Cont...

From these
Z 1marginal density functions, we compute
E (X ) = x4x 3 dx = 45 and
Z0 1
8
E (Y ) = y 4y (1 − y 2 )dy = 15 .
0

From the joint


Z 1 Z density function given above, we have
1
E (XY ) = xy 8xydxdy = 49 .
0 y

For (1) Cov(X,Y) = E (XY ) − E (X )E (Y )


  
4 4 8
= −
9 5 15
4
=
225
. Module-2 . 108 / 122
Solution Cont...
Z 1
2
First we have to find E (X 2 ), E (Y 2 ), σx2 and σY2 . E (X 2 ) = 4x 5 dx = 3
Z 1 0

and E (Y 2 ) = 4y 3 (1 − y 2 )dy = 13 .
0

σx2 = Var(X) = E (X 2 ) − [E (X )]2


 2
2 4 2 16 2
= − = − = .
3 5 3 25 75
σy2 = Var(Y) = E (Y 2 ) − [E (Y )]2
 2
1 8 1 64 11
= − = − = .
3 15 3 225 225

. Module-2 . 109 / 122


Solution Cont...

Cov(X,Y)
Therefore, ρ(X , Y ) = q
(σx2 )(σy2 )
4
225
=q
2 11
 
75 225
4
=√ .
66

. Module-2 . 110 / 122


Moments

Let X be a discrete random variable and X takes the values


x1 , x2 , x3 , . . . , xn with probabilities p1 , p2 , p3 , . . . , pn Then r th moment is
0
n
xir pr
P
µr (about origin) =
i=1
0
n
(xi − A)r pi
P
µr (about any point x=A) =
i=1
0
n
(xi − x̄)r pi
P
µr (about mean x̄) =
i=1
Similarly, for continuous case on the interval (a, b), the r th moment is
Z b
0
µr (about origin) = x r f (x)dx
a Z b
0
µr (about any point x=A) = (x − A)r f (x)dx
Z b a
0
µr (about mean x̄) = (x − x̄)r f (x)dx
a
. Module-2 . 111 / 122
Note

0
mean = E (X ) = µ1 and
0
Variance = σ 2 = E (X 2 ) − (E (X ))2 = µ2 0 − (µ1 )2 .

. Module-2 . 112 / 122


Characteristic Function

The expected values E (X ), E (X 2 ), E (X 3 ), . . . , and E (X r ) are called


moments. As you have already experienced in some cases, the mean
µ = E (X ) and the variance σ 2 = Var(X)=E (X 2 )µ2 , which are functions
of moments, are sometimes difficult to find. Special functions, called
moment-generating functions can sometimes make finding the mean and
variance of a random variable simpler.
Although higher order moments of a random variable X may be obtained
directly by using the definition of E (X n ), it will be easier in many problems
to compute them through the characteristic function or equivalently
through the moment generating function of the random variable X .

. Module-2 . 113 / 122


While the characteristic function analysis exists, the moment generating
function need not . Moment Generating Function (MGF) of a random
variable(discrete or continuous) X is defined as E (e tx ), where t is real
variable, and denoted as MX (t).
n
If X is discrete, then MX (t) = E (e tx ) = e txi p(xi ),
P
i=1
where X takes the values x1 , x2 , x3 , . . . , xn with probabilities
p( x1 ), p( x2 ), p( x3 ), . . . p(xn )
Z ∞
If X is continuous, then MX (t) = E (e tx ) = e tx f (x)dx.
−∞

. Module-2 . 114 / 122


Properties of MGF

0 tr
The r th moment µr is the coefficient of r! in the expansion of MX (t)
in series of powers of t.

(tx)2 (tx)r
 
tx tx
MX (t) = E (e ) = E 1 + + + ··· + + ...
1! 2! r!
t2 tr
= 1 + tE (x) + E (x 2 ) + · · · + E (x r ) + . . .
2! r!
0 t2 0 tr 0
= 1 + tµ1 + µ2 + · · · + µr + . . .
2! r!
0 tr
Therefore, µr is the coefficient of r! in the expansion of MX (t) in
series of powers of t.

. Module-2 . 115 / 122


Properties of MGF

dr
 
0 r
µr = E (X ) = (MX (t)) .
dt r t=0
0
h i
In particular, if r = 1 then µ1 = d(MdtX (t)) is the mean of X .
t=0

McX (t) = MX (ct)

MaX +b (t) = e bt MX (at)

MX +Y (t) = MX (t)MY (t)

. Module-2 . 116 / 122


Characteristic function

Let X be a discrete random variable and X takes the values x1 , x2 , x3 , . . .


with probabilities p1 , p2 , p3 , . . . Then the characteristic function is defined
as φX (t) = E (e itx ) = e itxr p(xr ).
P
r Z ∞
Similarly, for continuous case φX (t) = E (e ) = itx e itx f (x)dx.
−∞

. Module-2 . 117 / 122


Properties of Characteristic function

0 i r tr
µr = E (X r )=the coefficient of r! in the expansion of φX (t) in series
of ascending powers of it.

dr
 
0 r 1
µr = E (X ) = r (φX (t)) .
i dt r t=0
0
h i
In particular, if r = 1 then µ1 = 1i d(φdtX (t))
is the mean of X .
t=0
φaX +b (t) = e ibt φ(at)

φX +Y (t) = φX (t)φY (t)

. Module-2 . 118 / 122


Problem

Find the moment generating function of the random variable X whose


1
probability mass function P(X = x) = 2x , x = 1, 2, 3, . . . , Deduce the
mean and variance from moment generating function.

et
Answer: MX (t) = 2−e t and mean is 2.

. Module-2 . 119 / 122


Problem
The density function of a continous random variable X is given
f (x) = kx(2 − x), 0 ≤ x ≤ 2. Find k, mean,variance and r th moment.

. Module-2 . 120 / 122


Problem

Find the characteristic function of the random variable X whose


probability mass function P(X = r ) = q r p, r = 0, 1, 2, 3, . . . and
p + q = 1. Deduce the mean and variance from characteristic function.

q q
Answer: φX (t) = p(1 − qe it )−1 , mean is p and variance is p2
.

. Module-2 . 121 / 122

You might also like