Abstract:Algorithms for generating random numbers that follow a gamma distribution with shape parameter less than unity are proposed. Acceptance-rejection algorithms are developed, based on the generalized exponential distribution. The squeeze technique is applied to our method, and then piecewise envelope functions are further considered. The proposed methods are excellent in acceptance efficiency and promising in speed.
What problem does this paper attempt to address?
The problem that this paper attempts to solve is how to efficiently generate gamma - distributed random numbers with a shape parameter less than 1. Specifically, the author proposes an acceptance - rejection algorithm based on the Generalized Exponential Distribution (GE), combined with the squeeze technique and piecewise envelope functions, to improve the generation efficiency and speed.
### Problem Background
The gamma distribution is one of the most important probability distributions in statistics and is widely used in natural sciences, engineering, and social sciences, etc. The probability density function of the gamma distribution is defined as:
\[ f_{GA}(x; \alpha, \lambda) = \frac{1}{\lambda^\alpha \Gamma(\alpha)} x^{\alpha - 1}e^{-x/\lambda} \quad (x\geq0) \]
where \(\alpha(> 0)\) is the shape parameter, \(\lambda(> 0)\) is the scale parameter, and \(\Gamma(x)\) is the gamma function.
When the shape parameter \(\alpha < 1\), the gamma distribution monotonically decreases from positive infinity at \(x = 0\) to zero as \(x\rightarrow\infty\). Generating random numbers of the gamma distribution in this case is an important statistical computing problem because traditional generation methods are less efficient in this case.
### Solution
In order to efficiently generate gamma - distributed random numbers with a shape parameter less than 1, the author proposes the following improvement methods:
1. **Basic Algorithm**: Construct an acceptance - rejection algorithm based on the Generalized Exponential Distribution (GE distribution). By comparing the probability density functions of the gamma distribution and the Generalized Exponential Distribution, use another uniformly distributed random variable to evaluate the acceptance condition.
2. **Squeeze Technique**: To avoid performing power and exponential operations in each iteration, the squeeze technique is introduced, using inequalities to simplify the judgment of the acceptance condition.
3. **Piecewise Envelope Function**: Divide the envelope function into two parts, use the Generalized Exponential Distribution on the left side of the switching point \(x = s\), and use the exponential tail on the right side. This can further improve the acceptance rate.
### Performance Evaluation
The author conducted numerical tests on the proposed algorithm and compared it with some existing classical algorithms. The results show that the newly proposed algorithm has a significant improvement in generation efficiency and speed. In particular, Algorithm 2 is optimal in most cases, and Algorithm 3 performs better when generating a large number of random numbers at one time.
### Conclusion
This paper proposes an efficient gamma - distributed random number generator, which is suitable for the case where the shape parameter is less than 1. By combining the Generalized Exponential Distribution, the squeeze technique, and the piecewise envelope function, the new algorithm is superior to many existing methods in performance. These methods are not only simple and easy to implement but also perform well in different compiler environments and have broad application prospects.