Module log_normal

Module log_normal 

Source
Expand description

LogNormal Distribution Module containing functions to the log Normal Distribution.

Implemented by statrs::distribution::LogNormal.

The log Normal Distribution has two parameters:

μ: μ ∈ R (real numbers) σ: 0 < σ (rate)

Usage:

log_normal_pdf(x, μ, σ)
log_normal_ln_pdf(x, μ, σ)
log_normal_cdf(x, μ, σ)
log_normal_sf(x, μ, σ)

with

x: (-∞, +∞) Float64/DOUBLE,
μ: (-∞, +∞) Float64/DOUBLE,
σ: (0, +∞) Float64/DOUBLE

Examples

#[tokio::main(flavor = "current_thread")]
async fn main() -> std::io::Result<()> {
    let mut ctx = datafusion::prelude::SessionContext::new();
    datafusion_statrs::distribution::log_normal::register(&mut ctx)?;
    ctx.sql("SELECT log_normal_pdf(1.1, 9.0, 1.0)").await?
       .show().await?;
    Ok(())
}

Functions§

cdf
ScalarUDF for the log-Normal CDF
ln_pdf
ScalarUDF for the log-Normal log PDF
pdf
ScalarUDF for the log-Normal PDF
register
Register the functions for the log-Normal Distribution
sf
ScalarUDF for the log-Normal SF