knitr::opts_chunk$set(echo = TRUE) library(tidyverse)
# set args mu = 0.7 epsilon = 0.1
alpha <- mu * ( ((10 * mu^2) / epsilon^2) * (1 / mu - 1) - 1 ) beta <- alpha / mu - alpha
tibble(x = c(0, 1)) %>% ggplot(aes(x = x)) + stat_function(fun = dbeta, args = list(shape1 = alpha, shape2 = beta)) + labs(title = paste0( "beta distribution with expected centre ", mu, " and 90% of values falling within ", epsilon ))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.