Conditional Expectation of joint pdf
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
3
down vote
favorite
Wish to identify what I'm doing wrong when finding the E(X|Y=5) of the following:
$$f(x, y)=begincases
1/6 & textif 0<x<2, 0<y<6-3x \ 0 & textotherwise
&
endcases.$$
My working:
$$beginalignmathsf E(Xmid Y=5)~&=~displaystyleint_0^2 x fracfrac16f(y),mathsf d xendalign$$
where
$$beginalignmathsf f(y)~&=~displaystyleint_0^frac-y+63 frac16 ,mathsf d x = frac6-y18endalign$$
Therefore,
$$beginalignmathsf E(Xmid Y=5)~&=~displaystyleint_0^2 x fracfrac16frac6-y18,mathsf d x mathsf ~&=~displaystyleint_0^2 x fracfrac16frac6-518,mathsf d x~&=~displaystyleint_0^2 3x ,mathsf d x endalign = 6$$
But then when I compute Var(X|Y=5), the answer is getting negative, which is impossible. So I think that I might have done something wrong when calculating the expectation.
My working for Variance:
$$Var(X|Y=5) = E(X^2|Y=5) - (E(X|Y=5) )^2 = 8 - 6^2 = -28$$
I appreciate any help.
self-study pdf joint-distribution conditional-expectation
add a comment |Â
up vote
3
down vote
favorite
Wish to identify what I'm doing wrong when finding the E(X|Y=5) of the following:
$$f(x, y)=begincases
1/6 & textif 0<x<2, 0<y<6-3x \ 0 & textotherwise
&
endcases.$$
My working:
$$beginalignmathsf E(Xmid Y=5)~&=~displaystyleint_0^2 x fracfrac16f(y),mathsf d xendalign$$
where
$$beginalignmathsf f(y)~&=~displaystyleint_0^frac-y+63 frac16 ,mathsf d x = frac6-y18endalign$$
Therefore,
$$beginalignmathsf E(Xmid Y=5)~&=~displaystyleint_0^2 x fracfrac16frac6-y18,mathsf d x mathsf ~&=~displaystyleint_0^2 x fracfrac16frac6-518,mathsf d x~&=~displaystyleint_0^2 3x ,mathsf d x endalign = 6$$
But then when I compute Var(X|Y=5), the answer is getting negative, which is impossible. So I think that I might have done something wrong when calculating the expectation.
My working for Variance:
$$Var(X|Y=5) = E(X^2|Y=5) - (E(X|Y=5) )^2 = 8 - 6^2 = -28$$
I appreciate any help.
self-study pdf joint-distribution conditional-expectation
you forgot the constraint on the support of $X$ given $Y=y.$
â Xi'an
35 mins ago
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
Wish to identify what I'm doing wrong when finding the E(X|Y=5) of the following:
$$f(x, y)=begincases
1/6 & textif 0<x<2, 0<y<6-3x \ 0 & textotherwise
&
endcases.$$
My working:
$$beginalignmathsf E(Xmid Y=5)~&=~displaystyleint_0^2 x fracfrac16f(y),mathsf d xendalign$$
where
$$beginalignmathsf f(y)~&=~displaystyleint_0^frac-y+63 frac16 ,mathsf d x = frac6-y18endalign$$
Therefore,
$$beginalignmathsf E(Xmid Y=5)~&=~displaystyleint_0^2 x fracfrac16frac6-y18,mathsf d x mathsf ~&=~displaystyleint_0^2 x fracfrac16frac6-518,mathsf d x~&=~displaystyleint_0^2 3x ,mathsf d x endalign = 6$$
But then when I compute Var(X|Y=5), the answer is getting negative, which is impossible. So I think that I might have done something wrong when calculating the expectation.
My working for Variance:
$$Var(X|Y=5) = E(X^2|Y=5) - (E(X|Y=5) )^2 = 8 - 6^2 = -28$$
I appreciate any help.
self-study pdf joint-distribution conditional-expectation
Wish to identify what I'm doing wrong when finding the E(X|Y=5) of the following:
$$f(x, y)=begincases
1/6 & textif 0<x<2, 0<y<6-3x \ 0 & textotherwise
&
endcases.$$
My working:
$$beginalignmathsf E(Xmid Y=5)~&=~displaystyleint_0^2 x fracfrac16f(y),mathsf d xendalign$$
where
$$beginalignmathsf f(y)~&=~displaystyleint_0^frac-y+63 frac16 ,mathsf d x = frac6-y18endalign$$
Therefore,
$$beginalignmathsf E(Xmid Y=5)~&=~displaystyleint_0^2 x fracfrac16frac6-y18,mathsf d x mathsf ~&=~displaystyleint_0^2 x fracfrac16frac6-518,mathsf d x~&=~displaystyleint_0^2 3x ,mathsf d x endalign = 6$$
But then when I compute Var(X|Y=5), the answer is getting negative, which is impossible. So I think that I might have done something wrong when calculating the expectation.
My working for Variance:
$$Var(X|Y=5) = E(X^2|Y=5) - (E(X|Y=5) )^2 = 8 - 6^2 = -28$$
I appreciate any help.
self-study pdf joint-distribution conditional-expectation
self-study pdf joint-distribution conditional-expectation
edited 1 hour ago
Ferdi
3,65542152
3,65542152
asked 1 hour ago
vic12
374
374
you forgot the constraint on the support of $X$ given $Y=y.$
â Xi'an
35 mins ago
add a comment |Â
you forgot the constraint on the support of $X$ given $Y=y.$
â Xi'an
35 mins ago
you forgot the constraint on the support of $X$ given $Y=y.$
â Xi'an
35 mins ago
you forgot the constraint on the support of $X$ given $Y=y.$
â Xi'an
35 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
Think about this geometrically: we've got $(X,Y)$ uniformly distributed over the right triangle with vertices at $(0,0)$, $(2,0)$, and $(0,6)$.
If we imagine sampling over and over from this region uniformly, we can picture $E(X|Y=5)$ as the average $x$ coordinate of the points that end up on the horizontal line $y=5$. All of these points will necessarily have $0 < x < 1/3$, since if $x geq 1/3$ then $y = 5$ can't happen, and since the points are uniform over this line, this image suggests $E(X|Y=5) stackrel ?= 1/6$ (this is the midpoint of the range of $x$ points that can end up on this line).
Checking this with calculus, the issue with what you did is the limits of integration for $x$ also depend on $y$. If $y = 5$ is observed then the biggest that $x$ can be is $1/3$, so really
$$
E(X|Y=5) = int_0^1/3x frac36-y,text dx = 3 cdot frac 12 x^2bigg|_x=0^x=1/3 = frac 16.
$$
Another quick sanity check is that $E(X|Y)$ has to be within the range of $X$, so $E(X|Y=5)neq 6$ can be recognized as incorrect before the negative variance shows up.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Think about this geometrically: we've got $(X,Y)$ uniformly distributed over the right triangle with vertices at $(0,0)$, $(2,0)$, and $(0,6)$.
If we imagine sampling over and over from this region uniformly, we can picture $E(X|Y=5)$ as the average $x$ coordinate of the points that end up on the horizontal line $y=5$. All of these points will necessarily have $0 < x < 1/3$, since if $x geq 1/3$ then $y = 5$ can't happen, and since the points are uniform over this line, this image suggests $E(X|Y=5) stackrel ?= 1/6$ (this is the midpoint of the range of $x$ points that can end up on this line).
Checking this with calculus, the issue with what you did is the limits of integration for $x$ also depend on $y$. If $y = 5$ is observed then the biggest that $x$ can be is $1/3$, so really
$$
E(X|Y=5) = int_0^1/3x frac36-y,text dx = 3 cdot frac 12 x^2bigg|_x=0^x=1/3 = frac 16.
$$
Another quick sanity check is that $E(X|Y)$ has to be within the range of $X$, so $E(X|Y=5)neq 6$ can be recognized as incorrect before the negative variance shows up.
add a comment |Â
up vote
3
down vote
accepted
Think about this geometrically: we've got $(X,Y)$ uniformly distributed over the right triangle with vertices at $(0,0)$, $(2,0)$, and $(0,6)$.
If we imagine sampling over and over from this region uniformly, we can picture $E(X|Y=5)$ as the average $x$ coordinate of the points that end up on the horizontal line $y=5$. All of these points will necessarily have $0 < x < 1/3$, since if $x geq 1/3$ then $y = 5$ can't happen, and since the points are uniform over this line, this image suggests $E(X|Y=5) stackrel ?= 1/6$ (this is the midpoint of the range of $x$ points that can end up on this line).
Checking this with calculus, the issue with what you did is the limits of integration for $x$ also depend on $y$. If $y = 5$ is observed then the biggest that $x$ can be is $1/3$, so really
$$
E(X|Y=5) = int_0^1/3x frac36-y,text dx = 3 cdot frac 12 x^2bigg|_x=0^x=1/3 = frac 16.
$$
Another quick sanity check is that $E(X|Y)$ has to be within the range of $X$, so $E(X|Y=5)neq 6$ can be recognized as incorrect before the negative variance shows up.
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Think about this geometrically: we've got $(X,Y)$ uniformly distributed over the right triangle with vertices at $(0,0)$, $(2,0)$, and $(0,6)$.
If we imagine sampling over and over from this region uniformly, we can picture $E(X|Y=5)$ as the average $x$ coordinate of the points that end up on the horizontal line $y=5$. All of these points will necessarily have $0 < x < 1/3$, since if $x geq 1/3$ then $y = 5$ can't happen, and since the points are uniform over this line, this image suggests $E(X|Y=5) stackrel ?= 1/6$ (this is the midpoint of the range of $x$ points that can end up on this line).
Checking this with calculus, the issue with what you did is the limits of integration for $x$ also depend on $y$. If $y = 5$ is observed then the biggest that $x$ can be is $1/3$, so really
$$
E(X|Y=5) = int_0^1/3x frac36-y,text dx = 3 cdot frac 12 x^2bigg|_x=0^x=1/3 = frac 16.
$$
Another quick sanity check is that $E(X|Y)$ has to be within the range of $X$, so $E(X|Y=5)neq 6$ can be recognized as incorrect before the negative variance shows up.
Think about this geometrically: we've got $(X,Y)$ uniformly distributed over the right triangle with vertices at $(0,0)$, $(2,0)$, and $(0,6)$.
If we imagine sampling over and over from this region uniformly, we can picture $E(X|Y=5)$ as the average $x$ coordinate of the points that end up on the horizontal line $y=5$. All of these points will necessarily have $0 < x < 1/3$, since if $x geq 1/3$ then $y = 5$ can't happen, and since the points are uniform over this line, this image suggests $E(X|Y=5) stackrel ?= 1/6$ (this is the midpoint of the range of $x$ points that can end up on this line).
Checking this with calculus, the issue with what you did is the limits of integration for $x$ also depend on $y$. If $y = 5$ is observed then the biggest that $x$ can be is $1/3$, so really
$$
E(X|Y=5) = int_0^1/3x frac36-y,text dx = 3 cdot frac 12 x^2bigg|_x=0^x=1/3 = frac 16.
$$
Another quick sanity check is that $E(X|Y)$ has to be within the range of $X$, so $E(X|Y=5)neq 6$ can be recognized as incorrect before the negative variance shows up.
edited 1 hour ago
answered 1 hour ago
jld
11.5k23149
11.5k23149
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f374882%2fconditional-expectation-of-joint-pdf%23new-answer', 'question_page');
);
Post as a guest
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
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
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
you forgot the constraint on the support of $X$ given $Y=y.$
â Xi'an
35 mins ago