How to scale a gamma distribution

4.6k Views Asked by At

I am trying to sample from a gamma distribution using transform sampling. All the example I have seen as in the Wikipedia, is on the range from 0 to 20. How can I scale or extend the distribution over, say 0 to 1000. So I need to maintain the curve for say (k=2, theta = 2) for a range of 0 to 1000.

1

There are 1 best solutions below

1
On BEST ANSWER

I'm a little unclear about what you're asking since the support for the distribution is $x \in (0,\infty)$. This is my attempt to provide what I think you are after.

The Gamma distribution has the cumulative distribution function

$$ F\left(x;k,\theta\right) = \frac{1}{\Gamma(k)}\gamma(k,\frac{x}{\theta}) \qquad \text{for }x\gt 0 \text{ and } k,\theta \gt 0 $$

where $\gamma$ is the lower incomplete gamma function

The Gamma distribution has the scaling property so that if $X$ is a random variable that follows a Gamma distribution, so does $cX$ for $c > 0$. To scale the distribution, multiply $\theta$ by $c$:

$$ cX \sim \text{Gamma}(k,c\theta) $$

So if you want it to scale a distribution with $k = 2$ and $\theta = 2$ to the range $(0,1000)$, you could multiply $\theta$ by $1000$.