STA301_LEC26

Page 1

Virtual University of Pakistan Lecture No. 26 Statistics and Probability

Miss Saleha Naghmi Habibullah


IN THE LAST LECTURE, YOU LEARNT

• Mathematical Expectation, Variance & Moments of Continuous Probability Distributions •Bivariate Probability Distribution (Discrete case)+


TOPICS FOR TODAY •BIVARIATE Probability Distributions (Discrete and Continuous) • Properties of Expected Values in the case of Bivariate Probability Distributions


You will recall that, in the last lecture we began the discussion of the example in which we were drawing 2 balls out of an urn containing 3 black, 2 red and 3 green balls, and you will remember that, in this example, we were interested in computing quite a few quantities.


I encouraged you to compute the probabilities of the various possible combinations of x and y values, and, in particular, I motivated you to think about the 3 probabilities that were equal to zero. Let us re-commence the discussion of this particular 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?


As indicated in the last lecture, using the rule of combinations in conjunction with the classical definition of probability, the probability of the first cell came out to be 3/28. By similar calculations, we obtain all the remaining probabilities, and, as such, we obtain the following bivariate table:


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


This joint p.d. of the two r.v.’s (X, Y) can be represented by the formula

f ( x, y ) =

( )( ) ( 3 x

2 y

3 2− x − y

28

)

x = 0,1, 2

= y = 0,1,2 0 ≤ x + y ≤ 2.


ii) To compute P(X + Y < 1), we see that x + y < 1 for the cells (0, 0), (0, 1) and (1, 0). Therefore P(X + Y < 1) = f(0, 0) + f(0, 1) + f(1, 0) = 3/28 +6/28 + 9/28 = 18/28 = 9/14


 3  2  3  f (0, 0) =  ÷ ÷ ÷  0  0  2  8  ÷ 2


iii) The marginal p.d.’s are: x g(x)

0 10/28

1 15/28

2 3/28

y h(x)

0 15/28

1 12/28

2 1/28


iv)

By definition, the conditional p.d. f(x | 1) is

f(x | 1) = P(X = x | Y = 1)

P( X = x and Y = 1) f ( x ,1) = = P( Y = 1) h (1)


Now

h (1)

2

= ∑ f ( x ,1) x =0

6 6 = + +0 28 28 12 3 = = 28 7 Therefore

f ( x ,1) f ( x | 1) = h (1) 3 = f ( x ,1) , 7

x = 0,1,2


That is,

7  7  6  1 f ( 0 | 1) = f ( 0,1) =     = 3  3   28  2 7  7  6  1 f (1 | 1) = f (1,1) =     = 3  3   28  2 7 7 f ( 2 | 1) = f ( 2,1) =   ( 0) = 0 3 3


Hence the conditional p.d. of X given that Y = 1, is

x

0

1

2

f(x|1)

1/2

1/2

0


v)

Finally, P(X = 0 | Y = 1) = f(0 | 1) = 1/2


vi)

We find that f(0, 1) = 6/28, 2

g( 0 ) = ∑ f ( 0, y ) y =0

3 6 1 10 = + + = 28 28 28 28 2

h (1) = ∑ f ( x ,1) x =0

6 6 12 = + +0 = 28 28 28


Now

6 10 12 ≠ × , 28 28 28

i.e.

f (0,1) ≠g(0 )h (1), and therefore X and Y are NOT statistically independent.


Next, we consider the concept of BIVARIATE CONTINUOUS PROBABILITY DISTRIBUTION:


CONTINUOUS BIVARIATE DISTRIBUTIONS: The bivariate probability density function of continuous r.v.’s X and Y is an integrable function f(x,y) satisfying the following properties:


i) f(x,y) > 0 for all (x, y) ∞ ∞

ii)

∫ ∫ f ( x , y ) dx dy = 1, and

−∞ −∞

P ( a ≤ X ≤ b, c ≤ Y ≤ d ) iii)

b d

= ∫ ∫ f ( x , y ) dy dx. a c


Let us try to understand the graphic picture of a bivariate continuous probability distribution:


The region of the XY-plane depicted by the interval

(x1 < X < x2; y1 < Y < y2) is shown graphically:


Y y2 y1 0

(x1, y2)

(x2, y2)

(x1, y1)

(x2, y1)

x1

x2

X


Just as in the case of a continuous univariate situation, the probability function f(x) gives us a curve under which we compute areas in order to find various probabilities, in the case of a continuous bivariate situation, the probability function f(x,y) gives a SURFACE


and, when we compute the probability that our random variable X lies between x1 and x2 AND, simultaneously, the random variable Y lies between y1 and y2, we will be computing the VOLUME under the surface given by our probability function f(x, y) encompassed by this region.


The MARGINAL p.d.f. of the continuous r.v. X is

g( x ) = ∫ f ( x , y ) dy −∞

and that of the r.v. Y is

h( y ) =

∫ f ( x, y ) dx

−∞


That is, the marginal p.d.f. of any of the variables is obtained by integrating out the other variable from the joint p.d.f. between the limits –∞ and +∞.


The CONDITIONAL p.d.f. of the continuous r.v. X given that Y takes the value y, is defined to be

f ( x, y ) f ( x | y) = , h( y) where f(x,y) and h(y) are respectively the joint p.d.f. of X and Y, and the marginal p.d.f. of Y, and h(y) > 0.


Similarly, the conditional p.d.f. of the continuous r.v. Y given that X = x, is

f ( x, y ) f ( y | x) = , g( x )

provided that g(x) > 0.


It is worth noting that the conditional p.d.f’s satisfy all the requirements for the UNIVARIATE density function.


Finally:


Two continuous r.v.’s X and Y are said to be Statistically Independent, if and only if their joint density f(x,y) can be factorized in the form f(x,y) = g(x)h(y) for all possible values of X and Y.


EXAMPLE Given the following joint p.d.f. 1 f(x, y) = (6 – x – y), 0 ≤ x ≤ 2; 2 ≤ y ≤ 4, 8 = 0 , elsewhere


a) b)

Verify that f(x,y) is a joint density function.

5  3 , Calculate PX ≤ , Y ≤  2  2


c) Find the marginal p.d.f. g(x) and h(y). d) Find the conditional p.d.f. f(x | y) and f(y | x).


SOLUTION a) The joint density f(x,y) will be a p.d.f. if (i) (ii)

f(x,y) > 0 and ∞ ∞

∫ ∫ f ( x , y)dx dy = 1

−∞ −∞


Now f(x,y) is clearly greater than zero for all x and y in the given region, and


∞∞

12 4 ∫ ∫ f ( x , y) dx dy = ∫ ∫ (6 −x −y ) dy dx 80 2 − ∞− ∞ 4 2

12  y = ∫ 6 y −xy −  dx 80  2   2 2 1

2

1 2 = ∫ (6 −2x )dx =  6 x −x  80 8 0 1 = [12 −4] = 1 8


Thus f(x,y) has the properties of a joint p.d.f.


b) To determine the probability of a value of the r.v. (X, Y) falling in the region X < 3/2 , Y < 5/2, we find


3  P X ≤ , Y ≤ 2  3 2

5  2

5 2

1 = ∫ ∫ ( 6 − x − y ) dy dx x =0 y=2 8 3 2

5 2

2  1 y  dx = ∫ 6 y − xy − 8 0  2  2 3 2

[

1  15 x  1 2 15x − 2 x = ∫  − dx = 80  8 2 64

]

3 2

0

9 = 32


c) The marginal p.d.f. of X is


g( x )

= ∫ f ( x , y ) dy, =

−∞ < x <∞

−∞ 14

∫ ( 6 − x − y ) dy,

82

2 4

1 y = 6 y − xy −  8  2  2 1 = (3 − x) , 4 = 0,

0≤x≤2 0≤x≤2 0≤x≤2

x < 0 OR x ≥ 2


Similarly, the marginal p.d.f. of Y is

h (y )

2 1

= ∫ (6 −x −y )dx , 2 ≤y ≤4 80

1 = (5 −y ) , 4 = 0, elsewhere.

2 ≤y ≤4


d) The conditional p.d.f. of X given Y = y, is

f ( x, y ) f ( x | y) = , where h(y) > 0 h( y)

Hence

1   ( 6 − x − y) 6−x−y 8  = , 0≤x≤2 f(x|y)= = 2 ( 5 − y) 1   ( 5 − y) 4


and the conditional p.d.f. of Y given X = x, is

f ( x, y ) f ( y | x) = , where g(x) > 0 g( x )

Hence

1   ( 6 − x − y ) 6 −x −y 8  f ( y | x) = = , 2 ≤y ≤4 2 (3 − x ) 1   ( 3 − x ) 4


Next, we consider two important properties of mathematical expectation which are valid in the case of BIVARIATE probability distributions:


PROPERTY NO. 1 The expected value of the sum of any two random variables is equal to the sum of their expected values, i.e. E(X + Y) = E(X) + E(Y).


PROPERTY NO. 2 The expected value of the product of two independent r.v.’s is equal to the product of their expected values, i.e. E(XY) = E(X) E(Y). The result also holds for the difference of r.v.’s i.e. E(X – Y) = E(X) – E(Y).


It should be noted that these properties are valid for continuous random variable’s in which case the summations are replaced by integrals.


Let us now verify these properties for the following example:


EXAMPLE: Let X and Y be two discrete r.v.’s with the following joint p.d. x 2

4

0.10 0.20 0.10

0.15 0.30 0.15

y 1 3 5


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


SOLUTION To determine the expected values of X and Y, we first find the marginal p.d. g(x) and h(y) by adding over the columns and rows of the two-way table as below:


x 2

4

h(y)

1 3 5

0.10 0.20 0.10

0.15 0.30 0.15

0.25 0.50 0.25

g(x)

0.40

0.60

1.00

y


Now E(X) = ∑ xj g(xj) = 2 × 0.40 + 4 × 0.60 = 0.80 + 2.40 = 3.2 E(Y) = ∑ yi h(yi) = 1 × 0.25 + 3 × 0.50 + 5 × 0.25 = 0.25 + 1.50 + 1.25 = 3.0 Hence E(X) + E(Y) = 3.2 + 3.0 = 6.2


(

) (

E( X + Y ) = ∑ ∑ x i + y j f x i , y j i

j

)


In order to compute E(XY) directly, we apply the formula:

(

) (

E ( XY ) = ∑ ∑ x i y j f x i , y j i

j

)


In the next lecture, we will discuss these two formulae in detail, and, interestingly, we will find that not only E(X+Y) equals E(X) + E(Y), but also E(XY) equals E(X) E(Y) implying that the random variables X and Y are statistically independent.


IN TODAY’S LECTURE, YOU LEARNT •BIVARIATE Probability Distributions (Discrete and Continuous) • Properties of Expected Values in the case of Bivariate Probability Distributions


IN THE NEXT LECTURE, YOU WILL LEARN • Properties of Expected Values in the case of Bivariate Probability Distributions (Detailed discussion) •Covariance & Correlation •Some Well-known Discrete Probability Distributions: •Discrete Uniform Distribution


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.