n. The joint or bivariate probability distribution consisting of

Virtual University of Pakistan
Lecture No. 25
of the course on
Statistics and Probability
by
Miss Saleha Naghmi Habibullah
IN THE LAST LECTURE,
YOU LEARNT
• Chebychev’s Inequality
• Concept of Continuous Probability Distribution
• Distribution Function of a Continuous Probability
Distribution
TOPICS FOR TODAY
•
Mathematical Expectation, Variance &
Moments of a Continuous Probability distribution
•
BIVARIATE Probability Distribution
You will recall that, in the last
lecture, we were dealing with an
example
of
a
continuous
probability distribution in which
we were interested in computing
a conditional probability.
We now discuss this particular
concept:
EXAMPLE
a)
Find the value of k so that the function f(x) defined
as follows, may be a density function
f(x) = kx, 0 < x < 2
= 0, elsewhere
b)
Compute P(X = 1).
c)
Compute P(X > 1).
d)
Compute the distribution function F(x).
e)
P X  1/2


1/ 3  X  2 / 3
SOLUTION
We had
f(x)
= kx, 0 < x < 2
= 0, elsewhere
and we obtained k = 1/2.
Hence:
 x2 , for 0  x  2
f x   
 0, elsewhere
e) Applying the definition of
conditional probability, we get
1
1




P
X
2 
PX  12 | 13  X  23  13
2



P 3 X 3
1
2
2
2
3
2
1
3
1
3
x
x
5
3
5
    
 
 4   4  36 1 12
1
2
x
 dx
1 2
3
2
3
x
 dx
1 2
3
The above example was of
the simplest case when the
graph of our continuous
probability distribution is in
the form of a straight line.
Let us now consider a
slightly more complicated
situation:
EXAMPLE
A continuous random variable X has
the d.f. F(x) as follows:
F(x)
= 0,
for x < 0,
2
2x

,
for 0 < x < 1,
5
2

3 2
x 
 - +  3x - , for 1  x  2,
5 5
2 
=1
for x > 2.
Find the p.d.f. and P(|X| < 1.5).
SOLUTION
d
Fx .
By definition, we have f x  
dx
4
x
f x  
Therefore
for 0 < x < 1
5
2
 3 - x  for 1 < x < 2
5
=0
elsewhere.
Now P|X| < 1.5) = P(–1.5 < X < 1.5)
1.5 23 - x 
4x
  0 dx   0 dx +  dx + 
dx
5
-
-1.5
0 5
1
1
1.5
2 
 2x 2   2 
x

0+0+
 +  5  3x 
5
2

  

0
1
-1 . 5
0
1
2 2 
2.25  
1 
 +  4.5  -  3 - 
5 5 
2  
2 
= 0.40 + 0.35 = 0.75.
Let us now discuss the
mathematical expectation
of continuous random
variables
through
the
following example:
EXAMPLE
Find the expected value of the random variable X
having the p.d.f.
f(x)
= 2 (1 – x), 0 < x < 1
= 0,
elsewhere.
SOLUTION
Now

E ( X )   x f x  dx
-
1
 2  x 1 - x  dx
0
3 1
x
x
1 1 1
 2 -   2 -  
3 0
 2 3 3
2
2
As indicated earlier, the
term ‘expected value’ implies
the mean value.
The graph of the above
probability density function and
its mean value are presented in
the following figure:
f(x)
2
1.5
1
0.5
0
0.25
E(X) = 0.33
0.5 0.75
1
X
Suppose that we are
interested in verifying the
properties of mathematical
expectation that are valid in
the
case
of
univariate
probability distributions.
You will recall that, in the last lecture, we noted
that if X is a discrete random variable and if a and b are
constants, then
E(aX + b) = a E(X) + b.
This property is equally valid in the case of
continuous probability distributions.
In this example, suppose that a = 3 and b = 5. Then,
we wish to verify that
E(3X + 5) = 3 E(X) + 5.
The right-hand-side of the above equation is:
3 E(X) + 5 = 3(
1
3
)+5=1+5=6
In order to compute the left-hand-side, we
proceed as follows:
1
E (3X + 5)  2  3x + 51 - x dx
0
1
2
5 - 2x - 3x  dx
2
0

 2 5x - x
2

31
-x 0
 25 - 1 - 1  23  6.
Since the left-hand-side is
equal to the right-hand-side,
therefore the property is
verified.
SPECIAL CASE:
We have
E(aX + b) = a E(X) + b.
If b = 0, the above property takes the following simple
form:
E(aX) = a E(X).
Next, let us consider the
computation of the moments
and moment-ratios in the case
of a continuous probability
distribution:
EXAMPLE
A continuous random variable X has the p.d.f.
f x 
3
 x 2 - x , 0  x  2.
4
 0,
otherwise
Find the first four moments about the mean and the
moment-ratios.
We first calculate
moments about origin as:
the
'1  EX 

  x f x  dx
-


4 2
32
3  2x
x
2
  x 2 x - x dx  
- 
40
4 3
4 0
3 16 16  3 16 
  -      1;
4  3 4  4 12 
3
 
 '2  E X
2

  x f x  dx
2
-

32

 x 2x - x
40
2
2

5 2
3  2x
x
dx  
- 
4 4
5 0
3  32  3  8  6
 8 -      ;
4
5  4 5 5
4
 
'3  E X 3

  x 3 f x  dx
-

32

 x 2x - x
40
3
2

6 2
3  2x
x
dx  
- 
4 5
6 0
5
3  64 64  3  64  8
  -    ;
4 5
6  4  30  5
 
 '4  E X
4

  x f x  dx
4
-

32

 x 2x - x
40
4
2

7 2
3  2x
x
dx  
- 
4 6
7 0
6
3  64 128  3  64  16
    
.

4 3
7  4  21 7
Next, we find the moments about the
mean as follows:
1
0
2
 '2 -'1 
2
6
1
2
 - 1 
5
5
3
 '3 -3'1 '2 +2'1 
3
8
8 18
6
3
 - 31  + 21  - + 2  0 ;
5
5 5
5
4
 '4 -4'1 '3 +6'1  '2 -3'1 
2
4
16
8
2 6 
4
 - 41  + 61   - 31
7
5
5
16 32 36
3
 - + -3 .
7 5
5
35
The first moment-ratio is
1 
2
3
3
2

0
2
1
 
5
3
 0.
This implies that this particular continuous
probability distribution is absolutely symmetric.
The second moment-ratio is
3
4
35
2  2 

2
.
14
.
2
2  1 
 
5
This implies that this particular continuous
probability distribution may be regarded as playkurtic, i.e.
flatter than the normal distribution.
The students are encouraged
to draw the graph of this
distribution in order to develop
a visual picture in their minds.
We begin the concept
of
bivariate
probability
distribution by introducing the
term ‘Joint Distributions’:
JOINT DISTRIBUTIONS:
The distribution of two or more random variables
which are observed simultaneously when an experiment is
performed, is called their JOINT distribution.
It is customary to call the distribution of a single
random variable as univariate.
Likewise, a distribution involving two, three or
many r.v.’s simultaneously is referred to as bivariate,
trivariate or multivariate.
A bivariate distribution may be
discrete when the possible values of
(X, U) are finite or countably
infinite. It is continuous if (X, Y) can
assume all values in some noncountable set of the plane. A
bivariate distribution is said mixed
when one r.v. is discrete and the
other is continuous.
Bivariate Probability Function:
Let X and Y be two discrete r.v.’s defined on the
same sample space S, X taking the values x1, x2, …, xm
and Y taking the values y1, y2, …, yn.
Then the probability that X
takes on the value xi and, at the
same time, Y takes on the value y ,j
denoted by f(xi, yj) or pij, is defined
to be the joint probability function
or simply the joint distribution of X
and Y.
Thus the joint probability function, also called the
bivariate probability function f(x, y) is a function whose
value
at
the
point
(xi, yj) is given by
f(xi, yj)
= P(X = xi and Y = yj),
i = 1, 2, …, m.
j = 1, 2, …, n.
The joint or bivariate
probability
distribution
consisting of all pairs of values
(xi, yj) and their associated
probabilities f(xi, yj) i.e. the set
of triples [xi, yj, f(xi, yj)] can
either be shown in the following
two-way table:
Joint Probability Distribution of X and Y
y2
…
yj
…
yn
P(X = x i)
x1
f(x1,y1)
f(x1,y2)
…
f(x1,yj)
…
f(x1,yn)
g(x 1)
x2
f(x2,y1)
f(x2,y2)
…
f(x2,yj)
…
f(x2,yn)
g(x 2)


f(xi,y2)
…
f(xi,yj)
…
f(xi,yn)
g(x i)

y1

X\Y
xi
f(xi,y1)




xm
f(xm,y1)
f(xm,y2)
…
f(xm,yj)
…
f(xm,yn)
g(x m)
P(Y=y j)
h(y 1)
h(y 2)
…
h(y j)
…
h(y n)
1
or be expressed by mean of
a formula for f(x, y). The
probabilities f(x, y) can be
obtained by substituting
appropriate values of x and
y in the table or formula.
A joint probability
function has the following
properties:
PROPERTIES:
i)
ii)
f(xi, yj) > 0, for all
(xi, yj), i.e. for
i = 1, 2, …, m;
j = 1, 2, …, n.
  f x i , y j   1
i
j
Next, we consider the
concept
of
MARGINAL
PROBABILITY FUNCTIONS:
The point to be understood here
is that, from the joint probability
function for (X, Y), we can obtain
the
INDIVIDUAL
probability
function of X and Y. Such
individual probability functions are
called MARGINAL probability
functions.
Let f(x, y) be the joint probability function of two
discrete r.v.’s X and Y. Then the marginal probability
function of X is defined as
n

gx i    f x i , y j
j1
=

f(xi, y1) + f(xi, y2) + … + f(xi, yn)
as xi must occur either with y1 or y2 or … or yn.
=
P(X = xi);
that is, the individual
probability function of X is
found by adding over the
rows of the two-way table.
Similarly, the marginal probability
function for Y is obtained by adding over the
column as
 
m

 
h y j   f xi , y j  P Y  y j
i 1

The values of the marginal
probabilities are often written
in the margins of the joint
table as they are the row and
column totals in the table. The
probabilities in each marginal
probability function add to 1.
Next, we consider the
concept of CONDITIONAL
PROBABILITY FUNCTION:
Let X and Y be two discrete r.v.’s with joint
probability function f(x, y).
Then the conditional probability function for X
given Y = y, denoted as f(x|y), is defined by
f(xi | yj) = P(X = xi | Y = yj)


P X  x i and Y  y j

f x i , y j 

,
h y j 
P Y  yj


for i = 1, 2, …, j = 1, 2, …
where h(y) is the marginal probability, and h(y) > 0.
It gives the probability that X
takes on the value xi given that Y
has taken on the value yj.
The conditional probability
f(xi | yj) is non-negative and (for a
given fixed yj) adds to 1 on i and
hence is a probability function.
Similarly, the conditional probability function for Y
given X = x is
f(yj | xi) = P(Y = yj | X = xi)


P Y  y j and X  x i

PX  x i 
f xi , y j

, where g(x) > 0.
g x i 


INDEPENDENCE:
Two discrete r.v.’s X and Y are said to be statistically
independent, if and only if, for all possible pairs of values
(xi, yj) the joint probability function f(x, y) can be expressed
as the product of the two marginal probability functions.
That is, X and Y are independent, if
f(x, y) = P(X = xi and Y = yj)
= P(X = xi). P(Y = yj)
for all i and j.
= g(x) h(y).
It should be noted that the
joint probability function of X
and Y when they are
independent, can be obtained
by MULTIPLYING together
their marginal probability
functions.
Let us now illustrate all
these concepts with the help of
an example:
EXAMPLE:
An urn contains 3 black, 2 red and 3 green balls and
2 balls are selected at random from it. If X is the number of
black balls and Y is the number of red balls selected, then
find
i)
ii)
iii)
iv)
v)
vi)
the joint probability
function f(x, y);
P(X + Y < 1);
the marginal p.d. g(x)
and h(y);
the conditional p.d. f(x | 1),
P(X = 0 | Y = 1); and
Are x and Y independent?
i) The sample space S for this
experiment contains sample points.
The possible values of X are 0, 1, and 2,
and those for Y are 0, 1, and 2.
The values that (X, Y) can take on
are (0, 0), (0, 1), (1, 0), (1, 1), (0, 2) and
(2, 0). We desire to find f(x, y) for each
value (x, y).
The total number of ways in which 2 balls can be
drawn out of a total of 8 balls is

8
2
8x 7

 28.
2
f(0, 0) = P(X = 0 and Y = 0) = 3/28
Now f(0, 0) = P(X = 0 and Y = 0), where the event (X
= 0 and
Y = 0) represents that neither black nor red ball is selected,
implying that the 2 selected are green balls. This event
therefore contains
sample points, and
     3
3
0
2
0
3
2
f(0, 0) = P(X = 0 and Y = 0) = 3/28
Again f(0, 1) = P(X = 0 and Y = 1)
= P (none is black, 1 is red
and 1 is green)






3
0
2
1
28
3
1
6
28
Similarly, f(1, 1)
= P(X = 1 and Y = 1)
= P(1 is black 1 is red and
none is green)






3
1
2
1
28
3
0
6
28
Similar calculations
the probabilities of
values and the
probability function
and Y is given as:
give
other
joint
of X
Joint Probability Distribution
Y
P(X = xi)
0
1
2
g(x)
X
0
3/28
6/28
1/28
10/28
1
9/28
6/28
0
15/28
2
P(Y = yj)
h(y)
3/28
0
0
3/28
15/28
12/28
1/28
1
IN TODAY’S LECTURE,
YOU LEARNT
• Mathematical Expectation,
Variance & Moments of
Continuous Probability
Distributions
•BIVARIATE Probability
Distribution (Discrete case)
IN THE NEXT LECTURE,
YOU WILL LEARN
•BIVARIATE Probability Distributions
(Discrete and Continuous)
• Properties of Expected Values in the
case of Bivariate Probability
Distributions
• Covariance & Correlation