Interactive Exercises - Chapter 4
Problem W4.1
Use the widget for the gamma distribution in the scale parameterization (the one used in the course book) for this exercise. Note that the names for the two parameters in the Gamma distribution is not \(\alpha\) and \(\beta\) as in the book, but instead \(\alpha\) and \(\theta\). C’est la vie. 🤷♂️
- Start with the \(\mathrm{Gamma}(3,1)\) distribution and gradually move the first parameter \(\alpha\) toward 1. What happens with the shape of the distribution at \(\alpha = 1\)?
- Let us explore the effect of the second parameter, the scale parameter \(\theta\).
- Set \(\alpha=2\) and \(\theta=2\). What is the mean and variance? What is \(\mathrm{Pr}(X\leq 3)\)?
- Set \(\alpha=4\) and \(\theta=1\), what is the mean and variance and \(\mathrm{Pr}(X\leq 3)\) now?
- What if \(\alpha=16\) and \(\theta=0.25\)?
Problem W4.2
Use the widget for the beta distribution for this exercise.
Start with the \(\mathrm{Beta}(1,1)\) distribution. Is there another name for this distribution?
Now, change to \(\mathrm{Beta}(2,2)\), then to \(\mathrm{Beta}(3,3)\), then finally to \(\mathrm{Beta}(10,10)\). What can you say about the shape for these settings?
Set \(\alpha\) and \(\beta\) so that most of the density mass is on the right hand side, i.e. for values close to 1. Give a configuration of \(\alpha\) and \(\beta\) achieves this. Finally, set \(\alpha\) and \(\beta\) so that the values close to \(x=1\) has the highest density and the density is monotonically decreasing toward \(x=0\).
Can you make the density symmetric around \(x=0.5\) and bathtub shaped with most of the density close to 0 and 1?