8.2 Posterior estimation

The posterior model we have just estimated is an estimate of \(\pi\).

library(patchwork)
a <- plot_beta(18,92,mean = TRUE) + xlim(0,0.6) +ylim(0,12.5)
b <- plot_beta(4,16,mean = TRUE)+ xlim(0,0.6) +ylim(0,12.5)
(a|b) & labs(y="Density") &
  theme_bw() & theme(legend.position = "none")

qbeta(c(0.025, 0.975), 18, 92)
## [1] 0.1009084 0.2379286