Gamma
public enum Gamma
Gamma distribution
-
Returns a SSProbDistParams struct containing mean, variance, kurtosis and skewness of the Gamma distribution.
Throws
SSSwiftyStatsError if a <= 0 || b <= 0Declaration
Swift
public static func para<FPT>(shape a: FPT, scale b: FPT) throws -> SSProbDistParams<FPT> where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint
Parameters
a
Shape parameter
b
Scale parameter
-
Returns the pdf of the Gamma distribution.
Throws
SSSwiftyStatsError if a <= 0 || b <= 0Declaration
Swift
public static func pdf<FPT>(x: FPT, shape a: FPT, scale b: FPT) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint
Parameters
x
x
a
Shape parameter
b
Scale parameter
-
Returns the cdf of the Gamma distribution.
Throws
SSSwiftyStatsError if a <= 0 || b <= 0Declaration
Swift
public static func cdf<FPT>(x: FPT, shape a: FPT, scale b: FPT) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint
Parameters
x
x
a
Shape parameter
b
Scale parameter
-
Returns the quantile of the Gamma distribution.
Throws
SSSwiftyStatsError if a <= 0 || b <= 0 || p < 0 || p > 1Declaration
Swift
public static func quantile<FPT>(p: FPT, shape a: FPT, scale b: FPT) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint
Parameters
p
p
a
Shape parameter
b
Scale parameter