Report a bug
If you spot a problem with this page, click here to create a GitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
mir.stat.distribution.normal
Normal Distribution
Copyright:
Based on the CEPHES math library, which is
Copyright (C) 1994 Stephen L. Moshier (moshier@world.std.com).
Authors:
Stephen L. Moshier, ported to D by Don Clugston and David Nadlinger. Adopted to Mir by Ilya Yaroshenko.
This module contains algorithms for the Normal Distribution.
License:
Authors:
John Michael Hall
- public import mir.math.func.normal :
normalPDF
,normalCDF
,normalInvCDF
; - pure nothrow @nogc @safe T
normalCCDF
(T)(const Tx
, const Tmean
, const TstdDev
)
if (isFloatingPoint!T);
pure nothrow @nogc @safe TnormalCCDF
(T)(const Ta
)
if (isFloatingPoint!T); - Computes the normal complementary cumulative distribution function (CCDF)Parameters:
T x
value to evaluate CCDF T mean
mean T stdDev
standard deviation See Also:Examples:import mir.math.common: approxEqual; assert(0.5.normalCCDF.approxEqual(1 - normalCDF(0.5))); assert(0.5.normalCCDF(0, 1.5).approxEqual(1 - normalCDF(0.5, 0, 1.5))); assert(1.5.normalCCDF(1, 3).approxEqual(1 - normalCDF(1.5, 1, 3)));
- pure nothrow @nogc @safe T
normalLPDF
(T)(const Tx
, const Tmean
, const TstdDev
)
if (isFloatingPoint!T);
pure nothrow @nogc @safe TnormalLPDF
(T)(const Tx
)
if (isFloatingPoint!T); - Computes the normal log probability density function (LPDF)Parameters:
T x
value to evaluate LPDF T mean
mean T stdDev
standard deviation See Also:Examples:import mir.math.common: approxEqual, log; assert(0.5.normalLPDF.approxEqual(log(normalPDF(0.5)))); assert(0.5.normalLPDF(0, 1.5).approxEqual(log(normalPDF(0.5, 0, 1.5)))); assert(1.5.normalLPDF(1, 3).approxEqual(log(normalPDF(1.5, 1, 3))));
Copyright © 2016-2023 by Ilya Yaroshenko | Page generated by
Ddoc on Wed Oct 18 12:23:06 2023