Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

MATHEMATICAL EXPECTATIONS

EXPECTED VALUE OF A RANDOM VARIABLE


Intuitively, the expected value of a random variable is the average value that
the random variable takes on. For example, if half the time X = 0, and the other half
of the time X = 10, then the average value of X is 5. We shall write this as E(X) = 5.

Similarly, if one-third of the time Y = 6 while two-thirds of the time Y = 15,


then E(Y) = 12

To understand expected value more precisely, we consider discrete and


absolutely continuous random variables separately. This section focuses on the
expected value of discrete random variables.

The Discrete Case

Definition1.

Let X be a discrete random variable. Then the expected value (or mean value or
mean) of X, written E(X) or 𝜇𝑋 , is defined by
𝑛 𝑛

𝜇 = 𝔼(𝑋) = ∑ 𝑥 𝑃 (𝑋 = 𝑥 ) = ∑ 𝑥 𝑃𝑋 (𝑥 )
𝑖=1 𝑖=1

In other words, the mean or expected value of any discrete random variable may be
obtained by multiplying each of the values x1, x2,…, xn of the random variable X by its
corresponding probability f(x1), f(x2),…, f(xn) and summing up the products.

Definition 2.

Let X be a discrete random variable with the probability distribution

x x1 x1 … xn
P(X=x) f(x1) f(x2) … f(xn)
MATHEMATICAL EXPECTATIONS

Then the mean or expected value of X is


𝑛

𝜇 = 𝐸 (𝑋) = ∑ 𝑥𝑖 𝑓(𝑥𝑖 )
𝑖=1

Example 1. Let us find the expected value of X, where X is the number of tails that
occur per toss when two coins are tossed 12 times and that the experiment yield no
tails, 1 tail, and 2 tails, a total of 2, 4, and 6 times, respectively.

The vales of X can be 0, 1, 2. So

2 4 6 4
𝜇 = 𝐸 (𝑋) = (0) ( ) + (1) ( ) + (2) ( ) =
12 12 12 3

Example 2. Suppose that P(Z = −3) = 0.2, and P(Z = 11) = 0.7, and P(Z = 31) = 0.1.

Then

E(Z) = (−3)(0.2) + (11)(0.7) + (31)(0.1) = −0.6 + 7.7 + 3.1 = 10.2.

Suppose that P(W = −3) = 0.2, and P(W = −11) = 0.7, and P(W = 31) = 0.1.

Then

E(W) = (−3)(0.2) + (−11)(0.7) + (31)(0.1) = −0.6 − 7.7 + 3.1 = −5.2.

Thus, the expected value of W is negative.

We can see that computing the expected value of a discrete random variable X
is simple (at least in simple cases) once we know the probabilities that X = x (or,
equivalently, once we know the probability function f(x)).
MATHEMATICAL EXPECTATIONS

It's important to note that, as the following example demonstrates, expected


values can sometimes be infinite.

Example 3. Let X be a discrete random variable, with probability function f(x) given
by

f(2k) = 2−k

for k = 1, 2, 3,... , with f(x) = 0 for other values of x.

That is, f(2) = 1/2,

f(4) = 1/4, f(8) = 1/8, etc.,

while f(1) = f(3) = f (5) = f(6) =···= 0.

Then it is easily checked that f(x) is indeed a valid probability function

(i.e., f(x) ≥ 0 for all x, with ∑ 𝑓 (𝑥 ) = 1). On the other hand, we compute that

𝐸 (𝑋) = ∑(2𝑘 )(2−𝑘 ) = ∞


𝑘=1

We therefore say that E(X) = ∞, i.e., that the expected value of X is infinite.

Example 4. Let us find the expected number of girls on a committee of 4 selected at


random from 6 girls and 5 boys.

Let X represents the number of girls on the committee. The probability


distribution of X is given by

6 5
( )( )
𝑥 4−𝑥
𝑓 (𝑥 ) = 11 , for x = 0, 1, 2, 3, 4
( )
4

6
( ) (5) 1
𝑓(0) = 0 4 =
11 66
( )
4
MATHEMATICAL EXPECTATIONS

6 5
( )( ) 2
𝑓(1) = 1 3 =
11 11
( )
4

6 5
( )( ) 5
𝑓 (2) = 2 2 =
11 11
( )
4

6
( ) (5) 10
𝑓(3) = 3 1 =
11 33
( )
4

6 5
( )( ) 1
𝑓(4) = 4 0 =
11 22
( )
4

So, the expected value is

1 2 5 10 1
𝜇 = 𝐸 (𝑋) = (0) ( ) + (1) ( ) + (2) ( ) + (3) ( ) + (4) ( )
66 11 11 33 22

24
=
11

Thus, if a committee of 4 is selected at random repeatedly from 6 girls and 5 boys, it


would contain on the average of 2.2 ≈ 2 girls.

Example 5. Suppose the number of product Y, ordered in an on-line shop on the first
hour of the sale period has the following distribution:

Y 5 6 7 8 9 10
P(Y=y) 1 1 1 1 1 1
12 12 4 4 6 6

Let f(y) = 20Y-1 represents the net income for the checked-out item. Find the expected
net income for this time period.
MATHEMATICAL EXPECTATIONS

Solution:

The store expects to get net earnings of

1 1 1
𝜇 = 𝐸 (𝑌) = (20(5) − 1) ( ) + (20(6) − 1) ( ) + (20(7) − 1) ( )
12 12 4
1 1 1
+ (20(8) − 1) ( ) + (20(9) − 1) ( ) + (20(10) − 1) ( )
4 6 6

33 119 139 159 179 199


= + + + + +
4 12 4 4 6 6

467
=
3

≈ 155.67

Hence, the expected net income on the first hour of the sale period is 155.67 pesos.

Example 6. We roll two standard 6-sided dice. You win P1000 if the sum is 2 and lose

P100 otherwise. How much do you expect to win on average per trial?

Solution:

The probability of getting a sum of 2 is 1/36. If you play N times, you can
𝟏 𝟑𝟓
‘expect’ ·N of the trials to give a 2 and · N of the trials to give something else.
𝟑𝟔 𝟑𝟔

Thus, your total expected winnings are

𝑁 35𝑁
1000 ( ) − 100 ( )
36 36

To get the expected average per trial we divide the total by N:

1 35
𝑒𝑥𝑝𝑒𝑐𝑡𝑒𝑑 𝑎𝑣𝑒𝑟𝑎𝑔𝑒 𝑤𝑖𝑛 = 1000 ( ) − 100 ( ) = −69.44
36 36

Now, would you be willing to play this game one time? multiple times?
MATHEMATICAL EXPECTATIONS

Notes:

1. The expected value is also called the mean or average of X and often denoted
by µ (“mu”).

2. As seen in the above examples, the expected value need not be a possible value of
the random variable. Rather it is a weighted average of the possible values.

3. Expected value is a summary statistic, providing a measure of the location or central


tendency of a random variable.

4. If all the values are equally probable then the expected value is just the usual average
of the values.

Interpretations of the Expected values

The expected value of a random variable has many interpretations.

1. Expected value is a weighted average. Specifically, for a discrete random variable,


the expected value is computed by "weighting'', or multiplying, each value of the
random variable, xi , by the probability that the random variable takes that value,
p(xi) , and then summing over all possible values. This interpretation of the
expected value as a weighted average explains why it is also referred to as the
mean of the random variable.

2. The expected value of a random variable is also interpreted as the long-run value of
the random variable. In other words, if we repeat the underlying random
experiment several times and take the average of the values of the random variable
corresponding to the outcomes, we would get the expected value, approximately.
Again, we see that the expected value is related to an average value of the random
variable. Given the interpretation of the expected value as an average, either
"weighted'' or "long-run'', the expected value is often referred to as a measure of
center of the random variable.

3. The expected value of a random variable has a graphical interpretation. The expected
value gives the center of mass of the probability mass function.
MATHEMATICAL EXPECTATIONS

Expected value of Two variable function

Suppose we have two random variables, X and Y. These might be independent,


in which case the value of X has no effect on the value of Y. Alternatively, X and Y
might be dependent: when we observe a random value for X, it might influence the
random values of Y that we are most likely to observe. For example, X might be the
height of a randomly selected person, and Y might be the weight. On the whole, larger
values of X will be associated with larger values of Y .

To understand what E(XY ) means, think of observing a large number of pairs


(x1, y1),(x2, y2), . . . ,(xN , yN ). If X and Y are dependent, the value xi might affect the
value yi , and vice versa, so we have to keep the observations together in their pairings.
As the number of pairs N tends to infinity, the average

𝑁
1
∑(𝑥𝑖 )(𝑦𝑖 )
𝑁
𝑖=1

approaches the expectation E(XY ).

For example, if X is height and Y is weight, E(XY ) is the average of (height ×


weight). We are interested in E(XY ) because it is used for calculating the covariance
and correlation, which are measures of how closely related X and Y are.

Definition. Let X and Y be discrete random variables with joint probabilities given by
f(x,y), where x= x1, x2, …,xm and y=y1, y2,…,yn. The mean or expected value of the
random variable g(x,y) is

𝜇𝑔(𝑋,𝑌) = 𝐸 [𝑔(𝑋, 𝑌)] = ∑𝑚


𝑖=1 ∑𝑛𝑗=1 𝑔(𝑥𝑖 , 𝑦𝑗 )𝑓(𝑥𝑖 , 𝑦𝑗 ).
MATHEMATICAL EXPECTATIONS

Now, if g(X,Y)=X, then


𝑚 𝑛 𝑚

𝜇𝑥 = 𝐸 [(𝑋)] = ∑ ∑ 𝑥𝑖 𝑓(𝑥𝑖 , 𝑦𝑗 ) = ∑ 𝑥𝑖 𝑔(𝑥𝑖 )


𝑖=1 𝑗=1 𝑖=1

where 𝑔(𝑥𝑖 ) are the values of the marginal distribution of X.

Similarly, if g(X,Y) =Y, then


𝑚 𝑛 𝑚

𝜇𝑦 = 𝐸 [(𝑌)] = ∑ ∑ 𝑦𝑗 𝑓(𝑥𝑖 , 𝑦𝑗 ) = ∑ 𝑦𝑗 ℎ(𝑦𝑗 )


𝑖=1 𝑗=1 𝑖=1

where (ℎ(𝑦𝑗 ) is the marginal distribution of Y.

Example 7. Two refills for ball point pen are selected at random from a bag that
contains 3 blue refills, 2 red refills, and 3 black refills. If X is the number of blue refills
and Y is the number of red refills selected, the following table summarized the joint
probability distribution of X and Y.

f(x,y) x Row Total


0 1 2
0 3 9 3 15
28 28 28
28

6 6
28 28 12
y 1
28

1 1
2 28 28
Column 10 15 3 1
28 28 28
total
MATHEMATICAL EXPECTATIONS

a. find the expected value of g(X,Y)=XY


b. find 𝜇𝑥 and 𝜇𝑦 .

Solution:

a. using the definition of the mean of random variable g(x,y)


𝑚 𝑛

𝜇𝑔(𝑋,𝑌) = 𝐸[𝑔(𝑋, 𝑌)] = ∑ ∑ 𝑔(𝑥𝑖 , 𝑦𝑗 )𝑓(𝑥𝑖 , 𝑦𝑗 )


𝑖=1 𝑗=1
2 2

= ∑ ∑ 𝑥𝑦 𝑓(𝑥𝑖 , 𝑦𝑗 )
𝑥=0 𝑦=0

3 6 1 9
= (0)(0)+ (0)(1) + (0)(2) + (1)(0)
28 28 28 28
6 3
+ (1)(1) + (2)(0)
28 28
6
=0+0+0+0+ +0
28
3
=
14

b. To solve for 𝜇𝑥 ,
𝑚 𝑛 𝑚

𝜇𝑥 = 𝐸 [(𝑋)] = ∑ ∑ 𝑥𝑖 𝑓(𝑥𝑖 , 𝑦𝑗 ) = ∑ 𝑥𝑖 𝑔(𝑥𝑖 )


𝑖=1 𝑗=1 𝑖=1

2 2 2

= 𝐸 [(𝑋)] = ∑ ∑ 𝑥𝑖 𝑓(𝑥𝑖 , 𝑦𝑗 ) = ∑ 𝑥𝑖 𝑔(𝑥𝑖 )


𝑖=0 𝑗=0 𝑖=0

10 15 3
= (0) + (1) + (2)
28 28 28
3
=
4
MATHEMATICAL EXPECTATIONS

To solve for 𝜇𝑦 ,

𝑚 𝑛 𝑚

𝜇𝑦 = 𝐸 [(𝑌)] = ∑ ∑ 𝑦𝑗 𝑓(𝑥𝑖 , 𝑦𝑗 ) = ∑ 𝑦𝑗 ℎ(𝑦𝑗 )


𝑖=1 𝑗=1 𝑖=1

2 2 2

𝜇𝑦 = 𝐸 [(𝑌)] = ∑ ∑ 𝑦𝑗 𝑓(𝑥𝑖 , 𝑦𝑗 ) = ∑ 𝑦𝑗 ℎ(𝑦𝑗 )


𝑖=0 𝑗=0 𝑖=0

15 3 1
= (0) + (1) + (2)
28 7 28
1
=
2

References

Expected Value of Discrete Random Functions.


https://stats.libretexts.org/Courses/Saint_Mary's_College_Notre_Dame/DSCI_
500B_Essential_Probability_Theory_for_Data_Science_(Kuter)/03%3A_Disc
rete_Random_Variables/3.04%3A_Expected_Value_of_Discrete_Random_V
ariables
Evans, M., & Rosenthal, J. S. (2010). Probability and statistics: The science of
uncertainty. New York: W.H. Freeman and Co.

Mangaran, A. & Santos, E. (2004). Probability and Statistics A Comprehensive


Approach, San Ildefonso Print and Supplies.

Orlof & Bloomm. Discrete Random Variables: Expected Value.


https://ocw.mit.edu/courses/mathematics/18-05-introduction-to-probability-
and-statistics-spring-2014/readings/MIT18_05S14_Reading4b.pdf

You might also like