openGPMP
Open Source Mathematics Package
|
#include <probdist.hpp>
Public Member Functions | |
double | quantile_dist (double probability) |
Compute the quantile of the standard normal distribution. More... | |
double | normal_PDF (double x, double mean, double stddev) |
Compute the probability density function (PDF) for the normal distribution. More... | |
double | normal_CDF (double x, double mean, double stddev) |
Compute the cumulative distribution function (CDF) for the normal distribution. More... | |
double | uniform_CDF (size_t k, size_t n) |
Compute the cumulative distribution function (CDF) for the uniform distribution. More... | |
double | exp_PDF (double x, size_t k, double lambda) |
Compute the probability density function (PDF) for the exponential distribution. More... | |
double | emp_CDF (const std::vector< double > &data, double x) |
Compute the empirical cumulative distribution function (CDF) for a given value. More... | |
double | emp_PMF (const std::vector< double > &data, double x) |
Compute the empirical probability mass function (PMF) for a given value. More... | |
double | inverse_emp_CDF (const std::vector< double > &data, double p) |
Compute the inverse of the empirical cumulative distribution function (CDF) for a given probability. More... | |
double | mle (const std::vector< double > &data) |
Compute the Maximum Likelihood Estimate (MLE) for the mean of a dataset. More... | |
double | mom (const std::vector< double > &data) |
Compute the method of moments (MOM) estimate for the mean of a dataset. More... | |
double | mle_est (const std::vector< double > &data) |
Placeholder function for M-estimation. More... | |
double | mumv (const std::vector< double > &data) |
Compute the Mean-Unbiased Minimum-Variance (MUMV) estimate for the mean of a dataset. More... | |
double | median_uniased (const std::vector< double > &data) |
Compute the median-unbiased estimate for the median of a dataset. More... | |
std::pair< double, double > | ConfidenceInterval (const std::vector< double > &data, double alpha) |
Compute the confidence interval for the mean of a dataset. More... | |
double | Pivot (const std::vector< double > &data, double pivotFunction(const std::vector< double > &)) |
Compute the value of a pivot function for interval estimation. More... | |
double | PivotFunctionForConfidenceInterval (const std::vector< double > &data) |
Example pivot function for computing a confidence interval. More... | |
std::pair< double, double > | LikelihoodInterval (const std::vector< double > &data, double alpha) |
Compute the likelihood interval for a given dataset and significance level. More... | |
std::pair< double, double > | PredictionInterval (const std::vector< double > &data, double alpha) |
Compute the prediction interval for a given dataset and significance level. More... | |
std::pair< double, double > | ToleranceInterval (const std::vector< double > &data, double alpha) |
Compute the tolerance interval for a given dataset and significance level. More... | |
Definition at line 42 of file probdist.hpp.
std::pair< double, double > gpmp::stats::ProbDist::ConfidenceInterval | ( | const std::vector< double > & | data, |
double | alpha | ||
) |
Compute the confidence interval for the mean of a dataset.
data | The dataset |
alpha | The confidence level |
Definition at line 253 of file probdist.cpp.
References gpmp::stats::Describe::mean_arith(), and gpmp::stats::Describe::stdev().
double gpmp::stats::ProbDist::emp_CDF | ( | const std::vector< double > & | data, |
double | x | ||
) |
Compute the empirical cumulative distribution function (CDF) for a given value.
data | The dataset |
x | The value at which to evaluate the empirical CDF |
Definition at line 168 of file probdist.cpp.
double gpmp::stats::ProbDist::emp_PMF | ( | const std::vector< double > & | data, |
double | x | ||
) |
Compute the empirical probability mass function (PMF) for a given value.
data | The dataset |
x | The value at which to evaluate the empirical PMF |
Definition at line 180 of file probdist.cpp.
double gpmp::stats::ProbDist::exp_PDF | ( | double | x, |
size_t | k, | ||
double | lambda | ||
) |
Compute the probability density function (PDF) for the exponential distribution.
x | The value at which to evaluate the PDF |
k | The shape parameter of the distribution |
lambda | The rate parameter of the distribution |
Definition at line 150 of file probdist.cpp.
double gpmp::stats::ProbDist::inverse_emp_CDF | ( | const std::vector< double > & | data, |
double | p | ||
) |
Compute the inverse of the empirical cumulative distribution function (CDF) for a given probability.
data | The dataset |
p | The probability value between 0 and 1 |
Definition at line 186 of file probdist.cpp.
std::pair< double, double > gpmp::stats::ProbDist::LikelihoodInterval | ( | const std::vector< double > & | data, |
double | alpha | ||
) |
Compute the likelihood interval for a given dataset and significance level.
data | The dataset |
alpha | The significance level |
Definition at line 294 of file probdist.cpp.
double gpmp::stats::ProbDist::median_uniased | ( | const std::vector< double > & | data | ) |
Compute the median-unbiased estimate for the median of a dataset.
data | The dataset |
Definition at line 235 of file probdist.cpp.
double gpmp::stats::ProbDist::mle | ( | const std::vector< double > & | data | ) |
Compute the Maximum Likelihood Estimate (MLE) for the mean of a dataset.
data | The dataset |
Definition at line 199 of file probdist.cpp.
double gpmp::stats::ProbDist::mle_est | ( | const std::vector< double > & | data | ) |
Placeholder function for M-estimation.
data | The dataset |
Definition at line 220 of file probdist.cpp.
double gpmp::stats::ProbDist::mom | ( | const std::vector< double > & | data | ) |
Compute the method of moments (MOM) estimate for the mean of a dataset.
data | The dataset |
Definition at line 208 of file probdist.cpp.
References gpmp::stats::Describe::mean_arith(), and gpmp::stats::Describe::variance().
double gpmp::stats::ProbDist::mumv | ( | const std::vector< double > & | data | ) |
Compute the Mean-Unbiased Minimum-Variance (MUMV) estimate for the mean of a dataset.
data | The dataset |
Definition at line 226 of file probdist.cpp.
double gpmp::stats::ProbDist::normal_CDF | ( | double | x, |
double | mean, | ||
double | stddev | ||
) |
Compute the cumulative distribution function (CDF) for the normal distribution.
x | The value at which to evaluate the CDF |
mean | The mean of the distribution |
stddev | The standard deviation of the distribution |
Definition at line 135 of file probdist.cpp.
double gpmp::stats::ProbDist::normal_PDF | ( | double | x, |
double | mean, | ||
double | stddev | ||
) |
Compute the probability density function (PDF) for the normal distribution.
x | The value at which to evaluate the PDF |
mean | The mean of the distribution |
stddev | The standard deviation of the distribution |
Definition at line 127 of file probdist.cpp.
double gpmp::stats::ProbDist::Pivot | ( | const std::vector< double > & | data, |
double | pivotFunctionconst std::vector< double > & | ||
) |
Compute the value of a pivot function for interval estimation.
data | The dataset |
pivotFunction | The pivot function to evaluate |
Definition at line 271 of file probdist.cpp.
double gpmp::stats::ProbDist::PivotFunctionForConfidenceInterval | ( | const std::vector< double > & | data | ) |
Example pivot function for computing a confidence interval.
data | The dataset |
Definition at line 282 of file probdist.cpp.
References gpmp::stats::Describe::mean_arith(), and gpmp::stats::Describe::stdev().
std::pair< double, double > gpmp::stats::ProbDist::PredictionInterval | ( | const std::vector< double > & | data, |
double | alpha | ||
) |
Compute the prediction interval for a given dataset and significance level.
data | The dataset |
alpha | The significance level |
Definition at line 310 of file probdist.cpp.
double gpmp::stats::ProbDist::quantile_dist | ( | double | probability | ) |
Compute the quantile of the standard normal distribution.
probability | The probability value between 0 and 1 |
Definition at line 116 of file probdist.cpp.
References erfinv().
std::pair< double, double > gpmp::stats::ProbDist::ToleranceInterval | ( | const std::vector< double > & | data, |
double | alpha | ||
) |
Compute the tolerance interval for a given dataset and significance level.
data | The dataset |
alpha | The significance level |
Definition at line 324 of file probdist.cpp.
double gpmp::stats::ProbDist::uniform_CDF | ( | size_t | k, |
size_t | n | ||
) |
Compute the cumulative distribution function (CDF) for the uniform distribution.
k | The value at which to evaluate the CDF |
n | The maximum value in the uniform distribution |
Definition at line 142 of file probdist.cpp.