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 DiscreteCustomProbabilityDistribution

    java.lang.Object
      org.statcato.statistics.DiscreteCustomProbabilityDistribution

    public class DiscreteCustomProbabilityDistribution

extends java.lang.Object

Discrete probability distribution class with user-specified probabilities for discrete values.

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

Constructor Summary
`DiscreteCustomProbabilityDistribution(java.util.Vector<java.lang.Double> values, java.util.Vector<java.lang.Double> probabilities)` Construct a discrete probability distribution with custom values and probabilities.

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.Double` | `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

### DiscreteCustomProbabilityDistribution

    public DiscreteCustomProbabilityDistribution(java.util.Vector<java.lang.Double> values,
                                                 java.util.Vector<java.lang.Double> probabilities)

  Construct a discrete probability distribution with custom values and probabilities.

  Parameters:
    `values` - a vector of values
    `probabilities` - a vector of probabilities corresponding to the values

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` -
  Returns:
    cumulative probability P(<=x)

### inverseCumulativeProbability

    public java.lang.Double inverseCumulativeProbability(double area)

  Returns the inverse cumulative probability.

  Parameters:
    `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