Does mean centering reduce covariance?
$begingroup$
Assuming I have two non-independent random variables and I want to reduce covariance between them as much as possible without loosing too much "signal", does mean centering help? I read somewhere that mean centering reduces correlation by a significant factor, so I'm thinking it should do the same for covariance.
correlation covariance random-vector
$endgroup$
add a comment |
$begingroup$
Assuming I have two non-independent random variables and I want to reduce covariance between them as much as possible without loosing too much "signal", does mean centering help? I read somewhere that mean centering reduces correlation by a significant factor, so I'm thinking it should do the same for covariance.
correlation covariance random-vector
$endgroup$
add a comment |
$begingroup$
Assuming I have two non-independent random variables and I want to reduce covariance between them as much as possible without loosing too much "signal", does mean centering help? I read somewhere that mean centering reduces correlation by a significant factor, so I'm thinking it should do the same for covariance.
correlation covariance random-vector
$endgroup$
Assuming I have two non-independent random variables and I want to reduce covariance between them as much as possible without loosing too much "signal", does mean centering help? I read somewhere that mean centering reduces correlation by a significant factor, so I'm thinking it should do the same for covariance.
correlation covariance random-vector
correlation covariance random-vector
edited 9 hours ago
opa
1031
1031
asked 23 hours ago
lvdplvdp
617
617
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
If $X$ and $Y$ are random variables and $a$ and $b$ are constants, then
$$
begin{aligned}
operatorname{Cov}(X + a, Y + b)
&= E[(X + a - E[X + a])(Y + b - E[Y + b])] \
&= E[(X + a - E[X] - E[a])(Y + b - E[Y] - E[b])] \
&= E[(X + a - E[X] - a)(Y + b - E[Y] - b)] \
&= E[(X - E[X])(Y - E[Y])] \
&= operatorname{Cov}(X, Y).
end{aligned}
$$
Centering is the special case $a = -E[X]$ and $b = -E[Y]$, so centering does not affect covariance.
Also, since correlation is defined as
$$
operatorname{Corr}(X, Y)
= frac{operatorname{Cov}(X, Y)}{sqrt{operatorname{Var}(X) operatorname{Var}(Y)}},
$$
we can see that
$$
begin{aligned}
operatorname{Corr}(X + a, Y + b)
&= frac{operatorname{Cov}(X + a, Y + b)}{sqrt{operatorname{Var}(X + a) operatorname{Var}(Y + b)}} \
&= frac{operatorname{Cov}(X, Y)}{sqrt{operatorname{Var}(X) operatorname{Var}(Y)}},
end{aligned}
$$
so in particular, correlation isn't affected by centering either.
That was the population version of the story. The sample version is the same: If we use
$$
widehat{operatorname{Cov}}(X, Y)
= frac{1}{n} sum_{i=1}^n left(X_i - frac{1}{n}sum_{j=1}^n X_jright)left(Y_i - frac{1}{n}sum_{j=1}^n Y_jright)
$$
as our estimate of covariance between $X$ and $Y$ from a paired sample $(X_1,Y_1), ldots, (X_n,Y_n)$, then
$$
begin{aligned}
widehat{operatorname{Cov}}(X + a, Y + b)
&= frac{1}{n} sum_{i=1}^n left(X_i + a - frac{1}{n}sum_{j=1}^n (X_j + a)right)left(Y_i + b - frac{1}{n}sum_{j=1}^n (Y_j + b)right) \
&= frac{1}{n} sum_{i=1}^n left(X_i + a - frac{1}{n}sum_{j=1}^n X_j - frac{n}{n} aright)left(Y_i + b - frac{1}{n}sum_{j=1}^n Y_j - frac{n}{n} bright) \
&= frac{1}{n} sum_{i=1}^n left(X_i - frac{1}{n}sum_{j=1}^n X_jright)left(Y_i - frac{1}{n}sum_{j=1}^n Y_jright) \
&= widehat{operatorname{Cov}}(X, Y)
end{aligned}
$$
for any $a$ and $b$.
$endgroup$
$begingroup$
thanks for the detailed answer. Does it mean that for sample covariance the sample size doesn't have any impact either? i.e. reducing the sample size does not reduce the sample covariance?
$endgroup$
– lvdp
21 hours ago
3
$begingroup$
@lvdp That should probably be a separate question.
$endgroup$
– Acccumulation
10 hours ago
$begingroup$
A reduced sample size can only come with a different sample. A different sample could show different covariance, therefore. But as sample covariance is defined as an average, sample size is scaled for in principle.
$endgroup$
– Nick Cox
9 hours ago
add a comment |
$begingroup$
The definition of the covariance of $X$ and $Y$ is $E[(X-E[X])(Y-E[Y])]$. The expression $X-E[X]$ in that formula is the centered version of $X$. So we already center $X$ when we take the covariance, and centering is an idempotent operator; once a variable is centered, applying the centering process further times doesn't change it. If the formula didn't take the centered versions of the variables, then there would all sort of weird effects, such as the covariance between temperature and another variable being different depending on whether we measure temperature in Celsius or Kelvin.
$endgroup$
add a comment |
$begingroup$
"somewhere" tends to be a rather unreliable source...
Covariance/correlation are defined with explicit centering. If you don't center the data, then you are not computing covariance/correlation. (Precisely: Pearson correlation)
The main difference is whether you center based on a theoretical model (e.g., the expected value is supposed to be exactly 0) or based on the data (arithmetic mean). It is easy to see that the arithmetic mean will yield smaller Covariance than any different center.
However, smaller covariance does not imply smaller correlation, or the opposite. Assume that we have data X=(1,2) and Y=(2,1). It is easy to see that with arithmetic mean centering this will yield perfectly negative correlation, while if we know the generating process produces 0 on average, the data is actually positively correlated.
So in this example, we are centering - but with the theoretical expected value of 0.
This can arise easily. Consider we have a sensor array, 11x11, with the cells numbered -5 to +5. Rather than taking the arithmetic mean, it does make sense to use the "physical" mean of our sensor array here when looking for the correlation of sensor events (if we enumerated the cells 0 to 10, we'd use 5 as fixed mean, and we would get the exact same results, so that indexing choice disappears from the analysis - nice).
$endgroup$
$begingroup$
Thanks @Anony-Mousse, will the sample covariance depend on the sample size? I.e. smaller sample size will yield smaller covariance ( before centering).
$endgroup$
– lvdp
12 hours ago
$begingroup$
Depends on the sample obviously. On average - I don't know. I'd expect smaller samples to have more variability mostly, so maybe more often more extreme values. But that is just an intuition.
$endgroup$
– Anony-Mousse
1 hour ago
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "65"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f391838%2fdoes-mean-centering-reduce-covariance%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
If $X$ and $Y$ are random variables and $a$ and $b$ are constants, then
$$
begin{aligned}
operatorname{Cov}(X + a, Y + b)
&= E[(X + a - E[X + a])(Y + b - E[Y + b])] \
&= E[(X + a - E[X] - E[a])(Y + b - E[Y] - E[b])] \
&= E[(X + a - E[X] - a)(Y + b - E[Y] - b)] \
&= E[(X - E[X])(Y - E[Y])] \
&= operatorname{Cov}(X, Y).
end{aligned}
$$
Centering is the special case $a = -E[X]$ and $b = -E[Y]$, so centering does not affect covariance.
Also, since correlation is defined as
$$
operatorname{Corr}(X, Y)
= frac{operatorname{Cov}(X, Y)}{sqrt{operatorname{Var}(X) operatorname{Var}(Y)}},
$$
we can see that
$$
begin{aligned}
operatorname{Corr}(X + a, Y + b)
&= frac{operatorname{Cov}(X + a, Y + b)}{sqrt{operatorname{Var}(X + a) operatorname{Var}(Y + b)}} \
&= frac{operatorname{Cov}(X, Y)}{sqrt{operatorname{Var}(X) operatorname{Var}(Y)}},
end{aligned}
$$
so in particular, correlation isn't affected by centering either.
That was the population version of the story. The sample version is the same: If we use
$$
widehat{operatorname{Cov}}(X, Y)
= frac{1}{n} sum_{i=1}^n left(X_i - frac{1}{n}sum_{j=1}^n X_jright)left(Y_i - frac{1}{n}sum_{j=1}^n Y_jright)
$$
as our estimate of covariance between $X$ and $Y$ from a paired sample $(X_1,Y_1), ldots, (X_n,Y_n)$, then
$$
begin{aligned}
widehat{operatorname{Cov}}(X + a, Y + b)
&= frac{1}{n} sum_{i=1}^n left(X_i + a - frac{1}{n}sum_{j=1}^n (X_j + a)right)left(Y_i + b - frac{1}{n}sum_{j=1}^n (Y_j + b)right) \
&= frac{1}{n} sum_{i=1}^n left(X_i + a - frac{1}{n}sum_{j=1}^n X_j - frac{n}{n} aright)left(Y_i + b - frac{1}{n}sum_{j=1}^n Y_j - frac{n}{n} bright) \
&= frac{1}{n} sum_{i=1}^n left(X_i - frac{1}{n}sum_{j=1}^n X_jright)left(Y_i - frac{1}{n}sum_{j=1}^n Y_jright) \
&= widehat{operatorname{Cov}}(X, Y)
end{aligned}
$$
for any $a$ and $b$.
$endgroup$
$begingroup$
thanks for the detailed answer. Does it mean that for sample covariance the sample size doesn't have any impact either? i.e. reducing the sample size does not reduce the sample covariance?
$endgroup$
– lvdp
21 hours ago
3
$begingroup$
@lvdp That should probably be a separate question.
$endgroup$
– Acccumulation
10 hours ago
$begingroup$
A reduced sample size can only come with a different sample. A different sample could show different covariance, therefore. But as sample covariance is defined as an average, sample size is scaled for in principle.
$endgroup$
– Nick Cox
9 hours ago
add a comment |
$begingroup$
If $X$ and $Y$ are random variables and $a$ and $b$ are constants, then
$$
begin{aligned}
operatorname{Cov}(X + a, Y + b)
&= E[(X + a - E[X + a])(Y + b - E[Y + b])] \
&= E[(X + a - E[X] - E[a])(Y + b - E[Y] - E[b])] \
&= E[(X + a - E[X] - a)(Y + b - E[Y] - b)] \
&= E[(X - E[X])(Y - E[Y])] \
&= operatorname{Cov}(X, Y).
end{aligned}
$$
Centering is the special case $a = -E[X]$ and $b = -E[Y]$, so centering does not affect covariance.
Also, since correlation is defined as
$$
operatorname{Corr}(X, Y)
= frac{operatorname{Cov}(X, Y)}{sqrt{operatorname{Var}(X) operatorname{Var}(Y)}},
$$
we can see that
$$
begin{aligned}
operatorname{Corr}(X + a, Y + b)
&= frac{operatorname{Cov}(X + a, Y + b)}{sqrt{operatorname{Var}(X + a) operatorname{Var}(Y + b)}} \
&= frac{operatorname{Cov}(X, Y)}{sqrt{operatorname{Var}(X) operatorname{Var}(Y)}},
end{aligned}
$$
so in particular, correlation isn't affected by centering either.
That was the population version of the story. The sample version is the same: If we use
$$
widehat{operatorname{Cov}}(X, Y)
= frac{1}{n} sum_{i=1}^n left(X_i - frac{1}{n}sum_{j=1}^n X_jright)left(Y_i - frac{1}{n}sum_{j=1}^n Y_jright)
$$
as our estimate of covariance between $X$ and $Y$ from a paired sample $(X_1,Y_1), ldots, (X_n,Y_n)$, then
$$
begin{aligned}
widehat{operatorname{Cov}}(X + a, Y + b)
&= frac{1}{n} sum_{i=1}^n left(X_i + a - frac{1}{n}sum_{j=1}^n (X_j + a)right)left(Y_i + b - frac{1}{n}sum_{j=1}^n (Y_j + b)right) \
&= frac{1}{n} sum_{i=1}^n left(X_i + a - frac{1}{n}sum_{j=1}^n X_j - frac{n}{n} aright)left(Y_i + b - frac{1}{n}sum_{j=1}^n Y_j - frac{n}{n} bright) \
&= frac{1}{n} sum_{i=1}^n left(X_i - frac{1}{n}sum_{j=1}^n X_jright)left(Y_i - frac{1}{n}sum_{j=1}^n Y_jright) \
&= widehat{operatorname{Cov}}(X, Y)
end{aligned}
$$
for any $a$ and $b$.
$endgroup$
$begingroup$
thanks for the detailed answer. Does it mean that for sample covariance the sample size doesn't have any impact either? i.e. reducing the sample size does not reduce the sample covariance?
$endgroup$
– lvdp
21 hours ago
3
$begingroup$
@lvdp That should probably be a separate question.
$endgroup$
– Acccumulation
10 hours ago
$begingroup$
A reduced sample size can only come with a different sample. A different sample could show different covariance, therefore. But as sample covariance is defined as an average, sample size is scaled for in principle.
$endgroup$
– Nick Cox
9 hours ago
add a comment |
$begingroup$
If $X$ and $Y$ are random variables and $a$ and $b$ are constants, then
$$
begin{aligned}
operatorname{Cov}(X + a, Y + b)
&= E[(X + a - E[X + a])(Y + b - E[Y + b])] \
&= E[(X + a - E[X] - E[a])(Y + b - E[Y] - E[b])] \
&= E[(X + a - E[X] - a)(Y + b - E[Y] - b)] \
&= E[(X - E[X])(Y - E[Y])] \
&= operatorname{Cov}(X, Y).
end{aligned}
$$
Centering is the special case $a = -E[X]$ and $b = -E[Y]$, so centering does not affect covariance.
Also, since correlation is defined as
$$
operatorname{Corr}(X, Y)
= frac{operatorname{Cov}(X, Y)}{sqrt{operatorname{Var}(X) operatorname{Var}(Y)}},
$$
we can see that
$$
begin{aligned}
operatorname{Corr}(X + a, Y + b)
&= frac{operatorname{Cov}(X + a, Y + b)}{sqrt{operatorname{Var}(X + a) operatorname{Var}(Y + b)}} \
&= frac{operatorname{Cov}(X, Y)}{sqrt{operatorname{Var}(X) operatorname{Var}(Y)}},
end{aligned}
$$
so in particular, correlation isn't affected by centering either.
That was the population version of the story. The sample version is the same: If we use
$$
widehat{operatorname{Cov}}(X, Y)
= frac{1}{n} sum_{i=1}^n left(X_i - frac{1}{n}sum_{j=1}^n X_jright)left(Y_i - frac{1}{n}sum_{j=1}^n Y_jright)
$$
as our estimate of covariance between $X$ and $Y$ from a paired sample $(X_1,Y_1), ldots, (X_n,Y_n)$, then
$$
begin{aligned}
widehat{operatorname{Cov}}(X + a, Y + b)
&= frac{1}{n} sum_{i=1}^n left(X_i + a - frac{1}{n}sum_{j=1}^n (X_j + a)right)left(Y_i + b - frac{1}{n}sum_{j=1}^n (Y_j + b)right) \
&= frac{1}{n} sum_{i=1}^n left(X_i + a - frac{1}{n}sum_{j=1}^n X_j - frac{n}{n} aright)left(Y_i + b - frac{1}{n}sum_{j=1}^n Y_j - frac{n}{n} bright) \
&= frac{1}{n} sum_{i=1}^n left(X_i - frac{1}{n}sum_{j=1}^n X_jright)left(Y_i - frac{1}{n}sum_{j=1}^n Y_jright) \
&= widehat{operatorname{Cov}}(X, Y)
end{aligned}
$$
for any $a$ and $b$.
$endgroup$
If $X$ and $Y$ are random variables and $a$ and $b$ are constants, then
$$
begin{aligned}
operatorname{Cov}(X + a, Y + b)
&= E[(X + a - E[X + a])(Y + b - E[Y + b])] \
&= E[(X + a - E[X] - E[a])(Y + b - E[Y] - E[b])] \
&= E[(X + a - E[X] - a)(Y + b - E[Y] - b)] \
&= E[(X - E[X])(Y - E[Y])] \
&= operatorname{Cov}(X, Y).
end{aligned}
$$
Centering is the special case $a = -E[X]$ and $b = -E[Y]$, so centering does not affect covariance.
Also, since correlation is defined as
$$
operatorname{Corr}(X, Y)
= frac{operatorname{Cov}(X, Y)}{sqrt{operatorname{Var}(X) operatorname{Var}(Y)}},
$$
we can see that
$$
begin{aligned}
operatorname{Corr}(X + a, Y + b)
&= frac{operatorname{Cov}(X + a, Y + b)}{sqrt{operatorname{Var}(X + a) operatorname{Var}(Y + b)}} \
&= frac{operatorname{Cov}(X, Y)}{sqrt{operatorname{Var}(X) operatorname{Var}(Y)}},
end{aligned}
$$
so in particular, correlation isn't affected by centering either.
That was the population version of the story. The sample version is the same: If we use
$$
widehat{operatorname{Cov}}(X, Y)
= frac{1}{n} sum_{i=1}^n left(X_i - frac{1}{n}sum_{j=1}^n X_jright)left(Y_i - frac{1}{n}sum_{j=1}^n Y_jright)
$$
as our estimate of covariance between $X$ and $Y$ from a paired sample $(X_1,Y_1), ldots, (X_n,Y_n)$, then
$$
begin{aligned}
widehat{operatorname{Cov}}(X + a, Y + b)
&= frac{1}{n} sum_{i=1}^n left(X_i + a - frac{1}{n}sum_{j=1}^n (X_j + a)right)left(Y_i + b - frac{1}{n}sum_{j=1}^n (Y_j + b)right) \
&= frac{1}{n} sum_{i=1}^n left(X_i + a - frac{1}{n}sum_{j=1}^n X_j - frac{n}{n} aright)left(Y_i + b - frac{1}{n}sum_{j=1}^n Y_j - frac{n}{n} bright) \
&= frac{1}{n} sum_{i=1}^n left(X_i - frac{1}{n}sum_{j=1}^n X_jright)left(Y_i - frac{1}{n}sum_{j=1}^n Y_jright) \
&= widehat{operatorname{Cov}}(X, Y)
end{aligned}
$$
for any $a$ and $b$.
edited 9 hours ago
answered 22 hours ago
Artem MavrinArtem Mavrin
55148
55148
$begingroup$
thanks for the detailed answer. Does it mean that for sample covariance the sample size doesn't have any impact either? i.e. reducing the sample size does not reduce the sample covariance?
$endgroup$
– lvdp
21 hours ago
3
$begingroup$
@lvdp That should probably be a separate question.
$endgroup$
– Acccumulation
10 hours ago
$begingroup$
A reduced sample size can only come with a different sample. A different sample could show different covariance, therefore. But as sample covariance is defined as an average, sample size is scaled for in principle.
$endgroup$
– Nick Cox
9 hours ago
add a comment |
$begingroup$
thanks for the detailed answer. Does it mean that for sample covariance the sample size doesn't have any impact either? i.e. reducing the sample size does not reduce the sample covariance?
$endgroup$
– lvdp
21 hours ago
3
$begingroup$
@lvdp That should probably be a separate question.
$endgroup$
– Acccumulation
10 hours ago
$begingroup$
A reduced sample size can only come with a different sample. A different sample could show different covariance, therefore. But as sample covariance is defined as an average, sample size is scaled for in principle.
$endgroup$
– Nick Cox
9 hours ago
$begingroup$
thanks for the detailed answer. Does it mean that for sample covariance the sample size doesn't have any impact either? i.e. reducing the sample size does not reduce the sample covariance?
$endgroup$
– lvdp
21 hours ago
$begingroup$
thanks for the detailed answer. Does it mean that for sample covariance the sample size doesn't have any impact either? i.e. reducing the sample size does not reduce the sample covariance?
$endgroup$
– lvdp
21 hours ago
3
3
$begingroup$
@lvdp That should probably be a separate question.
$endgroup$
– Acccumulation
10 hours ago
$begingroup$
@lvdp That should probably be a separate question.
$endgroup$
– Acccumulation
10 hours ago
$begingroup$
A reduced sample size can only come with a different sample. A different sample could show different covariance, therefore. But as sample covariance is defined as an average, sample size is scaled for in principle.
$endgroup$
– Nick Cox
9 hours ago
$begingroup$
A reduced sample size can only come with a different sample. A different sample could show different covariance, therefore. But as sample covariance is defined as an average, sample size is scaled for in principle.
$endgroup$
– Nick Cox
9 hours ago
add a comment |
$begingroup$
The definition of the covariance of $X$ and $Y$ is $E[(X-E[X])(Y-E[Y])]$. The expression $X-E[X]$ in that formula is the centered version of $X$. So we already center $X$ when we take the covariance, and centering is an idempotent operator; once a variable is centered, applying the centering process further times doesn't change it. If the formula didn't take the centered versions of the variables, then there would all sort of weird effects, such as the covariance between temperature and another variable being different depending on whether we measure temperature in Celsius or Kelvin.
$endgroup$
add a comment |
$begingroup$
The definition of the covariance of $X$ and $Y$ is $E[(X-E[X])(Y-E[Y])]$. The expression $X-E[X]$ in that formula is the centered version of $X$. So we already center $X$ when we take the covariance, and centering is an idempotent operator; once a variable is centered, applying the centering process further times doesn't change it. If the formula didn't take the centered versions of the variables, then there would all sort of weird effects, such as the covariance between temperature and another variable being different depending on whether we measure temperature in Celsius or Kelvin.
$endgroup$
add a comment |
$begingroup$
The definition of the covariance of $X$ and $Y$ is $E[(X-E[X])(Y-E[Y])]$. The expression $X-E[X]$ in that formula is the centered version of $X$. So we already center $X$ when we take the covariance, and centering is an idempotent operator; once a variable is centered, applying the centering process further times doesn't change it. If the formula didn't take the centered versions of the variables, then there would all sort of weird effects, such as the covariance between temperature and another variable being different depending on whether we measure temperature in Celsius or Kelvin.
$endgroup$
The definition of the covariance of $X$ and $Y$ is $E[(X-E[X])(Y-E[Y])]$. The expression $X-E[X]$ in that formula is the centered version of $X$. So we already center $X$ when we take the covariance, and centering is an idempotent operator; once a variable is centered, applying the centering process further times doesn't change it. If the formula didn't take the centered versions of the variables, then there would all sort of weird effects, such as the covariance between temperature and another variable being different depending on whether we measure temperature in Celsius or Kelvin.
answered 10 hours ago
AcccumulationAcccumulation
1,60626
1,60626
add a comment |
add a comment |
$begingroup$
"somewhere" tends to be a rather unreliable source...
Covariance/correlation are defined with explicit centering. If you don't center the data, then you are not computing covariance/correlation. (Precisely: Pearson correlation)
The main difference is whether you center based on a theoretical model (e.g., the expected value is supposed to be exactly 0) or based on the data (arithmetic mean). It is easy to see that the arithmetic mean will yield smaller Covariance than any different center.
However, smaller covariance does not imply smaller correlation, or the opposite. Assume that we have data X=(1,2) and Y=(2,1). It is easy to see that with arithmetic mean centering this will yield perfectly negative correlation, while if we know the generating process produces 0 on average, the data is actually positively correlated.
So in this example, we are centering - but with the theoretical expected value of 0.
This can arise easily. Consider we have a sensor array, 11x11, with the cells numbered -5 to +5. Rather than taking the arithmetic mean, it does make sense to use the "physical" mean of our sensor array here when looking for the correlation of sensor events (if we enumerated the cells 0 to 10, we'd use 5 as fixed mean, and we would get the exact same results, so that indexing choice disappears from the analysis - nice).
$endgroup$
$begingroup$
Thanks @Anony-Mousse, will the sample covariance depend on the sample size? I.e. smaller sample size will yield smaller covariance ( before centering).
$endgroup$
– lvdp
12 hours ago
$begingroup$
Depends on the sample obviously. On average - I don't know. I'd expect smaller samples to have more variability mostly, so maybe more often more extreme values. But that is just an intuition.
$endgroup$
– Anony-Mousse
1 hour ago
add a comment |
$begingroup$
"somewhere" tends to be a rather unreliable source...
Covariance/correlation are defined with explicit centering. If you don't center the data, then you are not computing covariance/correlation. (Precisely: Pearson correlation)
The main difference is whether you center based on a theoretical model (e.g., the expected value is supposed to be exactly 0) or based on the data (arithmetic mean). It is easy to see that the arithmetic mean will yield smaller Covariance than any different center.
However, smaller covariance does not imply smaller correlation, or the opposite. Assume that we have data X=(1,2) and Y=(2,1). It is easy to see that with arithmetic mean centering this will yield perfectly negative correlation, while if we know the generating process produces 0 on average, the data is actually positively correlated.
So in this example, we are centering - but with the theoretical expected value of 0.
This can arise easily. Consider we have a sensor array, 11x11, with the cells numbered -5 to +5. Rather than taking the arithmetic mean, it does make sense to use the "physical" mean of our sensor array here when looking for the correlation of sensor events (if we enumerated the cells 0 to 10, we'd use 5 as fixed mean, and we would get the exact same results, so that indexing choice disappears from the analysis - nice).
$endgroup$
$begingroup$
Thanks @Anony-Mousse, will the sample covariance depend on the sample size? I.e. smaller sample size will yield smaller covariance ( before centering).
$endgroup$
– lvdp
12 hours ago
$begingroup$
Depends on the sample obviously. On average - I don't know. I'd expect smaller samples to have more variability mostly, so maybe more often more extreme values. But that is just an intuition.
$endgroup$
– Anony-Mousse
1 hour ago
add a comment |
$begingroup$
"somewhere" tends to be a rather unreliable source...
Covariance/correlation are defined with explicit centering. If you don't center the data, then you are not computing covariance/correlation. (Precisely: Pearson correlation)
The main difference is whether you center based on a theoretical model (e.g., the expected value is supposed to be exactly 0) or based on the data (arithmetic mean). It is easy to see that the arithmetic mean will yield smaller Covariance than any different center.
However, smaller covariance does not imply smaller correlation, or the opposite. Assume that we have data X=(1,2) and Y=(2,1). It is easy to see that with arithmetic mean centering this will yield perfectly negative correlation, while if we know the generating process produces 0 on average, the data is actually positively correlated.
So in this example, we are centering - but with the theoretical expected value of 0.
This can arise easily. Consider we have a sensor array, 11x11, with the cells numbered -5 to +5. Rather than taking the arithmetic mean, it does make sense to use the "physical" mean of our sensor array here when looking for the correlation of sensor events (if we enumerated the cells 0 to 10, we'd use 5 as fixed mean, and we would get the exact same results, so that indexing choice disappears from the analysis - nice).
$endgroup$
"somewhere" tends to be a rather unreliable source...
Covariance/correlation are defined with explicit centering. If you don't center the data, then you are not computing covariance/correlation. (Precisely: Pearson correlation)
The main difference is whether you center based on a theoretical model (e.g., the expected value is supposed to be exactly 0) or based on the data (arithmetic mean). It is easy to see that the arithmetic mean will yield smaller Covariance than any different center.
However, smaller covariance does not imply smaller correlation, or the opposite. Assume that we have data X=(1,2) and Y=(2,1). It is easy to see that with arithmetic mean centering this will yield perfectly negative correlation, while if we know the generating process produces 0 on average, the data is actually positively correlated.
So in this example, we are centering - but with the theoretical expected value of 0.
This can arise easily. Consider we have a sensor array, 11x11, with the cells numbered -5 to +5. Rather than taking the arithmetic mean, it does make sense to use the "physical" mean of our sensor array here when looking for the correlation of sensor events (if we enumerated the cells 0 to 10, we'd use 5 as fixed mean, and we would get the exact same results, so that indexing choice disappears from the analysis - nice).
answered 17 hours ago
Anony-MousseAnony-Mousse
30k54178
30k54178
$begingroup$
Thanks @Anony-Mousse, will the sample covariance depend on the sample size? I.e. smaller sample size will yield smaller covariance ( before centering).
$endgroup$
– lvdp
12 hours ago
$begingroup$
Depends on the sample obviously. On average - I don't know. I'd expect smaller samples to have more variability mostly, so maybe more often more extreme values. But that is just an intuition.
$endgroup$
– Anony-Mousse
1 hour ago
add a comment |
$begingroup$
Thanks @Anony-Mousse, will the sample covariance depend on the sample size? I.e. smaller sample size will yield smaller covariance ( before centering).
$endgroup$
– lvdp
12 hours ago
$begingroup$
Depends on the sample obviously. On average - I don't know. I'd expect smaller samples to have more variability mostly, so maybe more often more extreme values. But that is just an intuition.
$endgroup$
– Anony-Mousse
1 hour ago
$begingroup$
Thanks @Anony-Mousse, will the sample covariance depend on the sample size? I.e. smaller sample size will yield smaller covariance ( before centering).
$endgroup$
– lvdp
12 hours ago
$begingroup$
Thanks @Anony-Mousse, will the sample covariance depend on the sample size? I.e. smaller sample size will yield smaller covariance ( before centering).
$endgroup$
– lvdp
12 hours ago
$begingroup$
Depends on the sample obviously. On average - I don't know. I'd expect smaller samples to have more variability mostly, so maybe more often more extreme values. But that is just an intuition.
$endgroup$
– Anony-Mousse
1 hour ago
$begingroup$
Depends on the sample obviously. On average - I don't know. I'd expect smaller samples to have more variability mostly, so maybe more often more extreme values. But that is just an intuition.
$endgroup$
– Anony-Mousse
1 hour ago
add a comment |
Thanks for contributing an answer to Cross Validated!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f391838%2fdoes-mean-centering-reduce-covariance%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown