Closed fpmenninger closed 6 years ago
All looks fine to me according to Wikipedia.
using Plots, Distributions
using SpecialFunctions
g = Gamma(3,3)
x=range(0, stop=3, length=50)
plot(x, [pdf(g,i) for i in x], lw=2)
f(x, k=3.0, θ = 3.0) = 1/gamma(k)*θ^-k * x^(k-1) * exp(-x/θ)
plot!(x, [f(i) for i in x], linestyle=:dash, lw=2)
Do you have a different parametrization in mind (the second parameter in Julia is scale).
help?> Gamma
Gamma(α,θ)
The Gamma distribution with shape parameter α and scale θ has probability
density function
Got it. Using theta (scale) and wanting beta (rate). Thanks.
looking at :
results in a graph that instead of tapering to a thin tail at x=3, is just beginning to crest at x=3 (about where x=0.6 on the correct graph with the thin tail).