# Binomial

``public enum Binomial``

Binomial distribution

• ``` cdf(k:n:probability:tail:) ```

Returns the cdf of the Binomial Distribution

#### Declaration

Swift

``public static func cdf<FPT>(k: Int, n: Int, probability p0: FPT, tail: SSCDFTail) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint``

#### Parameters

 ``` k ``` number of successes ``` n ``` number of trials ``` p0 ``` probability for success ``` tail ``` .lower, .upper
• ``` pdf(k:n:probability:) ```

Returns the pdf of the Binomial Distribution

#### Declaration

Swift

``public static func pdf<FPT>(k: Int, n: Int, probability p0: FPT) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint``

#### Parameters

 ``` k ``` number of successes ``` n ``` number of trials ``` p0 ``` probability for success
• ``` para(numberOfTrials:probability:) ```

Returns a SSProbDistParams struct containing mean, variance, kurtosis and skewness of the Binomial distribution.

Throws

SSSwiftyStatsError if a >= b || c <= a || c >= b

#### Declaration

Swift

``public static func para<FPT>(numberOfTrials n: Int, probability p0: FPT) throws -> SSProbDistParams<FPT> where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint``

#### Parameters

 ``` n ``` Number of trials ``` p0 ``` Probability for success