1. Learn
  2. /
  3. Courses
  4. /
  5. Fundamentals of Bayesian Data Analysis in R

Connected

Exercise

Explore using the Beta distribution as a prior

The Beta distribution is a useful probability distribution when you want model uncertainty over a parameter bounded between 0 and 1. Here you'll explore how the two parameters of the Beta distribution determine its shape.

Instructions 1/4

undefined XP
    1
    2
    3
    4

One way to see how the shape parameters of the Beta distribution affect its shape is to generate a large number of random draws using the rbeta(n, shape1, shape2) function and visualize these as a histogram. The code displayed generates 1,000,000 draws from a Beta(1, 1) distribution: A Beta distribution with both shape parameters set to 1.

  • Visualize these draws using the hist function.