Minimum mean square error for two random variables

In summary, the minimum mean square error for the joint PMF can be determined by evaluating ##E_{X, Y}[(Y - aX - b)^2]##, where ##a = \frac{14}{11}## and ##b = \frac{1}{11}##. This results in a value of ##\frac{3}{22}##, which is different from the calculated value of ##\frac{203}{242}## due to an error in the expected values of ##X## and ##Y##.
  • #1
Dustinsfl
2,281
5

Homework Statement


Determine the minimum mean square error for the joint PMF. You will need to evaluate ##E_{X, Y}[(Y - 14/11\cdot X - 1/11)^2]##.
oyrcfIM.png


Homework Equations

The Attempt at a Solution


The answer is ##\frac{3}{22}##, but when I work it out, I get ##\frac{203}{484}##. From my values, I have the same expected values, covariance, and variance of X as the book. Therefore, since my numbers are on point, I can't figure out why my solution is so off.

The ##mse(a, b) = E_{X, Y}[(Y - \hat{Y})^2] = E_{X, Y}[(Y - aX - B)^2]## since ##\hat{Y} = aX + b##. Expanding out ##mse(a, b)## and taking the derivatives of ##\frac{\partial mse(a, b)}{\partial a} = 0## and ##\frac{\partial mse(a, b)}{\partial b} = 0##, we get that
\begin{alignat*}{2}
a_{opt} &= \frac{cov(X, Y)}{var(X)} &&={} \frac{14}{11}\\
b_{opt} &= E[Y] - \frac{cov(X, Y)}{var(X)}E[X] &&={} \frac{1}{11}
\end{alignat*}
Then the ##mse(a, b)## is
\begin{align*}
mse(a, b) &= E[Y^2] - 2aE[XY] + a^2E[X^2] - 2bE[Y] + 2abE[X] + b^2\\
&= E[Y^2] - \frac{28}{11}E[XY] + \frac{196}{121}E[X^2] -
\frac{2}{11}E[Y] + \frac{28}{121}E[X] + \frac{1}{121}
\end{align*}
In order to find ##mse(a, b)##, we need to know the expected value of ##X##, ##Y##, ##E[X^2]##, and ##E[X^2]## as well as ##E[XY]##.
\begin{alignat*}{4}
E[X] &= \sum_ix_ip_X[x_i] &\quad &
E[Y] &&={} \sum_jy_jp_Y[y_j]\\
&= 0\frac{1}{4} + 1\frac{1}{4} + 2\frac{1}{2} & &
&&={} 0\frac{1}{4} + 1\frac{1}{4} + 2\frac{1}{4} + 3\frac{1}{4}\\
&= \frac{5}{4} & &
&&={} \frac{3}{2}\\
E[X^2] &= \sum_ix_i^2p_X[x_i] & &
E[Y^2] &&={} \sum_jy_j^2p_Y[y_j]\\
&= 0^2\frac{1}{4} + 1^2\frac{1}{4} + 2^2\frac{1}{2} & &
&&={} 0^2\frac{1}{4} + 1^2\frac{1}{4} + 2^2\frac{1}{4} + 3^2\frac{1}{4}\\
&= \frac{9}{4} & &
&&={} \frac{15}{4}\\
E[XY] &= \sum_{i, j}x_iy_jp_{X, Y}[x_i, y_j]\\
&= 0^2\frac{1}{4} + 1^2\frac{1}{4} + 2^2\frac{1}{4} +
2\cdot 3\frac{1}{4}\\
&= \frac{11}{4}
\end{alignat*}
Now, that we have remaining components, we can obtain ##mse(a, b)##.
\begin{align*}
&= \frac{15}{4} - \frac{28}{11}\frac{11}{4} +
\frac{196}{121}\frac{9}{4} - \frac{2}{11}\frac{3}{2} +
\frac{28}{121}\frac{5}{4} + \frac{1}{121}\\
&= \frac{203}{484}
\end{align*}
 
Last edited:
Physics news on Phys.org
  • #2
Dustinsfl said:

Homework Statement


Determine the minimum mean square error for the joint PMF. You will need to evaluate ##E_{X, Y}[(Y - 14/11\cdot X - 1/11)^2]##.

Homework Equations

The Attempt at a Solution


The answer is ##\frac{3}{22}##, but when I work it out, I get ##\frac{203}{242}##. From my values, I have the same expected values, covariance, and variance of X as the book. Therefore, since my numbers are on point, I can't figure out why my number is so off.

The ##mse(a, b) = E_{X, Y}[(Y - \hat{Y})^2] = E_{X, Y}[(Y - aX - B)^2]## since ##\hat{Y} = aX + b##. Expanding out ##mse(a, b)## and taking the derivatives of ##\frac{\partial mse(a, b)}{\partial a} = 0## and ##\frac{\partial mse(a, b)}{\partial b} = 0##, we get that
\begin{alignat*}{2}
a_{opt} &= \frac{cov(X, Y)}{var(X)} &&={} \frac{14}{11}\\
b_{opt} &= E[Y] - \frac{cov(X, Y)}{var(X)}E[X] &&={} \frac{1}{11}
\end{alignat*}
Then the ##mse(a, b)## is
\begin{align*}
mse(a, b) &= E[Y^2] - 2aE[XY] + a^2E[X^2] - 2bE[Y] + 2abE[X] + b^2\\
&= E[Y^2] - \frac{28}{11}E[XY] + \frac{196}{121}E[X^2] -
\frac{2}{11}E[Y] + \frac{28}{121}E[X] + \frac{1}{121}
\end{align*}
In order to find ##mse(a, b)##, we need to know the expected value of ##X##, ##Y##, ##E[X^2]##, and ##E[X^2]## as well as ##E[XY]##.
\begin{alignat*}{4}
E[X] &= \sum_ix_ip_X[x_i] &\quad &
E[Y] &&={} \sum_jy_jp_Y[y_j]\\
&= 0\frac{1}{4} + 1\frac{1}{4} + 2\frac{1}{2} & &
&&={} 0\frac{1}{4} + 1\frac{1}{4} + 2\frac{1}{4} + 3\frac{1}{4}\\
&= \frac{5}{4} & &
&&={} \frac{3}{2}\\
E[X^2] &= \sum_ix_i^2p_X[x_i] & &
E[Y^2] &&={} \sum_jy_j^2p_Y[y_j]\\
&= 0^2\frac{1}{4} + 1^2\frac{1}{4} + 2^2\frac{1}{2} & &
&&={} 0^2\frac{1}{4} + 1^2\frac{1}{4} + 2^2\frac{1}{4} + 3^2\frac{1}{4}\\
&= \frac{9}{4} & &
&&={} \frac{15}{4}\\
E[XY] &= \sum_{i, j}x_iy_jp_{X, Y}[x_i, y_j]\\
&= 0^2\frac{1}{4} + 1^2\frac{1}{4} + 2^2\frac{1}{4} +
2\cdot 3\frac{1}{4}\\
&= \frac{11}{4}
\end{alignat*}
Now, that we have remaining components, we can obtain ##mse(a, b)##.Y - (14/11)X -
\begin{align*}
&= \frac{15}{4} - \frac{28}{11}\frac{11}{4} +
\frac{196}{121}\frac{9}{4} - \frac{2}{11}\frac{3}{2} +
\frac{28}{121}\frac{5}{4} + \frac{1}{121}\\
&= \frac{203}{242}
\end{align*}

I do not fully understand the notation ##(Y - 14/11\cdot X - 1/11)^2##. Do you mean
[tex] \left( Y - \frac{14}{11} X - \frac{1}{11} \right)^2 ? [/tex]
If so, use the "\frac" command in TeX. If you mean something else, try using appropriate parentheses. Or, you could/should even use parentheses without the "\frac" command---for example, write ##(Y - (14/11)X - 1/11)^2## if that is what you mean. Alternatively, you could write ##(Y - aX - b)^2,## where ##a = 14/11, \, b = 1/11##. Personally, I like this last way the best, as it helps keep different factors and influences separate.
 
  • #3
Ray Vickson said:
I do not fully understand the notation ##(Y - 14/11\cdot X - 1/11)^2##. Do you mean
[tex] \left( Y - \frac{14}{11} X - \frac{1}{11} \right)^2 ? [/tex]
If so, use the "\frac" command in TeX. If you mean something else, try using appropriate parentheses. Or, you could/should even use parentheses without the "\frac" command---for example, write ##(Y - (14/11)X - 1/11)^2## if that is what you mean. Alternatively, you could write ##(Y - aX - b)^2,## where ##a = 14/11, \, b = 1/11##. Personally, I like this last way the best, as it helps keep different factors and influences separate.

I have no idea what to say if you don't understand the meaning of ##(Y - 14/11\cdot X - 1/11)^2##. I am not trying to be rude, but I don't need an education in LaTeX.
 
  • #4
Dustinsfl said:
I have no idea what to say if you don't understand the meaning of ##(Y - 14/11\cdot X - 1/11)^2##. I am not trying to be rude, but I don't need an education in LaTeX.
Dustin, I'm pretty sure what you wrote is exactly what you intended to write. The reason for Ray's comment is that we get so many people who write x - 2/y - 3 when they really mean (x - 2)/(y - 3).
 
  • #5
Mark44 said:
Dustin, I'm pretty sure what you wrote is exactly what you intended to write. The reason for Ray's comment is that we get so many people who write x - 2/y - 3 when they really mean (x - 2)/(y - 3).

Even if one is unsure, look past the question into the attempt. If that was done, one would see the proper definition Y - aX - B and realize X is not in the denominator. Critiquing a question in which you didn't fully read is pointless since the reader was premature in their analysis when the clarity was already present and verified later.
 
  • #6
I get a different number for E[Y2], but it still doesn't get me to 3/22.
 
  • #7
haruspex said:
I get a different number for E[Y2], but it still doesn't get me to 3/22.

Did you get 7/2 and then 41/242 for the mean square error? I see my addition error in E[Y^2].
 
  • #8
Dustinsfl said:
I have no idea what to say if you don't understand the meaning of ##(Y - 14/11\cdot X - 1/11)^2##. I am not trying to be rude, but I don't need an education in LaTeX.

Dustinsfl said:
Even if one is unsure, look past the question into the attempt. If that was done, one would see the proper definition Y - aX - B and realize X is not in the denominator. Critiquing a question in which you didn't fully read is pointless since the reader was premature in their analysis when the clarity was already present and verified later.

Sorry, but I agree with Ray here. It isn't our job to look past what is written to see if we can figure out what was meant. When posters neglect needed parentheses we suggest they use them just as we make other suggestions to help posters solve their problems or how to write their solutions up properly. Often their misuse of parentheses is the cause of later algebra mistakes. Instead of telling us you don't need an education in LaTeX perhaps you could say something like "Thanks, I will try to be more careful." If you aren't "trying to be rude", then don't be rude.
 
  • #9
LCKurtz said:
Sorry, but I agree with Ray here. It isn't our job to look past what is written to see if we can figure out what was meant. When posters neglect needed parentheses we suggest they use them just as we make other suggestions to help posters solve their problems or how to write their solutions up properly. Often their misuse of parentheses is the cause of later algebra mistakes. Instead of telling us you don't need an education in LaTeX perhaps you could say something like "Thanks, I will try to be more careful." If you aren't "trying to be rude", then don't be rude.

For me, this is the 2nd time Ray hasn't read and made a mistake.

On this post: https://www.physicsforums.com/threads/cov-w-z-where-w-x-and-z-ax-y.775444/ he mentioned and identity to use that I already listed. So he has a recorded with me of not reading the question in full and making a suggestion mistake.

Additionally, I know how to format my questions and wouldn't make the error of saying times when I want to divide that as a quantity. I wasn't being careless and didnt need to be more careful since that format is what I meant and is correct.
 
  • #10
haruspex said:
I get a different number for E[Y2], but it still doesn't get me to 3/22.
The other error is in your calculation of B.
As you probably realize, it is very easy to get the 3/22 result once you have A and B. Just calculate Y errors.
 
  • Like
Likes Dustinsfl
  • #11
haruspex said:
The other error is in your calculation of B.
As you probably realize, it is very easy to get the 3/22 result once you have A and B. Just calculate Y errors.

Thanks sign error. All is good now.
 

Related to Minimum mean square error for two random variables

What is the concept of minimum mean square error for two random variables?

The minimum mean square error (MMSE) for two random variables is a measure of the average squared difference between the estimated value and the true value of the variables. It is used to determine the accuracy of an estimation or prediction.

How is the minimum mean square error calculated?

The minimum mean square error is calculated by taking the expected value of the squared difference between the estimated and true values. This value is then minimized to find the minimum mean square error.

What is the significance of minimum mean square error in statistics?

The minimum mean square error is an important concept in statistics as it is used to evaluate the performance of an estimation or prediction method. It provides a measure of the accuracy of the estimated values and can be used to compare different estimation methods.

What are the assumptions made when using minimum mean square error for two random variables?

The minimum mean square error assumes that the variables are normally distributed and that there is a linear relationship between them. It also assumes that the estimation errors are independent and have equal variances.

Can minimum mean square error be used for non-linear relationships?

No, minimum mean square error is only applicable for linear relationships between two random variables. For non-linear relationships, other methods such as non-linear least squares may be used to determine the accuracy of the estimation.

Similar threads

  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
585
  • Calculus and Beyond Homework Help
Replies
5
Views
347
  • Calculus and Beyond Homework Help
Replies
5
Views
668
  • Calculus and Beyond Homework Help
Replies
10
Views
851
  • Calculus and Beyond Homework Help
Replies
7
Views
857
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
899
  • Calculus and Beyond Homework Help
Replies
4
Views
737
  • Calculus and Beyond Homework Help
Replies
1
Views
484
Back
Top