Get range around median containing specified percentage of values.

Namespace:  AForge.Math
Assembly:  AForge.Math (in AForge.Math.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public IntRange GetRange(
	double percent
)

Parameters

percent
Type: System..::.Double
Values percentage around median.

Return Value

Returns the range which containes specifies percentage of values.

Remarks

The method calculates range of stochastic variable, which summary probability comprises the specified percentage of histogram's hits.

Sample usage:

CopyC#
// create histogram
Histogram histogram = new Histogram( new int[10] { 0, 0, 1, 3, 6, 8, 11, 0, 0, 0 } );
// get 50% range
IntRange range = histogram.GetRange( 0.5 );
// show the range ([4, 6])
Console.WriteLine( "50% range = [" + range.Min + ", " + range.Max + "]" );

See Also