|
140 | 140 | Let $\mu$ denote the common mean of this sample: |
141 | 141 |
|
142 | 142 | $$ |
143 | | - \mu := \mathbb E X = \int_{-\infty}^{\infty} x f(dx) |
| 143 | + \mu := \mathbb E X = \int_{-\infty}^{\infty} x f(x) dx |
144 | 144 | $$ |
145 | 145 |
|
146 | 146 | In addition, let |
@@ -228,7 +228,7 @@ def generate_histogram(X_distribution, n, m): |
228 | 228 | ax.axvline(x=mu, ls="--", lw=3, label=fr"$\mu = {mu}$") |
229 | 229 | |
230 | 230 | 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) |
232 | 232 | ax.set_ylabel('density', size=12) |
233 | 233 | ax.legend() |
234 | 234 | plt.show() |
@@ -263,7 +263,7 @@ def generate_multiple_hist(X_distribution, ns, m, log_scale=False): |
263 | 263 | ax.axvline(x=mu, ls="--", lw=3, label=fr"$\mu = {mu}$") |
264 | 264 |
|
265 | 265 | 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) |
267 | 267 | ax.set_ylabel('density', size=12) |
268 | 268 | ax.legend() |
269 | 269 | plt.show() |
@@ -305,7 +305,7 @@ def scattered_mean(distribution, burn_in, n, jump, ax, title, color, ylog=False) |
305 | 305 | ax.set_yscale("symlog") |
306 | 306 | ax.set_title(title, size=10) |
307 | 307 | 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) |
309 | 309 | yabs_max = max(ax.get_ylim()) |
310 | 310 | ax.set_ylim(ymin=-yabs_max, ymax=yabs_max) |
311 | 311 | return ax |
@@ -450,8 +450,9 @@ xmin, xmax = -3 * σ, 3 * σ |
450 | 450 | ax.set_xlim(xmin, xmax) |
451 | 451 | ax.hist(Y, bins=60, alpha=0.4, density=True) |
452 | 452 | 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) |
455 | 456 | ax.set_ylabel(r"$density$", size=12) |
456 | 457 |
|
457 | 458 | ax.legend() |
@@ -499,7 +500,7 @@ fig, ax = plt.subplots(figsize=(10, 6)) |
499 | 500 | xmin, xmax = -3 * σ, 3 * σ |
500 | 501 | ax.set_xlim(xmin, xmax) |
501 | 502 | 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) |
503 | 504 | ax.set_ylabel(r"$density$", size=12) |
504 | 505 | xgrid = np.linspace(xmin, xmax, 200) |
505 | 506 | ax.plot(xgrid, st.norm.pdf(xgrid, scale=σ), 'k-', lw=2, label='$N(0, \sigma^2)$') |
|
590 | 591 |
|
591 | 592 | $$ |
592 | 593 | \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\\ |
594 | 595 | &= \frac{\beta^2\sigma^2}{1-\beta^2} + \sigma^2 \\ |
595 | 596 | &= \frac{\sigma^2}{1-\beta^2} |
596 | 597 | \end{aligned} |
@@ -633,9 +634,11 @@ for t in range(n-1): |
633 | 634 | ax.scatter(range(100, n), means[100:n], s=10, alpha=0.5) |
634 | 635 |
|
635 | 636 | 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) |
637 | 638 | 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') |
639 | 642 |
|
640 | 643 | plt.legend() |
641 | 644 | plt.show() |
|
0 commit comments