Skip to content

Commit 7fe1fe2

Browse files
committed
typos fixed
1 parent d42beb7 commit 7fe1fe2

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

vignettes/Chapter05.Rmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
'---
22
title: "Chapter 5: Learning More About Bayesian Learning"
33
output: rmarkdown::html_vignette
44
vignette: >
@@ -28,7 +28,7 @@ par(mgp = c(1.6, .6, 0), mar = c(2.6, 2.6, 2.6, .4), lwd = 1)
2828
## Example 5.3 / Figure 5.1: The adaptive nature of Bayesian learning
2929

3030
We illustrate the adaptive nature of Bayesian learning (also referred to
31-
as *sequential updating* or *on-line learning*) via the beta-Bernoulli model
31+
as *sequential updating* or *on-line learning*) via the Beta-Bernoulli model
3232
from earlier.
3333

3434
```{r, echo=-(1:2)}
@@ -56,7 +56,7 @@ for (i in seq_along(thetatrue)) {
5656
lines(theta, dbeta(theta, a0 + succ, b0 + fail), col = rgb(0, 0, 0, .2 + .4*j/N))
5757
}
5858
59-
legend('topright', paste("N =", c(0, 20, 40, 60, 80, 100)), lty = 1,
59+
legend("topright", paste("N =", c(0, 20, 40, 60, 80, 100)), lty = 1,
6060
col = rgb(0, 0, 0, .2 + .4*c(0, 20, 40, 60, 80, 100)/N))
6161
}
6262
```
@@ -264,7 +264,7 @@ abline(h = e, lty = 2)
264264
## Figure 5.4: Bayesian asymptotics 1
265265

266266
To reproduce this figure, we again re-use the theory from Chapter 3 (the
267-
beta-Bernoulli model).
267+
Beta-Bernoulli model).
268268

269269
```{r, echo=-(1:2)}
270270
if (pdfplots) {
@@ -376,7 +376,7 @@ We now compute various point estimates under several settings. Note that we
376376
use the same number of 1s ($S_N$) as before.
377377

378378
```{r}
379-
options(knitr.kable.NA = '')
379+
options(knitr.kable.NA = "")
380380
a0 <- c(1, 2)
381381
b0 <- c(1, 4)
382382
set <- expand.grid(N = N, thetatrue = thetatrue, a0 = a0)
@@ -427,7 +427,7 @@ res <- cbind(res[,1:3], leftconf, rightconf, leftHPD, rightHPD)
427427
knitr::kable(round(res, 3))
428428
```
429429

430-
## Example 5.10 / Table 5.3: Coverage probabilities under the beta-Bernoulli model
430+
## Example 5.10 / Table 5.3: Coverage probabilities under the Beta-Bernoulli model
431431
For a (frequentist) estimate of the coverage probabilities, we simulate
432432
many data sets for each of the parameter configurations and check how often
433433
the intervals contain the true parameter.
@@ -486,7 +486,7 @@ res <- cbind(res[,1:2],
486486
knitr::kable(round(res, 2))
487487
```
488488

489-
## Example 5.11: Coverage probabilities under the Poisson-gamma model
489+
## Example 5.11: Coverage probabilities under the Poisson-Gamma model
490490

491491
As above, but for data from a $\mathcal{P}(5)$-distribution. We
492492
estimate the mean from $N = 24$ data points and construct CIs.
@@ -517,7 +517,7 @@ rightconf2 <- means + qnorm(1 - alpha / 2) * sqrt(vars / N)
517517
inconf2 <- leftconf2 <= mutrue & mutrue <= rightconf2
518518
```
519519

520-
For the Baysian variants, we look compute the equal-tailed and the HPD intervals.
520+
For the Bayesian variants, we compute the equal-tailed and the HPD intervals.
521521

522522
```{r}
523523
leftequal <- qgamma(alpha / 2, N * means + 1, N)

0 commit comments

Comments
 (0)