Beta Distribution

The Beta distribution models probabilities themselves — perfect for random variables bounded between 0 and 1. It’s commonly used in Bayesian inference as a prior for binomial proportions due to its flexibility in shape. 🔧

f_{X}(x) = {\frac {\Gamma (\alpha +\beta )}{\Gamma (\alpha )\Gamma (\beta )}}\,x^{\alpha -1}(1-x)^{\beta -1}

where \Gamma is the gamma function defined as:

\Gamma (z)=\int _{0}^{\infty}t^{z-1}e^{-t}\,dt

Python Code: Beta Distribution

To create Beta distributed data using numpy:

import numpy as np 

alpha = 0.5
beta = 0.5
size = (1000,1)

data = np.random.beta(alpha, beta, size)