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