You are on page 1of 46

JOINTLY DISTRIBUTED

RANDOM VARIABLES

SWN SCIENCE DEPARTMENT

JOINTLY DISTRIBUTED RANDOM VARIABLES


As you know, the synonyms of random variable, is :
chance variable, stochastic variable , and variate.
UNIVARIATE
(single-variable)

RANDOM VARIABLE
(VARIATE)

BIVARIATE
(two-variable)
MULTIVARIATE
(more than two-variable)

In this section, we first consider the case of two r.vs , their


associated distribution, and some properties.
When two or more random variables are associated with each
item in a population, the random variables are said to be jointly
distributed .
SWN SCIENCE DEPARTMENT

BIVARIATE / TWO-RANDOM VARIABLES


Definition :
Let be the sample space of a random experiment.
Let X and Y be two r.vs , then the pair (X,Y) is called a
bivariate (two-random variables), if each of X and Y
associates a real number with every element of .
Thus, the bivariate (X,Y) can be considered as a function
that to each point in assigns a point (x,y) in the plane.
The range space of the bivariate (X,Y) is denoted by
and defined by :

SWN SCIENCE DEPARTMENT

If the r.vs X and Y are each, by themselves,


discrete r.vs, then (X,Y) is called a discrete
bivariate.
Similarly, if X and Y are each, by themselves,
continuous r.vs , then (X,Y) is called a continuous
bivariate.
If one of X and Y is discrete, while the other is
continuous, then (X,Y) is called a mixed bivariate.

SWN SCIENCE DEPARTMENT

JOINTLY DISCRETE RANDOM VARIABLES


If X and Y are jointly discrete random variables :
1. The joint probability mass function of X and Y is the function;
p(x,y) = P(X=x and Y=y)
2.

The marginal probability mass funtion of X and Y can be obtained


from the joint probability mass function as follows :

where the sums are taken over all the possible values of Y and of X
respectively.
3. The joint probability mass functon has the property that :

where the sum is taken over all possible values of X and Y.


SWN SCIENCE DEPARTMENT

JOINTLY CONTINUOUS RANDOM VARIABLES


If X and Y are jointly continuous random variables, with joint
probability density function f(x,y), and a < b , c < d , then :
1.
2.

The joint probability density funtion has the following properties:


(i)
(ii)

3.

The marginal probability density functon of X and of Y are given,


respectively , by :

SWN SCIENCE DEPARTMENT

JOINT DISTRIBUTION FUNCTIONS


Definition :
The joint distribution funtion or the joint cumulative distribution
function (joint CDF) of X and Y , denoted by
, is the
function defined by :

(*)
The event (X x and Y y ) in (*) is equivalent to the event
AB, where A and B are events of , defined by :

SWN SCIENCE DEPARTMENT

EXPECTED VALUE OF A FUNCTION OF TWO JOINTLY


DISTRIBUTED RANDOM VARIABLES
Let h (x,y) be any function of x and y.
Then if the random variables X and Y have a joint distributions,
the expected value of h (X,Y) is defined to be:

(*)

provided that one of the double sums or integral in (*) is well defined.
SWN SCIENCE DEPARTMENT

The following properties of expected values are


obtained directly from corresponding properties of
integrals and sums.
For any two functions
having
expected values , and any constants a and b,

If h(x,y) 0 for all x and y , then E[ h(X,Y) ] 0

SWN SCIENCE DEPARTMENT

CONDITIONAL DISTRIBUTIONS
Definition :
Let X and Y be jointly discrete random variables, with joint
probability mass function p(x,y).
Let
denote the marginal probability mass funtion of X
and let x be any number for which
>0.
The conditional probability mass function of Y given X = x is:

SWN SCIENCE DEPARTMENT

10

The definition of the conditional probability density function is


just like that of the conditional probability mass function, with
mass functions replaced by density functions.
Definition :
Let X and Y be jointly continuous random-variables, with joint
probability density function f(x,y). Let
denote the
marginal probability density function of X and let x be any
number for which
>0.
The conditional probability density function of Y given X= x
is:

SWN SCIENCE DEPARTMENT

11

CONDITIONAL EXPECTATION
Expectation is another term for mean.
A conditional expectation is an expectation, or mean ,
calculated using a conditional probability mass
function or conditional probability density function.
The conditional expectation of Y given X = x is
denoted
E ( Y| X = x) or
.

SWN SCIENCE DEPARTMENT

12

INDEPENDENT RANDOM VARIABLES


Two random variables are independent if knowledge
regarding one of them does not affect the probabilities of
the other.
We present here a definition of independence of random
variables in terms of their joint probability mass or joint
probability density function.
The notion of independence for random variables is very
much like the notion of independence for events.

SWN SCIENCE DEPARTMENT

13

Definition :
Two random varibales X and Y are independent, provided
that :
1. If X and Y are jointly discrete, the joint probability mass
function is equal to the product of the marginals :
2. If X and Y are jointly continuous, the joint probability
density functions is equal to the product of the marginals :
Intuitively, when two random variables are independent,
knowledge of the value of one of them does not affect the
probability distribution of the other. In other words, the
conditional distribution of Y given X is the same as the
marginal distribution of Y.
SWN SCIENCE DEPARTMENT

14

If X and Y are independent random variables ,then :


1. If X and Y are jointly discrete, and x is a value for
which
> 0, then ;

2. If X and Y are jointly continuous, and x is a value for


which
> 0 , then ;

SWN SCIENCE DEPARTMENT

15

COVARIANCE
When two random variables are not independent, it is useful to
have a measure of the strength of the relationship between
them.
The population covariance is a measure of a certain type of
relationship known as a linear relationship.
We will usually drop the term population , and refer simply
to the covariance.
Definition : Let X and Y be random variables with means
and .
The covariance of X and Y is :
An alternate formula is :
SWN SCIENCE DEPARTMENT

16

CORRELATION
We will denote the correlation between random variable X and Y by

The correlation is a scaled version of the covariance. To compute the


correlation between X and Y, one first computes the covariance, and then
dividing by the product of the standard deviations of X and Y.
It can be proved that the correlation is always between, -1 and 1.
Definition : Let X and Y be jointly distributed random
variables with standard deviations
and
.
The correlation between X and Y is denoted
by:

and is given

For any two random variables X and Y

SWN SCIENCE DEPARTMENT

17

COVARIANCE, CORRELATION and INDEPENDENCE


When Cov (X,Y) =
= 0 , there is no linear relationship
between X and Y.
In this case we say that X and Y are uncorrelated.
Note that if Cov (X,Y) = 0 , then it is always the case that
and vice versa.

= 0,

If X and Y are independent random variables, then X and Y are


always uncorrelated, since there is no relationship, linear or
otherwise , between them.
It is mathematically possible to construct random variables that are
uncorrelated but not independent.
This phenomenon is rarely seen in practice, or rarely occurs in
practice.
SWN SCIENCE DEPARTMENT

18

EXERSICES
1. Consider a random experiment of tossing a fair coin
twice. Let (X,Y) be a bivariate r.v , where X is the
number of heads that occurs in the two tosses and Y is
the number of tails that occurs in the two tosses.
(a) What is the range of X ?
(b) What is the range of Y?
(c) Find and sketch the range
of (X,Y)
(d) Find P(X = 2 , Y = 0) , P(X = 0 , Y = 2) and
P (X =1 , Y =1)

SWN SCIENCE DEPARTMENT

19

Solution :
Dari yang diketahui, yaitu RE : menguncalkan SMUL
sebanyak dua kali, diperoleh = {HH, HT, TH, TT}
(a) = {0,1,2} kenapa ?
(b) = {0,1,2}
(c) Ingat definisi
maka,
(d)
P(X = 2 , Y = 0) = P(HH) =
P(X = 0 , Y = 2) = P(TT) =
P (X =1 , Y =1) = P(HT,TH) =
SWN SCIENCE DEPARTMENT

20

2. Two fair dice are thrown.


Consider a bivariate r.v (X,Y).
Let X = 0 or 1 according to whether the first die
shows an even number or an odd number of dots.
Similarly, let Y = 0 or 1 according to the second die.
(a) Find the range
of (X,Y)
(b) Find the joint pmfs of (X,Y)

SWN SCIENCE DEPARTMENT

21

Solution :
(a) = {(0,0) , (0,1) , (1,0) , (1,1)} , jelaskan!
(b) Karena X dan Y saling bebas (independent), maka :
P(X = 0) = P(X = 1) =
P(Y = 0) = P (Y = 1) =
Dengan demikian,

SWN SCIENCE DEPARTMENT

22

3. Consider a random experiment of drawing randomly


three balls from an urn containing two red , three
white and four blue balls.
Let (X,Y) be a bivariate r.v , where X and Y denote,
respectively, the number of red and white balls chosen.
(a) Find the range of (X,Y)
(b) Find the joint pmfs of (X,Y)
(c) Find the marginal pmfs of X and Y.
(d) Are X and Y independent?

SWN SCIENCE DEPARTMENT

23

Solution :
(a) Dari skenario soal ; vr X menyatakan banyaknya terambilnya
bola warna merah, dan vr Y menyatakan banyaknya terambilnya
bola warna putih.
Banyaknya bola warna merah ada 2 dan banyaknya bola warna
putih ada 3.
Dengan demikian ;
= { (0,0), (0,1), (0,2), (0,3), (1,0), (1,1), (1,2), (2,0), (2,1)}
(b) joint pmfs / pmf bersama dari (X,Y) :

SWN SCIENCE DEPARTMENT

24

Apabila disajikan dalam tabel, hasilnya berikut ini :


Tabel p(x,y)
x

y
0

4/84 18/8 12/8 1/84


4
4
1 12/8 24/8 6/84 0
4
4
(c)2 Marginal
4/84 pmfs
3/84 dari
0 X dan
0 Y dapat dihitung dari tabel diatas,

diperoleh :

(d) Karena
, maka
X dan Y tidakSWN
independent.
SCIENCE DEPARTMENT

25

4. Suppose the joint pmf of a bivariate r.v (X,Y) is given by :

(a) Are X and Y independent?


(b) Are X and Y uncorrelated?

SWN SCIENCE DEPARTMENT

26

Solution :
(a) Dari data yang diketahui, buat tabel :
Tabel p(x,y)
x
0
1
2

y
0
1
0
1/3
1/3 0
0
1/3

Marginal pmf :

Selanjutnya, periksa, apakah


Ambil,
Dengan demikian, X dan Y tidak independent
SWN SCIENCE DEPARTMENT

27

(b) Cov (X,Y) = E (XY) E(X) E(Y)

Jadi, X dan Y uncorrelated.

SWN SCIENCE DEPARTMENT

28

5. Suppose that p(x,y), the joint probability mass function

of X and Y, is given by :
p(0,0) = 0,4 , p(0,1) = 0,2 , p(1,0) = 0,1 , p(1,1) =
0,3
Calculate the conditional probability mass function of
X, given that Y =1.

SWN SCIENCE DEPARTMENT

29

Solution :
(a) Dari yang diketahui , buat tabel p(x,y) .
x
0
1

0
0,4
0,1
0,5

y
1
0,2
0,3
0,5

0,6
0,4
1

Marginal pmf , yang diperlukan adalah


Yang ditanyakan :

SWN SCIENCE DEPARTMENT

30

6. The joint probability density function of random

variables X and Y is given by :

(a) Determine the value of


(b) Find the marginal probability density functions of
X and Y.

SWN SCIENCE DEPARTMENT

31

Solution :
(a) Gunakan sifat dari joint pdf :

SWN SCIENCE DEPARTMENT

32

(b) Mencari marginal pdf dari X dan Y :

SWN SCIENCE DEPARTMENT

33

7. The joint pmf of a bivariate r.v (X,Y) is given by :

where k is a constant.
(a) Find the value of k
(b) Find the marginal probability pmfs of X and Y.
(c) Are X and Y independent?

SWN SCIENCE DEPARTMENT

34

Solution :
(a)

Gunakan sifat joint pmf,

(b) Marginal pmf dari X :

SWN SCIENCE DEPARTMENT

35

(c) periksa, apakah :


jika ya berarti X dan Y independent.
Jika

maka X dan Y tidak independent.

SWN SCIENCE DEPARTMENT

36

8. Consider the binary communication channel shown in figure


below. Let (X,Y) be a bivariate r.v , where X is the input to
the channel and Y is the output of the channel.
Let P(X=0) = 0,5 , P(Y=1| X=0) = 0,1 and
P(Y=0 | X=1) = 0,2
(a) Find the joint pmfs of (X,Y)
(b) Find the marginal pmfs of X and Y.
(c) Are X and Y independent?
0

P(Y=0| X=0)

0
Y

X
1

P(Y=0| X=1)
P(Y=1| X=0)

P(Y=1| X=1)
SWN SCIENCE DEPARTMENT

37

Solution :
(a) P(Y=1| X=0) + P(Y=0| X=0) =1
maka P(Y=0| X=0) =0,9
P(X=1) + P(X=0) =1
P(X=1) =1-0,5 = 0,5
Demikian juga
P(Y=1| X=1) =0,8
Mengingat : P(AB) = P(B) . P(A |B) = P(A) . P(B |A)
Maka :
P(X=0, Y=0) = P(Y=0 |X=0) . P(X=0) = 0,9 (0,5) = 0,45
P(X=0, Y=1) = P(Y=1 |X=0) . P(X=0) = 0,1 (0,5) = 0,05
P(X=1, Y=0) = P(Y=0 |X=1) . P(X=1) = 0,2 (0,5) = 0,10
P(X=1, Y=1) = P(Y=1 |X=1) . P(X=1) = 0,8 (0,5) = 0,40
Jadi, joint pmf dari (X,Y) adalah :
p(0,0) = 0,45 , p(0,1) = 0,05
p(1,0) =SWN
0,10
, p(1,1) = 0,40
SCIENCE DEPARTMENT

38

Apabila dibuat tabel p (x,y) sbb :


x
y
0
1
0
0,45
0,05
0,50
1
0,10
0,40
0,50
0,55
0,45
1
(b) Marginal pmf dari X adalah :
Marginal pmf dari Y adalah :
(c) Periksa, apakah :
, ternyata
0,45 0,50 (0,55)
Jadi X dan Y tidak independent.
SWN SCIENCE DEPARTMENT

39

9. Let (X,Y) be the bivariate r.v. of problem 8.


(a) Find the mean and the variance of X
(b) Find the mean and the variance of Y
(c) Find the covariance of X and Y
(d) Find the correlation coefficient of X and Y

SWN SCIENCE DEPARTMENT

40

Solution :
(a)

(b)

Dengan cara yang sama seperti (a) , maka :

SWN SCIENCE DEPARTMENT

41

(c)
= 0.0.(0,45) + 0.1.(0,05) + 1.0.(0,1) + 1.1.(0,4)
= 0,4
Jadi, Cov (X,Y) = 0,4 (0,5) (0,45) = 0,175
(d)

SWN SCIENCE DEPARTMENT

42

10. Consider a random experiment of tossing two coins three


times.
Coin A is fair ; but coin B is not fair, with P(H) = and
P(T) =
.
Consider a bivariate r.v. (X,Y) , where X denotes the
number of heads resulting from coin A and Y denotes the
number of heads resulting from coin B.
(a) Find the range of (X,Y)
(b) Find the joint pmfs of (X,Y)
(c) Find P(X=Y) , P(X>Y) and P (X+Y 4)

SWN SCIENCE DEPARTMENT

43

Solution :
(a) Seperti pada soal 1;
Jadi,
(b) Jelas bahwa X dan Y saling bebas/independent,
Untuk variabel random X :

, dengan
cara yang sama ,
SWN SCIENCE DEPARTMENT

44

Untuk variabel random Y :

dengan cara yang sama dapat dihitung ,


Karena X dan Y independent, maka :
Joint pmf dari (X,Y) ditabelkan sbb :
p(x,y)

x
0

y
2

0
1
2
3
SWN SCIENCE DEPARTMENT

45

(c)

SWN SCIENCE DEPARTMENT

46