LogNormal

public class LogNormal : ContinuousDistribution

The log-normal continuous distribution.

Three constructors are provided.

There are two parameter-based constructors; both take the mean of the distribution on the log scale. One constructor takes the variance of the distribution on the log scale, and the other takes the standard deviation on the log scale. See LogNormal.init(meanLog:varianceLog:) and LogNormal.init(meanLog:sdLog:).

One data-based constructor is provided. Given an array of sample values, a log-normal distribution will be created parameterised by the mean and variance of the sample data.

  • Constructor that takes the mean and the variance of the distribution under the log scale.

    Declaration

    Swift

    public init(meanLog: Double, varianceLog: Double)
  • Constructor that takes the mean and the standard deviation of the distribution under the log scale.

    Declaration

    Swift

    public convenience init(meanLog: Double, sdLog: Double)
  • Constructor that takes sample data and uses the the mean and the standard deviation of the sample data under the log scale.

    Declaration

    Swift

    public convenience init?(data: [Double])
  • Undocumented

    Declaration

    Swift

    public func pdf(_ x: Double) -> Double
  • Undocumented

    Declaration

    Swift

    public func cdf(_ x: Double) -> Double
  • Undocumented

    Declaration

    Swift

    public func quantile(_ p: Double) -> Double