Page 86 - DCAP601_SIMULATION_AND_MODELING
P. 86

Simulation and Modelling



                      Notes         As an instance of the rejection method, consider the logistic distribution  as a hurdle for the
                                    standard normal. From discrete choice methods, it is identified that binary probit and binary
                                    logit are very comparable , so the logistic may be a fine candidate that can be reversed logically.
                                                                                 2 2
                                    The logistic distribution with scale zero and variance   /3 has cdf:
                                                                 G(x) = [1 + exp(–x/)]  .
                                                                                  –1
                                                               –1
                                                                                              –1
                                    The matching thickness is g(x) =  G(x)[1 – G(x)] and the quantiles are G (u) = – log[(1 – u)/u].
                                    Execution needs a pick for the scaling parameter  c in (1) and the discrepancy of the logistic
                                    distribution during , such that the rejection probability is (approximately) diminished. Devroye
                                    demonstrates the principle of how these  parameters can  be calculated.  Following this,  we
                                    maximize f(x)/g (x), or more expediently, d(x) = log f(x) – log g (x) to locate one solution at zero
                                                                                      
                                    for   0.71. For lesser ’s, zero is a local minimum. Solving numerically, it is found that min
                                                                                                                
                                    max  d(x) is at x  = 0.98226 when   = 0.65. The value of c is then f(x )/g (x ) = 1.081. This shows
                                        x        m             m                         m  m  m
                                    a rejection algorithm:
                                          repeat
                                                w  = log(u ), w  = log(1 – u )
                                                 1      1   2        1
                                                v = 0.65 _ (w  – w );
                                                          1   2
                                          until log(u ) + w  + w  + log(1.081/0.65) < –v /2 “ log(2)/2 return v.                          (5)
                                                                              2
                                                  2    1   2
                                    It will be slower than (4), as it needs at least two uniforms and three logarithms for each standard
                                    normal.
                                    There is a large journalism on the generation of non-uniform random numbers.

                                    Efficient Methods for the Standard Normal Distribution

                                    The abovementioned  polar  technique  is simple  to execute, but not  chiefly fast. Due to  the
                                    significance of  the  normal  distribution, many  more  well-organized  methods  have  been
                                    anticipated. The method of Wallace (1996) is attractive, as it generates normal random numbers
                                    directly, in addition to being very well-organized. Though, due to this it is also rather harder to
                                    understand the properties of this technique.
                                    Perhaps the fastest obtainable rejection method at the moment is the so called ‘ziggurat method,’
                                    commenced by Marsaglia and Tsang (1984) and consequently refined (Marsaglia and Tsang,
                                    2000). This technique has some scarcities, which were corrected by Doornik (2005b) at the cost of
                                    some of its speed.
                                    The ziggurat partitions the standard normal thickness into horizontal blocks of equal area. The
                                                                            2
                                    standardization can be mislaid, using f(x) = exp(–x /2) as an alternative. All blocks are rectangular
                                    boxes, apart from the bottom  one, which  includes a  box joined  with the  remainder of  the
                                    density.
                                    This is demonstrated in Figure 6.1, using four boxes, labeled from bottom to top as B ,B ,B ,B .
                                                                                                         0  1  2  3
                                    Equal areas of size V entails:

                                                                                      
                                                                                         x
                                    x  [f(x ) — f(x )] = x  [f(x ) — f(x )] = x  [f(x ) — f(x )] = x f(x ) +   f  ( )dx  V  .
                                     3   4     3    2  3     2    1   2     1   1  1
                                                                                       1 x
                                    Note that, working backward along the X-axis, earlier values of x can be easily obtained. For
                                    Instance, if x  is known:
                                              1
                                                                  x  = f  (f(x ) + V/x ) .
                                                                      –1
                                                                   2      1      1



            80                               LOVELY PROFESSIONAL UNIVERSITY
   81   82   83   84   85   86   87   88   89   90   91