Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.statcato.statistics
Class DiscreteProbabilityDistribution

    java.lang.Object
      org.statcato.statistics.DiscreteProbabilityDistribution

Direct Known Subclasses:
  BinomialProbabilityDistribution, GeometricProbabilityDistribution, PoissonProbabilityDistribution

    public abstract class DiscreteProbabilityDistribution

extends java.lang.Object

Abtract base class for different types of discrete probability distributions. Subclasses must implement density and cumulativeProbability methods.

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

Constructor Summary
`DiscreteProbabilityDistribution()`

Method Summary
`abstract double` | `cumulativeProbability(double x)` Returns the cumulative probabililty up to x.
`abstract double` | `density(double x)` Returns the density of the distribution at x.
`java.lang.Double` | `inverseCumulativeProbability(double x1, double x2, double tol, 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

### DiscreteProbabilityDistribution

    public DiscreteProbabilityDistribution()

Method Detail

### density

    public abstract double density(double x)

  Returns the density of the distribution at x.

  Parameters:
    `x` -
  Returns:
    probability density at x

### cumulativeProbability

    public abstract double cumulativeProbability(double x)

  Returns the cumulative probabililty up to x.

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

### inverseCumulativeProbability

    public java.lang.Double inverseCumulativeProbability(double x1,
                                                         double x2,
                                                         double tol,
                                                         double area)

  Returns the inverse cumulative probability. Uses the Brent's method to find a root between x1 and x2 that gives a cumulative probability of area with an accuracy within tol tolerance.

  Parameters:
    `x1` - lower bound of root
    `x2` - upper bound of root
    `tol` - tolerance
    `area` - cumulative probability
  Returns:
    inverse cumulative probability

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD