gov.sandia.cognition.statistics.bayesian
Class BayesianCredibleInterval

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.method.ConfidenceInterval
          extended by gov.sandia.cognition.statistics.bayesian.BayesianCredibleInterval
All Implemented Interfaces:
CloneableSerializable, Serializable, Cloneable

@PublicationReference(author="Wikipedia",
                      title="Credible interval",
                      type=WebPage,
                      year=2010,
                      url="http://en.wikipedia.org/wiki/Credible_interval")
public class BayesianCredibleInterval
extends ConfidenceInterval

A Bayesian credible interval defines a bound that a scalar parameter is within the given interval. This is the Bayesian analogue to the frequentist notion of a confidence interval.

Since:
3.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Constructor Summary
BayesianCredibleInterval(double median, double lowerBound, double upperBound, double confidence)
          Creates a new instance of ConfidenceInterval
 
Method Summary
static
<NumberType extends Number>
BayesianCredibleInterval
compute(UnivariateDistribution<NumberType> distribution, double confidence)
          Creates a Bayesian credible interval by inverting the given CDF.
 
Methods inherited from class gov.sandia.cognition.statistics.method.ConfidenceInterval
getCentralValue, getConfidence, getLowerBound, getNumSamples, getUpperBound, setCentralValue, setConfidence, setLowerBound, setNumSamples, setUpperBound, toString, withinInterval
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BayesianCredibleInterval

public BayesianCredibleInterval(double median,
                                double lowerBound,
                                double upperBound,
                                double confidence)
Creates a new instance of ConfidenceInterval

Parameters:
median - Median value of the parameter
lowerBound - Lower bound for the parameter
upperBound - Upper bound for the parameter
confidence - Confidence that the parameter is within the bound, or 1-pvalue, on the interval [0,1], where confidence=0 means the bound will be zero, while confidence=1 means that the confidence bound will be the entire support of the underlying distribution.
Method Detail

compute

public static <NumberType extends Number> BayesianCredibleInterval compute(UnivariateDistribution<NumberType> distribution,
                                                                           double confidence)
Creates a Bayesian credible interval by inverting the given CDF.

Type Parameters:
NumberType - Type of number to consider
Parameters:
distribution - Distribution to compute the credible interval of, typically the posterior from a Bayesian estimation algorithm.
confidence - Confidence that the parameter is within the bound, or 1-pvalue, on the interval [0,1], where confidence=0 means the bound will be zero, while confidence=1 means that the confidence bound will be the entire support of the underlying distribution.
Returns:
Confidence interval of the parameter given the distribution