# DiscreteDistribution struct

Namespace: [Grasshopper2.Types.Random](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.types.random.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
[IoId("00000000-35D9-4AC9-B5EA-A9AA2235396A")]
public struct DiscreteDistribution : IStorable
```

Represents a variety of discrete statistical distributions.

## Constructors

- [DiscreteDistribution](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/ctor.md)

## Properties

- [Deviation](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/deviation.md): Gets the standard deviation of this distribution. Not all types of distribution have a meaningful deviation, in which case this property returns NaN.
- [Entropy](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/entropy.md): Gets the entropy of this distribution. Not all types of distribution have an entropy value, in which case this property returns NaN.
- [Maximum](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/maximum.md): Gets the largest parameter for which this distribution is defined.
- [Mean](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/mean.md): Gets the mean of this distribution. Not all types of distribution have a mean, in which case this property returns NaN.
- [Median](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/median.md): Gets the median of this distribution. Not all types of distribution have a median, in which case this property returns NaN.
- [Minimum](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/minimum.md): Gets the smallest parameter for which this distribution is defined.
- [Mode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/mode.md): Gets the mode of this distribution. Not all types of distribution have a mode, in which case this property returns NaN.
- [Skewness](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/skewness.md): Gets the statistical skewness of this distribution. Not all types of distribution have a skewness, in which case this property returns NaN.
- [Type](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/type.md): Gets the type of this distribution.
- [Variance](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/variance.md): Gets the statistical variance of this distribution. Not all types of distribution have a variance, in which case this property returns NaN.

## Methods

- [CreateBernoulli](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/createbernoulli.md): (static) Create a Bernoulli discrete distribution.
- [CreateBinomial](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/createbinomial.md): (static) Create a Binomial discrete distribution.
- [CreateConwayMaxwell](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/createconwaymaxwell.md): (static) Create a Conway-Maxwell-Poisson discrete distribution.
- [CreateGeometric](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/creategeometric.md): (static) Create a Geometric discrete distribution.
- [CreateHyperGeometric](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/createhypergeometric.md): (static) Create a Hyper-Geometric discrete distribution.
- [CreatePoisson](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/createpoisson.md): (static) Create a Poisson discrete distribution.
- [CreateSampling](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/createsampling.md): Gets a collection of random samples within this distribution. This method should only be called when the distribution is discrete.
- [CreateSamplingConsistent](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/createsamplingconsistent.md): Create a random sampling of this distribution which is more consistent but slower than the [DiscreteDistribution.CreateSampling(Random, int)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/createsampling.md) method.
- [CreateUniform](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/createuniform.md): (static) Create a uniform discrete distribution.
- [CreateZipf](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/createzipf.md): (static) Create a Zipf discrete distribution.
- [CumulativeAt](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/cumulativeat.md): Gets the cumulative distribution at x.
- [GetPreview](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/getpreview.md): Create a preview of the PDF and CDF functions.
- [GetRelevantInterval](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/getrelevantinterval.md): Gets the relevant x-interval in which the distribution has the most detailed progression. This method is used to decide on which interval any distribution previews ought to be drawn.
- [ProbabilityAt](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/probabilityat.md): Gets the probability density of the distribution at index i.
- [Store](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/store.md)
- [ToString](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/tostring.md)
- [ValidateConwayMaxwellNuParameter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.random.discretedistribution/validateconwaymaxwellnuparameter.md): (static)
