StudentT
public enum StudentT
Student T distribution
-
Returns a SSProbDistParams struct containing mean, variance, kurtosis and skewness of the Student’s T 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 Student’s t-distribution
Throws
SSSwiftyStatsError if df <= 0Declaration
Swift
public static func pdf<FPT>(t: FPT, degreesOfFreedom df: FPT, rlog: Bool! = false) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint
Parameters
t
t
df
Degrees of freedom
rlog
Return log(T_PDF(t, df))
-
Returns the cdf of Student’s t-distribution
Throws
SSSwiftyStatsError if df <= 0Declaration
Swift
public static func cdf<FPT>(t: FPT, degreesOfFreedom df: FPT) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint
Parameters
t
t
df
Degrees of freedom
-
Returns the quantile function of Student’s t-distribution adapted from: http://rapidq.phatcode.net/examples/Math
Throws
SSSwiftyStatsError if df <= 0 or/and p < 0 or p > 1.0Note
Bisection
Declaration
Swift
public static func quantile<FPT>(p: FPT, degreesOfFreedom df: FPT) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint
Parameters
p
Probability
df
Degrees of freedom