StandardNormal

public enum StandardNormal

Standard Gaussian distribution

  • Returns the CDF of the standard Gaussian distribution (mean = 0.0, standard deviation = 1.0)

    Declaration

    Swift

    public static func cdf<FPT>(u: FPT) -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint

    Parameters

    u

    Standardized variate (u = (x - mean)/sd)

  • Returns the PDF of the standard Gaussian distribution (mean = 0.0, standard deviation = 1.0)

    Declaration

    Swift

    public static func pdf<FPT>(u: FPT!) -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint

    Parameters

    u

    Standardized variate (u = (x - mean)/sd)

  • Returns the quantile function of the standard Gaussian distribution. Uses algorithm AS241 at http://lib.stat.cmu.edu/apstat/241 (ALGORITHM AS241 APPL. STATIST. (1988) VOL. 37, NO. 3, 477-484.)

    Throws

    SSSwiftyStatsError if p < 0.0 or p > 1

    Declaration

    Swift

    public static func quantile<T>(p: T) throws -> T where T : Decodable, T : Encodable, T : SSFloatingPoint

    Parameters

    p

    P