MCPcopy Create free account
hub / github.com/Open-Quant/openquant / normal_pdf

Function normal_pdf

crates/openquant/src/bet_sizing.rs:429–433  ·  view source on GitHub ↗
(x: f64, mu: f64, sigma: f64)

Source from the content-addressed store, hash-verified

427}
428
429fn normal_pdf(x: f64, mu: f64, sigma: f64) -> f64 {
430 let s = sigma.max(1e-8);
431 let z = (x - mu) / s;
432 (-0.5 * z * z).exp() / (s * (2.0 * std::f64::consts::PI).sqrt())
433}
434
435fn fit_two_normal_mixture_em(
436 samples: &[f64],

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected