Extreme Optimization™: Complexity made simple.

Math and Statistics
Libraries 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
    • Data Analysis 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
    • Partners
    • Contact us
Introduction
Deployment Guide
Nuget packages
Configuration
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 Data Analysis Library User's GuideData Analysis Library User's Guide
Expand Statistics Library User's GuideStatistics Library User's Guide
Expand Data Access Library User's GuideData Access Library User's Guide
Expand ReferenceReference
  • Extreme Optimization
    • Features
    • Solutions
    • Documentation
    • QuickStart Samples
    • Sample Applications
    • Downloads
    • Technical Support
    • Download trial
    • How to buy
    • Blog
    • Company
    • Resources
  • Documentation
    • Introduction
    • Deployment Guide
    • Nuget packages
    • Configuration
    • Using Parallelism
    • Mathematics Library User's Guide
    • Vector and Matrix Library User's Guide
    • Data Analysis Library User's Guide
    • Statistics Library User's Guide
    • Data Access Library User's Guide
    • Reference
  • Statistics Library User's Guide
    • Statistical Variables
    • Numerical Variables
    • Statistical Models
    • Regression Analysis
    • Analysis of Variance
    • Time Series Analysis
    • Multivariate Analysis
    • Continuous Distributions
    • Discrete Distributions
    • Multivariate Distributions
    • Kernel Density Estimation
    • Hypothesis Tests
    • Appendices
  • Discrete Distributions
    • Discrete Probability Distributions
    • The Bernoulli Distribution
    • The Binomial Distribution
    • The Geometric Distribution
    • The Hypergeometric Distributions
    • The Negative Binomial Distribution
    • The Poisson Distribution
    • The Uniform Distribution
  • Discrete Probability Distributions

Discrete Probability Distributions

Extreme Optimization Numerical Libraries for .NET Professional

All classes that implement discrete probability distributions inherit from the DiscreteDistribution class. This class defines methods and properties common to all discrete probability distributions.

Parameters of a distribution

Discrete probability distributions arise from counting events whose occurrence is in some way probabilistic. One parameter specifies the probabilistic element of the setup. The remaining parameters specify specific details about the setup.

Each distribution object has one or more properties corresponding to the distribution parameters. These properties are read-only.

Properties of distributions

Each distribution object has one or more properties that return the parameters of the distribution.

In addition, each distribution defines properties that describe the main traits of the distribution. The Mean property returns the mean of the distribution.

The StandardDeviation property returns the standard deviation of the distribution. The Variance property returns the variance. The Skewness property returns the skewness of the distribution, and the Kurtosis property returns the kurtosis supplement of the distribution.

Distribution Functions

Associated with each distribution are a number of functions that are commonly used in statistical calculations. The probability function gives the probability that a random sample from the distribution takes on a specific value. It is implemented by the Probability method. This method takes one argument: the value for which the probability is requested. There is an Probability that takes two arguments, and returns the total probability that a sample falls within the interval specified by the arguments. The lower bound is inclusive. The upper bound is exclusive. This means that passing the same value for both parameters returns 0.

The distribution function, often called the cumulative distribution function (CDF), gives the probability that a sample or sample from the distribution has a value less than or equal to its argument. It is implemented by the DistributionFunction method.

Generating Random Variates

One of the principal applications of probability distributions is the generation of random numbers that follow a certain distribution. The discrete distribution classes provide a series of methods to make this happen.

The Sample method returns a single random sample from the distribution. It has overloads as both static (Shared in Visual Basic) and instance methods. The instance method has only one parameter: the random number generator that will be used to generate the uniform random number(s) used in the calculation of the sample. It is of type SystemRandom. Any of the random number generators from the Extreme.Mathematics.Random namespace can be used for this purpose.

Each class also defines one or more static overloads, one each for each constructor. The first argument is always the random number generator, as above. Additional arguments correspond to the arguments of each constructor. This makes it possible to generate random samples for any distribution without first constructing a distribution object.

The Sample method generates a large number of random samples at once. The first argument is once again the uniform random number generator. The samples are returned as an integer array. The array must be supplied as the second argument. Two additional argument may be provided, which supply the start index and the length of a segment in the array where the samples are to be copied.

Copyright (c) 2004-2021 ExoAnalytics Inc.

Send comments on this topic to support@extremeoptimization.com

Copyright © 2004-2021, 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.