When linear regression is formulated probabilistically using MLE, turns out that what we used to get as output, is actually the mean of $P(y|x)$, the latter is normal distributed around the correct output. My question is, can we also predict the standard deviation as well? so, for each $x$, I get mean $y$ plus $\sigma^2$.
My rough idea is, in addition to $h_\theta(x)$, we need $g_\theta(x)$ as our variance, and then $P(y|x) = e^{-\frac{(h_\theta(x_i)-y_i)^2}{g_\theta(x_i)^2}}$
Any reference for such derviation ?