Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

77%
+5 −0
Q&A Which of the multiple definitions of correlation to use?

0 answers  ·  posted 4y ago by Mithrandir24601‭  ·  last activity 4y ago by r~~‭

#1: Initial revision by user avatar Mithrandir24601‭ · 2020-10-16T16:21:29Z (about 4 years ago)
Which of the multiple definitions of correlation to use?
In optics[^1], we have a notion of [coherence](https://en.wikipedia.org/wiki/Degree_of_coherence#Degree_of_first-order_coherence), that's defined as a normalised correlation/cross-correlation/autocorrelation function: Simplifying notation from the linked Wiki page we can write the (un-normalised, first order) correlation function $$G^{(1)} = \left\langle XY\right\rangle,$$ where I'm using $\left\langle\ldots\right\rangle$ to represent the expectation value, which can then be normalised as $$g^{(1)} = \frac{\left\langle XY\right\rangle}{\sqrt{\left\langle X^2\rangle\langle Y^2\right\rangle}},$$ where $X$ and $Y$ are some matrices/operators/variables etc.

All seems well and good... Except the problem was already mentioned in the first sentence - the correlation between $X$ and $Y$ is [defined as](https://en.wikipedia.org/wiki/Correlation_and_dependence#Definition) $$g = \frac{\left\langle XY\right\rangle - \left\langle X\rangle\langle Y\right\rangle}{\sqrt{\left\langle X^2\right\\rangle - \left\langle X\right\rangle^2}\sqrt{\left\langle Y^2\right\\rangle - \left\langle Y\right\rangle^2}},$$ which is the normalised covariance $$G = \left\langle XY\right\rangle - \left\langle X\rangle\langle Y\right\rangle.$$

So, **how do we reconcile these similar yet different definitions?** More importantly, **how do you know which is the right one to use?** In order to tell how correlated two sets of data taken from the expectation of two different measurements of a signal are.

Initially, it seemed like the former might apply to operators and matrices in physics, while the latter applies to variables in statistics. However, there are a couple of issues with this - in taking the expectation of an operator, it instead becomes a continuous variable, which can be treated statistically. The second is that [I sometimes see the first definition of correlation $G^{(1)}$ used alongside the definition of covariance $G$](https://en.wikipedia.org/wiki/Cross-correlation#Cross-correlation_of_stochastic_processes), which if nothing else, is a *confusing* way of mixing different definitions.

[^1]: Yes, I know, starting a maths question with something about physics... Bear with me? Please?