Skip to content

Commit

Permalink
FIX: pickups from live lecture (#542)
Browse files Browse the repository at this point in the history
* FIX: pickups from live lecture

* update xlables

This updates the x labels of the violin plot comparing Amazon and Costco.

* Update prob_dist.md

---------

Co-authored-by: Longye Tian <[email protected]>
  • Loading branch information
mmcky and longye-tian authored Aug 1, 2024
1 parent 1a46d9d commit eecca09
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lectures/prob_dist.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ $$
p(i) = (1 - \theta)^i \theta
$$

where $\lambda \in [0,1]$ is a parameter
where $\theta \in [0,1]$ is a parameter

(A discrete distribution has infinite support if the set of points to which it assigns positive probability is infinite.)

Expand Down Expand Up @@ -884,7 +884,10 @@ x_costco = prices.pct_change()[1:] * 100
fig, ax = plt.subplots()
ax.violinplot([x_amazon, x_costco])
ax.set_ylabel('monthly return (percent change)')
ax.set_xlabel('KDE')
ax.set_xlabel('retailers')
ax.set_xticks([1, 2])
ax.set_xticklabels(['Amazon', 'Costco'])
plt.show()
```

Expand Down

1 comment on commit eecca09

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.