gov.sandia.cognition.statistics.distribution
Class UnivariateGaussian.CDF.Inverse

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.AbstractDistribution<NumberType>
          extended by gov.sandia.cognition.statistics.AbstractClosedFormUnivariateDistribution<Double>
              extended by gov.sandia.cognition.statistics.AbstractClosedFormSmoothUnivariateDistribution
                  extended by gov.sandia.cognition.statistics.distribution.UnivariateGaussian
                      extended by gov.sandia.cognition.statistics.distribution.UnivariateGaussian.CDF.Inverse
All Implemented Interfaces:
Evaluator<Double,Double>, Vectorizable, ScalarFunction<Double>, UnivariateScalarFunction, ClosedFormComputableDistribution<Double>, ClosedFormDistribution<Double>, ClosedFormUnivariateDistribution<Double>, ComputableDistribution<Double>, Distribution<Double>, DistributionWithMean<Double>, EstimableDistribution<Double,UnivariateGaussian>, SmoothUnivariateDistribution, UnivariateDistribution<Double>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
UnivariateGaussian.CDF

public static class UnivariateGaussian.CDF.Inverse
extends UnivariateGaussian
implements UnivariateScalarFunction

Inverts the CumulativeDistribution function. That is, we find the value of z such that p = Pr( x lessThan z ), where x is drawn from a normalized Gaussian. Uses a closed-form computation.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gov.sandia.cognition.statistics.distribution.UnivariateGaussian
UnivariateGaussian.CDF, UnivariateGaussian.ErrorFunction, UnivariateGaussian.IncrementalEstimator, UnivariateGaussian.MaximumLikelihoodEstimator, UnivariateGaussian.PDF, UnivariateGaussian.SufficientStatistic, UnivariateGaussian.WeightedMaximumLikelihoodEstimator
 
Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.distribution.UnivariateGaussian
BIG_Z, DEFAULT_MEAN, DEFAULT_VARIANCE, mean, PI2, SQRT2, variance
 
Constructor Summary
UnivariateGaussian.CDF.Inverse()
          Creates a new instance of UnivariateGaussian with zero mean and unit variance
UnivariateGaussian.CDF.Inverse(double mean, double variance)
          Creates a new instance of UnivariateGaussian
UnivariateGaussian.CDF.Inverse(UnivariateGaussian other)
          Copy constructor
 
Method Summary
 double evaluate(double p)
          Evaluates the Inverse UnivariateGaussian CDF for the given probability.
 Double evaluate(Double input)
          Evaluates the function on the given input and returns the output.
static double evaluate(double p, double mean, double variance)
          Evaluates the Inverse UnivariateGaussian CDF for the given probability.
 double evaluateAsDouble(Double input)
          Evaluates the scalar function as a double.
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.UnivariateGaussian
clone, convertFromVector, convertToVector, convolve, getCDF, getEstimator, getMaxSupport, getMean, getMinSupport, getProbabilityFunction, getVariance, sample, setMean, setVariance, times, toString
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractDistribution
sample
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 
Methods inherited from interface gov.sandia.cognition.statistics.Distribution
sample
 

Constructor Detail

UnivariateGaussian.CDF.Inverse

public UnivariateGaussian.CDF.Inverse()
Creates a new instance of UnivariateGaussian with zero mean and unit variance


UnivariateGaussian.CDF.Inverse

public UnivariateGaussian.CDF.Inverse(double mean,
                                      double variance)
Creates a new instance of UnivariateGaussian

Parameters:
mean - First central moment (expectation) of the distribution
variance - Second central moment (square of standard deviation) of the distribution

UnivariateGaussian.CDF.Inverse

public UnivariateGaussian.CDF.Inverse(UnivariateGaussian other)
Copy constructor

Parameters:
other - UnivariateGaussian to copy
Method Detail

evaluate

public Double evaluate(Double input)
Description copied from interface: Evaluator
Evaluates the function on the given input and returns the output.

Specified by:
evaluate in interface Evaluator<Double,Double>
Parameters:
input - The input to evaluate.
Returns:
The output produced by evaluating the input.

evaluateAsDouble

public double evaluateAsDouble(Double input)
Description copied from interface: ScalarFunction
Evaluates the scalar function as a double.

Specified by:
evaluateAsDouble in interface ScalarFunction<Double>
Parameters:
input - The input value.
Returns:
The scalar output calculated from the given input.

evaluate

public double evaluate(double p)
Evaluates the Inverse UnivariateGaussian CDF for the given probability. If you are using this method many times in a row, then use the two-argument method by caching the standard deviation.

Specified by:
evaluate in interface UnivariateScalarFunction
Parameters:
p - Value at which to solve for x such that x=CDF(p)
Returns:
Value of x such that x=CDF(p)

evaluate

public static double evaluate(double p,
                              double mean,
                              double variance)
Evaluates the Inverse UnivariateGaussian CDF for the given probability. This is faster than computing the single-argument evaluate() method.

Parameters:
p - Value at which to solve for x such that x=CDF(p)
mean - Mean of the distribution
variance - Variance of the distribution.
Returns:
Value of x such that x=CDF(p)