ContinuousDistribution.GetExpectedHistogram Method

Definition

Namespace: Numerics.NET.Statistics.Distributions
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3

Overload List

GetExpectedHistogram(Double[], Double) Gets a vector containing a histogram of the expected number of samples for a given total number of samples.
GetExpectedHistogram(IntervalIndex<Double>, Double) Gets a vector containing a histogram of the expected number of samples for a given total number of samples.
GetExpectedHistogram(Double, Double, Int32, Double) Gets a vector whose bins contain the expected number of samples for a given total number of samples.

GetExpectedHistogram(Double[], Double)

Gets a vector containing a histogram of the expected number of samples for a given total number of samples.
C#
public Histogram<Interval<double>> GetExpectedHistogram(
	double[] bounds,
	double numberOfSamples
)

Parameters

bounds  Double[]
An array of double-precision floating-point numbers specifying the lower bounds of the bins and the upper bound of the last bin.
numberOfSamples  Double
The total number of samples.

Return Value

Histogram<Interval<Double>>
A vector.

Remarks

This method constructs a vector with bounds specified by the bounds parameter. The elements of this array must be in ascending order.

The total in each bin is the expectation value of the number of samples in the bin when numberOfSamples samples are taken from the distribution.

Exceptions

ArgumentNullException

bounds is null.

ArgumentException

The elements of bounds are not in ascending order.

GetExpectedHistogram(IntervalIndex<Double>, Double)

Gets a vector containing a histogram of the expected number of samples for a given total number of samples.
C#
public Histogram<Interval<double>> GetExpectedHistogram(
	IntervalIndex<double> index,
	double numberOfSamples
)

Parameters

index  IntervalIndex<Double>
An interval index that specifies the bins for the histogram.
numberOfSamples  Double
The total number of samples.

Return Value

Histogram<Interval<Double>>
A vector.

Remarks

This method constructs a vector with bounds specified by the index parameter.

The total in each bin is the expectation value of the number of samples in the bin when numberOfSamples samples are taken from the distribution.

Exceptions

ArgumentNullException

index is null.

GetExpectedHistogram(Double, Double, Int32, Double)

Gets a vector whose bins contain the expected number of samples for a given total number of samples.
C#
public Histogram<Interval<double>> GetExpectedHistogram(
	double lowerBound,
	double upperBound,
	int numberOfBins,
	double numberOfSamples
)

Parameters

lowerBound  Double
The lower bound of the histogram.
upperBound  Double
The upper bound of the histogram.
numberOfBins  Int32
The number of bins.
numberOfSamples  Double
The total number of samples.

Return Value

Histogram<Interval<Double>>
A vector.

Remarks

This method constructs a vector with the specified number of bins divided equaly from lowerBound to upperBound.

The total in each bin is the expectation value of the number of samples in the bin when numberOfSamples samples are taken from the distribution.

Exceptions

ArgumentOutOfRangeException

numberOfBins is less than or equal to zero.

ArgumentException

upperBound is less than lowerBound.

See Also