Beta Binomial ConjugacyPrior h(σ)∼Beta(α,β)h(\sigma) \sim \text{Beta}(\alpha, \beta)h(σ)∼Beta(α,β) Likelihood g(x∣θ)∼Binomial(n,x,θ)g(x|\theta) \sim \text{Binomial}(n, x, \theta)g(x∣θ)∼Binomial(n,x,θ) Posterior f(θ∣x)=g(x∣θ)h(θ)∫θg(x∣θ)h(θ)dθf(\theta | x) = {{g(x | \theta) h(\theta)} \over {\int\limits_{\theta} g(x|\theta) h(\theta) d \theta}}f(θ∣x)=θ∫g(x∣θ)h(θ)dθg(x∣θ)h(θ) ∴f(θ∣x)∼Beta(α+x, β+n−x)\therefore f(\theta | x) \sim \text{Beta}(\alpha + x,~\beta + n - x)∴f(θ∣x)∼Beta(α+x, β+n−x)