|
38 | 38 | "\n", |
39 | 39 | "$$x_f = \\frac{1}{2} a t^2 + v_0 t + x_0$$\n", |
40 | 40 | "\n", |
41 | | - "Where $x_0$ and $x_f$ are the initial and final locations, $v_0$ is the initial velocity, and $a$ is acceleration.\n", |
| 41 | + "where $x_0$ and $x_f$ are the initial and final locations, $v_0$ is the initial velocity, and $a$ is acceleration.\n", |
42 | 42 | "\n", |
43 | 43 | "## A falling ball\n", |
44 | 44 | "\n", |
|
87 | 87 | "cell_type": "markdown", |
88 | 88 | "metadata": {}, |
89 | 89 | "source": [ |
90 | | - "Casting the equation $x_f = \\frac{1}{2} g t^2 + x_0$ into a regression context, we let time ($t$) be the independent variable, and final location ($x_f$) be the response/dependent variable. This allows our coefficients to be proportional to $g$ and $x_0$. The intercept, $\\beta_0$ corresponds exactly to $x_0$. Letting $\\beta_1 = \\frac{1}{2} g$ then gives $g = 2\\beta_1$ when $x_1 = t^2$, meaning we\"re doing _polynomial regression_. We can put this into Bambi via the following, optionally including the `+ 1` to emphasize that we choose to include the coefficient. " |
| 90 | + "Casting the equation $x_f = \\frac{1}{2} g t^2 + x_0$ into a regression context, we let time ($t$) be the independent variable, and final location ($x_f$) be the response/dependent variable. This allows our coefficients to be proportional to $g$ and $x_0$. The intercept, $\\beta_0$ corresponds exactly to $x_0$. Letting $\\beta_1 = \\frac{1}{2} g$ then gives $g = 2\\beta_1$ when $x_1 = t^2$, meaning we're doing _polynomial regression_. We can put this into Bambi via the following, optionally including the `+ 1` to emphasize that we choose to include the coefficient. " |
91 | 91 | ] |
92 | 92 | }, |
93 | 93 | { |
|
145 | 145 | "cell_type": "markdown", |
146 | 146 | "metadata": {}, |
147 | 147 | "source": [ |
148 | | - "The term `I(t**2)` indicates to evaluate inside the `I`. For including _just the $t^2$ term_, you can express it any of the following ways: \n", |
| 148 | + "The term `I(t**2)` indicates to evaluate inside the `I`. For including _just the $t^2$ term_, you can express it in any of the following ways: \n", |
149 | 149 | "\n", |
150 | 150 | "- `I(t**2)`\n", |
151 | 151 | "- `{t**2}`\n", |
152 | 152 | "- Square the data directly, and pass it as a new column\n", |
153 | 153 | "\n", |
154 | | - "To verify, we\"ll fit the other two versions as well." |
| 154 | + "To verify, we'll fit the other two versions as well." |
155 | 155 | ] |
156 | 156 | }, |
157 | 157 | { |
|
487 | 487 | "\n", |
488 | 488 | "$$x_f = \\beta_0 + \\beta_1 t + \\beta_2 t^2$$\n", |
489 | 489 | "\n", |
490 | | - "Which then maps the solved coefficents to the following: $\\beta_0 = x_0$, $\\beta_1 = v_0$, and $\\beta_2 = \\frac{g}{2}$." |
| 490 | + "which then maps the solved coefficents to the following: $\\beta_0 = x_0$, $\\beta_1 = v_0$, and $\\beta_2 = \\frac{g}{2}$." |
491 | 491 | ] |
492 | 492 | }, |
493 | 493 | { |
|
0 commit comments