Skip to content

Commit

Permalink
Merge branch 'main' into edit_prob2
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcky committed Aug 1, 2024
2 parents 8853de1 + 21a6894 commit dede7a6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lectures/prob_dist.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ Let's see if SciPy gives us the same results:
u.mean(), u.var()
```

<<<<<<< HEAD
=======

>>>>>>> main
Here's the PMF:

```{code-cell} ipython3
Expand Down Expand Up @@ -328,6 +332,10 @@ ax.set_ylabel('PMF')
plt.show()
```

<<<<<<< HEAD
=======

>>>>>>> main
#### Poisson distribution

The Poisson distribution on $S = \{0, 1, \ldots\}$ with parameter $\lambda > 0$ has PMF
Expand Down Expand Up @@ -795,7 +803,7 @@ So we will have one observation for each month.
```{code-cell} ipython3
:tags: [hide-output]
df = yf.download('AMZN', '2000-1-1', '2024-1-1', interval='1mo' )
df = yf.download('AMZN', '2000-1-1', '2024-1-1', interval='1mo')
prices = df['Adj Close']
x_amazon = prices.pct_change()[1:] * 100
x_amazon.head()
Expand Down Expand Up @@ -872,7 +880,7 @@ For example, let's compare the monthly returns on Amazon shares with the monthly
```{code-cell} ipython3
:tags: [hide-output]
df = yf.download('COST', '2000-1-1', '2024-1-1', interval='1mo' )
df = yf.download('COST', '2000-1-1', '2024-1-1', interval='1mo')
prices = df['Adj Close']
x_costco = prices.pct_change()[1:] * 100
```
Expand Down

0 comments on commit dede7a6

Please sign in to comment.