Poisson
public enum Poisson
Poisson distribution
-
Returns a SSProbDistParams struct containing mean, variance, kurtosis and skewness of the Binomial distribution.
Throws
SSSwiftyStatsError if lambda <= 0, n < 0Declaration
Swift
public static func para<FPT>(numberOfEvents n: Int, rate lambda: FPT) throws -> SSProbDistParams<FPT> where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint
Parameters
n
Number of events
lambda
rate
-
Returns the cdf of the Poisson Distribution
Throws
SSSwiftyStatsError if lambda <= 0, k < 0Declaration
Swift
public static func cdf<FPT>(k: Int, rate lambda: FPT, tail: SSCDFTail) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint
Parameters
k
number of events
lambda
rate
tail
.lower, .upper
-
Returns the pdf of the Poisson Distribution
Throws
SSSwiftyStatsError if lambda <= 0, k < 0Declaration
Swift
public static func pdf<FPT>(k: Int, rate lambda: FPT) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint
Parameters
k
number of events
lambda
rate