Determine the mean square error of a simple distribution

AI Thread Summary
The discussion focuses on calculating the expected quadratic prediction error for a distribution involving random variables X and Y. The calculations lead to a result of E(Y - E(Y|X))^2 = 1/24, while the book states the answer is 1/48, suggesting a potential oversight in the book's methodology. The conditional probability distribution of Y given X is identified as a continuous uniform distribution, and the calculation can be verified using variance formulas. The conversation also touches on the concept of the "best predictor," emphasizing that it refers to the estimator with the lowest mean squared error. The analysis concludes that the participant's calculations appear correct, indicating a discrepancy with the book's answer.
psie
Messages
315
Reaction score
40
Homework Statement
Consider $$f_{X,Y}(x,y)=\begin{cases} c,&\text{for } x,y\geq0, x+y\leq 1,\\ 0,&\text{otherwise}.\end{cases},$$where ##c## is some constant to be determined. Determine ##E(Y\mid X=x)## and ##E(X\mid Y=y)##. Moreover, determine the expected quadratic prediction error ##E(Y-d(X))^2## for the best predictor ##d(X)## of ##Y## based on ##X##.
Relevant Equations
The best predictor is the conditional expectation, i.e. ##h(X)=E(Y\mid X)##.
What troubles me about this exercise is that I don't get the answer that the book gets regarding the expected quadratic prediction error.

##c## is determined by $$1=\int_0^1\int_0^{1-x} c\,dydx=c\int_0^1(1-x)\,dx=c\left[-\frac{(1-x)^2}{2}\right]_0^1=\frac{c}2,$$so ##c=2##. The marginal density of ##X## is $$f_X(x)=\int_0^{1-x}2\,dy=2(1-x),\quad 0<x<1.$$And the conditional one is $$f_{Y\mid X=x}(y)=\frac{f_{X,Y}(x,y)}{f_X(x)}=\frac2{2(1-x)}=\frac1{1-x},\quad 0<y<1-x.$$Finally, $$E(Y\mid X=x)=\int_0^{1-x}y\cdot\frac1{1-x}\,dy=\frac1{1-x}\left[\frac{y^2}{2}\right]_0^{1-x}=\frac{(1-x)^2}{2(1-x)}=\frac{1-x}{2}.$$ By symmetry, ##E(X\mid Y=y)=\frac{1-y}{2}##.

I am confident everything is correct up to this point, as this is actually an example in the book and done exactly the same way. But the next part is omitted in the book, i.e. determining the expected quadratic prediction error ##E(Y-E(Y\mid X))^2##, where ##E(Y\mid X)=(1-X)/2##. We can simplify as follows \begin{align*}E(Y-E(Y\mid X))^2&=E(Y-(1-X)/2)^2 \\ &=E(Y^2+(1-X)^2/4-Y(1-X)) \\ &=E\left(Y^2+\frac14-\frac{X}{2}+\frac{X^2}{4}-Y+YX\right).\end{align*} Since ##X,Y## have the exact same distribution, we can replace ##Y## with ##X## except in the last term I believe, i.e. except in ##YX##. So we have $$E\left(\frac{5X^2}{4}+\frac14-\frac{3X}{2}+YX\right)=\frac54E(X^2)+\frac14-\frac32E(X)+E(YX).$$ I used WolframAlpha to compute the three expectations on the right-hand side of this last equation:

##E(X)=\frac13##: first integral
##E(X^2)=\frac16##: second integral
##E(XY)=\frac1{12}##: third integral

Therefor $$E(Y-(1-X)/2)^2 =\frac54\cdot\frac16+\frac14-\frac32\cdot\frac13+\frac1{12}=\frac1{24}.$$The book gets ##\frac1{48}##.
 
  • Like
Likes Gavran and docnet
Physics news on Phys.org
I have tried the calculation a couple of different ways, and get the same answer as you. I suspect they may have forgotten (as I almost did) to include the constant c in the calculation.
 
Your result is correct.
The conditional probability distribution of Y given X is a continuous uniform distribution. You can check the result by using the next expression $$ E((Y-E(Y|X))^2) = E(Var(Y|X)) $$ and by using the formula for calculating a variance of a continuous uniform distribution.
 
I assume the " Best predictor" is some estimator. But then what would " best" mean here, as there are estimators that may have, e.g. , minimal variance, be consistent, etc.
 
WWGD said:
I assume the " Best predictor" is some estimator. But then what would " best" mean here, as there are estimators that may have, e.g. , minimal variance, be consistent, etc.
Here we are talking about the predictor of ## Y ## based on ## X ## with the lowest mean squared error among all possible estimators of ## Y ## based on ## X ##.
 
Thread 'Use greedy vertex coloring algorithm to prove the upper bound of χ'
Hi! I am struggling with the exercise I mentioned under "Homework statement". The exercise is about a specific "greedy vertex coloring algorithm". One definition (which matches what my book uses) can be found here: https://people.cs.uchicago.edu/~laci/HANDOUTS/greedycoloring.pdf Here is also a screenshot of the relevant parts of the linked PDF, i.e. the def. of the algorithm: Sadly I don't have much to show as far as a solution attempt goes, as I am stuck on how to proceed. I thought...
Back
Top