Solving a Linear Mean Square Estimation the Easy Way I have an exercise which is quite trivial. However I got stuck and I'm not sure if this the end-result. I assume there has to be a way to get this result much quicker.

Given are two randomly distributed variables y and n with mean 0 and variance 1. Further we know that $E\{yn\} = 0.5$ We measure $$x=y+n$$

We look for linear-mean-square estimation of y as a function of x.

From the given facts we now x has zero mean two. The variance has to be $$var(x) = var(y)+var(n)+2\cdot cov(yn)$$
because y and n are correlated. Therefor $var(x)$ becomes $$1+1+2\cdot 0.5 = 3$$

y becomes $y = n-x$ and $\hat{y}$ should have the form $\hat{y}= ax+b$.
For a and b I already have the general formula:
$$a=\frac{E\{xy\}-m_xm_y}{\sigma_x^2}$$
$$b=\frac{E\{x^2\}m_y-E\{xy\}m_x}{\sigma_x^2}.$$
In my case y should be $n-x$ if i got this right. But solving the problem with those formulas for a and b leaves me with terms like $E\{xn\}$. How can I know what this mean should be? I can't assume they are uncorrelated, can I? Probably I'm running completely in the wrong direction, and the solution is much more obvious. 

EDIT 1: From Fat32's input I get for a:
$$a = \frac{E\{x(n-x)\}}{\sigma_x^2}=\frac{3-1.5}{3}=1/2$$
and b $$b=\frac{E\{x^2\}m_y-E\{x(n-x)\}m_x}{\sigma_x^2}=\frac{3-1.5}{3}=\frac{1}{2}.$$
The solution would therefor be $y=-\frac{1}{2}x+\frac{1}{2}=\frac{1}{2}(1-x)$ Not sure if this is true. Have to test it with random samples.

EDIT 2:
I did a test with matlab:

N = 10000;             %// Number of samples in each vector
M = randn(N, 2);

R = [1 0.5; 0.5 1]; %// correlation matrix
M = M * chol(R); %used to calculated depended random variables

n = M(:, 1);
y = M(:, 2);

x = y+n;

y_hat = -0.5*x+0.5;

mean(y-y_hat)


y_hat is not even close to the real y. Has not even the same mean. I don't get it. I'm making definitely some mistakes here.

EDIT 3:
Found another formula which uses the a and b. Inserted the linear leas squares solution becomes $$\hat{y}=\rho_{xy}\frac{\sigma_y}{\sigma_x}(x-m_x)+m_y.$$ When I insert my values I get:
$$\hat{y}=\rho_{xy}\frac{1}{\sqrt{3}}x.$$
Rho is $\frac{1.5}{\sqrt(3)}$ and so $\hat{y}$ becomes 0.5x as @Fat32 pointed out. The error above was that b is zero because $m_x$ and $m_y$ are zero.
So in your case doesn't the relation $x = n+y$ help ?

I mean, assuming your derivation for the mean square estimtor is right, then to compute $E\{xn\}$ you would look for $E\{ (y+n)n\}$ and using properties of $x$ and $n$ you would get

$$E\{xn\} = E\{(y+n)n\} = E\{yn\} + E\{n^2\} = 0.5 + 1 = 1.5 $$