Beta distribution
The beta distribution is a flexible distribution useful for modelling things between and - like frequencies, proportions, or probabilities.
Pick 'shape' parameters and (make them between 1 and 10 to start) and plot the beta distribution:
over the (continuous) range .
Note. The beta distribution is implemented as dbeta() in R, but you have to use "shape1" and "shape2" instead of and :
dbeta( x, shape1 = alpha, shape2 = beta )
How does the shape vary as you change the parameters? What happens if they are less than 1?
For extra kudos, ignore dbeta() and write your own function beta_distribution() to compute this based on the normal distributino density formula:
(You can use the beta() function to compute the value on the demoninator.)
Cumulative and quantiles
Just like the normal and binomial, the beta distribution has cumulative desnity pbeta() and quantile function qbeta().
For example, 95% of the mass of a distribution is between:
qbeta( c( 0.025, 0.975 ), 1, 1 )
(Hmm - these values look familiar. Why?)