Download presentation
Presentation is loading. Please wait.
1
Expected values, covariance, and correlation
2
Expectation of a function of random variables
Let X and Y be jointly distributed rv’s with pmf or pdf f(x,y). The expected value E[h(X,Y)] of a function of the random variables is
3
Example (the nut company)
Recall that X=weight of almonds and Y=weight of cashews. The joint density is
4
Example (continued) If 1 lb. of almonds cost the company $1, 1 lb. of cashews cost them $1.50, and 1 lb. of peanuts costs $.50, then the total cost of the contents is The expected total cost is
5
Covariance It is frequently of interest to assess how strongly two rv’s are related to one another. The covariance between two random variables is defined by
6
Properties of covariance
The covariance is the expected product of the deviations of the rv’s from their means. Note that If X and Y increase together, the covariance is positive, it is negative if Y decreases when X increases, and zero if those two effects perfectly cancel each other. The covariance depends on both the possible values of the rv’s and their probabilities.
7
Easier way to compute covariance
The following formula gives a shortcut for computing covariance:
8
Example: insurance deductibles
For the joint and marginal densities: 100 200 .20 .10 .5 250 .05 .15 .30 .25 .50
9
Example: mixed nuts The joint and marginal densities:
10
The problem with covariance as a measure
Covariance depends on the scale of the variables. For example, in the deductible example, if we measure X and Y in units of hundreds, Cov(X,Y)=(1875)(.01)(.01)=.1875. This problem is avoided by scaling the covariance.
11
Correlation The correlation coefficient between X and Y is defined as
12
Covariance for examples
For the insurance deductible example, For the mixed nuts example,
13
Proposition If a and c are either both positive or both negative, .
For any two rv’s X and Y, By statement 1, correlation is not affected by linear changes in the units of measurement. By statement 2, the strongest positive correlation is 1 and the strongest negative correlation is -1.
14
Proposition If X and Y are independent, then , but
does not imply that they are independent. or if and only if for some numbers a and b with Thus measures linear relationships. Variables can be dependent without having a linear relationship.
15
Example Let for each of the four points
. Then (check) but the variables are not independent. (What is their relationship?)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.