Download 4.2 Variance and Covariance

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
E:
I:
A  B  ,
Mutually Exclusive(E) &
Statistically Independent(I)
P( A  B)  P( A) P( B);
1 Tossing a coin. Let A ={Head}, B={Tail}, then A and B
are ( ) but not ( );
2 Tossing two coins one by one. Let C ={First Head},
D={Second Head}, then C and D are ( ) but not ( );
Solution:
P(CD) = ¼= P(C) P(D)
1
Chapter 4 Mathematical Expectation

4.1 Mean of Random Variables

4.2 Variance and Covariance

4.3 Means and Variances of Linear
Combinations of Random variables

4.4 Chebyshev’s Theorem
2
In general
If X and Y are two random variables, f(x, y) is the
joint density function, then:
 E(X)=   xf ( x, y ) =
x
y
 xg ( x)
x
 

 

 E(X) =   xf ( x, y )dxdy   xg ( x)dx
 E(Y) =   yf ( x, y ) =  yh( y )
y x
 
(discrete case)
y
(continuous case)
(discrete case)

 E(Y) =  yf ( x, y )dxdy  yh( y )dy
(continuous case)
g(x) and h(y) are marginal probability distributions of X and Y,
respectively.
3
4.2 Variance and Covariance

The most important measure of variability of a
random variable X is obtained by letting
g(X) =
( X  )
2
then E[g(X)] gives a measure of the variability
of the distribution of X.
4
Definition 4.3 Let X be a random variable with
probability distribution f(x) and mean . The
variance of X is
 2  E[( X   ) 2 ]   ( x   ) 2 f ( x)
x
if X is discrete, and

 2  E[( X   ) 2 ]   ( x   ) 2 f ( x)dx
if X is continuous.



The positive square root of the variance, , is called the
standard deviation of X.
The quantity x -  is called the deviation of an
observation, x, from its mean.
5
Note

2≥0

When the standard deviation of a random
variable is small, we expect most of the values
of X to be grouped around mean.

We often use standard deviations to compare
two or more distributions that have the same
unit measurements.
6
Example 4.8 Page97
Let the random variable X represent the number of automobiles
that are used for official business purposes on any given workday.
The probability distributions of X for two companies are given
below:
Company A:
Company B:
x
1
2
3
f(x)
0.3
0.4
0.3
x
0
f(x)
0.2
1
2
0.1 0.3
3
4
0.3 0.1
Find the variances of X for the two companies.
Solution:
B  2
  (1)(0.3)  (2)(0.4)  (3)(0.3)  2
A
 A2  (1  2) 2 (0.3)  (2  2) 2 (0.4)  (3  2) 2 (0.3)  0.6
4
 B2   ( x  2) 2 f ( x)  1.6
x 0
 B2   A2
7
Theorem 4.2
The variance of a random variable X is
 2  E( X 2 )   2 .
Proof: For the discrete case we can write
   ( x   ) f ( x)   ( x 2  2x   2 ) f ( x)
2
2
x
x
  x 2 f ( x)  2   x f ( x)   2  f ( x).
x
Since
x
   xf ( x)
by definition, and
x
 f ( x)  1
for any
x
x
discrete probability distribution, it follows that
 2   x 2 f ( x)   2  E ( X 2 )   2 .
x
For the continuous case the proof is step by step the same, with
summations replaced by integrations.
8
Example 4.10
The weekly demand for Pepsi, in thousands of liters, from a
local chain of efficiency stores, is a continuous random
variable X having the probability density
1  x2
elsewhere
2( x-1) ,
f ( x)  
0,
Find the mean and variance of X.
Solution:
2
  E( X )  2 x( x  1)dx  5 3.
1
and
2
E ( X )  2 x 2 ( x  1)dx  17 6 .
2
1
Therefore,
 2  17 6  (5 3) 2  1 18.
9
Theorem 4.3 Let X be a random variable with
probability distribution f(x). The variance of the
random variable g(X) is
 g ( X )  E[( g ( X )   g ( X ) ) 2 ]   ( g ( x)   g ( X ) ) 2 f ( x)
2
x
if X is discrete, and

 g ( X ) 2  E[( g ( X )   g ( X ) ) 2 ]   ( g ( x)   g ( X ) ) 2 f ( x)dx

if X is continuous.
10
Definition 4.4 Covariance of two random variables
Let X and Y be random variables with joint probability
distribution f(x, y). The covariance of X and Y is
 XY  E[( X   X )(Y  Y )]   ( x   X )( y  Y ) f ( x, y )
x
y
if X and Y are discrete, and
 XY  E[( X   X )(Y  Y )] 
 
  (x  
X
)( y  Y ) f ( x, y )dxdy
  
if X and Y are continuous.
11
Remark




If large values of X often result in large values of Y or small
values of X result in small values of Y, then positive X–  X
will often result in positive Y – Y .Thus the product (X –  X)(Y
– Y) will tend to be positive (positive association between X
and Y).
Similarly, if small values of X often result in large values of Y
or large values of X result in small values of Y, then positive X
–  X will often result in negative Y – Y. Thus the product (X
–  X )(Y – Y ) will tend to be negative (negative association
between X and Y).
The sign of the covariance indicates whether the relationship
between two variables is positive or negative.
It can be shown that when two variables are independent, then
12
the covariance of the two variables is zero.
Theorem 4.4 The covariance of two random
variables X and Y with means  X and Y ,
respectively, is given by
 XY  E( XY )   X Y .
Proof: For the discrete case we can write
 XY  
 (x  
x

)( y  Y ) f ( x, y )
y
 ( xy  
x

X
X
y  Y x   X  Y ) f ( x , y )
y
 xyf ( x, y)     yf ( x, y)
Y
X
x
y
 Y 
x
x
 xf ( x, y)  
y
X
X
y
Y 
x
 f ( x, y )
y
1
13
Example 4.14, page 101
The fraction X of male runners and the fraction Y of female
runners who compete in marathon races is described by the joint
density function:
0  x  1, 0  y  x
elsewhere
8 xy,
f ( x, y )  
0,
Find the covariance of X and Y.
Solution: We first compute the marginal density function. They are
4 y (1  y 2 ), 0  y  1
h( y )  
elsewhere
0
4 x 3 , 0  x  1
g ( x)  
0 elsewhere
1
1
 X  E ( X )   4 x 4 dx  54
Y  E(Y )   4 y 2 (1  y 2 )dy  158
0
0
1
E ( XY )  
0
1

y
8 x 2 y 2 dxdy 
4
9
 XY  E ( XY )   X Y  94  ( 54 )( 158 ) 
4
225
14
Correlation Coefficient
The measure of the strength of the relationship
Definition 4.5 Let X and Y be random variables
with covariance  XY and standard deviation
 X and  Y , respectively. The correlation
coefficient of X and Y is
 XY
 XY

 XY
15
Example 4.14, page 101
The fraction X of male runners and the fraction Y of female
runners who compete in marathon races is described by the joint
density function:
8 xy,
f ( x, y )  
0,
0  x  1, 0  y  x
elsewhere
Find the correlation coefficient of X and Y.
Solution: We first compute the marginal density function. They are
4 x 3 , 0  x  1
g ( x)  
0 elsewhere
1
 X  E ( X )   4 x 4 dx  54
0
 XY

 XY 
 XY
4 y (1  y 2 ), 0  y  1
h( y )  
elsewhere
0
1
Y  E(Y )   4 y 2 (1  y 2 )dy  158
0
4
225
2 11
75 225

4
1

66 2
16
Remark

 XY
is free of units.
Satisfies the inequality
  XY  0

 XY  1
if
1   XY  1
 XY  0
(X and Y are independent)
if Y = a + bX
17
Related documents