Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update erlang.jl docstring #1915

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/univariate/continuous/erlang.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
"""
Erlang(α)
Erlang(α=1,θ=1)

The *Erlang distribution* is a special case of a [`Gamma`](@ref) distribution with integer shape parameter.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The *Erlang distribution* is a special case of a [`Gamma`](@ref) distribution with integer shape parameter.
The *Erlang distribution* is a special case of a [`Gamma`](@ref) distribution with integer shape parameter α and scale parameter θ.


```math
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
Expand Down
Loading