@@ -124,7 +124,9 @@ In particular, if $y_1$ is log normal with parameters $(\mu_1, \sigma_1^2)$ and
124124$y_2$ is log normal with parameters $(\mu_2, \sigma_2^2)$, then the product $y_1 y_2$ is log normal
125125with parameters $(\mu_1 + \mu_2, \sigma_1^2 + \sigma_2^2)$.
126126127-**Note:** While the product of two log normal distributions is log normal, the **sum** of two log normal distributions is **not** log normal.
127+```{note}
128+While the product of two log normal distributions is log normal, the **sum** of two log normal distributions is **not** log normal.
129+```
128130129131This observation sets the stage for challenge that confronts us in this lecture, namely, to approximate probability distributions of **sums** of independent log normal random variables.
130132@@ -273,9 +275,10 @@ def pdf_seq(μ,σ,I,m):
273275<!-- #region -->
274276Now we shall set a grid length $I$ and a grid increment size $m =1$ for our discretizations.
275277276-**Note**: We set $I$ equal to a power of two because we want to be free to use a Fast Fourier Transform
278+```{note}
279+We set $I$ equal to a power of two because we want to be free to use a Fast Fourier Transform
277280to compute a convolution of two sequences (discrete distributions).
278-281+```
279282280283We recommend experimenting with different values of the power $p$ of 2.
281284@@ -300,7 +303,7 @@ NT = x.size
300303301304plt.figure(figsize = (8,8))
302305plt.subplot(2,1,1)
303-plt.plot(x[:np.int(NT)],p1[:np.int(NT)],label = '')
306+plt.plot(x[:int(NT)],p1[:int(NT)],label = '')
304307plt.xlim(0,2500)
305308count, bins, ignored = plt.hist(s1, 1000, density=True, align='mid')
306309@@ -413,7 +416,7 @@ NT= np.size(x)
413416414417plt.figure(figsize = (8,8))
415418plt.subplot(2,1,1)
416-plt.plot(x[:np.int(NT)],c1f[:np.int(NT)]/m,label = '')
419+plt.plot(x[:int(NT)],c1f[:int(NT)]/m,label = '')
417420plt.xlim(0,5000)
418421419422count, bins, ignored = plt.hist(ssum2, 1000, density=True, align='mid')
@@ -426,7 +429,7 @@ plt.show()
426429NT= np.size(x)
427430plt.figure(figsize = (8,8))
428431plt.subplot(2,1,1)
429-plt.plot(x[:np.int(NT)],c2f[:np.int(NT)]/m,label = '')
432+plt.plot(x[:int(NT)],c2f[:int(NT)]/m,label = '')
430433plt.xlim(0,5000)
431434432435count, bins, ignored = plt.hist(ssum3, 1000, density=True, align='mid')
@@ -577,9 +580,10 @@ mu6, sigma6 = 1.444, 1.4632
577580mu7, sigma7 = -.040, 1.4632
578581579582```
580-581-**Note:** Because the failure rates are all very small, log normal distributions with the
583+```{note}
584+Because the failure rates are all very small, log normal distributions with the
582585above parameter values actually describe $P(A_i)$ times $10^{-09}$.
586+```
583587584588So the probabilities that we'll put on the $x$ axis of the probability mass function and associated cumulative distribution function should be multiplied by $10^{-09}$
585589@@ -650,9 +654,9 @@ print("time for 13 convolutions = ", tdiff13)
650654651655```{code-cell} python3
652656d13 = np.cumsum(c13)
653-Nx=np.int(1400)
657+Nx=int(1400)
654658plt.figure()
655-plt.plot(x[0:np.int(Nx/m)],d13[0:np.int(Nx/m)]) # show Yad this -- I multiplied by m -- step size
659+plt.plot(x[0:int(Nx/m)],d13[0:int(Nx/m)]) # show Yad this -- I multiplied by m -- step size
656660plt.hlines(0.5,min(x),Nx,linestyles='dotted',colors = {'black'})
657661plt.hlines(0.9,min(x),Nx,linestyles='dotted',colors = {'black'})
658662plt.hlines(0.95,min(x),Nx,linestyles='dotted',colors = {'black'})