Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

correlation & dot product

Status
Not open for further replies.

ifrah jaffri

Newbie level 6
Newbie level 6
Joined
Jan 19, 2014
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
77
Is there any relation between correlation between two signals and dot product between two

vectors?
 

Maybe... depending on what exactly you mean by "vector". A vector is just some numbers, so it all depends on what you put in your vector.

If your vectors contain the samples of the functions whose correlation you want to calculate, then there is a close relationship. In fact, for zero-mean signals the inner product (dot product) will then equal the sample covariance (which is related to sample correlation by a simple scaling factor). In general (including non-zero mean signals), you just need to subtract the sample mean from each vector before computing the inner product.

Do you use Matlab? I could give some examples to help clarify. Or I can write some examples in mathematical notation if you prefer.

Note: If your vectors are vector signals (i.e. where each element of the vector is effectively a sample from a different function), then things are more complicated. In this case, you would need many instances of the vectors (corresponding to the different sampling times), yielding two matrices. Using these matrices, you could then compute a sample correlation matrix.
 

To start with, we should focus our discussion on **broken link removed** signals. We can extend the discussion to random (or "stochastic") signals later if required.

So, let's state a simple point first: If two zero-mean signals are uncorrelated, then their dot products are zero. In other words, zero-mean uncorrelated signals are geometrically "perpendicular" (or "orthogonal").

To visualise this, we can start with a really simple three-sample example. So, let's assume we have 2 signals: x1(t) and x2(t), where "t" denotes time. We make a very short digital recording of the signals, lasting for just 3 samples. For our simple example, let's assume these are the values we record:
Code:
x1 = [0;1;-1];
x2 = [-2;1;1];

We can confirm that these signals are zero-mean, using:
Code:
sum(x1)
sum(x2)
and seeing that they are both zero. Then we can check their correlation in the normal way:
Code:
covariance = (x1 - mean(x1)).'*(x2 - mean(x2));
variance1 = sum(abs(x1 - mean(x1)).^2);
variance2 = sum(abs(x2 - mean(x2)).^2);
correlation = covariance/sqrt(variance1*variance2)
which we find is zero.

Now, if we plot the 3D vectors x1 and x2 in Matlab, we can see that they look perpendicular:

corr1.PNG

and we can confirm this by checking that their inner product (dot product) is zero, using:
Code:
x1.'*x2

[Sorry... I will have to finish this post tomorrow. I have been in surgery today and need to rest now.]
 

yes sure. you take rest. Get well soon :).
Anxiously waiting for your complete post, as it seems to me quite elaborative and easy to understand.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top