gov.sandia.cognition.statistics.method
Class ChebyshevInequality

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.method.ChebyshevInequality
All Implemented Interfaces:
ConfidenceIntervalEvaluator<Collection<Double>>, CloneableSerializable, Serializable, Cloneable

public class ChebyshevInequality
extends AbstractCloneableSerializable
implements ConfidenceIntervalEvaluator<Collection<Double>>

Computes the Chebyshev Inequality for the given level of confidence. Answers the question: "What range of values can a random variable take if I can estimate its mean and variance at least confidence percent of the time?" 1-confidence = Pr{ abs(X-mean(data)) >= a } <= variance(data) / a^2 -> Pr{ mean-a <= X <= mean+a } >= confidence

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

Field Summary
static ChebyshevInequality INSTANCE
          This class has no members, so here's a static instance.
 
Constructor Summary
ChebyshevInequality()
          Creates a new instance of ChebyshevInequality
 
Method Summary
 ConfidenceInterval computeConfidenceInterval(Collection<Double> data, double confidence)
          Computes the Chebyshev Inequality for the given level of confidence.
 ConfidenceInterval computeConfidenceInterval(double sampleMean, double sampleVariance, int numSamples, double confidence)
          Computes the Chebyshev Inequality for the given level of confidence.
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final ChebyshevInequality INSTANCE
This class has no members, so here's a static instance.

Constructor Detail

ChebyshevInequality

public ChebyshevInequality()
Creates a new instance of ChebyshevInequality

Method Detail

computeConfidenceInterval

public ConfidenceInterval computeConfidenceInterval(Collection<Double> data,
                                                    double confidence)
Computes the Chebyshev Inequality for the given level of confidence. Answers the question: "What range of values can a random variable take if I can estimate its mean and variance at least confidence percent of the time?" 1-confidence = Pr{ abs(X-mean(data)) >= a } <= variance(data) / a^2 -> Pr{ mean-a <= X <= mean+a } >= confidence

Specified by:
computeConfidenceInterval in interface ConfidenceIntervalEvaluator<Collection<Double>>
Parameters:
data - Data from which to estimate the mean and variance
confidence - Confidence value to find the range of values for
Returns:
ConfidenceInterval describing the worst-case range that ANY random variable can take at the given confidence value

computeConfidenceInterval

public ConfidenceInterval computeConfidenceInterval(double sampleMean,
                                                    double sampleVariance,
                                                    int numSamples,
                                                    double confidence)
Computes the Chebyshev Inequality for the given level of confidence.

Specified by:
computeConfidenceInterval in interface ConfidenceIntervalEvaluator<Collection<Double>>
Parameters:
sampleMean - The sample mean of the data
sampleVariance - The sample variance of the data
numSamples - The number of samples in the data
confidence - Confidence value to find the range of values for
Returns:
ConfidenceInterval describing the worst-case range that ANY random variable can take at the given confidence value