Skip to content

Commit b17ba00

Browse files
committed
update based on comments
1 parent 8b6f9e4 commit b17ba00

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

lectures/lln_clt.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ $$
140140
Let $\mu$ denote the common mean of this sample:
141141

142142
$$
143-
\mu := \mathbb E X = \int_{-\infty}^{\infty} x f(dx)
143+
\mu := \mathbb E X = \int_{-\infty}^{\infty} x f(x) dx
144144
$$
145145

146146
In addition, let
@@ -228,7 +228,7 @@ def generate_histogram(X_distribution, n, m):
228228
ax.axvline(x=mu, ls="--", lw=3, label=fr"$\mu = {mu}$")
229229
230230
ax.set_xlim(min(sample_means), max(sample_means))
231-
ax.set_xlabel(r'$\bar x$', size=12)
231+
ax.set_xlabel(r'$\bar x_n$', size=12)
232232
ax.set_ylabel('density', size=12)
233233
ax.legend()
234234
plt.show()
@@ -263,7 +263,7 @@ def generate_multiple_hist(X_distribution, ns, m, log_scale=False):
263263
ax.axvline(x=mu, ls="--", lw=3, label=fr"$\mu = {mu}$")
264264
265265
ax.set_xlim(min(sample_means), max(sample_means))
266-
ax.set_xlabel(r'$\bar x$', size=12)
266+
ax.set_xlabel(r'$\bar x_n$', size=12)
267267
ax.set_ylabel('density', size=12)
268268
ax.legend()
269269
plt.show()
@@ -305,7 +305,7 @@ def scattered_mean(distribution, burn_in, n, jump, ax, title, color, ylog=False)
305305
ax.set_yscale("symlog")
306306
ax.set_title(title, size=10)
307307
ax.set_xlabel(r"$n$", size=12)
308-
ax.set_ylabel(r"$\bar x$", size=12)
308+
ax.set_ylabel(r"$\bar x_n$", size=12)
309309
yabs_max = max(ax.get_ylim())
310310
ax.set_ylim(ymin=-yabs_max, ymax=yabs_max)
311311
return ax
@@ -450,8 +450,9 @@ xmin, xmax = -3 * σ, 3 * σ
450450
ax.set_xlim(xmin, xmax)
451451
ax.hist(Y, bins=60, alpha=0.4, density=True)
452452
xgrid = np.linspace(xmin, xmax, 200)
453-
ax.plot(xgrid, st.norm.pdf(xgrid, scale=σ), 'k-', lw=2, label='$N(0, \sigma^2)$')
454-
ax.set_xlabel(r"$Y$", size=12)
453+
ax.plot(xgrid, st.norm.pdf(xgrid, scale=σ),
454+
'k-', lw=2, label='$N(0, \sigma^2)$')
455+
ax.set_xlabel(r"$Y_n$", size=12)
455456
ax.set_ylabel(r"$density$", size=12)
456457
457458
ax.legend()
@@ -499,7 +500,7 @@ fig, ax = plt.subplots(figsize=(10, 6))
499500
xmin, xmax = -3 * σ, 3 * σ
500501
ax.set_xlim(xmin, xmax)
501502
ax.hist(Y, bins=60, alpha=0.4, density=True)
502-
ax.set_xlabel(r"$Y$", size=12)
503+
ax.set_xlabel(r"$Y_n$", size=12)
503504
ax.set_ylabel(r"$density$", size=12)
504505
xgrid = np.linspace(xmin, xmax, 200)
505506
ax.plot(xgrid, st.norm.pdf(xgrid, scale=σ), 'k-', lw=2, label='$N(0, \sigma^2)$')
@@ -590,7 +591,7 @@ $$
590591

591592
$$
592593
\begin{aligned}
593-
Var(X_t+1) &= \beta^2 Var(X_{t}) + \sigma^2\\
594+
Var(X_{t+1}) &= \beta^2 Var(X_{t}) + \sigma^2\\
594595
&= \frac{\beta^2\sigma^2}{1-\beta^2} + \sigma^2 \\
595596
&= \frac{\sigma^2}{1-\beta^2}
596597
\end{aligned}
@@ -633,9 +634,11 @@ for t in range(n-1):
633634
ax.scatter(range(100, n), means[100:n], s=10, alpha=0.5)
634635
635636
ax.set_xlabel(r"$n$", size=12)
636-
ax.set_ylabel(r"$\bar x$", size=12)
637+
ax.set_ylabel(r"$\bar x_n$", size=12)
637638
yabs_max = max(ax.get_ylim(), key=abs)
638-
ax.axhline(y=α/(1-β), ls="--", lw=3, label=r"$\mu = \frac{\alpha}{1-\beta}$",color = 'black')
639+
ax.axhline(y=α/(1-β), ls="--", lw=3,
640+
label=r"$\mu = \frac{\alpha}{1-\beta}$",
641+
color = 'black')
639642
640643
plt.legend()
641644
plt.show()

0 commit comments

Comments
 (0)