20 Activity 2
The purpose of this activity is to explore and reinforce concepts in Chapters 1-3 of Bringing Bayesian Models to Life.
You are encouraged to work with others students in the class to complete this activity.
For this activity let [a] be a beta distribution with α=2 and β=1 (i.e., a∼beta(α=2,β=1)).
Solve the integral ∫10[a]da analytically (i.e., using pencil and paper).
Approximate the integral ∫10[a]da numerically using the quadrature method with m=40 equally spaced support points (see pg. 12 in BBM2L).
Approximate the integral ∫10[a]da using Monte Carlo integration with K=100 draws (see pg. 18 in BBM2L).
Write 3-5 sentences comparing the results you obtained in questions 1-3 and explain why the analytical and numerical results differ.
Solve the integral ∫10a[a]da analytically. Verify that your answer matches that of the expected value of a beta distribution with α=2 and β=1.
Approximate the integral ∫10a[a]da numerically using the quadrature method with m=40 equally spaced support points.
Approximate the integral ∫10a[a]da using Monte Carlo integration with K=100 draws.
This is probably a trick question. Solve the integral ∫10log(1sin(a))[a]da analytically.
This is not a trick question. Approximate the integral ∫10log(1sin(a))[a]da using Monte Carlo integration with K=100 draws.