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 GeometricProbabilityDistribution

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

    public class GeometricProbabilityDistribution

extends DiscreteProbabilityDistribution

Geometric probability distribution class.

Type I: models the number of trials needed to produce the first success
Type II: model the number of failures before the first success

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

Field Summary
`static int` | `TYPEI` models the number of trials needed to produce the first success
`static int` | `TYPEII` models the number of failures before the first success

Constructor Summary
`GeometricProbabilityDistribution(double p, int type)` Constructs a geometric probability distribution with the given success probability and type.

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 org.statcato.statistics.DiscreteProbabilityDistribution
`inverseCumulativeProbability`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TYPEI

    public static int TYPEI

  models the number of trials needed to produce the first success

### TYPEII

    public static int TYPEII

  models the number of failures before the first success

Constructor Detail

### GeometricProbabilityDistribution

    public GeometricProbabilityDistribution(double p,
                                            int type)

  Constructs a geometric probability distribution with the given success probability and type.

  Parameters:
    `p` - success probability
    `type` - TYPEI (models the number of trials needed to produce the first success) or TYPEII (model the number of failures before the first success)

Method Detail

### density

    public double density(double x)

  Returns the density of the distribution at x.

  Specified by:
    `density` in class `DiscreteProbabilityDistribution`
  Parameters:
    `x` - an integer
  Returns:
    probability density at x

### cumulativeProbability

    public double cumulativeProbability(double x)

  Returns the cumulative probabililty up to x.

  Specified by:
    `cumulativeProbability` in class `DiscreteProbabilityDistribution`
  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