Given the model $y = f(x) + \epsilon, f(x) = Wx$, I want to find an estimate of $Var(Y)$. Note here I don't account for the randomness in the input $x$, but rather I consider it a deterministic value.
Since $\epsilon\sim \mathcal{N}(0,\sigma)$ then $Y|X \sim N(f(x),\sigma)$. First, we know that $\mathbb{E}[Y|X] = f(X)$, then $\mathbb{E}[Y] = \mathbb{E}_X\mathbb{E}_Y[Y|X] = \mathbb{E}[f(X)] = f(x)$.
Finding $\mathbb{E}[Y^2]$: $\mathbb{E}[Y^2] = \mathbb{E}_X[\mathbb{E}[Y^2|X]]$, note that $y^2 = f^2(x) + 2f(x)\epsilon + \epsilon^2$, which means $Y^2|X \sim \mathcal{N}(f^2(X),\sigma (\sigma + 4f^2(X)))$. That is, $\mathbb{E}[Y^2] = \mathbb{E}[f^2(X)] = f^2(x)$
$\mathbb{E}[(Y - \mathbb{E}[Y])^2] = \mathbb{E}[Y^2] - \mathbb{E}[Y]^2 =f(x)^2 - f(X)^2 $ = 0.
Obviously, the result is wrong, but I cannot capture the error that I made.
Another attempt is to use the law of total variance:
$Var(Y) = \mathbb{E}[Var(Y|X)] + Var(\mathbb{E}(Y|X)) = \mathbb{E}[\sigma] + Var(f(x))$. Note that if we consider x as a random variable, then I guess this refers to the error of the input data (The variance of the input distribution) (please correct me if I am wrong), but since we consider it as a deterministic value, we have $Var(Y) = \sigma$.
I am pretty sure I have done penalties of mistakes that I am not aware of. Can you please help me spotting the mistakes I have made?