# 12.1 Covariance and the correlation coefficient  (Page 2/2)

 Page 2 / 2

The $\rho =-1$ line is:

$\frac{u-{\mu }_{Y}}{{\sigma }_{Y}}=-\frac{t-{\mu }_{X}}{{\sigma }_{X}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\text{or}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}u=-\frac{{\sigma }_{Y}}{{\sigma }_{X}}\left(t-{\mu }_{X}\right)+{\mu }_{Y}$

$1-\rho$ is proportional to the variance abut the $\rho =1$ line and $1+\rho$ is proportional to the variance about the $\rho =-1$ line. $\rho =0$ iff the variances about both are the same.

## Uncorrelated but not independent

Suppose the joint density for $\left\{X,\phantom{\rule{0.166667em}{0ex}}Y\right\}$ is constant on the unit circle about the origin. By the rectangle test, the pair cannot be independent. By symmetry, the $\rho =1$ line is $u=t$ and the $\rho =-1$ line is $u=-t$ . By symmetry, also, the variance about each of these lines is the same. Thus $\rho =0$ , which is true iff $\mathrm{Cov}\phantom{\rule{0.166667em}{0ex}}\left[X,Y\right]=0$ . This fact can be verified by calculation, if desired.

## Uniform marginal distributions

Consider the three distributions in [link] . In case (a), the distribution is uniform over the square centered at the origin with vertices at (1,1), (-1,1), (-1,-1),(1,-1). In case (b), the distribution is uniform over two squares, in the first and third quadrants with vertices (0,0), (1,0), (1,1), (0,1) and (0,0),

(-1,0), (-1,-1), (0,-1). In case (c) the two squares are in the second and fourth quadrants. The marginalsare uniform on (-1,1) in each case, so that in each case

$E\left[X\right]=E\left[Y\right]=0\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\text{and}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[X\right]=\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[Y\right]=1/3$

This means the $\rho =1$ line is $u=t$ and the $\rho =-1$ line is $u=-t$ .

1. By symmetry, $E\left[XY\right]=0$ (in fact the pair is independent) and $\rho =0$ .
2. For every pair of possible values, the two signs must be the same, so $E\left[XY\right]>0$ which implies $\rho >0$ . The actual value may be calculated to give $\rho =3/4$ . Since $1-\rho <1+\rho$ , the variance about the $\rho =1$ line is less than that about the $\rho =-1$ line. This is evident from the figure.
3. $E\left[XY\right]<0$ and $\rho <0$ . Since $1+\rho <1-\rho$ , the variance about the $\rho =-1$ line is less than that about the $\rho =1$ line. Again, examination of the figure confirms this.

## A pair of simple random variables

With the aid of m-functions and MATLAB we can easily caluclate the covariance and the correlation coefficient. We use the joint distribution for Example 9 in "Variance." In that example calculations show

$E\left[XY\right]-E\left[X\right]E\left[Y\right]=-0.1633=\mathrm{Cov}\phantom{\rule{0.166667em}{0ex}}\left[X,Y\right],\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}{\sigma }_{X}=1.8170\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\text{and}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}{\sigma }_{Y}=1.9122$

so that $\rho =-0.04699$ .

## An absolutely continuous pair

The pair $\left\{X,Y\right\}$ has joint density function ${f}_{XY}\left(t,u\right)=\frac{6}{5}\left(t+2u\right)$ on the triangular region bounded by $t=0,u=t$ , and $u=1$ . By the usual integration techniques, we have

${f}_{X}\left(t\right)=\frac{6}{5}\left(1+t-2{t}^{2}\right),\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}0\le t\le 1\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\text{and}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}{f}_{Y}\left(u\right)=3{u}^{2},\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}0\le u\le 1$

From this we obtain $E\left[X\right]=2/5,\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[X\right]=3/50,\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}E\left[Y\right]=3/4$ , and $\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[Y\right]=3/80$ . To complete the picture we need

$E\left[XY\right]=\frac{6}{5}{\int }_{0}^{1}{\int }_{t}^{1}\left({t}^{2}u+2t{u}^{2}\right)\phantom{\rule{0.166667em}{0ex}}dudt=8/25$

Then

$\mathrm{Cov}\phantom{\rule{0.166667em}{0ex}}\left[X,Y\right]=E\left[XY\right]-E\left[X\right]E\left[Y\right]=2/100\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\text{and}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\rho =\frac{\mathrm{Cov}\phantom{\rule{0.166667em}{0ex}}\left[X,Y\right]}{{\sigma }_{X}{\sigma }_{Y}}=\frac{4}{30}\sqrt{10}\approx 0.4216$

APPROXIMATION

tuappr Enter matrix [a b]of X-range endpoints [0 1] Enter matrix [c d]of Y-range endpoints [0 1] Enter number of X approximation points 200Enter number of Y approximation points 200 Enter expression for joint density (6/5)*(t + 2*u).*(u>=t) Use array operations on X, Y, PX, PY, t, u, and PEX = total(t.*P) EX = 0.4012 % Theoretical = 0.4EY = total(u.*P) EY = 0.7496 % Theoretical = 0.75VX = total(t.^2.*P) - EX^2 VX = 0.0603 % Theoretical = 0.06VY = total(u.^2.*P) - EY^2 VY = 0.0376 % Theoretical = 0.0375CV = total(t.*u.*P) - EX*EY CV = 0.0201 % Theoretical = 0.02rho = CV/sqrt(VX*VY) rho = 0.4212 % Theoretical = 0.4216

Coefficient of linear correlation

The parameter ρ is usually called the correlation coefficient. A more descriptive name would be coefficient of linear correlation . The following example shows that all probability mass may be on a curve, so that $Y=g\left(X\right)$ (i.e., the value of Y is completely determined by the value of X ), yet $\rho =0$ .

## $Y=g\left(X\right)$ But $\rho =0$

Suppose $X\sim$ uniform (-1,1), so that ${f}_{X}\left(t\right)=1/2,\phantom{\rule{0.277778em}{0ex}}-1 and $E\left[X\right]=0$ . Let $Y=g\left(X\right)=cosX$ . Then

$\mathrm{Cov}\phantom{\rule{0.166667em}{0ex}}\left[X,Y\right]=E\left[XY\right]=\frac{1}{2}{\int }_{-1}^{1}tcos\phantom{\rule{0.166667em}{0ex}}t\phantom{\rule{0.277778em}{0ex}}dt=0$

Thus $\rho =0$ . Note that g could be any even function defined on (-1,1). In this case the integrand $tg\left(t\right)$ is odd, so that the value of the integral is zero.

Variance and covariance for linear combinations

We generalize the property (V4) on linear combinations. Consider the linear combinations

$X=\sum _{i=1}^{n}{a}_{i}{X}_{i}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\text{and}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}Y=\sum _{j=1}^{m}{b}_{j}{Y}_{j}$

We wish to determine $\mathrm{Cov}\phantom{\rule{0.166667em}{0ex}}\left[X,Y\right]$ and $\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[X\right]$ . It is convenient to work with the centered random variables ${X}^{\text{'}}=X-{\mu }_{X}$ and ${Y}^{\text{'}}=Y-{\mu }_{y}$ . Since by linearity of expectation,

${\mu }_{X}=\sum _{i=1}^{n}{a}_{i}{\mu }_{{X}_{i}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\text{and}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}{\mu }_{Y}=\sum _{j=1}^{m}{b}_{j}{\mu }_{{Y}_{j}}$

we have

${X}^{\text{'}}=\sum _{i=1}^{n}{a}_{i}{X}_{i}-\sum _{i=1}^{n}{a}_{i}{\mu }_{{X}_{i}}=\sum _{i=1}^{n}{a}_{i}\left({X}_{i}-{\mu }_{{X}_{i}}\right)=\sum _{i=1}^{n}{a}_{i}{X}_{i}^{\text{'}}$

and similarly for Y ' . By definition

$\mathrm{Cov}\phantom{\rule{0.166667em}{0ex}}\left(X,Y\right)=E\left[{X}^{\text{'}}{Y}^{\text{'}}\right]=E\left[\sum _{i,j}{a}_{i}{b}_{j}{X}_{i}^{\text{'}}{Y}_{j}^{\text{'}}\right]=\sum _{i,j}{a}_{i}{b}_{j}E\left[{X}_{i}^{\text{'}}{Y}_{j}^{\text{'}}\right]=\sum _{i,j}{a}_{i}{b}_{j}\mathrm{Cov}\phantom{\rule{0.166667em}{0ex}}\left({X}_{i},{Y}_{j}\right)$

In particular

$\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left(X\right)=\mathrm{Cov}\phantom{\rule{0.166667em}{0ex}}\left(X,X\right)=\sum _{i,j}{a}_{i}{a}_{j}\mathrm{Cov}\phantom{\rule{0.166667em}{0ex}}\left({X}_{i},{X}_{j}\right)=\sum _{i=1}^{n}{a}_{i}^{2}\mathrm{Cov}\phantom{\rule{0.166667em}{0ex}}\left({X}_{i},{X}_{i}\right)+\sum _{i\ne j}{a}_{i}{a}_{j}\mathrm{Cov}\phantom{\rule{0.166667em}{0ex}}\left({X}_{i},{X}_{j}\right)$

Using the fact that ${a}_{i}{a}_{j}\mathrm{Cov}\left({X}_{i},{X}_{j}\right)={a}_{j}{a}_{i}\mathrm{Cov}\left({X}_{j},{X}_{i}\right)$ , we have

$\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[X\right]=\sum _{i=1}^{n}{a}_{i}^{2}\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[{X}_{i}\right]+2\sum _{i

Note that a i 2 does not depend upon the sign of a i . If the X i form an independent class, or are otherwise uncorrelated, the expression for variance reduces to

$\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[X\right]=\sum _{i=1}^{n}{a}_{i}^{2}\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[{X}_{i}\right]$

can someone help me with some logarithmic and exponential equations.
20/(×-6^2)
Salomon
okay, so you have 6 raised to the power of 2. what is that part of your answer
I don't understand what the A with approx sign and the boxed x mean
it think it's written 20/(X-6)^2 so it's 20 divided by X-6 squared
Salomon
I'm not sure why it wrote it the other way
Salomon
I got X =-6
Salomon
ok. so take the square root of both sides, now you have plus or minus the square root of 20= x-6
oops. ignore that.
so you not have an equal sign anywhere in the original equation?
Commplementary angles
hello
Sherica
im all ears I need to learn
Sherica
right! what he said ⤴⤴⤴
Tamia
what is a good calculator for all algebra; would a Casio fx 260 work with all algebra equations? please name the cheapest, thanks.
a perfect square v²+2v+_
kkk nice
algebra 2 Inequalities:If equation 2 = 0 it is an open set?
or infinite solutions?
Kim
The answer is neither. The function, 2 = 0 cannot exist. Hence, the function is undefined.
Al
y=10×
if |A| not equal to 0 and order of A is n prove that adj (adj A = |A|
rolling four fair dice and getting an even number an all four dice
Kristine 2*2*2=8
Differences Between Laspeyres and Paasche Indices
No. 7x -4y is simplified from 4x + (3y + 3x) -7y
is it 3×y ?
J, combine like terms 7x-4y
im not good at math so would this help me
yes
Asali
I'm not good at math so would you help me
Samantha
what is the problem that i will help you to self with?
Asali
how do you translate this in Algebraic Expressions
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
what's the easiest and fastest way to the synthesize AgNP?
China
Cied
types of nano material
I start with an easy one. carbon nanotubes woven into a long filament like a string
Porter
many many of nanotubes
Porter
what is the k.e before it land
Yasmin
what is the function of carbon nanotubes?
Cesar
what is nanomaterials​ and their applications of sensors.
what is nano technology
what is system testing?
preparation of nanomaterial
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
what is system testing
what is the application of nanotechnology?
Stotaw
In this morden time nanotechnology used in many field . 1-Electronics-manufacturad IC ,RAM,MRAM,solar panel etc 2-Helth and Medical-Nanomedicine,Drug Dilivery for cancer treatment etc 3- Atomobile -MEMS, Coating on car etc. and may other field for details you can check at Google
Azam
anybody can imagine what will be happen after 100 years from now in nano tech world
Prasenjit
after 100 year this will be not nanotechnology maybe this technology name will be change . maybe aftet 100 year . we work on electron lable practically about its properties and behaviour by the different instruments
Azam
name doesn't matter , whatever it will be change... I'm taking about effect on circumstances of the microscopic world
Prasenjit
how hard could it be to apply nanotechnology against viral infections such HIV or Ebola?
Damian
silver nanoparticles could handle the job?
Damian
not now but maybe in future only AgNP maybe any other nanomaterials
Azam
can nanotechnology change the direction of the face of the world
At high concentrations (>0.01 M), the relation between absorptivity coefficient and absorbance is no longer linear. This is due to the electrostatic interactions between the quantum dots in close proximity. If the concentration of the solution is high, another effect that is seen is the scattering of light from the large number of quantum dots. This assumption only works at low concentrations of the analyte. Presence of stray light.
the Beer law works very well for dilute solutions but fails for very high concentrations. why?
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
A fair die is tossed 180 times. Find the probability P that the face 6 will appear between 29 and 32 times inclusive