Error when trying to derive variance of sample mean
$begingroup$
Assume that $X$ is a random variable with mean $E[X]$ variance $sigma^2$. Let $mu = frac{1}{N}sum_{n=1}^N X_n$, where $X_n$ is i.i.d with respect to $n$ having mean $E[X]$ and variance $sigma^2$, be an estimator of $E[X]$. I tried to show that $Variance(E[X] - mu) = frac{sigma^2}{N}$ but I have made some error which I'm blind to... An approach which yields the correct answer can be found at
http://sepwww.stanford.edu/sep/prof/pvi/rand/paper_html/node16.html.
I'm proceeding as follows:
Let $e = E[X]-mu$ then
begin{align}
Variance(e) &= E[(e -E[e])^2] \
&= E[e^2] - E[e]^2 \
&= E[e^2] & text{unbiased estimator} \
&= E[(E[X]-mu)^2] \
&= E[E[X]^2 - E[X]mu + mu^2] \
&= E[mu^2] - E[X]^2 & text{since }E[mu] = E[X] \
&= Eleft[left(frac{1}{N}sum_{n=1}^N X_nright)^2right] - E[X]^2 \
&= Eleft[frac{1}{N^2}sum_{m=1}^Nsum_{n=1}^N X_m X_nright] - E[X]^2 \
&= left(frac{1}{N^2}sum_{m=1}^Nsum_{n=1}^N E[X_m X_n]right) - E[X]^2 \
&= left(frac{1}{N^2}sum_{n=1}^N E[X_n^2]right) - E[X]^2 & text{due to independence} \
&= left(frac{1}{N^2}sum_{n=1}^N E[X^2]right) - E[X]^2 & text{from assumption on distr. of $X_n$} \
&= frac{1}{N} E[X^2] - E[X]^2 \
&= frac{1}{N} E[X^2] - E[X]^2 \
&= frac{1}{N} (sigma^2 + E[X]^2) - E[X]^2 \
&= frac{sigma^2}{N} + (frac{1}{N} - 1) E[X]^2 \
end{align}
EDIT:
Correcting the error pointed out by NCh gives the correct answer. Continuing from the 9th row
begin{align}
&= left(frac{1}{N^2}sum_{m=1}^Nsum_{n=1}^N E[X_m X_n]right) - E[X]^2 \
&= frac{1}{N^2}left(left(sum_{n=1}^N E[X_n^2]right) + left(sum_{m=1}^Nsum_{nin{1,dots,N}-{m}} E[X_m]E[X_n]right)right) - E[X]^2 & text{due to independence} \
&= frac{1}{N^2}left(left(sum_{n=1}^N E[X^2]right) + left(sum_{m=1}^Nsum_{nin{1,dots,N}-{m}} E[X]^2right)right) - E[X]^2 & text{from assumption on distr. of $X_n$} \
&= frac{1}{N^2}(NE[X^2] + N(N-1)E[X]^2) - E[X] \
&= frac{1}{N}(E[X^2] - E[X]^2) \
&= frac{sigma^2}{N} \
end{align}
probability statistics self-learning estimation expected-value
$endgroup$
add a comment |
$begingroup$
Assume that $X$ is a random variable with mean $E[X]$ variance $sigma^2$. Let $mu = frac{1}{N}sum_{n=1}^N X_n$, where $X_n$ is i.i.d with respect to $n$ having mean $E[X]$ and variance $sigma^2$, be an estimator of $E[X]$. I tried to show that $Variance(E[X] - mu) = frac{sigma^2}{N}$ but I have made some error which I'm blind to... An approach which yields the correct answer can be found at
http://sepwww.stanford.edu/sep/prof/pvi/rand/paper_html/node16.html.
I'm proceeding as follows:
Let $e = E[X]-mu$ then
begin{align}
Variance(e) &= E[(e -E[e])^2] \
&= E[e^2] - E[e]^2 \
&= E[e^2] & text{unbiased estimator} \
&= E[(E[X]-mu)^2] \
&= E[E[X]^2 - E[X]mu + mu^2] \
&= E[mu^2] - E[X]^2 & text{since }E[mu] = E[X] \
&= Eleft[left(frac{1}{N}sum_{n=1}^N X_nright)^2right] - E[X]^2 \
&= Eleft[frac{1}{N^2}sum_{m=1}^Nsum_{n=1}^N X_m X_nright] - E[X]^2 \
&= left(frac{1}{N^2}sum_{m=1}^Nsum_{n=1}^N E[X_m X_n]right) - E[X]^2 \
&= left(frac{1}{N^2}sum_{n=1}^N E[X_n^2]right) - E[X]^2 & text{due to independence} \
&= left(frac{1}{N^2}sum_{n=1}^N E[X^2]right) - E[X]^2 & text{from assumption on distr. of $X_n$} \
&= frac{1}{N} E[X^2] - E[X]^2 \
&= frac{1}{N} E[X^2] - E[X]^2 \
&= frac{1}{N} (sigma^2 + E[X]^2) - E[X]^2 \
&= frac{sigma^2}{N} + (frac{1}{N} - 1) E[X]^2 \
end{align}
EDIT:
Correcting the error pointed out by NCh gives the correct answer. Continuing from the 9th row
begin{align}
&= left(frac{1}{N^2}sum_{m=1}^Nsum_{n=1}^N E[X_m X_n]right) - E[X]^2 \
&= frac{1}{N^2}left(left(sum_{n=1}^N E[X_n^2]right) + left(sum_{m=1}^Nsum_{nin{1,dots,N}-{m}} E[X_m]E[X_n]right)right) - E[X]^2 & text{due to independence} \
&= frac{1}{N^2}left(left(sum_{n=1}^N E[X^2]right) + left(sum_{m=1}^Nsum_{nin{1,dots,N}-{m}} E[X]^2right)right) - E[X]^2 & text{from assumption on distr. of $X_n$} \
&= frac{1}{N^2}(NE[X^2] + N(N-1)E[X]^2) - E[X] \
&= frac{1}{N}(E[X^2] - E[X]^2) \
&= frac{sigma^2}{N} \
end{align}
probability statistics self-learning estimation expected-value
$endgroup$
add a comment |
$begingroup$
Assume that $X$ is a random variable with mean $E[X]$ variance $sigma^2$. Let $mu = frac{1}{N}sum_{n=1}^N X_n$, where $X_n$ is i.i.d with respect to $n$ having mean $E[X]$ and variance $sigma^2$, be an estimator of $E[X]$. I tried to show that $Variance(E[X] - mu) = frac{sigma^2}{N}$ but I have made some error which I'm blind to... An approach which yields the correct answer can be found at
http://sepwww.stanford.edu/sep/prof/pvi/rand/paper_html/node16.html.
I'm proceeding as follows:
Let $e = E[X]-mu$ then
begin{align}
Variance(e) &= E[(e -E[e])^2] \
&= E[e^2] - E[e]^2 \
&= E[e^2] & text{unbiased estimator} \
&= E[(E[X]-mu)^2] \
&= E[E[X]^2 - E[X]mu + mu^2] \
&= E[mu^2] - E[X]^2 & text{since }E[mu] = E[X] \
&= Eleft[left(frac{1}{N}sum_{n=1}^N X_nright)^2right] - E[X]^2 \
&= Eleft[frac{1}{N^2}sum_{m=1}^Nsum_{n=1}^N X_m X_nright] - E[X]^2 \
&= left(frac{1}{N^2}sum_{m=1}^Nsum_{n=1}^N E[X_m X_n]right) - E[X]^2 \
&= left(frac{1}{N^2}sum_{n=1}^N E[X_n^2]right) - E[X]^2 & text{due to independence} \
&= left(frac{1}{N^2}sum_{n=1}^N E[X^2]right) - E[X]^2 & text{from assumption on distr. of $X_n$} \
&= frac{1}{N} E[X^2] - E[X]^2 \
&= frac{1}{N} E[X^2] - E[X]^2 \
&= frac{1}{N} (sigma^2 + E[X]^2) - E[X]^2 \
&= frac{sigma^2}{N} + (frac{1}{N} - 1) E[X]^2 \
end{align}
EDIT:
Correcting the error pointed out by NCh gives the correct answer. Continuing from the 9th row
begin{align}
&= left(frac{1}{N^2}sum_{m=1}^Nsum_{n=1}^N E[X_m X_n]right) - E[X]^2 \
&= frac{1}{N^2}left(left(sum_{n=1}^N E[X_n^2]right) + left(sum_{m=1}^Nsum_{nin{1,dots,N}-{m}} E[X_m]E[X_n]right)right) - E[X]^2 & text{due to independence} \
&= frac{1}{N^2}left(left(sum_{n=1}^N E[X^2]right) + left(sum_{m=1}^Nsum_{nin{1,dots,N}-{m}} E[X]^2right)right) - E[X]^2 & text{from assumption on distr. of $X_n$} \
&= frac{1}{N^2}(NE[X^2] + N(N-1)E[X]^2) - E[X] \
&= frac{1}{N}(E[X^2] - E[X]^2) \
&= frac{sigma^2}{N} \
end{align}
probability statistics self-learning estimation expected-value
$endgroup$
Assume that $X$ is a random variable with mean $E[X]$ variance $sigma^2$. Let $mu = frac{1}{N}sum_{n=1}^N X_n$, where $X_n$ is i.i.d with respect to $n$ having mean $E[X]$ and variance $sigma^2$, be an estimator of $E[X]$. I tried to show that $Variance(E[X] - mu) = frac{sigma^2}{N}$ but I have made some error which I'm blind to... An approach which yields the correct answer can be found at
http://sepwww.stanford.edu/sep/prof/pvi/rand/paper_html/node16.html.
I'm proceeding as follows:
Let $e = E[X]-mu$ then
begin{align}
Variance(e) &= E[(e -E[e])^2] \
&= E[e^2] - E[e]^2 \
&= E[e^2] & text{unbiased estimator} \
&= E[(E[X]-mu)^2] \
&= E[E[X]^2 - E[X]mu + mu^2] \
&= E[mu^2] - E[X]^2 & text{since }E[mu] = E[X] \
&= Eleft[left(frac{1}{N}sum_{n=1}^N X_nright)^2right] - E[X]^2 \
&= Eleft[frac{1}{N^2}sum_{m=1}^Nsum_{n=1}^N X_m X_nright] - E[X]^2 \
&= left(frac{1}{N^2}sum_{m=1}^Nsum_{n=1}^N E[X_m X_n]right) - E[X]^2 \
&= left(frac{1}{N^2}sum_{n=1}^N E[X_n^2]right) - E[X]^2 & text{due to independence} \
&= left(frac{1}{N^2}sum_{n=1}^N E[X^2]right) - E[X]^2 & text{from assumption on distr. of $X_n$} \
&= frac{1}{N} E[X^2] - E[X]^2 \
&= frac{1}{N} E[X^2] - E[X]^2 \
&= frac{1}{N} (sigma^2 + E[X]^2) - E[X]^2 \
&= frac{sigma^2}{N} + (frac{1}{N} - 1) E[X]^2 \
end{align}
EDIT:
Correcting the error pointed out by NCh gives the correct answer. Continuing from the 9th row
begin{align}
&= left(frac{1}{N^2}sum_{m=1}^Nsum_{n=1}^N E[X_m X_n]right) - E[X]^2 \
&= frac{1}{N^2}left(left(sum_{n=1}^N E[X_n^2]right) + left(sum_{m=1}^Nsum_{nin{1,dots,N}-{m}} E[X_m]E[X_n]right)right) - E[X]^2 & text{due to independence} \
&= frac{1}{N^2}left(left(sum_{n=1}^N E[X^2]right) + left(sum_{m=1}^Nsum_{nin{1,dots,N}-{m}} E[X]^2right)right) - E[X]^2 & text{from assumption on distr. of $X_n$} \
&= frac{1}{N^2}(NE[X^2] + N(N-1)E[X]^2) - E[X] \
&= frac{1}{N}(E[X^2] - E[X]^2) \
&= frac{sigma^2}{N} \
end{align}
probability statistics self-learning estimation expected-value
probability statistics self-learning estimation expected-value
edited Dec 4 '18 at 8:04
Angelos
asked Dec 3 '18 at 14:10
AngelosAngelos
788
788
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
An error is when you went from 9th to 10th raw:
$$mathbb E[X_m X_n]neq mathbb E[X_n^2]$$
for $mneq n$.
By independence,
$$mathbb E[X_m X_n]=mathbb E[X_m]mathbb E[X_n]=mathbb E[X]^2$$
Note also that by properties of variance,
$$
Var(E[X]-mu) = Var(mu) = Varleft(frac{sum_{i=1}^N X_i}{N}right) = frac{1}{N^2} Varleft(sum_{i=1}^N X_iright) = frac{1}{N^2} left(sum_{i=1}^N Var(X_i)right) = frac{N sigma^2}{N^2} = frac{sigma^2}{N}
$$
$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: "69"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
},
noCode: 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%2fmath.stackexchange.com%2fquestions%2f3024098%2ferror-when-trying-to-derive-variance-of-sample-mean%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$
An error is when you went from 9th to 10th raw:
$$mathbb E[X_m X_n]neq mathbb E[X_n^2]$$
for $mneq n$.
By independence,
$$mathbb E[X_m X_n]=mathbb E[X_m]mathbb E[X_n]=mathbb E[X]^2$$
Note also that by properties of variance,
$$
Var(E[X]-mu) = Var(mu) = Varleft(frac{sum_{i=1}^N X_i}{N}right) = frac{1}{N^2} Varleft(sum_{i=1}^N X_iright) = frac{1}{N^2} left(sum_{i=1}^N Var(X_i)right) = frac{N sigma^2}{N^2} = frac{sigma^2}{N}
$$
$endgroup$
add a comment |
$begingroup$
An error is when you went from 9th to 10th raw:
$$mathbb E[X_m X_n]neq mathbb E[X_n^2]$$
for $mneq n$.
By independence,
$$mathbb E[X_m X_n]=mathbb E[X_m]mathbb E[X_n]=mathbb E[X]^2$$
Note also that by properties of variance,
$$
Var(E[X]-mu) = Var(mu) = Varleft(frac{sum_{i=1}^N X_i}{N}right) = frac{1}{N^2} Varleft(sum_{i=1}^N X_iright) = frac{1}{N^2} left(sum_{i=1}^N Var(X_i)right) = frac{N sigma^2}{N^2} = frac{sigma^2}{N}
$$
$endgroup$
add a comment |
$begingroup$
An error is when you went from 9th to 10th raw:
$$mathbb E[X_m X_n]neq mathbb E[X_n^2]$$
for $mneq n$.
By independence,
$$mathbb E[X_m X_n]=mathbb E[X_m]mathbb E[X_n]=mathbb E[X]^2$$
Note also that by properties of variance,
$$
Var(E[X]-mu) = Var(mu) = Varleft(frac{sum_{i=1}^N X_i}{N}right) = frac{1}{N^2} Varleft(sum_{i=1}^N X_iright) = frac{1}{N^2} left(sum_{i=1}^N Var(X_i)right) = frac{N sigma^2}{N^2} = frac{sigma^2}{N}
$$
$endgroup$
An error is when you went from 9th to 10th raw:
$$mathbb E[X_m X_n]neq mathbb E[X_n^2]$$
for $mneq n$.
By independence,
$$mathbb E[X_m X_n]=mathbb E[X_m]mathbb E[X_n]=mathbb E[X]^2$$
Note also that by properties of variance,
$$
Var(E[X]-mu) = Var(mu) = Varleft(frac{sum_{i=1}^N X_i}{N}right) = frac{1}{N^2} Varleft(sum_{i=1}^N X_iright) = frac{1}{N^2} left(sum_{i=1}^N Var(X_i)right) = frac{N sigma^2}{N^2} = frac{sigma^2}{N}
$$
answered Dec 4 '18 at 3:07
NChNCh
6,3832723
6,3832723
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- 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%2fmath.stackexchange.com%2fquestions%2f3024098%2ferror-when-trying-to-derive-variance-of-sample-mean%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