You are on page 1of 28

Chapter 4

Mathematical Expectation

Md. Gulam Kibria


Lecturer, Dept. of IPE, BUET
Mean of a Random Variable
Problem: A lot containing 7 components is sampled by a quality
inspector; the lot contains 4 good components and 3 defective
components. A sample of 3 is taken by the inspector. Find the
expected value of the number of good components in this sample.
4 3

Solution: x 3 x
f ( x) ; x 0, 1, 2, 3
7

3
f 0 , f 1 , f 2 , f 3
1 12 18 4
35 35 35 35
1 12 18 4
E X 0 1 2 3
35 35 35 35
1.7
Mean of a Random Variable
Problem: A salesperson for a medical device company has two
appointments on a given day. At the first appointment, he believes
that he has a 70% chance to make the deal, from which he can earn
$1000 commission if successful. On the other hand, he thinks he
only has a 40% chance to make the deal at the second appointment,
from which, if successful, he can make $1500. What is his expected
commission based on his own probability belief? Assume that the
appointment results are independent of each other.
Solution:
Mean of a Random Variable
Mean of a Random Variable
Problem: Let X be the random variable that denotes the life in
hours of a certain electronic device. The probability density
function is
20000
3 , x 100,
f x x
0, elsewhere.

Find the expected life of this type of device.


Mean of a Random Variable
Let us consider a new random variable g(X), which depends on X.
If X is a discrete random variable with probability distribution f(x),
for x = 1, 0, 1, 2, and g(X) = X2, then

and so the probability distribution of g(X) may be written

By the definition of the expected value of a random variable, we


obtain
Mean of a Random Variable
Mean of a Random Variable
Problem: Suppose that the number of cars X that pass through a car
wash between 4:00 P.M. and 5:00 P.M. on any sunny Friday has the
following probability distribution:

Let g(X) = 2X1 represent the amount of money, in dollars, paid to


the attendant by the manager. Find the attendants expected earnings
for this particular time period.

Problem: Suppose X is a random variable with density function


x2
, 1 x 2,
f x 3
0, elsewhere.

Find the expected value of g(X) = 4X + 3.
Mean of a Random Variable
Mean of a Random Variable
Problem: Let X and Y be the random variables with joint
probability distribution given below. Find the expected value
of g(X, Y ) = XY.

Problem:
Variance of a Random Variable
Variance of a Random Variable
Problem: Let the random variable X represent the number of
automobiles that are used for official business purposes on any
given workday. The probability distribution for company A is

and that for company B is

Show that the variance of the probability distribution for


company B is greater than that for company A.
Variance of a Random Variable
Solution:
Alternative Formula for Variance of a Random
Variable

What about continuous case?


Variance of a Random Variable
Problem: The weekly demand for a drinking-water product, in
thousands of liters, from a local chain of efficiency stores is a
continuous random variable X having the probability density
2x 1, 1 x 2,
f x
0. elsewhere.
Find the mean and variance of X.
Solution:
Variance of a Random Variable
Variance of a Random Variable
Problem: Calculate the variance of g(X) = 2X + 3, where X is a
random variable with probability distribution

Solution:
Variance of a Random Variable
Problem: Let X be a random variable having the following density
function. Find the variance of the random variable g(X) = 4X + 3.
x2
, 1 x 2,
f x 3
0, elsewhere.
Solution:
Covariance
Let X and Y be random variables with joint probability
distribution f(x, y). The covariance of X and Y is
Cov X , Y or, XY E X X Y Y
E XY X Y Y X X Y
E XY X E Y Y E X E X Y
E XY X Y Y X X Y
E XY X Y
Covariance
Problem: For the following joint probability distribution, find the
covariance of X and Y.

Problem: For the following joint density function, find the


covariance of X and Y.

16 y
3 , 2 x 3, 0 y 1,
f x, y x
0, elsewhere.
Covariance
The sign of the covariance indicates whether the relationship
between two dependent random variables is positive or
negative.
When X and Y are statistically independent, it can be shown
that the covariance is zero.
The converse, however, is not generally true.
Two variables may have zero covariance and still not be
statistically independent.
Note that the covariance only describes the linear relationship
between two random variables.
Therefore, if a covariance between X and Y is zero, X and Y
may have a nonlinear relationship, which means that they are
not necessarily independent.
Correlation Coefficient
Let X and Y be random variables with covariance XY and
standard deviations X and Y , respectively. The correlation
coefficient of X and Y is
XY
XY
X Y
The correlation coefficient satisfies the inequality 1 XY 1.
It assumes a value of zero when XY = 0.
Where there is an exact linear dependency, say Y a + bX,
XY = 1 if b > 0 and XY = 1 if b < 0.
Problem: For the following joint density function, find the
correlation coefficient between X and Y.
16 y
3 , 2 x 3, 0 y 1,
f x, y x
0, elsewhere.
Means and Variances of Linear Combinations of
Random Variables
If a and b are constants, then E(aX + b) = aE(X) + b.
The expected value of the sum or difference of two or more
functions of a random variable X is the sum or difference of the
expected values of the functions. That is,
E[g(X) h(X)] = E[g(X)] E[h(X)].
The expected value of the sum or difference of two or more
functions of the random variables X and Y is the sum or
difference of the expected values of the functions. That is,
E[g(X,Y) h(X,Y)] = E[g(X,Y)] E[h(X,Y)].
Let X and Y be two independent random variables. Then
E(XY ) = E(X) E(Y).
Means and Variances of Linear Combinations of
Random Variables
If X and Y are random variables with joint probability distribution
f(x, y) and a, b, and c are constants, then
aX
2
bY c a
2 2
X b Y 2ab XY
2 2

Setting b = 0, we see that


2
aX c a 2 2
X

Setting a = 1 and b = 0, we see that

2
X c 2
X

Setting b = 0 and c = 0, we see that


2
aX a 2 2
X
Means and Variances of Linear Combinations of
Random Variables
If X and Y are independent random variables then

2
aX bY a b
2 2
X
2 2
Y

aX
2
bY a
2 2
X b Y
2 2

If X1,X2, . . . , Xn are independent random variables, then

2
a1 X1 a2 X 2 ....... an X n a a
2
1
2
X1
2
2
2
X2 ..... a
2
n
2
Xn

Example 4.22 and Example 4.23


Other Terminologies
Coefficient of Variation (COV or ):
X
COV X X
X
For a deterministic variable, COV(X) is zero. A smaller value of the COV
indicates a smaller amount of uncertainty or randomness in the variable,
and a larger amount indicates a larger amount of uncertainty.
Skewness:
1 n
Skewness xi X
3

n i 1
Skewness Coefficient ():
Skewness
X
X3
If the value is zero, the randomness is symmetric; if it is positive, the
dispersion is more above the mean than below the mean, and if it is
negative the dispersion is more below the mean.
Problem

Consider a cantilever beam of span L m with a uniform load of W kg/m. The


maximum shear force (S) and the maximum bending moment (M) at the fixed end
WL2
are WL and , respectively. Consider L to be a constant and W to be a random
2
variable with a mean of W and a standard deviation of W.
(i) Calculate the covariance of S and M, that is, Cov(S, M).
(ii) Show that the correlation coefficient S , M 1.
Using the results obtained in parts (i) and (ii), are S and M perfectly correlated?
Problem
The PDF of the annual snowfall, R, of Winterfell is
shown in the figure below.

(i) Define the PDF of R properly.


(ii) What is the mode?
(iii) Find the coefficient of variation of R.

You might also like