Class UniformDiscreteDistribution
Inheritance
Implements
Inherited Members
Namespace: Mars.Numerics.Statistics
Assembly: Mars.Numerics.dll
Syntax
[Serializable]
public class UniformDiscreteDistribution : UnivariateDiscreteDistribution, IFormattable, IUnivariateDistribution<int>, IUnivariateDistribution, IDistribution, ICloneable, IUnivariateDistribution<double>, ISampleableDistribution<double>, IRandomNumberGenerator<double>, ISampleableDistribution<int>, IRandomNumberGenerator<int>
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Examples
// Create an uniform (discrete) distribution in [2, 6]
var dist = new UniformDiscreteDistribution(a: 2, b: 6);
// Common measures
double mean = dist.Mean; // 4.0
double median = dist.Median; // 4.0
double var = dist.Variance; // 1.3333333333333333
// Cumulative distribution functions
double cdf = dist.DistributionFunction(k: 2); // 0.2
double ccdf = dist.ComplementaryDistributionFunction(k: 2); // 0.8
// Probability mass functions
double pmf1 = dist.ProbabilityMassFunction(k: 4); // 0.2
double pmf2 = dist.ProbabilityMassFunction(k: 5); // 0.2
double pmf3 = dist.ProbabilityMassFunction(k: 6); // 0.2
double lpmf = dist.LogProbabilityMassFunction(k: 2); // 1.6094379124341003
// Quantile function
int icdf1 = dist.InverseDistributionFunction(p: 0.17); // 2
int icdf2 = dist.InverseDistributionFunction(p: 0.46); // 4
int icdf3 = dist.InverseDistributionFunction(p: 0.87); // 6
// Hazard (failure rate) functions
double hf = dist.HazardFunction(x: 4); // 0.5
double chf = dist.CumulativeHazardFunction(x: 4); // 0.916290731874155
// String representation
string str = dist.ToString(CultureInfo.InvariantCulture); // "U(x; a = 2, b = 6)"
Constructors
 Improve this Doc View SourceUniformDiscreteDistribution(Int32, Int32)
Declaration
public UniformDiscreteDistribution(int a = 0, int b = 1)
Parameters
Type  Name  Description 

System.Int32  a  The starting (minimum) value a. 
System.Int32  b  The ending (maximum) value b. 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Properties
 Improve this Doc View SourceEntropy
Declaration
public override double Entropy { get; }
Property Value
Type  Description 

System.Double 
Overrides
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Length
Declaration
public double Length { get; }
Property Value
Type  Description 

System.Double 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Maximum
Declaration
public double Maximum { get; }
Property Value
Type  Description 

System.Double 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Mean
Declaration
public override double Mean { get; }
Property Value
Type  Description 

System.Double 
Overrides
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Minimum
Declaration
public double Minimum { get; }
Property Value
Type  Description 

System.Double 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Support
Declaration
public override IntRange Support { get; }
Property Value
Type  Description 

IntRange  A DoubleRange containing the support interval for this distribution. 
Overrides
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Variance
Declaration
public override double Variance { get; }
Property Value
Type  Description 

System.Double 
Overrides
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Methods
 Improve this Doc View SourceClone()
Declaration
public override object Clone()
Returns
Type  Description 

System.Object  A new object that is a copy of this instance. 
Overrides
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Generate(FastRandom)
Declaration
public override int Generate(FastRandom source)
Parameters
Type  Name  Description 

Mars.Common.Core.Random.FastRandom  source  The random number generator to use as a source of randomness. Default is to use System.Random. 
Returns
Type  Description 

System.Int32  A random observations drawn from this distribution. 
Overrides
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Generate(Int32, Int32[], FastRandom)
Declaration
public override int[] Generate(int samples, int[] result, FastRandom source)
Parameters
Type  Name  Description 

System.Int32  samples  The number of samples to generate. 
System.Int32[]  result  The location where to store the samples. 
Mars.Common.Core.Random.FastRandom  source  The random number generator to use as a source of randomness. Default is to use Mars.Common.Core.Random.Generator.Random. 
Returns
Type  Description 

System.Int32[]  A random vector of observations drawn from this distribution. 
Overrides
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
InnerDistributionFunction(Int32)
k
.
Declaration
protected override double InnerDistributionFunction(int k)
Parameters
Type  Name  Description 

System.Int32  k  A single point in the distribution range. 
Returns
Type  Description 

System.Double 
Overrides
Remarks
InnerLogProbabilityMassFunction(Int32)
x
.
Declaration
protected override double InnerLogProbabilityMassFunction(int k)
Parameters
Type  Name  Description 

System.Int32  k  A single point in the distribution range. 
Returns
Type  Description 

System.Double 
The logarithm of the probability of k
occurring in the current distribution.

Overrides
Remarks
k
will occur.
InnerProbabilityMassFunction(Int32)
x
.
Declaration
protected override double InnerProbabilityMassFunction(int k)
Parameters
Type  Name  Description 

System.Int32  k  A single point in the distribution range. 
Returns
Type  Description 

System.Double 
The probability of k occurring
in the current distribution.

Overrides
Remarks
k
will occur.
Random()
Declaration
public static int Random()
Returns
Type  Description 

System.Int32  A random double value sampled from the specified Uniform distribution. 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Random(FastRandom)
Declaration
public static int Random(FastRandom source)
Parameters
Type  Name  Description 

Mars.Common.Core.Random.FastRandom  source 
Returns
Type  Description 

System.Int32  A random double value sampled from the specified Uniform distribution. 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Random(Int32, FastRandom)
Declaration
public static int[] Random(int samples, FastRandom source)
Parameters
Type  Name  Description 

System.Int32  samples  The number of samples to generate. 
Mars.Common.Core.Random.FastRandom  source  The random number generator to use as a source of randomness. Default is to use System.Random. 
Returns
Type  Description 

System.Int32[]  An array of double values sampled from the specified Uniform distribution. 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Random(Int32, Int32, FastRandom)
Declaration
public static int Random(int a, int b, FastRandom source)
Parameters
Type  Name  Description 

System.Int32  a  The starting number a. 
System.Int32  b  The ending number b. 
Mars.Common.Core.Random.FastRandom  source  The random number generator to use as a source of randomness. Default is to use System.Random. 
Returns
Type  Description 

System.Int32  A random double value sampled from the specified Uniform distribution. 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Random(Int32, Int32, Int32, FastRandom)
Declaration
public static int[] Random(int a, int b, int samples, FastRandom source)
Parameters
Type  Name  Description 

System.Int32  a  The starting number a. 
System.Int32  b  The ending number b. 
System.Int32  samples  The number of samples to generate. 
Mars.Common.Core.Random.FastRandom  source  The random number generator to use as a source of randomness. Default is to use System.Random. 
Returns
Type  Description 

System.Int32[]  An array of double values sampled from the specified Uniform distribution. 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Random(Int32, Int32, Int32, Int32[], FastRandom)
Declaration
public static int[] Random(int a, int b, int samples, int[] result, FastRandom source)
Parameters
Type  Name  Description 

System.Int32  a  The starting number a. 
System.Int32  b  The ending number b. 
System.Int32  samples  The number of samples to generate. 
System.Int32[]  result  The location where to store the samples. 
Mars.Common.Core.Random.FastRandom  source  The random number generator to use as a source of randomness. Default is to use System.Random. 
Returns
Type  Description 

System.Int32[]  An array of double values sampled from the specified Uniform distribution. 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Random(Int32, Int32, Int32, Int32[])
Declaration
public static int[] Random(int a, int b, int samples, int[] result)
Parameters
Type  Name  Description 

System.Int32  a  The starting number a. 
System.Int32  b  The ending number b. 
System.Int32  samples  The number of samples to generate. 
System.Int32[]  result  The location where to store the samples. 
Returns
Type  Description 

System.Int32[]  An array of double values sampled from the specified Uniform distribution. 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Random(Int32, Int32, Int32)
Declaration
public static int[] Random(int a, int b, int samples)
Parameters
Type  Name  Description 

System.Int32  a  The starting number a. 
System.Int32  b  The ending number b. 
System.Int32  samples  The number of samples to generate. 
Returns
Type  Description 

System.Int32[]  An array of double values sampled from the specified Uniform distribution. 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Random(Int32, Int32)
Declaration
public static int Random(int a, int b)
Parameters
Type  Name  Description 

System.Int32  a  The starting number a. 
System.Int32  b  The ending number b. 
Returns
Type  Description 

System.Int32  A random double value sampled from the specified Uniform distribution. 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Random(Int32, Int32[], FastRandom)
Declaration
public static int[] Random(int samples, int[] result, FastRandom source)
Parameters
Type  Name  Description 

System.Int32  samples  The number of samples to generate. 
System.Int32[]  result  The location where to store the samples. 
Mars.Common.Core.Random.FastRandom  source  The random number generator to use as a source of randomness. Default is to use System.Random. 
Returns
Type  Description 

System.Int32[]  An array of double values sampled from the specified Uniform distribution. 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Random(Int32, Int32[])
Declaration
public static int[] Random(int samples, int[] result)
Parameters
Type  Name  Description 

System.Int32  samples  The number of samples to generate. 
System.Int32[]  result  The location where to store the samples. 
Returns
Type  Description 

System.Int32[]  An array of double values sampled from the specified Uniform distribution. 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
Random(Int32)
Declaration
public static int[] Random(int samples)
Parameters
Type  Name  Description 

System.Int32  samples  The number of samples to generate. 
Returns
Type  Description 

System.Int32[]  An array of double values sampled from the specified Uniform distribution. 
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References:
ToString(String, IFormatProvider)
Declaration
public override string ToString(string format, IFormatProvider formatProvider = null)
Parameters
Type  Name  Description 

System.String  format  
System.IFormatProvider  formatProvider 
Returns
Type  Description 

System.String  A System.String that represents this instance. 
Overrides
Remarks
In probability theory and statistics, the discrete uniform distribution is a symmetric probability distribution whereby a finite number of values are equally likely to be observed; every one of n values has equal probability 1/n. Another way of saying "discrete uniform distribution" would be "a known, finite number of outcomes equally likely to happen".
A simple example of the discrete uniform distribution is throwing a fair die. The possible values are 1, 2, 3, 4, 5, 6, and each time the die is thrown the probability of a given score is 1/6. If two dice are thrown and their values added, the resulting distribution is no longer uniform since not all sums have equal probability.
The discrete uniform distribution itself is inherently nonparametric. It is convenient, however, to represent its values generally by an integer interval [a,b], so that a,b become the main parameters of the distribution (often one simply considers the interval [1,n] with the single parameter n).
References: