diff --git a/constant_model_loss_transformations/loss_transformations.qmd b/constant_model_loss_transformations/loss_transformations.qmd index 8525d70b..feb9fb3a 100644 --- a/constant_model_loss_transformations/loss_transformations.qmd +++ b/constant_model_loss_transformations/loss_transformations.qmd @@ -822,11 +822,11 @@ In this calculation, we use the fact that the **sum of deviations from the mean Let's quickly walk through the proof for this: $$\sum_{i=1}^{n} (y_i - \bar{y}) = \sum_{i=1}^{n} y_i - \sum_{i=1}^{n} \bar{y}$$ -$$ = \sum\_{i=1}^{n} y_i - n\bar{y}$$ +$$ = \sum_{i=1}^{n} y_i - n\bar{y}$$ -$$ = \sum*{i=1}^{n} y_i - n\frac{1}{n}\sum*{i=1}^{n}y$$ +$$ = \sum_{i=1}^{n} y_i - n\frac{1}{n}\sum_{i=1}^{n}y$$ -$$ = \sum*{i=1}^{n} y_i - \sum*{i=1}^{n}y_i$$ +$$ = \sum_{i=1}^{n} y_i - \sum_{i=1}^{n}y_i$$ In our calculations, we'll also be using the definition of the variance as a sample. As a refresher: diff --git a/docs/constant_model_loss_transformations/loss_transformations.html b/docs/constant_model_loss_transformations/loss_transformations.html index 0179cd5e..2f527ac2 100644 --- a/docs/constant_model_loss_transformations/loss_transformations.html +++ b/docs/constant_model_loss_transformations/loss_transformations.html @@ -1180,9 +1180,9 @@
Let’s quickly walk through the proof for this: \[\sum_{i=1}^{n} (y_i - \bar{y}) = \sum_{i=1}^{n} y_i - \sum_{i=1}^{n} \bar{y}\]
-\[ = \sum\_{i=1}^{n} y_i - n\bar{y}\]
-\[ = \sum*{i=1}^{n} y_i - n\frac{1}{n}\sum*{i=1}^{n}y\]
-\[ = \sum*{i=1}^{n} y_i - \sum*{i=1}^{n}y_i\]
+\[ = \sum_{i=1}^{n} y_i - n\bar{y}\]
+\[ = \sum_{i=1}^{n} y_i - n\frac{1}{n}\sum_{i=1}^{n}y\]
+\[ = \sum_{i=1}^{n} y_i - \sum_{i=1}^{n}y_i\]
In our calculations, we’ll also be using the definition of the variance as a sample. As a refresher:
\[\sigma_y^2 = \frac{1}{n}\sum_{i=1}^{n} (y_i - \bar{y})^2\]
Getting into our calculation for MSE minimization:
@@ -2333,11 +2333,11 @@"Year") babynames.groupby(
<pandas.core.groupby.generic.DataFrameGroupBy object at 0x105e8db20>
+<pandas.core.groupby.generic.DataFrameGroupBy object at 0x105d49400>
What does this strange output mean? Calling .groupby
(documentation) has generated a GroupBy
object. You can imagine this as a set of “mini” sub-DataFrame
s, where each subframe contains all of the rows from babynames
that correspond to a particular year.