library(tidyverse)
#> Warning: package 'tibble' was built under R version 4.0.2
#> Warning: package 'tidyr' was built under R version 4.0.2
#> Warning: package 'dplyr' was built under R version 4.0.2
tibble(x = 0:42,
y1 = pbinom(x, 42, 0.3),
y2 = 1-pbeta(0.3, x+1, 42-x)) %>%
ggplot(aes(x = x, y = y1)) +
geom_point(col = "green", size = 3) +
geom_point(aes(y = y2))
# that makes a lot of sense! as the number of successes increases (in a
# binomial) its as if the number of successes increases and failures decrease in a Beta
Created on 2020-11-27 by the reprex package (v0.3.0)