Given that, $y$ is generated according to $N(x^T_0w,\sigma^2)$ (N-Normal distribution)
Why the following true? $$E[y_o^2]= \sigma^2 +(x^Tw)^2 $$
Given that, $y$ is generated according to $N(x^T_0w,\sigma^2)$ (N-Normal distribution)
Why the following true? $$E[y_o^2]= \sigma^2 +(x^Tw)^2 $$
Copyright © 2021 JogjaFile Inc.
Starting from the definition of variance
$$\sigma^2 = E[(x-E[x])^2]$$
we can write
$$\sigma^2 = E[x^2 - 2x \cdot E[x]-(E[x])^2] $$
and because of linearity of expectation
$$ \sigma^2= \\ E[x^2] - E[2x \cdot E[x]]+E[(E[x])^2] \\ = E[x^2] - 2(E[x])^2+(E[x])^2 \\ = E[x^2] - (E[x])^2 $$
This can be written as
$$E[x^2] = \sigma^2+(E [x])^2$$