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
Copy file name to clipboardExpand all lines: lectures/mle.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,7 +94,7 @@ The number of billionaires is integer-valued.
94
94
Hence we consider distributions that take values only in the nonnegative integers.
95
95
96
96
(This is one reason least squares regression is not the best tool for the present problem, since the dependent variable in linear regression is not restricted
97
-
to integer values)
97
+
to integer values.)
98
98
99
99
One integer distribution is the [Poisson distribution](https://en.wikipedia.org/wiki/Poisson_distribution), the probability mass function (pmf) of which is
100
100
@@ -176,7 +176,7 @@ In Treisman's paper, the dependent variable --- the number of billionaires $y_i$
176
176
177
177
Hence, the distribution of $y_i$ needs to be conditioned on the vector of explanatory variables $\mathbf{x}_i$.
178
178
179
-
The standard formulation --- the so-called *poisson regression* model --- is as follows:
179
+
The standard formulation --- the so-called *Poisson regression* model --- is as follows:
180
180
181
181
```{math}
182
182
:label: poissonreg
@@ -322,7 +322,7 @@ $$
322
322
$$
323
323
324
324
In doing so it is generally easier to maximize the log-likelihood (consider
325
-
differentiating $f(x) = x \exp(x)$ vs. $f(x) = \log(x) + x$).
325
+
differentiating $f(x) = x \exp(x)$ vs. $f(x) = \log(x) + x$).
326
326
327
327
Given that taking a logarithm is a monotone increasing transformation, a maximizer of the likelihood function will also be a maximizer of the log-likelihood function.
328
328
@@ -350,7 +350,7 @@ $$
350
350
\end{split}
351
351
$$
352
352
353
-
The MLE of the Poisson to the Poisson for $\hat{\beta}$ can be obtained by solving
353
+
The MLE of the Poisson for $\hat{\beta}$ can be obtained by solving
354
354
355
355
$$
356
356
\underset{\beta}{\max} \Big(
@@ -386,7 +386,7 @@ def logL(β):
386
386
return -((β - 10) ** 2) - 10
387
387
```
388
388
389
-
To find the value of gradient of the above function, we can use [jax.grad](https://jax.readthedocs.io/en/latest/_autosummary/jax.grad.html) which auto-differentiates the given function.
389
+
To find the value of the gradient of the above function, we can use [jax.grad](https://jax.readthedocs.io/en/latest/_autosummary/jax.grad.html) which auto-differentiates the given function.
390
390
391
391
We further use [jax.vmap](https://jax.readthedocs.io/en/latest/_autosummary/jax.vmap.html) which vectorizes the given function i.e. the function acting upon scalar inputs can now be used with vector inputs.
0 commit comments