MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / normal_quantile

Function normal_quantile

extlibs/catch/include/catch/catch.hpp:7453–7467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7451 }
7452
7453 double normal_quantile(double p) {
7454 static const double ROOT_TWO = std::sqrt(2.0);
7455
7456 double result = 0.0;
7457 assert(p >= 0 && p <= 1);
7458 if (p < 0 || p > 1) {
7459 return result;
7460 }
7461
7462 result = -erfc_inv(2.0 * p);
7463 // result *= normal distribution standard deviation (1.0) * sqrt(2)
7464 result *= /*sd * */ ROOT_TWO;
7465 // result += normal disttribution mean (0)
7466 return result;
7467 }
7468
7469 double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n) {
7470 double sb = stddev.point;

Callers 1

bootstrapFunction · 0.85

Calls 1

erfc_invFunction · 0.85

Tested by

no test coverage detected