Beta

From Statipedia

Jump to: navigation, search

Contents

The Beta Distribution

  • The Beta Distribution can be used for a continuous random variable that can only take values between 0 and 1.
  • Can be used to describe the amount of time an event or project will take to complete, if it must take place within a specified interval.


Probability Density Function

Image:1baa04dad3403ad113a36a39b23a2e34.png

  • The leading term (with the Gamma functions) is a constant that ensures the area under the pdf curve = 1.
  • R code: dbeta(p,alpha,beta), where the sum alpha+beta is regarded as the "sample size" and alpha/(alpha+beta) is the population mean.
  • Another useful parameterization is a = alpha/(alpha+beta) and b = 1/sqrt(alpha+beta)
    • alpha = a/b^2
    • beta = (1-a)/b^2

Image:325px-Beta_distribution_pdf.png


Cumulative Distribution Function

Image:3694218cd8a76a32df63a03f80ada54d.png

  • where Bx(α,β) is the incomplete beta function and Ix(α,β) is the regularized incomplete beta function.
  • R code: pbeta(q, alpha, beta)

Image:325px-Beta_distribution_cdf.png


Generating Random Variables

> rbeta(10,5,8)

[1] 0.28396857 0.29257510 0.43823168 0.46036009 0.31662962 0.31494870
[7] 0.31709740 0.35495964 0.39718446 0.07957405

Common Statistics

Image:F721ee11a95cf6fce816ea7bf058fad2.png

Parameter Estimation

Bayesian

Two cases are described below. In the first, we are given a sample drawn directly from a beta-distributed population. In the second, rathe than observing the sampled probabilities directly, we're given the results of repeated Bernoulli trials (i.e., Binomial trials, with perhaps-different orders (Ns)) for each unobserved probability.

Data = Beta-Distributed Probabilities = c(p1, p2, ...pn)

The likelihood function is simply the product of beta densities.

  • L(data|alpha,beta) = dbeta(p1,alpha,beta)*dbeta(p2,alpha,beta)*...*dbeta(pn,alpha,beta)

Data are Binomial = list(c(K1, K2, ...Kn), c(N1, N2, ...Nn))

The likelihood function can be expressed as a product of gamma functions divided by another product of gamma functions.

  • L(K1|N1,alpha,beta) = ln(Gamma(alpha+beta))+ln(Gamma(alpha+K1))+ln(Gamma(beta+N1-K1))-ln(Gamma(alpha+beta+N))-ln(Gamma(alpha))-ln(Gamma(beta))
  • L(data|alpah,beta) = L(K1|N1,alpha,beta)*L(K2|N2,alpha,beta)*...*L(Kn|Nn,alpha,beta)

Method of Moments

  • Image:98f23d137dfcd0af6f5f5838c2a424da.png
  • Image:B6ec444d8a167b440c4be9617c216eef.png

Related Distributions

  • Continuous Uniform - Can be thought of as a special case of Beta
  • Binomial - Beta is a conjugate prior

External Links


Back to Probability_Distributions

Personal tools