Merge pull request #104 from bizzguy/patch-1

Update Probability.ipynb
This commit is contained in:
Peter Norvig
2021-06-05 22:47:35 -07:00
committed by GitHub

View File

@@ -2339,7 +2339,7 @@
"def repeated_hist(dist, n=10**6, bins=100):\n",
" \"Sample the distribution n times and make a histogram of the results.\"\n",
" samples = [dist() for _ in range(n)]\n",
" plt.hist(samples, bins=bins, normed=True)\n",
" plt.hist(samples, bins=bins, density=True)\n",
" plt.title('{} (μ = {:.1f})'.format(dist.__name__, mean(samples)))\n",
" plt.grid(axis='x')\n",
" plt.yticks([], '')\n",