Expectation of a function of two independent random variables.












0












$begingroup$


Suppose X and Y are independent and uniformally distributed around [0, 1]. Define $Z = (X-Y)^2$. I'm interested in the variance $sigma_Z^2 = mathbb{E}[Z^2] - mathbb{E}[Z]^2$, and suppose I already know $mathbb{E}[Z]^2 = frac{1}{36}$.



For $mathbb{E}[Z^4]$, is computing $mathbb{E}[Z^2] cdot mathbb{E}[Z^2]$ sufficient enough since X and Y are i.i.d?










share|cite|improve this question











$endgroup$












  • $begingroup$
    Do you want the variance of $Z$ or $Z^2$? The formula you wrote is the variance of $Z^2$ but you have indexed $sigma^2$ by just $Z$. Which is it?
    $endgroup$
    – LoveTooNap29
    Jan 21 at 21:52












  • $begingroup$
    Sorry, there was a typo here.
    $endgroup$
    – TimelordViktorious
    Jan 22 at 1:52
















0












$begingroup$


Suppose X and Y are independent and uniformally distributed around [0, 1]. Define $Z = (X-Y)^2$. I'm interested in the variance $sigma_Z^2 = mathbb{E}[Z^2] - mathbb{E}[Z]^2$, and suppose I already know $mathbb{E}[Z]^2 = frac{1}{36}$.



For $mathbb{E}[Z^4]$, is computing $mathbb{E}[Z^2] cdot mathbb{E}[Z^2]$ sufficient enough since X and Y are i.i.d?










share|cite|improve this question











$endgroup$












  • $begingroup$
    Do you want the variance of $Z$ or $Z^2$? The formula you wrote is the variance of $Z^2$ but you have indexed $sigma^2$ by just $Z$. Which is it?
    $endgroup$
    – LoveTooNap29
    Jan 21 at 21:52












  • $begingroup$
    Sorry, there was a typo here.
    $endgroup$
    – TimelordViktorious
    Jan 22 at 1:52














0












0








0





$begingroup$


Suppose X and Y are independent and uniformally distributed around [0, 1]. Define $Z = (X-Y)^2$. I'm interested in the variance $sigma_Z^2 = mathbb{E}[Z^2] - mathbb{E}[Z]^2$, and suppose I already know $mathbb{E}[Z]^2 = frac{1}{36}$.



For $mathbb{E}[Z^4]$, is computing $mathbb{E}[Z^2] cdot mathbb{E}[Z^2]$ sufficient enough since X and Y are i.i.d?










share|cite|improve this question











$endgroup$




Suppose X and Y are independent and uniformally distributed around [0, 1]. Define $Z = (X-Y)^2$. I'm interested in the variance $sigma_Z^2 = mathbb{E}[Z^2] - mathbb{E}[Z]^2$, and suppose I already know $mathbb{E}[Z]^2 = frac{1}{36}$.



For $mathbb{E}[Z^4]$, is computing $mathbb{E}[Z^2] cdot mathbb{E}[Z^2]$ sufficient enough since X and Y are i.i.d?







probability probability-theory statistics probability-distributions






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 22 at 1:53







TimelordViktorious

















asked Jan 21 at 21:40









TimelordViktoriousTimelordViktorious

487313




487313












  • $begingroup$
    Do you want the variance of $Z$ or $Z^2$? The formula you wrote is the variance of $Z^2$ but you have indexed $sigma^2$ by just $Z$. Which is it?
    $endgroup$
    – LoveTooNap29
    Jan 21 at 21:52












  • $begingroup$
    Sorry, there was a typo here.
    $endgroup$
    – TimelordViktorious
    Jan 22 at 1:52


















  • $begingroup$
    Do you want the variance of $Z$ or $Z^2$? The formula you wrote is the variance of $Z^2$ but you have indexed $sigma^2$ by just $Z$. Which is it?
    $endgroup$
    – LoveTooNap29
    Jan 21 at 21:52












  • $begingroup$
    Sorry, there was a typo here.
    $endgroup$
    – TimelordViktorious
    Jan 22 at 1:52
















$begingroup$
Do you want the variance of $Z$ or $Z^2$? The formula you wrote is the variance of $Z^2$ but you have indexed $sigma^2$ by just $Z$. Which is it?
$endgroup$
– LoveTooNap29
Jan 21 at 21:52






$begingroup$
Do you want the variance of $Z$ or $Z^2$? The formula you wrote is the variance of $Z^2$ but you have indexed $sigma^2$ by just $Z$. Which is it?
$endgroup$
– LoveTooNap29
Jan 21 at 21:52














$begingroup$
Sorry, there was a typo here.
$endgroup$
– TimelordViktorious
Jan 22 at 1:52




$begingroup$
Sorry, there was a typo here.
$endgroup$
– TimelordViktorious
Jan 22 at 1:52










1 Answer
1






active

oldest

votes


















1












$begingroup$

In general the answer to "is $mathbb{E}(Z^4)=mathbb{E}(Z^2)^2$?" is no, so I would not try to use this. Just directly compute everything.



Assuming you want to compute the variance of $Z^2$:



Let $Z=(X-Y)^2$ where $X,Y$ are IID $mathcal{U}(0,1)$ RVs. The variance of $Z^2$ is given by
$$sigma_{Z^2}^2=mathbb{E}(Z^4)-mathbb{E}(Z^2)^2,$$
using the well known formula for variance. Both of these expectations can be computed directly. Lets start with the lower power one. Applying the binomial theorem,
$$Z^2=(X-Y)^4=X^4-4X^3Y+6X^2Y^2-4XY^3 +Y^4,$$
then taking expectations and using linearity and independence of $X$ and $Y$,
$$mathbb{E}(Z^2)=mathbb{E}(X^4)-4mathbb{E}(X^3)mathbb{E}(Y)+6mathbb{E}(X^2)mathbb{E}(Y^2)-4mathbb{E}(X)mathbb{E}(Y^3)+mathbb{E}(Y^4),$$
But since $X$ and $Y$ are also identically distributed uniform RVs on $(0,1)$, it follows that they have the same moments. So in turn this reduces to
$$mathbb{E}(Z^2)=2mathbb{E}(U^4)-8mathbb{E}(U^3)mathbb{E}(U)+6mathbb{E}(U^2)^2$$
where $U$ is any $mathcal{U}(0,1)$ RV. All of these can now be computed directly as standard integrals and once that is over with, just remember to square the result. Repeat the process for $Z^4$ and you are done after substituting both results back into the variance formula.






share|cite|improve this answer











$endgroup$









  • 1




    $begingroup$
    FWIW, I don't think the expansion of Z^2 in the second step is entirely correct.
    $endgroup$
    – TimelordViktorious
    Jan 22 at 1:52










  • $begingroup$
    @TimelordViktorious Ah! you are correct—I am off by some signs that unfortunately carry through the rest of the work. I'll edit accordingly.
    $endgroup$
    – LoveTooNap29
    Jan 22 at 1:57










  • $begingroup$
    @TimelordViktorious Should be good now but it's always nice to have a second set of eyes :)
    $endgroup$
    – LoveTooNap29
    Jan 22 at 1:59










  • $begingroup$
    Thanks a lot for your help!
    $endgroup$
    – TimelordViktorious
    Jan 22 at 14:49











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3082457%2fexpectation-of-a-function-of-two-independent-random-variables%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









1












$begingroup$

In general the answer to "is $mathbb{E}(Z^4)=mathbb{E}(Z^2)^2$?" is no, so I would not try to use this. Just directly compute everything.



Assuming you want to compute the variance of $Z^2$:



Let $Z=(X-Y)^2$ where $X,Y$ are IID $mathcal{U}(0,1)$ RVs. The variance of $Z^2$ is given by
$$sigma_{Z^2}^2=mathbb{E}(Z^4)-mathbb{E}(Z^2)^2,$$
using the well known formula for variance. Both of these expectations can be computed directly. Lets start with the lower power one. Applying the binomial theorem,
$$Z^2=(X-Y)^4=X^4-4X^3Y+6X^2Y^2-4XY^3 +Y^4,$$
then taking expectations and using linearity and independence of $X$ and $Y$,
$$mathbb{E}(Z^2)=mathbb{E}(X^4)-4mathbb{E}(X^3)mathbb{E}(Y)+6mathbb{E}(X^2)mathbb{E}(Y^2)-4mathbb{E}(X)mathbb{E}(Y^3)+mathbb{E}(Y^4),$$
But since $X$ and $Y$ are also identically distributed uniform RVs on $(0,1)$, it follows that they have the same moments. So in turn this reduces to
$$mathbb{E}(Z^2)=2mathbb{E}(U^4)-8mathbb{E}(U^3)mathbb{E}(U)+6mathbb{E}(U^2)^2$$
where $U$ is any $mathcal{U}(0,1)$ RV. All of these can now be computed directly as standard integrals and once that is over with, just remember to square the result. Repeat the process for $Z^4$ and you are done after substituting both results back into the variance formula.






share|cite|improve this answer











$endgroup$









  • 1




    $begingroup$
    FWIW, I don't think the expansion of Z^2 in the second step is entirely correct.
    $endgroup$
    – TimelordViktorious
    Jan 22 at 1:52










  • $begingroup$
    @TimelordViktorious Ah! you are correct—I am off by some signs that unfortunately carry through the rest of the work. I'll edit accordingly.
    $endgroup$
    – LoveTooNap29
    Jan 22 at 1:57










  • $begingroup$
    @TimelordViktorious Should be good now but it's always nice to have a second set of eyes :)
    $endgroup$
    – LoveTooNap29
    Jan 22 at 1:59










  • $begingroup$
    Thanks a lot for your help!
    $endgroup$
    – TimelordViktorious
    Jan 22 at 14:49
















1












$begingroup$

In general the answer to "is $mathbb{E}(Z^4)=mathbb{E}(Z^2)^2$?" is no, so I would not try to use this. Just directly compute everything.



Assuming you want to compute the variance of $Z^2$:



Let $Z=(X-Y)^2$ where $X,Y$ are IID $mathcal{U}(0,1)$ RVs. The variance of $Z^2$ is given by
$$sigma_{Z^2}^2=mathbb{E}(Z^4)-mathbb{E}(Z^2)^2,$$
using the well known formula for variance. Both of these expectations can be computed directly. Lets start with the lower power one. Applying the binomial theorem,
$$Z^2=(X-Y)^4=X^4-4X^3Y+6X^2Y^2-4XY^3 +Y^4,$$
then taking expectations and using linearity and independence of $X$ and $Y$,
$$mathbb{E}(Z^2)=mathbb{E}(X^4)-4mathbb{E}(X^3)mathbb{E}(Y)+6mathbb{E}(X^2)mathbb{E}(Y^2)-4mathbb{E}(X)mathbb{E}(Y^3)+mathbb{E}(Y^4),$$
But since $X$ and $Y$ are also identically distributed uniform RVs on $(0,1)$, it follows that they have the same moments. So in turn this reduces to
$$mathbb{E}(Z^2)=2mathbb{E}(U^4)-8mathbb{E}(U^3)mathbb{E}(U)+6mathbb{E}(U^2)^2$$
where $U$ is any $mathcal{U}(0,1)$ RV. All of these can now be computed directly as standard integrals and once that is over with, just remember to square the result. Repeat the process for $Z^4$ and you are done after substituting both results back into the variance formula.






share|cite|improve this answer











$endgroup$









  • 1




    $begingroup$
    FWIW, I don't think the expansion of Z^2 in the second step is entirely correct.
    $endgroup$
    – TimelordViktorious
    Jan 22 at 1:52










  • $begingroup$
    @TimelordViktorious Ah! you are correct—I am off by some signs that unfortunately carry through the rest of the work. I'll edit accordingly.
    $endgroup$
    – LoveTooNap29
    Jan 22 at 1:57










  • $begingroup$
    @TimelordViktorious Should be good now but it's always nice to have a second set of eyes :)
    $endgroup$
    – LoveTooNap29
    Jan 22 at 1:59










  • $begingroup$
    Thanks a lot for your help!
    $endgroup$
    – TimelordViktorious
    Jan 22 at 14:49














1












1








1





$begingroup$

In general the answer to "is $mathbb{E}(Z^4)=mathbb{E}(Z^2)^2$?" is no, so I would not try to use this. Just directly compute everything.



Assuming you want to compute the variance of $Z^2$:



Let $Z=(X-Y)^2$ where $X,Y$ are IID $mathcal{U}(0,1)$ RVs. The variance of $Z^2$ is given by
$$sigma_{Z^2}^2=mathbb{E}(Z^4)-mathbb{E}(Z^2)^2,$$
using the well known formula for variance. Both of these expectations can be computed directly. Lets start with the lower power one. Applying the binomial theorem,
$$Z^2=(X-Y)^4=X^4-4X^3Y+6X^2Y^2-4XY^3 +Y^4,$$
then taking expectations and using linearity and independence of $X$ and $Y$,
$$mathbb{E}(Z^2)=mathbb{E}(X^4)-4mathbb{E}(X^3)mathbb{E}(Y)+6mathbb{E}(X^2)mathbb{E}(Y^2)-4mathbb{E}(X)mathbb{E}(Y^3)+mathbb{E}(Y^4),$$
But since $X$ and $Y$ are also identically distributed uniform RVs on $(0,1)$, it follows that they have the same moments. So in turn this reduces to
$$mathbb{E}(Z^2)=2mathbb{E}(U^4)-8mathbb{E}(U^3)mathbb{E}(U)+6mathbb{E}(U^2)^2$$
where $U$ is any $mathcal{U}(0,1)$ RV. All of these can now be computed directly as standard integrals and once that is over with, just remember to square the result. Repeat the process for $Z^4$ and you are done after substituting both results back into the variance formula.






share|cite|improve this answer











$endgroup$



In general the answer to "is $mathbb{E}(Z^4)=mathbb{E}(Z^2)^2$?" is no, so I would not try to use this. Just directly compute everything.



Assuming you want to compute the variance of $Z^2$:



Let $Z=(X-Y)^2$ where $X,Y$ are IID $mathcal{U}(0,1)$ RVs. The variance of $Z^2$ is given by
$$sigma_{Z^2}^2=mathbb{E}(Z^4)-mathbb{E}(Z^2)^2,$$
using the well known formula for variance. Both of these expectations can be computed directly. Lets start with the lower power one. Applying the binomial theorem,
$$Z^2=(X-Y)^4=X^4-4X^3Y+6X^2Y^2-4XY^3 +Y^4,$$
then taking expectations and using linearity and independence of $X$ and $Y$,
$$mathbb{E}(Z^2)=mathbb{E}(X^4)-4mathbb{E}(X^3)mathbb{E}(Y)+6mathbb{E}(X^2)mathbb{E}(Y^2)-4mathbb{E}(X)mathbb{E}(Y^3)+mathbb{E}(Y^4),$$
But since $X$ and $Y$ are also identically distributed uniform RVs on $(0,1)$, it follows that they have the same moments. So in turn this reduces to
$$mathbb{E}(Z^2)=2mathbb{E}(U^4)-8mathbb{E}(U^3)mathbb{E}(U)+6mathbb{E}(U^2)^2$$
where $U$ is any $mathcal{U}(0,1)$ RV. All of these can now be computed directly as standard integrals and once that is over with, just remember to square the result. Repeat the process for $Z^4$ and you are done after substituting both results back into the variance formula.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Jan 22 at 1:58

























answered Jan 21 at 22:09









LoveTooNap29LoveTooNap29

1,1331614




1,1331614








  • 1




    $begingroup$
    FWIW, I don't think the expansion of Z^2 in the second step is entirely correct.
    $endgroup$
    – TimelordViktorious
    Jan 22 at 1:52










  • $begingroup$
    @TimelordViktorious Ah! you are correct—I am off by some signs that unfortunately carry through the rest of the work. I'll edit accordingly.
    $endgroup$
    – LoveTooNap29
    Jan 22 at 1:57










  • $begingroup$
    @TimelordViktorious Should be good now but it's always nice to have a second set of eyes :)
    $endgroup$
    – LoveTooNap29
    Jan 22 at 1:59










  • $begingroup$
    Thanks a lot for your help!
    $endgroup$
    – TimelordViktorious
    Jan 22 at 14:49














  • 1




    $begingroup$
    FWIW, I don't think the expansion of Z^2 in the second step is entirely correct.
    $endgroup$
    – TimelordViktorious
    Jan 22 at 1:52










  • $begingroup$
    @TimelordViktorious Ah! you are correct—I am off by some signs that unfortunately carry through the rest of the work. I'll edit accordingly.
    $endgroup$
    – LoveTooNap29
    Jan 22 at 1:57










  • $begingroup$
    @TimelordViktorious Should be good now but it's always nice to have a second set of eyes :)
    $endgroup$
    – LoveTooNap29
    Jan 22 at 1:59










  • $begingroup$
    Thanks a lot for your help!
    $endgroup$
    – TimelordViktorious
    Jan 22 at 14:49








1




1




$begingroup$
FWIW, I don't think the expansion of Z^2 in the second step is entirely correct.
$endgroup$
– TimelordViktorious
Jan 22 at 1:52




$begingroup$
FWIW, I don't think the expansion of Z^2 in the second step is entirely correct.
$endgroup$
– TimelordViktorious
Jan 22 at 1:52












$begingroup$
@TimelordViktorious Ah! you are correct—I am off by some signs that unfortunately carry through the rest of the work. I'll edit accordingly.
$endgroup$
– LoveTooNap29
Jan 22 at 1:57




$begingroup$
@TimelordViktorious Ah! you are correct—I am off by some signs that unfortunately carry through the rest of the work. I'll edit accordingly.
$endgroup$
– LoveTooNap29
Jan 22 at 1:57












$begingroup$
@TimelordViktorious Should be good now but it's always nice to have a second set of eyes :)
$endgroup$
– LoveTooNap29
Jan 22 at 1:59




$begingroup$
@TimelordViktorious Should be good now but it's always nice to have a second set of eyes :)
$endgroup$
– LoveTooNap29
Jan 22 at 1:59












$begingroup$
Thanks a lot for your help!
$endgroup$
– TimelordViktorious
Jan 22 at 14:49




$begingroup$
Thanks a lot for your help!
$endgroup$
– TimelordViktorious
Jan 22 at 14:49


















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3082457%2fexpectation-of-a-function-of-two-independent-random-variables%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

SQL update select statement

'app-layout' is not a known element: how to share Component with different Modules