org.statcato.statistics
Class IntegerProbabilityDistribution

java.lang.Object
  extended by org.statcato.statistics.IntegerProbabilityDistribution

public class IntegerProbabilityDistribution
extends java.lang.Object

Integer probability distribution class. Discrete uniform probability distribution, where each integer in a specific interval has the same probability of occurring.

Since:
1.0
Version:
%I%, %G%
Author:
Margaret Yau

Constructor Summary
IntegerProbabilityDistribution(int min, int max)
          Constructs an Integer probability distribution with the given minimum and maximum values.
 
Method Summary
 double cumulativeProbability(double x)
          Returns the cumulative probabililty up to x.
 double density(double x)
          Returns the density of the distribution at x.
 java.lang.Integer inverseCumulativeProbability(double area)
          Returns the inverse cumulative probability.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerProbabilityDistribution

public IntegerProbabilityDistribution(int min,
                                      int max)
Constructs an Integer probability distribution with the given minimum and maximum values.

Parameters:
min - minimum
max - maximum
Method Detail

density

public double density(double x)
Returns the density of the distribution at x.

Parameters:
x - an integer
Returns:
probability density at x

cumulativeProbability

public double cumulativeProbability(double x)
Returns the cumulative probabililty up to x.

Parameters:
x - an integer
Returns:
cumulative probability P(<=x)

inverseCumulativeProbability

public java.lang.Integer inverseCumulativeProbability(double area)
Returns the inverse cumulative probability.

Parameters:
area - cumulative probability
Returns:
inverse cumulative probability