Skip to content

Commit

Permalink
Merge pull request #321 from QuantEcon/mle_units
Browse files Browse the repository at this point in the history
[mle] update units and labels
  • Loading branch information
jstac authored Nov 17, 2023
2 parents f243881 + 3c3ae7d commit 7274f15
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lectures/mle.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jupytext:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.14.5
jupytext_version: 1.15.2
kernelspec:
display_name: Python 3 (ipykernel)
language: python
Expand Down Expand Up @@ -102,8 +102,13 @@ Let's histogram this sample.

```{code-cell} ipython3
fig, ax = plt.subplots()
ax.set_xlim(-1,20)
ax.hist(sample, density=True, bins=5_000, histtype='stepfilled', alpha=0.8)
ax.set_xlim(-1, 20)
density, edges = np.histogram(sample, bins=5000, density=True)
prob = density * np.diff(edges)
plt.stairs(prob, edges, fill=True, alpha=0.8, label=r"unit: $\$100,000$")
plt.ylabel("prob")
plt.xlabel("net wealth")
plt.legend()
plt.show()
```

Expand Down Expand Up @@ -502,7 +507,6 @@ ax.legend()
plt.show()
```
Clearly, this distribution is not a good fit for our data.
```{solution-end}
Expand Down

0 comments on commit 7274f15

Please sign in to comment.