How to prove that $sum_{i<j}(X_i-X_j)^2=nsum_{i=1}^{n}(X_i-bar{X})^2$
$begingroup$
In a example about U-statistics, $h(x_1,x_2)=frac 12(x_1-x_2)^2$, then
$$U_n=frac{2}{n(n-1)}sum_{i<j}frac{(X_i-X_j)^2}{2}=frac{1}{n-1}sum_{i=1}^{n}(X_i-bar{X})^2$$
I don't know how to prove it completely.
statistics
$endgroup$
add a comment |
$begingroup$
In a example about U-statistics, $h(x_1,x_2)=frac 12(x_1-x_2)^2$, then
$$U_n=frac{2}{n(n-1)}sum_{i<j}frac{(X_i-X_j)^2}{2}=frac{1}{n-1}sum_{i=1}^{n}(X_i-bar{X})^2$$
I don't know how to prove it completely.
statistics
$endgroup$
$begingroup$
Please show us what you have tried so far.
$endgroup$
– Stockfish
Dec 18 '18 at 11:58
1
$begingroup$
I think the formula $sum_{i<j}(x_j+x_j)^2=(n-1)sum_{i=1}^{n}x_i$ will be help. But I don't know how to prove the above formula.
$endgroup$
– chole
Dec 18 '18 at 12:14
add a comment |
$begingroup$
In a example about U-statistics, $h(x_1,x_2)=frac 12(x_1-x_2)^2$, then
$$U_n=frac{2}{n(n-1)}sum_{i<j}frac{(X_i-X_j)^2}{2}=frac{1}{n-1}sum_{i=1}^{n}(X_i-bar{X})^2$$
I don't know how to prove it completely.
statistics
$endgroup$
In a example about U-statistics, $h(x_1,x_2)=frac 12(x_1-x_2)^2$, then
$$U_n=frac{2}{n(n-1)}sum_{i<j}frac{(X_i-X_j)^2}{2}=frac{1}{n-1}sum_{i=1}^{n}(X_i-bar{X})^2$$
I don't know how to prove it completely.
statistics
statistics
asked Dec 18 '18 at 11:47
cholechole
333
333
$begingroup$
Please show us what you have tried so far.
$endgroup$
– Stockfish
Dec 18 '18 at 11:58
1
$begingroup$
I think the formula $sum_{i<j}(x_j+x_j)^2=(n-1)sum_{i=1}^{n}x_i$ will be help. But I don't know how to prove the above formula.
$endgroup$
– chole
Dec 18 '18 at 12:14
add a comment |
$begingroup$
Please show us what you have tried so far.
$endgroup$
– Stockfish
Dec 18 '18 at 11:58
1
$begingroup$
I think the formula $sum_{i<j}(x_j+x_j)^2=(n-1)sum_{i=1}^{n}x_i$ will be help. But I don't know how to prove the above formula.
$endgroup$
– chole
Dec 18 '18 at 12:14
$begingroup$
Please show us what you have tried so far.
$endgroup$
– Stockfish
Dec 18 '18 at 11:58
$begingroup$
Please show us what you have tried so far.
$endgroup$
– Stockfish
Dec 18 '18 at 11:58
1
1
$begingroup$
I think the formula $sum_{i<j}(x_j+x_j)^2=(n-1)sum_{i=1}^{n}x_i$ will be help. But I don't know how to prove the above formula.
$endgroup$
– chole
Dec 18 '18 at 12:14
$begingroup$
I think the formula $sum_{i<j}(x_j+x_j)^2=(n-1)sum_{i=1}^{n}x_i$ will be help. But I don't know how to prove the above formula.
$endgroup$
– chole
Dec 18 '18 at 12:14
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
Hint 1 :
$sum_{i<j}{(X_i-X_j)^2} = frac{1}{2}sum_{i}sum_{j}(X_i-X_j)^2$
Hint 2 : Add and subtract $bar{X} $ to simplify sum of squares.
You will arrive at your result.
$endgroup$
add a comment |
$begingroup$
We know that (I found it here)
begin{equation}
left( sum_{n=1}^N a_n right)^2 = sum_{n=1}^N a_n^2 + 2 sum_{j=1}^{N}sum_{i=1}^{j-1} a_i a_j
end{equation}
So using the above identity
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i-frac{1}{n}sum_{j=1}^nX_j)^2\
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j + frac{1}{n^2}(sum_{j=1}^nX_j)^2 )\
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j + frac{1}{n^2}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k) )
end{align}
The last term above is independent of $i$ so it sums up $n$ times as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j) + frac{n}{n^2}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
which is also
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j) + frac{1}{n}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
which could also be written as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2-frac{2}{n}sum_{i=1}^{n}X_isum_{j=1}^nX_j) + frac{1}{n}( 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
Rewriting differently we have
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2-frac{2}{n}sum_{i,j}X_iX_j + frac{2}{n}sum_{i<j}X_iX_j
end{align}
The last two terms above are the same terms with missing terms. Notice that $sum_{i,j}X_iX_j$ spans all $i = 1 ldots n$ and $j = 1 ldots n$ but the other one spans an upper triangular version of it. This means that their difference will span the lower triangular version of it as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2 - frac{2}{n}sum_{igeq j}X_iX_j
end{align}
Factor $n$ on the right hand side, then divide by $n-1$ on both sides, then Multiply/divide by $2$ on the right hand side
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{igeq j}X_iX_j}{2}
Big)
end{align}
Notice that $i geq j$ could be split to two summations
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{i = j}X_iX_j - 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
but when $i = j$, it is the same as a single summation, hence
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{i=1}^n X_i^2 - 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
which gives
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n -1)
sum_{i=1}^{n}X_i^2- 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
The numerator above is nothing other than $sum_{i<j} (X_i - X_j)^2 = sum_{i<j} X_i^2 - 2 sum_{i<j} X_iX_j + sum_{i<j} X_j^2$. It is easy to see the cross terms, however it is not as straightforward to see that we have $n-1$ terms of the form $X_i^2$. This should conclude
begin{align}
frac{1}{n-1}sum_{i=1}^{n}(X_i-bar{X})^2
=
frac{2}{n(n-1)}sum_{i<j}frac{(X_i-X_j)^2}{2}
end{align}
$endgroup$
add a comment |
$begingroup$
A one-line proof summary:$$sum_{i<j}(X_i-X_j)^2=frac{1}{2}sum_{ij}(X_i-X_j)^2=nsum_iX_i^2-sum_{ij}X_iX_j=nsum_i X_i(X_i-overline{X})=nsum_i(X_i-overline{X})^2.$$The first $=$ uses the fact that $(X_i-X_j)^2$ is $ileftrightarrow j$-symmetric and $0$ if $i=j$. The second $=$ expands the square and separates squares from cross terms. The third $=$ is a trivial rearrangement. The last $=$ uses $$X_i(X_i-overline{X})-(X_i-overline{X})^2=overline{X}(X_i-overline{X}),$$which becomes $0$ under $sum_i$.
$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%2f3045070%2fhow-to-prove-that-sum-ijx-i-x-j2-n-sum-i-1nx-i-barx2%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$
Hint 1 :
$sum_{i<j}{(X_i-X_j)^2} = frac{1}{2}sum_{i}sum_{j}(X_i-X_j)^2$
Hint 2 : Add and subtract $bar{X} $ to simplify sum of squares.
You will arrive at your result.
$endgroup$
add a comment |
$begingroup$
Hint 1 :
$sum_{i<j}{(X_i-X_j)^2} = frac{1}{2}sum_{i}sum_{j}(X_i-X_j)^2$
Hint 2 : Add and subtract $bar{X} $ to simplify sum of squares.
You will arrive at your result.
$endgroup$
add a comment |
$begingroup$
Hint 1 :
$sum_{i<j}{(X_i-X_j)^2} = frac{1}{2}sum_{i}sum_{j}(X_i-X_j)^2$
Hint 2 : Add and subtract $bar{X} $ to simplify sum of squares.
You will arrive at your result.
$endgroup$
Hint 1 :
$sum_{i<j}{(X_i-X_j)^2} = frac{1}{2}sum_{i}sum_{j}(X_i-X_j)^2$
Hint 2 : Add and subtract $bar{X} $ to simplify sum of squares.
You will arrive at your result.
answered Dec 18 '18 at 12:22
Vishaal SudarsanVishaal Sudarsan
995
995
add a comment |
add a comment |
$begingroup$
We know that (I found it here)
begin{equation}
left( sum_{n=1}^N a_n right)^2 = sum_{n=1}^N a_n^2 + 2 sum_{j=1}^{N}sum_{i=1}^{j-1} a_i a_j
end{equation}
So using the above identity
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i-frac{1}{n}sum_{j=1}^nX_j)^2\
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j + frac{1}{n^2}(sum_{j=1}^nX_j)^2 )\
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j + frac{1}{n^2}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k) )
end{align}
The last term above is independent of $i$ so it sums up $n$ times as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j) + frac{n}{n^2}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
which is also
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j) + frac{1}{n}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
which could also be written as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2-frac{2}{n}sum_{i=1}^{n}X_isum_{j=1}^nX_j) + frac{1}{n}( 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
Rewriting differently we have
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2-frac{2}{n}sum_{i,j}X_iX_j + frac{2}{n}sum_{i<j}X_iX_j
end{align}
The last two terms above are the same terms with missing terms. Notice that $sum_{i,j}X_iX_j$ spans all $i = 1 ldots n$ and $j = 1 ldots n$ but the other one spans an upper triangular version of it. This means that their difference will span the lower triangular version of it as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2 - frac{2}{n}sum_{igeq j}X_iX_j
end{align}
Factor $n$ on the right hand side, then divide by $n-1$ on both sides, then Multiply/divide by $2$ on the right hand side
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{igeq j}X_iX_j}{2}
Big)
end{align}
Notice that $i geq j$ could be split to two summations
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{i = j}X_iX_j - 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
but when $i = j$, it is the same as a single summation, hence
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{i=1}^n X_i^2 - 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
which gives
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n -1)
sum_{i=1}^{n}X_i^2- 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
The numerator above is nothing other than $sum_{i<j} (X_i - X_j)^2 = sum_{i<j} X_i^2 - 2 sum_{i<j} X_iX_j + sum_{i<j} X_j^2$. It is easy to see the cross terms, however it is not as straightforward to see that we have $n-1$ terms of the form $X_i^2$. This should conclude
begin{align}
frac{1}{n-1}sum_{i=1}^{n}(X_i-bar{X})^2
=
frac{2}{n(n-1)}sum_{i<j}frac{(X_i-X_j)^2}{2}
end{align}
$endgroup$
add a comment |
$begingroup$
We know that (I found it here)
begin{equation}
left( sum_{n=1}^N a_n right)^2 = sum_{n=1}^N a_n^2 + 2 sum_{j=1}^{N}sum_{i=1}^{j-1} a_i a_j
end{equation}
So using the above identity
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i-frac{1}{n}sum_{j=1}^nX_j)^2\
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j + frac{1}{n^2}(sum_{j=1}^nX_j)^2 )\
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j + frac{1}{n^2}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k) )
end{align}
The last term above is independent of $i$ so it sums up $n$ times as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j) + frac{n}{n^2}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
which is also
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j) + frac{1}{n}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
which could also be written as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2-frac{2}{n}sum_{i=1}^{n}X_isum_{j=1}^nX_j) + frac{1}{n}( 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
Rewriting differently we have
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2-frac{2}{n}sum_{i,j}X_iX_j + frac{2}{n}sum_{i<j}X_iX_j
end{align}
The last two terms above are the same terms with missing terms. Notice that $sum_{i,j}X_iX_j$ spans all $i = 1 ldots n$ and $j = 1 ldots n$ but the other one spans an upper triangular version of it. This means that their difference will span the lower triangular version of it as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2 - frac{2}{n}sum_{igeq j}X_iX_j
end{align}
Factor $n$ on the right hand side, then divide by $n-1$ on both sides, then Multiply/divide by $2$ on the right hand side
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{igeq j}X_iX_j}{2}
Big)
end{align}
Notice that $i geq j$ could be split to two summations
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{i = j}X_iX_j - 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
but when $i = j$, it is the same as a single summation, hence
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{i=1}^n X_i^2 - 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
which gives
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n -1)
sum_{i=1}^{n}X_i^2- 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
The numerator above is nothing other than $sum_{i<j} (X_i - X_j)^2 = sum_{i<j} X_i^2 - 2 sum_{i<j} X_iX_j + sum_{i<j} X_j^2$. It is easy to see the cross terms, however it is not as straightforward to see that we have $n-1$ terms of the form $X_i^2$. This should conclude
begin{align}
frac{1}{n-1}sum_{i=1}^{n}(X_i-bar{X})^2
=
frac{2}{n(n-1)}sum_{i<j}frac{(X_i-X_j)^2}{2}
end{align}
$endgroup$
add a comment |
$begingroup$
We know that (I found it here)
begin{equation}
left( sum_{n=1}^N a_n right)^2 = sum_{n=1}^N a_n^2 + 2 sum_{j=1}^{N}sum_{i=1}^{j-1} a_i a_j
end{equation}
So using the above identity
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i-frac{1}{n}sum_{j=1}^nX_j)^2\
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j + frac{1}{n^2}(sum_{j=1}^nX_j)^2 )\
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j + frac{1}{n^2}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k) )
end{align}
The last term above is independent of $i$ so it sums up $n$ times as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j) + frac{n}{n^2}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
which is also
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j) + frac{1}{n}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
which could also be written as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2-frac{2}{n}sum_{i=1}^{n}X_isum_{j=1}^nX_j) + frac{1}{n}( 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
Rewriting differently we have
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2-frac{2}{n}sum_{i,j}X_iX_j + frac{2}{n}sum_{i<j}X_iX_j
end{align}
The last two terms above are the same terms with missing terms. Notice that $sum_{i,j}X_iX_j$ spans all $i = 1 ldots n$ and $j = 1 ldots n$ but the other one spans an upper triangular version of it. This means that their difference will span the lower triangular version of it as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2 - frac{2}{n}sum_{igeq j}X_iX_j
end{align}
Factor $n$ on the right hand side, then divide by $n-1$ on both sides, then Multiply/divide by $2$ on the right hand side
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{igeq j}X_iX_j}{2}
Big)
end{align}
Notice that $i geq j$ could be split to two summations
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{i = j}X_iX_j - 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
but when $i = j$, it is the same as a single summation, hence
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{i=1}^n X_i^2 - 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
which gives
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n -1)
sum_{i=1}^{n}X_i^2- 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
The numerator above is nothing other than $sum_{i<j} (X_i - X_j)^2 = sum_{i<j} X_i^2 - 2 sum_{i<j} X_iX_j + sum_{i<j} X_j^2$. It is easy to see the cross terms, however it is not as straightforward to see that we have $n-1$ terms of the form $X_i^2$. This should conclude
begin{align}
frac{1}{n-1}sum_{i=1}^{n}(X_i-bar{X})^2
=
frac{2}{n(n-1)}sum_{i<j}frac{(X_i-X_j)^2}{2}
end{align}
$endgroup$
We know that (I found it here)
begin{equation}
left( sum_{n=1}^N a_n right)^2 = sum_{n=1}^N a_n^2 + 2 sum_{j=1}^{N}sum_{i=1}^{j-1} a_i a_j
end{equation}
So using the above identity
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i-frac{1}{n}sum_{j=1}^nX_j)^2\
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j + frac{1}{n^2}(sum_{j=1}^nX_j)^2 )\
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j + frac{1}{n^2}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k) )
end{align}
The last term above is independent of $i$ so it sums up $n$ times as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j) + frac{n}{n^2}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
which is also
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
sum_{i=1}^{n}(X_i^2-frac{2}{n}X_isum_{j=1}^nX_j) + frac{1}{n}(sum_{j=1}^nX_j^2 + 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
which could also be written as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2-frac{2}{n}sum_{i=1}^{n}X_isum_{j=1}^nX_j) + frac{1}{n}( 2sum_{j=1}^nsum_{k=1}^{j-1}X_jX_k)
end{align}
Rewriting differently we have
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2-frac{2}{n}sum_{i,j}X_iX_j + frac{2}{n}sum_{i<j}X_iX_j
end{align}
The last two terms above are the same terms with missing terms. Notice that $sum_{i,j}X_iX_j$ spans all $i = 1 ldots n$ and $j = 1 ldots n$ but the other one spans an upper triangular version of it. This means that their difference will span the lower triangular version of it as
begin{align}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
(1 + frac{1}{n})
sum_{i=1}^{n}X_i^2 - frac{2}{n}sum_{igeq j}X_iX_j
end{align}
Factor $n$ on the right hand side, then divide by $n-1$ on both sides, then Multiply/divide by $2$ on the right hand side
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{igeq j}X_iX_j}{2}
Big)
end{align}
Notice that $i geq j$ could be split to two summations
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{i = j}X_iX_j - 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
but when $i = j$, it is the same as a single summation, hence
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n + 1)
sum_{i=1}^{n}X_i^2 - 2sum_{i=1}^n X_i^2 - 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
which gives
begin{align}
frac{1}{n-1}
sum_{i=1}^{n}(X_i-bar{X})^2
&=
frac{2}{n(n-1)}
Big(
frac{(n -1)
sum_{i=1}^{n}X_i^2- 2sum_{i > j}X_iX_j}{2}
Big)
end{align}
The numerator above is nothing other than $sum_{i<j} (X_i - X_j)^2 = sum_{i<j} X_i^2 - 2 sum_{i<j} X_iX_j + sum_{i<j} X_j^2$. It is easy to see the cross terms, however it is not as straightforward to see that we have $n-1$ terms of the form $X_i^2$. This should conclude
begin{align}
frac{1}{n-1}sum_{i=1}^{n}(X_i-bar{X})^2
=
frac{2}{n(n-1)}sum_{i<j}frac{(X_i-X_j)^2}{2}
end{align}
edited Dec 18 '18 at 12:42
answered Dec 18 '18 at 12:02
Ahmad BazziAhmad Bazzi
8,3622824
8,3622824
add a comment |
add a comment |
$begingroup$
A one-line proof summary:$$sum_{i<j}(X_i-X_j)^2=frac{1}{2}sum_{ij}(X_i-X_j)^2=nsum_iX_i^2-sum_{ij}X_iX_j=nsum_i X_i(X_i-overline{X})=nsum_i(X_i-overline{X})^2.$$The first $=$ uses the fact that $(X_i-X_j)^2$ is $ileftrightarrow j$-symmetric and $0$ if $i=j$. The second $=$ expands the square and separates squares from cross terms. The third $=$ is a trivial rearrangement. The last $=$ uses $$X_i(X_i-overline{X})-(X_i-overline{X})^2=overline{X}(X_i-overline{X}),$$which becomes $0$ under $sum_i$.
$endgroup$
add a comment |
$begingroup$
A one-line proof summary:$$sum_{i<j}(X_i-X_j)^2=frac{1}{2}sum_{ij}(X_i-X_j)^2=nsum_iX_i^2-sum_{ij}X_iX_j=nsum_i X_i(X_i-overline{X})=nsum_i(X_i-overline{X})^2.$$The first $=$ uses the fact that $(X_i-X_j)^2$ is $ileftrightarrow j$-symmetric and $0$ if $i=j$. The second $=$ expands the square and separates squares from cross terms. The third $=$ is a trivial rearrangement. The last $=$ uses $$X_i(X_i-overline{X})-(X_i-overline{X})^2=overline{X}(X_i-overline{X}),$$which becomes $0$ under $sum_i$.
$endgroup$
add a comment |
$begingroup$
A one-line proof summary:$$sum_{i<j}(X_i-X_j)^2=frac{1}{2}sum_{ij}(X_i-X_j)^2=nsum_iX_i^2-sum_{ij}X_iX_j=nsum_i X_i(X_i-overline{X})=nsum_i(X_i-overline{X})^2.$$The first $=$ uses the fact that $(X_i-X_j)^2$ is $ileftrightarrow j$-symmetric and $0$ if $i=j$. The second $=$ expands the square and separates squares from cross terms. The third $=$ is a trivial rearrangement. The last $=$ uses $$X_i(X_i-overline{X})-(X_i-overline{X})^2=overline{X}(X_i-overline{X}),$$which becomes $0$ under $sum_i$.
$endgroup$
A one-line proof summary:$$sum_{i<j}(X_i-X_j)^2=frac{1}{2}sum_{ij}(X_i-X_j)^2=nsum_iX_i^2-sum_{ij}X_iX_j=nsum_i X_i(X_i-overline{X})=nsum_i(X_i-overline{X})^2.$$The first $=$ uses the fact that $(X_i-X_j)^2$ is $ileftrightarrow j$-symmetric and $0$ if $i=j$. The second $=$ expands the square and separates squares from cross terms. The third $=$ is a trivial rearrangement. The last $=$ uses $$X_i(X_i-overline{X})-(X_i-overline{X})^2=overline{X}(X_i-overline{X}),$$which becomes $0$ under $sum_i$.
answered Dec 18 '18 at 13:41
J.G.J.G.
30.3k23148
30.3k23148
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%2f3045070%2fhow-to-prove-that-sum-ijx-i-x-j2-n-sum-i-1nx-i-barx2%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
$begingroup$
Please show us what you have tried so far.
$endgroup$
– Stockfish
Dec 18 '18 at 11:58
1
$begingroup$
I think the formula $sum_{i<j}(x_j+x_j)^2=(n-1)sum_{i=1}^{n}x_i$ will be help. But I don't know how to prove the above formula.
$endgroup$
– chole
Dec 18 '18 at 12:14