MCPcopy Create free account
hub / github.com/Profactor/cv-plot / normal_quantile

Function normal_quantile

CvPlot/ext/catch2/inc/catch.hpp:7676–7690  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7674 }
7675
7676 double normal_quantile(double p) {
7677 static const double ROOT_TWO = std::sqrt(2.0);
7678
7679 double result = 0.0;
7680 assert(p >= 0 && p <= 1);
7681 if (p < 0 || p > 1) {
7682 return result;
7683 }
7684
7685 result = -erfc_inv(2.0 * p);
7686 // result *= normal distribution standard deviation (1.0) * sqrt(2)
7687 result *= /*sd * */ ROOT_TWO;
7688 // result += normal disttribution mean (0)
7689 return result;
7690 }
7691
7692 double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n) {
7693 double sb = stddev.point;

Callers 1

bootstrapFunction · 0.85

Calls 1

erfc_invFunction · 0.85

Tested by

no test coverage detected