To Clarify i am trying to generate a random variable from a gamma pdf
If $\Delta X$ indicates a random increment and it is said that $\Delta X$ follows a Gamma distribution.
What would that mean exactly? How would you be able to get random variables from the Gamma distribution?
So far I understood the following, but am guessing this might be wrong:
$$ X\sim \Gamma(\alpha,\beta)\equiv\operatorname{\Gamma}(\alpha,\beta)$$
This means $X$ follows a Gamma distribution so $\Delta X$ is a kind of sum of the different values $X$ takes at every iteration
$$g(x;\alpha, \beta) = \frac{\beta^\alpha x^{\alpha-1}e^{-x\beta}}{\Gamma(\alpha)}, \text{ for } x\geqslant 0\text{ and } \alpha,\beta>0 $$
so $X$ is represented by $x$ in the Gamma pdf, meaning I should put the value of $X$ for $x$ when computing the value of $X$ from the Gamma pdf?
It sounds like you want to generate gamma-distributed random variables. If you want to write the code yourself, the way I know how is using the acceptance-rejection method by first generating an exponentially-distributed RV. An exponential random variable $G$ with pdf $\lambda \mathrm e^{-\lambda g}$ may be generated by first generating a uniform(0,1) random variable $U$ and applying the inverse transformation $$ G = -\frac{1}{\lambda}\log(1-U). $$ To generate a $gamma(\alpha,\beta)$-ditributed random variable, choose $\lambda = \frac{\alpha}{\beta}$ above and then use the acceptance-rejection method.
OTOH most scientific software includes these methods. E.g. MATLAB's
gaminv(p,a,b)could be used where $p$ is a uniform(0,1), $a = \alpha$ and $b = \frac{1}{\beta}$ (MATLAB uses the "other" version of the pdf you've given). For example if you want to generate $1000$ gamma(2,3) random variables: