ADDM.cpp
Loading...
Searching...
No Matches
stats.h
Go to the documentation of this file.
1#ifndef STATS_H
2#define STATS_H
3
4#include <boost/math/distributions/normal.hpp>
5
14inline double probabilityDensityFunction(float mean, float sigma, float x) {
15 boost::math::normal_distribution<double> dist(mean, sigma);
16 double pdf = boost::math::pdf(dist, x);
17 return pdf;
18}
19
28inline double cumulativeDensityFunction(float mean, float sigma, float x) {
29 boost::math::normal_distribution<double> dist(mean, sigma);
30 double cdf = boost::math::cdf(dist, x);
31 return cdf;
32}
33
34#endif
double probabilityDensityFunction(float mean, float sigma, float x)
Compute the probability density function provided mean and standard deviation.
Definition stats.h:14
double cumulativeDensityFunction(float mean, float sigma, float x)
Compute the cumulative density function provided mean and standard deviation.
Definition stats.h:28