# 2.5 Correlation and covariance of a random signal

 Page 1 / 1
(Blank Abstract)

When we take the expected value , or average, of a random process , we measure several important characteristics about how the process behavesin general. This proves to be a very important observation. However, suppose we have several random processes measuringdifferent aspects of a system. The relationship between these different processes will also be an important observation. Thecovariance and correlation are two important tools in finding these relationships. Below we will go into more details as towhat these words mean and how these tools are helpful. Note that much of the following discussions refer to just randomvariables, but keep in mind that these variables can represent random signals or random processes.

## Covariance

To begin with, when dealing with more than one random process, it should be obvious that it would be nice to be able to havea number that could quickly give us an idea of how similar the processes are. To do this, we use the covariance , which is analogous to the variance of a single variable.

Covariance
A measure of how much the deviations of two or more variables or processes match.
For two processes, $X$ and $Y$ , if they are not closely related then the covariance will be small, and if they are similar then the covariancewill be large. Let us clarify this statement by describing what we mean by "related" and "similar." Two processes are"closely related" if their distribution spreads are almost equal and they are around the same, or a very slightlydifferent, mean.

Mathematically, covariance is often written as ${\sigma }_{xy}()$ and is defined as

$\mathrm{cov}(X, Y)={\sigma }_{xy}()=((X-\langle X\rangle )(Y-\langle Y\rangle ))$
This can also be reduced and rewritten in the following twoforms:
${\sigma }_{xy}()=\langle (xy)()\rangle -\langle x\rangle ()\langle y\rangle ()$
${\sigma }_{xy}()=\int \,d y$ x X X Y Y f x y

## Useful properties

• If $X$ and $Y$ are independent and uncorrelated or one of them has zero mean value, then ${\sigma }_{xy}()=0$
• If $X$ and $Y$ are orthogonal, then ${\sigma }_{xy}()=-((X)(Y))$
• The covariance is symmetric $\mathrm{cov}(X, Y)=\mathrm{cov}(Y, X)$
• Basic covariance identity $\mathrm{cov}(X+Y, Z)=\mathrm{cov}(X, Z)+\mathrm{cov}(Y, Z)$
• Covariance of equal variables $\mathrm{cov}(X, X)=\mathrm{Var}(X)$

## Correlation

For anyone who has any kind of statistical background, you should be able to see that the idea of dependence/independenceamong variables and signals plays an important role when dealing with random processes. Because of this, the correlation of two variables provides us with a measure of how the two variables affect one another.

Correlation
A measure of how much one random variable depends upon the other.
This measure of association between the variables will provideus with a clue as to how well the value of one variable can be predicted from the value of the other. The correlation isequal to the average of the product of two random variables and is defined as
$\mathrm{cor}(X, Y)=(XY)=\int \,d y$ x x y f x y

## Correlation coefficient

It is often useful to express the correlation of random variables with a range of numbers, like a percentage. For agiven set of variables, we use the correlation coefficient to give us the linear relationship between our variables. The correlation coefficient of twovariables is defined in terms of their covariance and standard deviations , denoted by ${\sigma }_{x}()$ , as seen below

$\rho =\frac{\mathrm{cov}(X, Y)}{{\sigma }_{x}(){\sigma }_{y}()}$
where we will always have $-1\le \rho \le 1$ This provides us with a quick and easy way to view the correlation between our variables. If there is norelationship between the variables then the correlation coefficient will be zero and if there is a perfect positivematch it will be one. If there is a perfect inverse relationship, where one set of variables increases while theother decreases, then the correlation coefficient will be negative one. This type of correlation is often referred tomore specifically as the Pearson's Correlation Coefficient ,or Pearson's Product Moment Correlation.

So far we have dealt with correlation simply as a number relating the relationship between any two variables.However, since our goal will be to relate random processes to each other, which deals with signals as a function oftime, we will want to continue this study by looking at correlation functions .

## Example

Now let us take just a second to look at a simple example that involves calculating the covariance and correlation of twosets of random numbers. We are given the following data sets: $x=\{3, 1, 6, 3, 4\}()$ $y=\{1, 5, 3, 4, 3\}()$ To begin with, for the covariance we will need to find the expected value , or mean, of $x$ and $y$ . $\langle x\rangle =\frac{1}{5}(3+1+6+3+4)=3.4$ $\langle y\rangle =\frac{1}{5}(1+5+3+4+3)=3.2$ $\langle xy\rangle =\frac{1}{5}(3+5+18+12+12)=10$ Next we will solve for the standard deviations of our two setsusing the formula below (for a review click here ). $\sigma =\sqrt{((X-(X))^{2})}$ ${\sigma }_{x}()=\sqrt{\frac{1}{5}(0.16+5.76+6.76+0.16+0.36)}=1.625$ ${\sigma }_{y}()=\sqrt{\frac{1}{6}(4.84+3.24+0.04+0.64+0.04)}=1.327$ Now we can finally calculate the covariance using one of the two formulas found above. Since we calculated the threemeans, we will use that formula since it will be much simpler. ${\sigma }_{xy}()=10-3.4\times 3.2=-0.88$ And for our last calculation, we will solve for thecorrelation coefficient, $\rho$ . $\rho =\frac{-0.88}{1.625\times 1.327}=-0.408$

## Matlab code for example

The above example can be easily calculated using Matlab. Below I have included the code to find all of the valuesabove.

x = [3 1 6 3 4]; y = [1 5 3 4 3]; mx = mean(x) my = mean(y) mxy = mean(x.*y) % Standard Dev. from built-in Matlab Functions std(x,1) std(y,1) % Standard Dev. from Equation Above (same result as std(?,1)) sqrt( 1/5 * sum((x-mx).^2)) sqrt( 1/5 * sum((y-my).^2)) cov(x,y,1) corrcoef(x,y)

what is variations in raman spectra for nanomaterials
I only see partial conversation and what's the question here!
what about nanotechnology for water purification
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
what is the stm
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
absolutely yes
Daniel
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers! By By By Rhodes By  By Prateek Ashtikar  By  