Loading [MathJax]/jax/output/CommonHTML/jax.js
+ - 0:00:00
Notes for current slide
Notes for next slide



Beta Prior

Dr. Mine Dogucu

Examples from bayesrulesbook.com

1 / 16

Back to Graduate School Applications

Last lecture we were trying to understand π the acceptance rate of a graduate program in a specific department. Let's make a fresh start to the same problem. This time we will let π[0,1].

2 / 16

Continuous probability models

Let π be a continuous random variable with pdf f(π). Then f(π) has the following properties:

  • πf(π)dπ=1, ie. the area under f(π) is 1
  • f(π)0
  • P(a<π<b)=baf(π)dπ when ab

Interpreting f(π):

f(π) can be used to compare the plausibility of two different values of π.

3 / 16

Plotting the continuous prior

For each of the student's prior ideas for π plot the pdf of the prior. Your plot will not be exact since no exact values are given.

Morteza thinks that it is extremely difficult to get into this program.

Jared thinks that it is difficult to get into this program.

Erin does not have any strong opinions whether it is difficult or easy to get into this program.

Xuan thinks that it is easy to get into this program.

Beyoncé thinks that it is extremely easy to get into this program.

4 / 16

Morteza's prior

5 / 16

Jared's prior

6 / 16

Erin's prior

7 / 16

Xuan's prior

8 / 16

Beyoncé's prior

9 / 16

Beta Prior model

Let π be a random variable which can take any value between 0 and 1, ie. π[0,1]. Then the variability in π might be well modeled by a Beta model with shape parameters α>0 and β>0:

πBeta(α,β) The Beta model is specified by continuous pdf f(π)=Γ(α+β)Γ(α)Γ(β)πα1(1π)β1 for π[0,1] where Γ(z)=0yz1eydy and Γ(z+1)=zΓ(z). Fun fact: when z is a positive integer, then Γ(z) simplifies to Γ(z)=(z1)!.

10 / 16

Beta Prior model

πBeta(3,8)

f(π)=Γ(α+β)Γ(α)Γ(β)πα1(1π)β1

f(π)=Γ(3+11)Γ(3)Γ(8)0.531(10.5)81

f(π)=13!2!7!0.531(10.5)81

f(π)=0.703125

11 / 16

Beta Prior model

πBeta(3,8)

dbeta(x = 0.5,
shape1 = 3,
shape2 = 8)
## [1] 0.703125
12 / 16

Plotting Beta Prior

13 / 16

Plotting Beta Prior with bayesrules package

Use the plot_beta() function in the bayesrules package to try different shape parameters. Example:

plot_beta(alpha = 5, beta = 7)

14 / 16

Beta Descriptives

E(π)=αα+β

Mode(π)=α1α+β2

Var(π)=αβ(α+β)2(α+β+1)

15 / 16

Beta Descriptives with bayesrules package

Use the summarize_beta() function in the bayesrules package to find the mean, mode, and variance of various Beta distributions. Example:

summarize_beta(alpha = 5, beta = 7)
## mean mode var
## 1 0.4166667 0.4 0.01869658
16 / 16

Back to Graduate School Applications

Last lecture we were trying to understand π the acceptance rate of a graduate program in a specific department. Let's make a fresh start to the same problem. This time we will let π[0,1].

2 / 16
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow