Is there a name for the following probability density function: $$ P(x) \propto \exp\left(-\frac{x^2}{2}\right) \cosh(\gamma x) $$ where $\gamma \ge 0$ and $x\in\mathbb{R}$?

Eventually my goal is to draw efficiently samples from $P(x)$. If this distribution does not have a name, any suggestions on how I can draw samples from it?


1 Answer 1


Since $$\cosh(\gamma x)=\dfrac{e^{\gamma x}+e^{-\gamma x}}{2}$$ one can rewrite the density as $$ p(x)\propto \exp(-{x^2}/{2}) \{e^{\gamma x}+e^{-\gamma x}\}\\ \propto e^{-x^2/2+\gamma x}+e^{-x^2/2-\gamma x}\\ \propto e^{-(x-\gamma)^2/2}+e^{-(x+\gamma)^2/2}\\ $$ therefore this distribution is simply a mixture of two Normal distributions, $\mathcal N(\gamma,1)$ and $\mathcal N(-\gamma,1)$, with equal weights. Simulation (based on this representation) is thus obvious.

  • 2
    $\begingroup$ Ah that's obvious, don't know how I missed that. Thanks! $\endgroup$
    – a06e
    Commented Nov 4, 2023 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.