Extreme Optimization™: Complexity made simple.

Numerical Components
for .NET

  • Home
  • Features
    • Math Library
    • Vector and Matrix Library
    • Statistics Library
    • Performance
    • Usability
  • Documentation
    • Introduction
    • Math Library User's Guide
    • Vector and Matrix Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Resources
    • Downloads
    • QuickStart Samples
    • Sample Applications
    • Frequently Asked Questions
    • Technical Support
  • Blog
  • Order
  • Company
    • About us
    • Testimonials
    • Customers
    • Press Releases
    • Careers
    • Contact us
Introduction
Deployment Guide
Using Parallelism
Expand Mathematics Library User's GuideMathematics Library User's Guide
Expand Vector and Matrix Library User's GuideVector and Matrix Library User's Guide
Expand Statistics Library User's GuideStatistics Library User's Guide
Expand ReferenceReference
  • Home
    • Features
    • Solutions
    • Documentation
    • QuickStart Samples
    • Sample Applications
    • Downloads
    • Technical Support
    • Download trial
    • How to buy
    • Blog
    • Company
    • Resources
  • Documentation
    • Introduction
    • Deployment Guide
    • Using Parallelism
    • Mathematics Library User's Guide
    • Vector and Matrix Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Statistics Library User's Guide
    • Statistical Variables
    • Continuous Variables
    • Categorical Variables
    • Variable Collections
    • General Linear Models
    • Regression Analysis
    • Analysis of Variance
    • Time Series Analysis
    • Multivariate Analysis
    • Continuous Distributions
    • Discrete Distributions
    • Multivariate Distributions
    • Hypothesis Tests
    • Histograms
    • Random Numbers
    • Appendices
  • Continuous Distributions
    • Continuous Probability Distributions
    • The Beta Distribution
    • The Cauchy Distribution
    • The Chi Square Distribution
    • The Erlang Distribution
    • The Exponential Distribution
    • The F Distribution
    • The Gamma Distribution
    • The Generalized Pareto Distribution
    • The Gumbel Distribution
    • The Laplace Distribution
    • The Logistic Distribution
    • The Lognormal Distribution
    • The Normal Distribution
    • The Pareto Distribution
    • The Rayleigh Distribution
    • Student's t Distribution
    • The Transformed Beta Distribution
    • The Transformed Gamma Distribution
    • The Triangular Distribution
    • The Continuous Uniform Distribution
    • The Weibull Distribution
  • The Beta Distribution
Collapse image Expand Image Copy image CopyHover image
         




The Beta Distribution

The Beta distribution is often used to model random variables with a finite range. The Beta distribution is also used in Bayesian analysis.

The Beta distribution has two shape parameters, usually denoted by the Greek letters α and β. Its probability density function (PDF) is:

Probability density of the beta distribution.

Unlike most other distributions, location and scale parameters are not usually used to specify the general form of the Beta distribution. Instead, the lower and upper bounds of the definition interval are used.

For certain specific values of the parameters α and β, the beta distribution is equivalent to a simpler distribution. For α = β = 1, the beta distribution is equivalent to the uniform distribution. For α = 1 and β = 2, and α = 2 and β = 1, the beta distribution reduces to a triangular distribution. For α and β very large, the beta distribution approximates to the normal distribution.

The beta distribution is implemented by the BetaDistribution class. It has three constructors. The first constructor takes the two shape parameters, α and β as arguments. The following constructs a beta distribution with α = 1.5 and β = 0.8:

C#  Copy imageCopy
BetaDistribution beta1 = new BetaDistribution(1.5, 0.8);
Visual Basic  Copy imageCopy
Dim beta1 As BetaDistribution = New BetaDistribution(1.5, 0.8)

The second constructor takes two extra parameters that specify the lower and upper bound of the interval on which the beta distribution is defined. The default is a lower bound of 0 and an upper bound of 1. The following constructs a beta distribution with α = 1.5 and β = 0.8 over the interval [1, 4]:

C#  Copy imageCopy
BetaDistribution beta2 = new BetaDistribution(1.5, 0.8, 1, 4);
Visual Basic  Copy imageCopy
Dim beta2 As BetaDistribution = New BetaDistribution(1.5, 0.8, 1, 4)

If a variable is assumed to have a beta distribution, then the parameters of the distribution can be estimated using the method of matching moments. The third constructor performs this calculation. It takes one parameter: a NumericalVariable whose distribution is to be estimated. This constructor estimates a standard beta distribution, with lower bound and upper bound equal to 0 and 1, respectively.

Note that parameter estimation says nothing about how well the estimated distribution fits the variable's distribution. Use one of the goodness-of-fit tests to verify the appropriateness of the choice of distribution.

The BetaDistribution class has four specific properties that correspond to the parameters of the distribution. The Alpha and Beta properties return the shape parameters, α and β. The LowerBound and UpperBound properties return the bounds of the interval on which the beta distribution is defined.

BetaDistribution has one static (Shared in Visual Basic) method, Sample()()()(), which generates a random variate using a user-supplied uniform random number generator.

C#  Copy imageCopy
MersenneTwister random = new MersenneTwister();
double variate = BetaDistribution.GetRandomVariate(random, 1.5, 0.8);
Visual Basic  Copy imageCopy
Dim random As MersenneTwister = New MersenneTwister()
Dim variate As Double = BetaDistribution.GetRandomVariate(random, 1.5, 0.8)

For details of the properties and methods common to all continuous distribution classes, see the topic on class.

Send comments on this topic to support@extremeoptimization.com

Copyright (c) 2004-2011 ExoAnalytics Inc.

Copyright © 2003-2013, Extreme Optimization. All rights reserved.
Extreme Optimization, Complexity made simple, M#, and M Sharp are trademarks of ExoAnalytics Inc.
Microsoft, Visual C#, Visual Basic, Visual Studio, Visual Studio.NET, and the Optimized for Visual Studio logo
are registered trademarks of Microsoft Corporation.