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
-
-
Field Summary
Fields Modifier and Type Field and Description static intTYPEImodels the number of trials needed to produce the first successstatic intTYPEIImodels the number of failures before the first success
-
Constructor Summary
Constructors Constructor and Description GeometricProbabilityDistribution(double p, int type)Constructs a geometric probability distribution with the given success probability and type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecumulativeProbability(double x)Returns the cumulative probabililty up to x.doubledensity(double x)Returns the density of the distribution at x.java.lang.DoubleinverseCumulativeProbability(double area)Returns the inverse cumulative probability.-
Methods inherited from class org.statcato.statistics.DiscreteProbabilityDistribution
inverseCumulativeProbability
-
-
-
-
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 probabilitytype- 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:
densityin classDiscreteProbabilityDistribution- Parameters:
x- an integer- Returns:
- probability density at x
-
cumulativeProbability
public double cumulativeProbability(double x)
Returns the cumulative probabililty up to x.- Specified by:
cumulativeProbabilityin classDiscreteProbabilityDistribution- 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
-
-
DMelt 3.0 © DataMelt by jWork.ORG