Вы находитесь на странице: 1из 18

Lecture 10

Mathematical Expectation

Basic Idea Since a random variable in general can assume many values, it would be most pleasant if there were some number giving the average of these numbers in some sense. The ordinary average for a random variable is not such a good idea because for a random variable it is the probability information about the values that is important, not the raw values themselves. For example, suppose a random variable X assumes values 100 and 0 with probability mass function given by: p(100) = 0.99 , p(0) = 0.01 Then the ordinary average is 50, but the probability mass

function indicates that the most probable value of X is 100. But if we change the probability mass function as: p(0) = 0.99 , p(100) = 0.01 the most probable value is now zero. Question How to get an average probable value? Answer This is done by taking a weighted average, using the probabilities as weights (this means that the values with large probabilities count more and the values with small probabilities count less in the average) To be precise: Definition (Expected Value) Let X be a random variable with probability distribution f(x). The mean or expected value of X is = E(X) = x x f(x)

if X is discrete, and = E(X) = if X is continuous. Example The probability mass function of a discrete random variable X is:
3 1 x 3 3 x f(x) = ( ) ( ) x 4 4

x f(x) dx

for x = 0,1,2,3

Find the expected value of X .

Solution
3 1 0 3 3 0 27 f(0) = ( ) ( ) = 0 4 4 64 3 1 1 3 2 27 f(1) = ( ) ( ) = 1 4 4 64 3 1 2 3 1 9 f(2) = ( ) ( ) = 2 4 4 64

3 1 3 3 0 1 f(2) = ( ) ( ) = 3 4 4 64

= E(X) = x x f(x) = 0 27/64 + 1 27/64 + 2 9/64 + 3 1/64 = 48/64 Example In a gambling game a man is paid $5 if he gets all heads or all tails when three coins are tossed, and he will pay out $3 if either one or two heads show up. What is his expected gain? Solution The sample space for the possible outcomes is: S = {HHH, HHT, HTH, THH, HTT, THT, TTH, TTT} The random variable X of interest is the amount the gambler can win and the possible values of X are $5 if event E1 = {HHH , TTT } occurs P(E1) = 2/8 = 1/4 and -$3 if event

E2 = { HHT, HTH, THH, HTT, THT, TTH } occurs

P(E2) = 6/8 = 3/4

Therefore, expected gain is = E(X) = x x f(x) = 5 + (-3) = -1 the gambler will , on the average, lose $1 per toss of the three coins.

Example Compute E( X ) if X has the density function

f(x) = ( 1-x2 ) =0 Solution

-1 < x < 1 elsewhere

E(X) = =

x f(x) dx
1

x [ (1- x2)] dx = (x x3) dx


1

= [ x2/2 x4/4 ] 1 = 0 Example The density function of X is given by

f(x) = a + bx2 =0 If E(X) = 3/5, find a and b.

0x1 elsewhere

Expectation of a Function of a Random Variable Suppose that X is a given random variable ( discrete or continuous) with probability function f (x) . We transform X into another variable Y = g ( X ) . The issue is what is expected value of Y , E(Y )?

Hence the following theorem Theorem Let X be a random variable with probability function f(x). The mean or expected value of the random variable g(X) is: E [ g(X)] = g(x) f(x) If X is discrete, and E [ g(X)] =

g(x) f(x) dx

If X is continuous. Theorem If a and b are constants, then E(aX + b) = aE(X ) + b Example If X is the number of points rolled with a balanced die, find the expected value of g(X ) = 2X 2 +1 Solution

f(x) = 1/6 ,

x = 1,2,3,4,5,6

E(g(X)) = E(2X2 + 1) = 2 E(X2 ) + 1 = 2 [ x2 f(x) ] + 1 = 2 [ 12 1/6 + 22 1/6 + 32 1/6 + 42 1/6 + 52 1/6 + 62 1/6 ] + 1 = 94/3 Example Let X be a random variable with density function f (x) = x2 /3, =0, -1 < x < 2 elsewhere

Find the expected value of g(X) = 4X + 3. Solution E (4X + 3) =


2 1

(4X + 3) (x2/3) dx = 1/3 (4x3 + 3x2)dx =


1

=8

Mathematical Expectation of Two Random Variables We shall now extend our concept of mathematical expectation of two random variables X and Y with joint probability distribution f(x,y). Definintion Let X and Y be random variables with joint probability distribution f(x,y). The mean or expected value of the random variable g(X,Y) is E [g(X,Y)] = g(x,y) f(x,y) y x if X and Y are discrete E [g(X,Y)] =

g(x,y) f(x,y) dx dy

if X and Y are continuous. Special Case:

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

y x 0 1 2

0 1 2

3/28 3/14 1/28

9/28 3/14 0

3/28 0 0

Find the expected value of g(X,Y) = XY. Solution: E(XY) = xy f(x,y)


x=0 x=0 2 2

= (0)(0) f(0,0) + (0)(1) f(0,1) + (0)(2) f(0,2) + (1)(0) f(1,0) + (1)(1) f(1,1) + (2)(0) f(2,0) = f(1,1) = 3/14 Example Find E (Y/X) for the density function f(x,y) = [x(1+3y2)] , 0< x < 2, 0 < y < 1

=0, Solution E (Y/X) =


1

elsewhere

(y/x) [ {x(1+3y2)}] dx dy
0

After simplifications E (Y/X) = 5/8 Remarks Note that if g(X,Y) = X then we have E(X) = x f(x,y) = x g(x) y x x =

(discrete case) (continuous case)

x f(x,y) dy dx = x g(x) dx

where g(x) is the marginal distribution of X. Similarly

E(Y) = y f(x,y) = y h(y) y y x =


(discrete case) (continuous case)

y f(x,y) dx dy = y h(y) dy

where h(y) is the marginal distribution of Y.

Вам также может понравиться