8.2 Posterior estimation
The posterior model we have just estimated is an estimate of \(\pi\).
library(patchwork)
<- plot_beta(18,92,mean = TRUE) + xlim(0,0.6) +ylim(0,12.5)
a <- plot_beta(4,16,mean = TRUE)+ xlim(0,0.6) +ylim(0,12.5)
b |b) & labs(y="Density") &
(atheme_bw() & theme(legend.position = "none")
qbeta(c(0.025, 0.975), 18, 92)
## [1] 0.1009084 0.2379286