Home > Mathematica, Mathematics > Alpha, Beta, Gamma…

Alpha, Beta, Gamma…

\alpha, \beta, \gamma

I made the following  notes in reading John Cook’s post on the rule of three.


  • \lim _{n\rightarrow \infty} (1-\frac{3}{n})^n =e^{-3}\approx 0.05
  • Bayes theorem: f(\theta|D)=\frac{f(D|\theta) f(\theta)}{\int_\theta f(D|\theta)f(\theta)\, d\theta}
  • Binomial distribution (N trials, s successes) probability density function:f(D|\theta)=^N C_s \theta ^s (1-\theta)^{N-s}
  • Beta distribution probability density function: f(t;\alpha ,\beta)= \frac{1}{B(\alpha ,\beta)}t^{\alpha -1}(1-t)^{\beta-1} where B(\alpha , \beta)=\int_0^1 t^{\alpha -1}(1-t)^{\beta -1} \, dt
  • In estimating the rate of an event that hasn’t happened  yet using Bayes theorem, let the event  be modeled by binomial distribution, and consider the prior distribution for the probability of event assumed to be a beta distribution(\alpha , \beta). To get the uninformative prior that is used in the post we will just let \alpha =\beta =1. Let \theta be the parameter of interest.
  • With these assumptions:

f(\theta | N, s) =\frac {\theta ^s (1 -\theta)^{N-s} \theta ^{\alpha -1}(1 - \theta)^{\beta -1}}{\int_0^1 \theta ^s (1-\theta)^{N-s} \theta ^ {\alpha -1} (1 - \theta) ^{\beta -1} d \theta }

Simplifying yields:

f(\theta | N, s)=\frac{\theta^{s +\alpha -1} (1 -\theta)^{N -s +\beta -1} }{B( s +\alpha , N - s +\beta)}

This is a beta distribution ( s + \alpha, N -s +\beta).  Setting \alpha = \beta =1  and s =0 yields the beta distribution (1, N+1) as indicated by the post.

The following graphic illustrates the effect of changing N on the posterior probability.

Categories: Mathematica, Mathematics
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: