You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert

73
-
74
73
In this case, we can also approximate the distribution of $Y$ as normal, which
75
74
implies the mean maximizes the probability density.
76
75
@@ -93,9 +92,6 @@ hist(y[x==71],
93
92
main="",
94
93
xlim=range(y))
95
94
```
96
-
97
-

98
-
99
95
The best guess is still the expectation, but our strata has changed from all the
100
96
data, to only the $Y$ with $X=71$. So we can stratify and take the average,
101
97
which is the conditional expectation. Our prediction for any $x$ is therefore:
@@ -135,8 +131,6 @@ hist(y[x==71],
135
131
abline(v = fit$coef[1] + fit$coef[2]*71, col=1)
136
132
```
137
133
138
-

139
-
140
134
In this particular case, the regression line provides an optimal prediction
141
135
function for $Y$. But this is not generally true because, in the typical machine
142
136
learning problems, the optimal $f(x)$ is rarely a simple line.
0 commit comments