2

Is there an implementation of the Normal-Gamma distribution for Python? I have looked over the internet, including scipy, and could not find it.

Josh
  • 21
  • 1
  • 1
    Asking for libraries is considered off-topic. Consider rephrasing your question to ask how to accomplish what you have in mind of doing with an "implementation" of the Gamma-Normal. I'm sure someone will be glad to help, and if they happen to know an implementation they would point it out. – merv Nov 23 '20 at 22:41

1 Answers1

1

I am not aware of any package which implements it.
But since its building blocks are the Gamma Distribution and the Normal Distribution you may use them from SciPy.

For instance, in order to generate samples you may do (From Wikipedia - Normal Gamma Distribution):

  • Sample τ (\tau) from a gamma distribution with parameters α (\alpha) and β (\beta).
  • Sample x from a normal distribution with mean μ (\mu) and variance 1 / λ τ (1 / (\lambda \tau)).
Royi
  • 4,640
  • 6
  • 46
  • 64