• MARS Website
  • Core API
  • SmartOpenHamburg API
  • Model Components API
  • Common API
Show / Hide Table of Contents
  • Mars.Common
    • GeoHash
    • GeoHashDecoder
    • GeohashDecodeResult
    • GeoHashEncoder
    • GeoHashPrecision
    • Hyperrectangle
    • InputHashHelper
    • PositionHelper
  • Mars.Common.Collections
    • BinaryArrayHeap<T>
    • DoubleBits
    • FibonacciHeap<T, TKey>
    • FibonacciHeapDoubleKey<T>
    • FibonacciHeapNode<T, TKey>
    • FibonacciHeapNodeDoubleKey<T>
    • HeapNode
    • IntervalSize
    • K2DTree<T>
    • K2dTreeNode<T>
    • KdTree
    • KdTree<T>
    • KdTreeBase<TNode>
    • KdTreeNode
    • KdTreeNode<T>
    • KdTreeNodeBase<TNode>
    • KdTreeNodeCollection<TNode>
    • KdTreeNodeList<T>
    • Key
    • Node<T>
    • NodeBase<T>
    • NodeDataContainer<T>
    • NodeDistance<TNode>
    • QuadTree<T>
    • Root<T>
    • TreeDataContainer<T>
  • Mars.Common.Collections.CritBit
    • ICritBitTree<TValue>
  • Mars.Common.Collections.Graph
    • EdgeData
    • GraphData
    • GraphSerializer
    • ISpatialGraph
    • KeyContainer
    • NodeData
    • SpatialGraph
    • SpatialGraphHelper
  • Mars.Common.Collections.Graph.Algorithms
    • AStar
    • CompressedPathDatabase
    • ContractionSearch
    • DepthLimitedTraversal
  • Mars.Common.Collections.Graph.Helper
    • INodeFinder
    • KdTreeNodeFinder
    • RunLengthEncoder
  • Mars.Common.Collections.KNNGraph
    • DefaultRandomGenerator
    • DistanceUtils
    • EventSources
    • EventSources.GraphBuildEventSource
    • EventSources.GraphSearchEventSource
    • IProgressReporter
    • IProvideRandomValues
    • KnnGraph<TItem, TDistance>
    • KnnGraph<TItem, TDistance>.KnnSearchResult
    • KnnGraph<TItem, TDistance>.Parameters
    • Node
    • ReverseComparer<T>
    • ReverseComparerExtensions
    • SelectionKind
    • TravelingCosts<TItem, TDistance>
  • Mars.Common.Compat
    • FormatDecoderAttribute
    • FormatEncoderAttribute
    • FormatHandlerAttribute
    • IntegerAttribute
    • NegativeIntegerAttribute
    • NonnegativeIntegerAttribute
    • NonpositiveIntegerAttribute
    • PositiveIntegerAttribute
  • Mars.Common.Data
    • DomainDataImporter
  • Mars.Common.Data.Providers
    • AscDataProvider
    • GeoJsonFeatureCollectionConverter
    • GeoJsonFeatureConverter
    • GeoJsonHelper
    • GeometryDataProvider
    • GraphMlProvider
    • HttpDataProvider
    • IDataProvider<TInput>
    • JsonFileDataProvider
    • JsonTextDataProvider
    • XmlFileDataProvider
    • XmlTextDataProvider
  • Mars.Common.Exceptions
    • DimensionMismatchException
    • ParseException
  • Mars.Common.IO
    • ExtensionMethods
    • FileClientUtils
    • FileKeys
    • HttpClientUtils
    • ObjectSerialize
    • Serializer
    • SerializerCompression
    • SparseFormat
    • SparseReader
    • SparseWriter
  • Mars.Common.IO.Attributes
    • SerializationBinderAttribute
    • SurrogateSelectorAttribute
  • Mars.Common.IO.Console
    • ChildProgressBar
    • IProgressBar
    • ProgressBar
    • ProgressBarBase
    • ProgressBarHeight
    • ProgressBarOptions
    • ProgressBarSimple
  • Mars.Common.IO.Csv
    • CsvAnalyzer
    • CsvReader
    • CsvReader.RecordEnumerator
    • CsvWriter
    • MissingFieldAction
    • ParseErrorAction
    • ValueTrimmingOptions
  • Mars.Common.IO.Events
    • ParseErrorEventArgs
  • Mars.Common.IO.Exceptions
    • MalformedCsvException
    • MissingFieldCsvException
  • Mars.Common.IO.Mapped
    • Context
    • DefaultArrayFactory
    • Extensions
    • IArrayFactory
    • ISerializableToStream
    • MappedAccessor<T>
    • MemoryMap
    • MemoryMap.CreateAccessorFunc<T>
    • MemoryMap.ReadFromDelegate<T>
    • MemoryMap.WriteToDelegate<T>
    • MemoryMapDelegates
    • MemoryMapDelegates.CreateAccessorFunc<T>
    • MemoryMapStream
  • Mars.Common.IO.Mapped.Accessors
    • MappedAccessorByte
    • MappedAccessorDouble
    • MappedAccessorInt16
    • MappedAccessorInt32
    • MappedAccessorInt64
    • MappedAccessorSingle
    • MappedAccessorUInt16
    • MappedAccessorUInt32
    • MappedAccessorUInt64
    • MappedAccessorVariable<T>
  • Mars.Common.IO.Mapped.Arrays
    • Array<T>
    • ArrayBase<T>
    • ArrayProfile
    • MappedArray<TMapped, T>
    • MappedArray<TMapped, T>.MapFrom
    • MappedArray<TMapped, T>.MapTo
    • MemoryArray<T>
    • VariableArray<T>
  • Mars.Common.IO.Mapped.Collections
    • MemoryBackedDictionary<TKey, TValue>
    • MemoryBackedList<T>
  • Mars.Common.IO.Mapped.Indexes
    • Index<T>
  • Mars.Common.IO.Mapped.Streams
    • CappedStream
  • Mars.Common.Socket
    • ByteOrder
    • CloseEventArgs
    • CloseStatusCode
    • CompressionMethod
    • ErrorEventArgs
    • Ext
    • MessageEventArgs
    • WebSocket
    • WebSocketException
    • WebSocketState
  • Mars.Common.Socket.Server
    • IWebSocketSession
    • WebHeaderCollection
    • WebSocketBehavior
    • WebSocketContext
    • WebSocketServer
    • WebSocketServiceHost
    • WebSocketServiceManager
    • WebSocketSessionManager
  • Mars.Numerics
    • Classes
    • Combinatorics
    • Constants
    • Distance
    • Elementwise
    • Jagged
    • MathematicsException
    • MathHelper
    • Matrix
    • MatrixOrder
    • MatrixType
    • Norm
    • Sort
    • Sorting
    • Sparse
    • Sparse<T>
    • Tools
    • Vector
    • VectorHelper
    • VectorType
  • Mars.Numerics.Comparers
    • ArrayComparer<T>
    • ComparerDirection
    • CustomComparer<T>
    • ElementComparer
    • ElementComparer<T>
    • GeneralComparer
    • StableComparer<T>
  • Mars.Numerics.Distances
    • Angular
    • Chebyshev
    • Cosine
    • Dirac<T>
    • Euclidean
    • Hamming
    • Hamming<T>
    • Haversine
    • Jaccard
    • Jaccard<T>
    • Kulczynski
    • Levenshtein
    • Levenshtein<T>
    • Manhattan
    • Matching
    • Minkowski
    • SquareEuclidean
    • Vincenty
    • Vincenty.Ellipsoid
  • Mars.Numerics.Distances.Base
    • IDistance<T>
    • IDistance<TFirst, TSecond>
    • IMetric<T>
    • ISimilarity<T, TU>
    • ISimilarity<T>
  • Mars.Numerics.Exceptions
    • DimensionMismatchException
    • NonPositiveDefiniteMatrixException
    • SingularMatrixException
  • Mars.Numerics.Formats
    • DefaultMatrixFormatProvider
    • IMatrixFormatProvider
    • MatrixFormatProviderBase
    • MatrixFormatter
    • OctaveMatrixFormatProvider
  • Mars.Numerics.Ranges
    • ByteRange
    • DoubleRange
    • FloatRange
    • IntRange
    • IRange<T>
  • Mars.Numerics.Statistics
    • ConstValueDistribution<T>
    • Distribution<T>
    • FastGaussianDistributionD
    • FastGaussianDistributionF
    • IDistribution
    • UniformDiscreteDistribution
    • UniformDistributionD
    • UniformDistributionF
  • Mars.Numerics.Statistics.Base
    • BinarySearch
    • DistributionBase
    • ISampleableDistribution<TObservations>
    • IUnivariateDistribution
    • IUnivariateDistribution<TObservation>
    • UnivariateDiscreteDistribution

Class UniformDiscreteDistribution

Discrete uniform distribution.
Inheritance
System.Object
DistributionBase
UnivariateDiscreteDistribution
UniformDiscreteDistribution
Implements
System.IFormattable
IUnivariateDistribution<System.Int32>
IUnivariateDistribution
IDistribution
System.ICloneable
IUnivariateDistribution<System.Double>
ISampleableDistribution<System.Double>
Mars.Common.Core.Random.IRandomNumberGenerator<System.Double>
ISampleableDistribution<System.Int32>
Mars.Common.Core.Random.IRandomNumberGenerator<System.Int32>
Inherited Members
UnivariateDiscreteDistribution.DistributionFunction(Double[])
UnivariateDiscreteDistribution.ProbabilityFunction(Double[])
UnivariateDiscreteDistribution.Generate(Int32, Double[])
UnivariateDiscreteDistribution.Generate(Int32, Double[], FastRandom)
UnivariateDiscreteDistribution.IRandomNumberGenerator<Double>.Generate(Int32)
UnivariateDiscreteDistribution.ISampleableDistribution<Double>.Generate(Int32, FastRandom)
UnivariateDiscreteDistribution.ISampleableDistribution<Double>.Generate(Double)
UnivariateDiscreteDistribution.ISampleableDistribution<Double>.Generate(Double, FastRandom)
UnivariateDiscreteDistribution.IRandomNumberGenerator<Double>.Generate()
UnivariateDiscreteDistribution.ISampleableDistribution<Double>.Generate(FastRandom)
UnivariateDiscreteDistribution.Generate(Int32)
UnivariateDiscreteDistribution.Generate(Int32, Int32[])
UnivariateDiscreteDistribution.Generate()
UnivariateDiscreteDistribution.ISampleableDistribution<Int32>.Generate(Int32)
UnivariateDiscreteDistribution.ISampleableDistribution<Int32>.Generate(Int32, FastRandom)
UnivariateDiscreteDistribution.Quartiles
UnivariateDiscreteDistribution.QuantileDensityFunction(Double)
UnivariateDiscreteDistribution.ProbabilityFunction(Double)
UnivariateDiscreteDistribution.IUnivariateDistribution<Double>.InverseDistributionFunction(Double)
UnivariateDiscreteDistribution.IUnivariateDistribution<Double>.HazardFunction(Double)
UnivariateDiscreteDistribution.IUnivariateDistribution<Double>.CumulativeHazardFunction(Double)
UnivariateDiscreteDistribution.Mode
UnivariateDiscreteDistribution.Median
UnivariateDiscreteDistribution.DistributionFunction(Int32)
UnivariateDiscreteDistribution.InverseDistributionFunction(Double)
UnivariateDiscreteDistribution.ComplementaryDistributionFunction(Int32)
UnivariateDiscreteDistribution.HazardFunction(Int32)
UnivariateDiscreteDistribution.CumulativeHazardFunction(Int32)
UnivariateDiscreteDistribution.ProbabilityFunction(Int32)
UnivariateDiscreteDistribution.GetRange(Double)
UnivariateDiscreteDistribution.DistributionFunction(Int32, Boolean)
UnivariateDiscreteDistribution.DistributionFunction(Int32, Int32)
UnivariateDiscreteDistribution.InnerInverseDistributionFunction(Double)
UnivariateDiscreteDistribution.BaseInverseDistributionFunction(Double)
UnivariateDiscreteDistribution.BaseDistributionFunction(Int32)
UnivariateDiscreteDistribution.ComplementaryDistributionFunction(Int32, Boolean)
UnivariateDiscreteDistribution.InnerComplementaryDistributionFunction(Int32)
UnivariateDiscreteDistribution.ProbabilityMassFunction(Int32)
UnivariateDiscreteDistribution.LogProbabilityMassFunction(Int32)
UnivariateDiscreteDistribution.LogCumulativeHazardFunction(Int32)
UnivariateDiscreteDistribution.Generate(Int32, FastRandom)
UnivariateDiscreteDistribution.IUnivariateDistribution.Support
UnivariateDiscreteDistribution.IUnivariateDistribution<Int32>.Support
UnivariateDiscreteDistribution.IUnivariateDistribution<Double>.Support
UnivariateDiscreteDistribution.IUnivariateDistribution.GetRange(Double)
UnivariateDiscreteDistribution.IDistribution.DistributionFunction(Double[])
UnivariateDiscreteDistribution.IDistribution.ProbabilityFunction(Double[])
DistributionBase.ToString()
DistributionBase.ToString(IFormatProvider)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
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 Source

UniformDiscreteDistribution(Int32, Int32)

Creates a discrete uniform distribution defined in the interval [a;b].
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)

Properties

| Improve this Doc View Source

Entropy

Gets the entropy for this distribution.
Declaration
public override double Entropy { get; }
Property Value
Type Description
System.Double
Overrides
UnivariateDiscreteDistribution.Entropy
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Length

Gets the length of the distribution (b - a + 1).
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Maximum

Gets the maximum value of the distribution (b).
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Mean

Gets the mean for this distribution.
Declaration
public override double Mean { get; }
Property Value
Type Description
System.Double
Overrides
UnivariateDiscreteDistribution.Mean
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Minimum

Gets the minimum value of the distribution (a).
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Support

Gets the support interval for this distribution.
Declaration
public override IntRange Support { get; }
Property Value
Type Description
IntRange A DoubleRange containing the support interval for this distribution.
Overrides
UnivariateDiscreteDistribution.Support
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Variance

Gets the variance for this distribution.
Declaration
public override double Variance { get; }
Property Value
Type Description
System.Double
Overrides
UnivariateDiscreteDistribution.Variance
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)

Methods

| Improve this Doc View Source

Clone()

Creates a new object that is a copy of the current instance.
Declaration
public override object Clone()
Returns
Type Description
System.Object A new object that is a copy of this instance.
Overrides
DistributionBase.Clone()
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Generate(FastRandom)

Generates a random observation from the current distribution.
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
UnivariateDiscreteDistribution.Generate(FastRandom)
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Generate(Int32, Int32[], FastRandom)

Generates a random vector of observations from the current distribution.
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
UnivariateDiscreteDistribution.Generate(Int32, Int32[], FastRandom)
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

InnerDistributionFunction(Int32)

Gets the cumulative distribution function (cdf) for this distribution evaluated at point 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
UnivariateDiscreteDistribution.InnerDistributionFunction(Int32)
Remarks
The Cumulative Distribution Function (CDF) describes the cumulative probability that a given value or any value smaller than it will occur.
| Improve this Doc View Source

InnerLogProbabilityMassFunction(Int32)

Gets the log-probability mass function (pmf) for this distribution evaluated at point 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
UnivariateDiscreteDistribution.InnerLogProbabilityMassFunction(Int32)
Remarks
The Probability Mass Function (PMF) describes the probability that a given value k will occur.
| Improve this Doc View Source

InnerProbabilityMassFunction(Int32)

Gets the probability mass function (pmf) for this distribution evaluated at point 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
UnivariateDiscreteDistribution.InnerProbabilityMassFunction(Int32)
Remarks
The Probability Mass Function (PMF) describes the probability that a given value k will occur.
| Improve this Doc View Source

Random()

Generates a random observation from the Uniform distribution defined in the interval 0 and MAXVALUE.
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Random(FastRandom)

Generates a random observation from the Uniform distribution defined in the interval 0 and MAXVALUE.
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Random(Int32, FastRandom)

Generates a random observation from the Uniform distribution defined in the interval 0 and MAXVALUE.
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Random(Int32, Int32, FastRandom)

Generates a random observation from the Uniform distribution with the given parameters.
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Random(Int32, Int32, Int32, FastRandom)

Generates a random vector of observations from the Uniform distribution with the given parameters.
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Random(Int32, Int32, Int32, Int32[], FastRandom)

Generates a random vector of observations from the Uniform distribution with the given parameters.
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Random(Int32, Int32, Int32, Int32[])

Generates a random vector of observations from the Uniform distribution with the given parameters.
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Random(Int32, Int32, Int32)

Generates a random vector of observations from the Uniform distribution with the given parameters.
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Random(Int32, Int32)

Generates a random observation from the Uniform distribution with the given parameters.
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Random(Int32, Int32[], FastRandom)

Generates a random observation from the Uniform distribution defined in the interval 0 and MAXVALUE.
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Random(Int32, Int32[])

Generates a random observation from the Uniform distribution defined in the interval 0 and MAXVALUE.
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

Random(Int32)

Generates a random observation from the Uniform distribution defined in the interval 0 and MAXVALUE.
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)
| Improve this Doc View Source

ToString(String, IFormatProvider)

Returns a System.String that represents this instance.
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
DistributionBase.ToString(String, IFormatProvider)
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 non-parametric. 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:

  • Wikipedia, The Free Encyclopedia. Uniform distribution (discrete). Available on: http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)

Implements

System.IFormattable
IUnivariateDistribution<TObservation>
IUnivariateDistribution
IDistribution
System.ICloneable
IUnivariateDistribution<TObservation>
ISampleableDistribution<TObservations>
Mars.Common.Core.Random.IRandomNumberGenerator<T>
ISampleableDistribution<TObservations>
Mars.Common.Core.Random.IRandomNumberGenerator<T>

Extension Methods

Serializer.Save<T>(T, out Byte[], SerializerCompression)
Serializer.Save<T>(T, Stream, SerializerCompression)
Serializer.Save<T>(T, BinaryFormatter, Stream, SerializerCompression)
Serializer.Save<T>(T, String, SerializerCompression)
Serializer.Save<T>(T, String)
Matrix.Concatenate<T>(T, T[])
Matrix.Replace<T>(T, Object, Object)
DomainDataImporter.Import(Object, InputConfiguration)
ObjectSerialize.Serialize(Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © MARS GROUP. HAW Hamburg