ChiSquare
public enum ChiSquare
Chi square distribution
-
Returns a SSProbDistParams struct containing mean, variance, kurtosis and skewness of the Chi^2 distribution.
Throws
SSSwiftyStatsError if df <= 0Declaration
Swift
public static func para<FPT>(degreesOfFreedom df: FPT) throws -> SSProbDistParams<FPT> where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint
Parameters
df
Degrees of freedom
-
Returns the pdf of the Chi^2 distribution.
Throws
SSSwiftyStatsError if df <= 0Declaration
Swift
public static func pdf<FPT>(chi: FPT, degreesOfFreedom df: FPT) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint
Parameters
chi
Chi
df
Degrees of freedom
-
Returns the cdf of the Chi^2 distribution.
Throws
SSSwiftyStatsError if df <= 0Declaration
Swift
public static func cdf<FPT>(chi: FPT, degreesOfFreedom df: FPT, tail: SSCDFTail = .lower, rlog: Bool = false) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint
Parameters
chi
Chi
df
Degrees of freedom
-
Returns the p-quantile of the Chi^2 distribution.
Throws
SSSwiftyStatsError if df <= 0Declaration
Swift
public static func quantile<FPT>(p: FPT, degreesOfFreedom df: FPT) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint
Parameters
p
p
df
Degrees of freedom