Does mean centering reduces covariance?
$begingroup$
It might be a very naive question, but 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 thinking it should do the same for covariance.
correlation covariance random-vector
$endgroup$
add a comment |
$begingroup$
It might be a very naive question, but 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 thinking it should do the same for covariance.
correlation covariance random-vector
$endgroup$
add a comment |
$begingroup$
It might be a very naive question, but 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 thinking it should do the same for covariance.
correlation covariance random-vector
$endgroup$
It might be a very naive question, but 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 thinking it should do the same for covariance.
correlation covariance random-vector
correlation covariance random-vector
asked 55 mins ago
lvdplvdp
63
63
add a comment |
add a comment |
1 Answer
1
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$
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');
});
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-reduces-covariance%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
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$
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$
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 17 mins ago
answered 30 mins ago
Artem MavrinArtem Mavrin
33516
33516
add a comment |
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');
});
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-reduces-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');
});
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');
});
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');
});
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