From 2851fc340e1754a6a7f9d64917abc03cb7dbde67 Mon Sep 17 00:00:00 2001 From: theplatters Date: Thu, 14 Nov 2024 09:24:34 +0100 Subject: [PATCH 1/2] Update erlang.jl docstring --- src/univariate/continuous/erlang.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/univariate/continuous/erlang.jl b/src/univariate/continuous/erlang.jl index cd984415e0..773ca836a7 100644 --- a/src/univariate/continuous/erlang.jl +++ b/src/univariate/continuous/erlang.jl @@ -1,8 +1,13 @@ """ - Erlang(α,θ) + Erlang(a=1,s=1) The *Erlang distribution* is a special case of a [`Gamma`](@ref) distribution with integer shape parameter. +```math +f(x; a, s) = \\frac{x^{a-1} e^{-x/ s}}{(a-k)! s^a}, +\\quad x > 0 +``` + ```julia Erlang() # Erlang distribution with unit shape and unit scale, i.e. Erlang(1, 1) Erlang(a) # Erlang distribution with shape parameter a and unit scale, i.e. Erlang(a, 1) From 900584ba3197a5b8ef88904e4545a1564b7c3e24 Mon Sep 17 00:00:00 2001 From: theplatters Date: Thu, 14 Nov 2024 11:25:23 +0100 Subject: [PATCH 2/2] Update erlang.jl docstring to be consistent with gamma.jl --- src/univariate/continuous/erlang.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/univariate/continuous/erlang.jl b/src/univariate/continuous/erlang.jl index 773ca836a7..47343bf392 100644 --- a/src/univariate/continuous/erlang.jl +++ b/src/univariate/continuous/erlang.jl @@ -1,17 +1,17 @@ """ - Erlang(a=1,s=1) + Erlang(α=1,θ=1) The *Erlang distribution* is a special case of a [`Gamma`](@ref) distribution with integer shape parameter. ```math -f(x; a, s) = \\frac{x^{a-1} e^{-x/ s}}{(a-k)! s^a}, +f(x; α, θ) = \\frac{x^{α-1} e^{-x/ θ}}{(α-1)! θ^a}, \\quad x > 0 ``` ```julia Erlang() # Erlang distribution with unit shape and unit scale, i.e. Erlang(1, 1) -Erlang(a) # Erlang distribution with shape parameter a and unit scale, i.e. Erlang(a, 1) -Erlang(a, s) # Erlang distribution with shape parameter a and scale s +Erlang(α) # Erlang distribution with shape parameter a and unit scale, i.e. Erlang(a, 1) +Erlang(α, θ) # Erlang distribution with shape parameter a and scale s ``` External links