Is there a shortcut to computing $text{Cov}(X, Y)$ if we have $mathbb{E}[X]$, $mathbb{E}[Y]$ and...
Is there a shortcut to computing $text{Cov}(X, Y)$ if we have $mathbb{E}[X]$, $mathbb{E}[Y]$ and $mathbb{E}[Ymid X]$?
I have the joint PDF
$$f(x, y) = begin{cases} lambda e^{-lambda x}/x & text{ if } 0 < y < x, x in (0, infty) \[1em] 0, &text{ otherwise.} end{cases} $$
I want to find $text{Cov}(X, Y)$. I have $mathbb{E}[X] = 1/lambda$, $mathbb{E}[Ymid X] = x/2$ and $mathbb{E}[Y] = 1/2lambda$.
I need $mathbb{E}[XY]$ to compute $text{Cov}(X, Y) = mathbb{E}[XY] - mathbb{E}[X]mathbb{E}[Y].$
Do I need to compute the double integral for it? or is there a shortcut?
My attempt:
$$mathbb{E}[XY] = int_{0}^{infty} int_{0}^{x} (xy) lambda e^{-lambda x}/x mathop{dy} mathop{dx}$$
$$= int_{0}^{infty} lambda e^{-lambda x} int_{0}^{x} ymathop{dy}mathop{dx} $$
$$= frac{lambda }{2}int_{0}^{infty} x^{2}e^{-lambda x} mathop{dx}$$
Then let $u = x^{2}, mathop{du} = 2x mathop{dx}$, $mathop{dv} = e^{-lambda x}, v = -e^{-lambda x}/lambda$. We have
$$int_{0}^{infty} x^{2} e^{-lambda x} mathop{dx} $$
$$= -frac{x^{2}e^{-lambda x}}{lambda} + int_{0}^{infty} frac{2xe^{-lambda x}}{lambda} mathop{dx} $$
probability probability-theory probability-distributions covariance
add a comment |
Is there a shortcut to computing $text{Cov}(X, Y)$ if we have $mathbb{E}[X]$, $mathbb{E}[Y]$ and $mathbb{E}[Ymid X]$?
I have the joint PDF
$$f(x, y) = begin{cases} lambda e^{-lambda x}/x & text{ if } 0 < y < x, x in (0, infty) \[1em] 0, &text{ otherwise.} end{cases} $$
I want to find $text{Cov}(X, Y)$. I have $mathbb{E}[X] = 1/lambda$, $mathbb{E}[Ymid X] = x/2$ and $mathbb{E}[Y] = 1/2lambda$.
I need $mathbb{E}[XY]$ to compute $text{Cov}(X, Y) = mathbb{E}[XY] - mathbb{E}[X]mathbb{E}[Y].$
Do I need to compute the double integral for it? or is there a shortcut?
My attempt:
$$mathbb{E}[XY] = int_{0}^{infty} int_{0}^{x} (xy) lambda e^{-lambda x}/x mathop{dy} mathop{dx}$$
$$= int_{0}^{infty} lambda e^{-lambda x} int_{0}^{x} ymathop{dy}mathop{dx} $$
$$= frac{lambda }{2}int_{0}^{infty} x^{2}e^{-lambda x} mathop{dx}$$
Then let $u = x^{2}, mathop{du} = 2x mathop{dx}$, $mathop{dv} = e^{-lambda x}, v = -e^{-lambda x}/lambda$. We have
$$int_{0}^{infty} x^{2} e^{-lambda x} mathop{dx} $$
$$= -frac{x^{2}e^{-lambda x}}{lambda} + int_{0}^{infty} frac{2xe^{-lambda x}}{lambda} mathop{dx} $$
probability probability-theory probability-distributions covariance
2
Best I can do: $$mathbb{E}[XY] = mathbb{E}[mathbb{E}[XY mid X]] = mathbb{E}[Xmathbb{E}[Y mid X]] = mathbb{E}[X^2/2] = dfrac{1}{2}mathbb{E}[X^2]$$
– Clarinetist
Dec 4 '18 at 20:56
that will work for me. i can get the variance because i know $X sim text{Exp}(lambda)$. then I can do $mathbb{E}[X^{2}] = (text{Var}(X) + mathbb{E}[X]^{2})$
– joseph
Dec 4 '18 at 20:58
2
The next step is to simplify even further the computations, noting that $$mathrm{Cov}(X,Y)=E(XY)-E(X)E(Y)=E(XE(Ymid X))-E(X)E(E(Ymid X))$$ that is, $$mathrm{Cov}(X,Y)=E(X(tfrac12X))-E(X)E(tfrac12X)=tfrac12mathrm{var}(X)$$
– Did
Dec 4 '18 at 21:17
add a comment |
Is there a shortcut to computing $text{Cov}(X, Y)$ if we have $mathbb{E}[X]$, $mathbb{E}[Y]$ and $mathbb{E}[Ymid X]$?
I have the joint PDF
$$f(x, y) = begin{cases} lambda e^{-lambda x}/x & text{ if } 0 < y < x, x in (0, infty) \[1em] 0, &text{ otherwise.} end{cases} $$
I want to find $text{Cov}(X, Y)$. I have $mathbb{E}[X] = 1/lambda$, $mathbb{E}[Ymid X] = x/2$ and $mathbb{E}[Y] = 1/2lambda$.
I need $mathbb{E}[XY]$ to compute $text{Cov}(X, Y) = mathbb{E}[XY] - mathbb{E}[X]mathbb{E}[Y].$
Do I need to compute the double integral for it? or is there a shortcut?
My attempt:
$$mathbb{E}[XY] = int_{0}^{infty} int_{0}^{x} (xy) lambda e^{-lambda x}/x mathop{dy} mathop{dx}$$
$$= int_{0}^{infty} lambda e^{-lambda x} int_{0}^{x} ymathop{dy}mathop{dx} $$
$$= frac{lambda }{2}int_{0}^{infty} x^{2}e^{-lambda x} mathop{dx}$$
Then let $u = x^{2}, mathop{du} = 2x mathop{dx}$, $mathop{dv} = e^{-lambda x}, v = -e^{-lambda x}/lambda$. We have
$$int_{0}^{infty} x^{2} e^{-lambda x} mathop{dx} $$
$$= -frac{x^{2}e^{-lambda x}}{lambda} + int_{0}^{infty} frac{2xe^{-lambda x}}{lambda} mathop{dx} $$
probability probability-theory probability-distributions covariance
Is there a shortcut to computing $text{Cov}(X, Y)$ if we have $mathbb{E}[X]$, $mathbb{E}[Y]$ and $mathbb{E}[Ymid X]$?
I have the joint PDF
$$f(x, y) = begin{cases} lambda e^{-lambda x}/x & text{ if } 0 < y < x, x in (0, infty) \[1em] 0, &text{ otherwise.} end{cases} $$
I want to find $text{Cov}(X, Y)$. I have $mathbb{E}[X] = 1/lambda$, $mathbb{E}[Ymid X] = x/2$ and $mathbb{E}[Y] = 1/2lambda$.
I need $mathbb{E}[XY]$ to compute $text{Cov}(X, Y) = mathbb{E}[XY] - mathbb{E}[X]mathbb{E}[Y].$
Do I need to compute the double integral for it? or is there a shortcut?
My attempt:
$$mathbb{E}[XY] = int_{0}^{infty} int_{0}^{x} (xy) lambda e^{-lambda x}/x mathop{dy} mathop{dx}$$
$$= int_{0}^{infty} lambda e^{-lambda x} int_{0}^{x} ymathop{dy}mathop{dx} $$
$$= frac{lambda }{2}int_{0}^{infty} x^{2}e^{-lambda x} mathop{dx}$$
Then let $u = x^{2}, mathop{du} = 2x mathop{dx}$, $mathop{dv} = e^{-lambda x}, v = -e^{-lambda x}/lambda$. We have
$$int_{0}^{infty} x^{2} e^{-lambda x} mathop{dx} $$
$$= -frac{x^{2}e^{-lambda x}}{lambda} + int_{0}^{infty} frac{2xe^{-lambda x}}{lambda} mathop{dx} $$
probability probability-theory probability-distributions covariance
probability probability-theory probability-distributions covariance
asked Dec 4 '18 at 20:52
josephjoseph
4329
4329
2
Best I can do: $$mathbb{E}[XY] = mathbb{E}[mathbb{E}[XY mid X]] = mathbb{E}[Xmathbb{E}[Y mid X]] = mathbb{E}[X^2/2] = dfrac{1}{2}mathbb{E}[X^2]$$
– Clarinetist
Dec 4 '18 at 20:56
that will work for me. i can get the variance because i know $X sim text{Exp}(lambda)$. then I can do $mathbb{E}[X^{2}] = (text{Var}(X) + mathbb{E}[X]^{2})$
– joseph
Dec 4 '18 at 20:58
2
The next step is to simplify even further the computations, noting that $$mathrm{Cov}(X,Y)=E(XY)-E(X)E(Y)=E(XE(Ymid X))-E(X)E(E(Ymid X))$$ that is, $$mathrm{Cov}(X,Y)=E(X(tfrac12X))-E(X)E(tfrac12X)=tfrac12mathrm{var}(X)$$
– Did
Dec 4 '18 at 21:17
add a comment |
2
Best I can do: $$mathbb{E}[XY] = mathbb{E}[mathbb{E}[XY mid X]] = mathbb{E}[Xmathbb{E}[Y mid X]] = mathbb{E}[X^2/2] = dfrac{1}{2}mathbb{E}[X^2]$$
– Clarinetist
Dec 4 '18 at 20:56
that will work for me. i can get the variance because i know $X sim text{Exp}(lambda)$. then I can do $mathbb{E}[X^{2}] = (text{Var}(X) + mathbb{E}[X]^{2})$
– joseph
Dec 4 '18 at 20:58
2
The next step is to simplify even further the computations, noting that $$mathrm{Cov}(X,Y)=E(XY)-E(X)E(Y)=E(XE(Ymid X))-E(X)E(E(Ymid X))$$ that is, $$mathrm{Cov}(X,Y)=E(X(tfrac12X))-E(X)E(tfrac12X)=tfrac12mathrm{var}(X)$$
– Did
Dec 4 '18 at 21:17
2
2
Best I can do: $$mathbb{E}[XY] = mathbb{E}[mathbb{E}[XY mid X]] = mathbb{E}[Xmathbb{E}[Y mid X]] = mathbb{E}[X^2/2] = dfrac{1}{2}mathbb{E}[X^2]$$
– Clarinetist
Dec 4 '18 at 20:56
Best I can do: $$mathbb{E}[XY] = mathbb{E}[mathbb{E}[XY mid X]] = mathbb{E}[Xmathbb{E}[Y mid X]] = mathbb{E}[X^2/2] = dfrac{1}{2}mathbb{E}[X^2]$$
– Clarinetist
Dec 4 '18 at 20:56
that will work for me. i can get the variance because i know $X sim text{Exp}(lambda)$. then I can do $mathbb{E}[X^{2}] = (text{Var}(X) + mathbb{E}[X]^{2})$
– joseph
Dec 4 '18 at 20:58
that will work for me. i can get the variance because i know $X sim text{Exp}(lambda)$. then I can do $mathbb{E}[X^{2}] = (text{Var}(X) + mathbb{E}[X]^{2})$
– joseph
Dec 4 '18 at 20:58
2
2
The next step is to simplify even further the computations, noting that $$mathrm{Cov}(X,Y)=E(XY)-E(X)E(Y)=E(XE(Ymid X))-E(X)E(E(Ymid X))$$ that is, $$mathrm{Cov}(X,Y)=E(X(tfrac12X))-E(X)E(tfrac12X)=tfrac12mathrm{var}(X)$$
– Did
Dec 4 '18 at 21:17
The next step is to simplify even further the computations, noting that $$mathrm{Cov}(X,Y)=E(XY)-E(X)E(Y)=E(XE(Ymid X))-E(X)E(E(Ymid X))$$ that is, $$mathrm{Cov}(X,Y)=E(X(tfrac12X))-E(X)E(tfrac12X)=tfrac12mathrm{var}(X)$$
– Did
Dec 4 '18 at 21:17
add a comment |
0
active
oldest
votes
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%2f3026152%2fis-there-a-shortcut-to-computing-textcovx-y-if-we-have-mathbbex%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
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%2f3026152%2fis-there-a-shortcut-to-computing-textcovx-y-if-we-have-mathbbex%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
2
Best I can do: $$mathbb{E}[XY] = mathbb{E}[mathbb{E}[XY mid X]] = mathbb{E}[Xmathbb{E}[Y mid X]] = mathbb{E}[X^2/2] = dfrac{1}{2}mathbb{E}[X^2]$$
– Clarinetist
Dec 4 '18 at 20:56
that will work for me. i can get the variance because i know $X sim text{Exp}(lambda)$. then I can do $mathbb{E}[X^{2}] = (text{Var}(X) + mathbb{E}[X]^{2})$
– joseph
Dec 4 '18 at 20:58
2
The next step is to simplify even further the computations, noting that $$mathrm{Cov}(X,Y)=E(XY)-E(X)E(Y)=E(XE(Ymid X))-E(X)E(E(Ymid X))$$ that is, $$mathrm{Cov}(X,Y)=E(X(tfrac12X))-E(X)E(tfrac12X)=tfrac12mathrm{var}(X)$$
– Did
Dec 4 '18 at 21:17