Académique Documents
Professionnel Documents
Culture Documents
Random Deviates
William Thistleton1,2, John A. Marsh2,
Kenric Nelson2 and Constantino Tsallis3,4
1
1.
Introduction
Sq =
1 p ( x ) dx
q
q 1
( q )
(1)
1/14
2.
U1 = exp ( Z12 + Z 22 )
2
Z
1
U2 =
atan 2
2
Z1
2/14
(2a,b)
(3)
Z 2 = 2 ln (U1 ) sin ( 2 U 2 ) .
(4)
and
( Z1 , Z 2 ) ,
denoted
f Z1 ,Z 2 ( z1 , z2 ) , as
f Z1 , Z2 ( z1 , z2 ) = fU1 ,U 2 ( z1 , z2 ) J ( z1 , z2 )
(5)
u1 u2 u1 u2
.
z1 z2 z2 z1
(6)
( 0,1)
1
exp ( z12 + z22 ) 2
2
1
1
=
exp ( z12 2 )
exp ( z22 2 ) .
2
2
f Z1 , Z2 ( z1 , z2 ) =
(7)
The Box-Mller method is thus very simple: start with two independent random
numbers drawn from the range ( 0,1) , apply the transformations of Eqs. (3)-(4),
and one arrives at two random numbers drawn from a standard Gaussian
distribution (mean 0 and variance 1). The two random deviates thus generated
are independent due to the separation of the terms in Eq. (7).
3.
x1 q 1
1 q
x>0
and
3/14
(8)
[1 + (1 q ) x ](1 q )
e
1 + (1 q) x 0
x
q
(9)
else
These functions reduce to the usual logarithm and exponential functions when
q = 1. The q-Gaussian density is defined for < q < 3 as
1 (1 q )
2
p ( x; q , q ) = Aq Bq 1 + ( q 1) Bq ( x q )
Bq x q
= Aq Bq eq
(10)
where the parameters q , q2 , Aq , and Bq are defined as follows. First, the qmean q is defined analogously to the usual mean, except using the so-called qexpectation value (based on the escort distribution), as follows
x p ( x ) dx .
p ( x ) dx
q
q x
(11)
( x ) p ( x )
p ( x ) dx
2
(x )
2
q
dx
(12)
When q = 1, these expressions reduce to the usual mean and variance. The
normalization factor is given by
5 3q
2(1 q ) 1 q
2 q
1
q
1
Aq =
q 1
q 1
3q
2(q 1)
q <1
q =1 .
(13)
1< q < 3
Bq = (3 q ) q2
q ( ,3) .
(14)
4/14
Bq x 2
q q
Aq
3 q
1 2
x
3 q
q
q 1 2 1 q
=
x .(15)
1 +
3 q 3 q
Aq
We show below (Eq. 23) that the marginal distributions associated with our
transformed random variables recover this form with new parameter q .
The q-Gaussian distribution reproduces the usual Gaussian distribution
when q = 1, has compact support for q < 1, and decays asymptotically as a
power law for 1 < q < 3. For 3 q , the form given in Eq. (10) is not
normalizable. The usual variance (second order moment) is finite for q < 5 3 ,
and, for the standard q-Gaussian, is given by 2 = ( 3 q ) ( 5 3q ) . The usual
variance of the q-Gaussian diverges for 5 3 q < 3 , however the q-variance
remains finite for the full range < q < 3 , equal to unity for the standard qGaussian.
4.
(16)
Z 2 2 ln q (U1 ) sin ( 2 U 2 ) .
(17)
and
3q 1
. Thus as q (used in the q-log of the transformation)
q +1
U1 = exp q ( Z12 + Z 2 2 )
2
and
5/14
(18)
U2 =
Z
1
atan 2 ,
2
Z1
(19)
1
1
J ( z1 , z2 ) =
exp q ( z12 + z22 ) .
2
2
(20)
1
2
12 ( z12 + z22 )
1 q2 ( z12 + z22 )
=
e
e
.
q
2 ( 2 1 q )
(21)
1
2
f Z1 , Z2 ( z1 , z2 ) dz1
q +1
1 1+ q .
2 1 q
1 2 ( q 1) 1
1
2
=
( q 1) 1 (1 q ) z2
2
1
q , we have
1
(q 1) = q 1
2
3 q
(22)
and
1 1+ q
1
=
, and so we obtain
2 1 q 1 q
1
1
q 1
q 1 q 1 2 1 q
B x2
I=
x
1+
= Aq Bq eq q .(23)
3 q 3 q 3 q
2 ( q 1)
1
3 q
note that, in the limit as q the q-Gaussian recovers a uniform
6/14
to produce a
random variable without heavy tails, which may be treated with a traditional
histogram. This random variable has density
fY ( y ) = 2e Aq
y
1 1+ q
1
2 1 q
Bq 1 (1 q ) e 2 y
.
2
(24)
usual
transformation X q + q Z .
Here
Z ~ N q (0,1)
results
in
50 to 2000. As the sample size grows, the q-variance converges nicely to the
expected value q2 = 9 . The sample variances, however, converge relatively
slowly to the predicted value
( 3 q ) ( 5 3q ) = 2
2 = ( 3 q ) ( 5 3q ) q2 = 18
(where
7/14
5.
Acknowledgements
The authors gratefully acknowledge support from A. Williams of the Air
Force Research Laboratory, Information Directorate, and SI International, under
contract No. FA8756-04-C-0258.
q = -0.5, q = -5.0, N = 5E6
Empirical Density
Theoretical Density
0.5
p(x)
0.4
0.3
0.2
0.1
0
-1.5
-1
-0.5
0.5
1.5
x
Figure 1: Theoretical density p(x) and histogram of simulated data for a standard qGaussian distribution with q < 0 . The distribution has compact support for this q .
8/14
0.45
0.4
0.35
p(x)
0.3
0.25
0.2
0.15
0.1
0.05
0
-2
-1.5
-1
-0.5
0.5
1.5
x
Figure 2: Theoretical density p(x) and histogram of simulated data for a standard qGaussian distribution with 0 < q < 1 . The distribution has compact support for this q .
q = 15, q = 2.75, N = 5E6
Empirical Density
Theoretical Density
-1
10
-2
p(x)
10
-3
10
-4
10
-100
-80
-60
-40
-20
20
40
60
80
100
x
Figure 3: Theoretical density p(x) and histogram of simulated data for a standard qGaussian distribution with 1 < q < 3 , truncated domain.
9/14
lnq(p(x)/(2AqB1/2
q ))
-100
-200
-300
-400
-500
-600
20
40
60
80
x2
100
120
140
f(y)
0.08
0.06
0.04
0.02
0
-20
20
40
60
80
100
120
y
Figure 5: Theoretical density f(y) of the random variable Y = log ( X ) , and histogram of
simulated data, for a standard q-Gaussian random variable X. The value of q is the same
as in Figure 3.
10/14
7
Experimental q-variance
Experimental variance
Theoretical variance
2, 2q
q = 5/3
2
2
q = 1
2 = 1/3
0
-2
-1.5
-1
-0.5
0.5
1.5
2.5
q
Figure 6: Comparison of computed variance (circles) and q-variance (triangles). The
usual second order central moment is seen to diverge for generated q 5 / 3 . For
q the q-Gaussian approaches a uniform distribution on (-1,1) and so 2 1/ 3 .
Very heavy tails for large q renders computation of q-variance difficult.
Nq(5,9), q = 1.4
50
V[ X]
Vq [ X]
45
40
V[X], Vq[X]
35
30
25
20
15
10
5
0
200
400
600
800
1000
1200
1400
1600
1800
2000
Number of Deviates
11/14
Nq(5,9), q = 2.75
100
10
V[X]
Vq[X]
80
10
60
V[X], Vq[X]
10
40
10
20
10
10
200
400
600
800
1000
1200
1400
1600
1800
2000
Number of Deviates
6.
12/14
7.
References
P.J. Bickel and K.A. Doksum, Mathematical Statistics, Prentice Hall, Saddle
River, NJ, 2001.
2
G. Marsaglia, W.W. Tsang, The Ziggurat Method for Generating Random
Variables, Journal of Statistical Software, Vol. 5, No. 8 (2000).
3
G.E.P Box, M.E. Muller, A note on the generation of random normal
deviates, Annals Math. Stat, Vol. 29, pp. 610-61, (1958).
4
M. Gell-Mann and C. Tsallis, eds. Nonextensive Entropy: Interdisciplinary
Applications, Oxford University Press, New York, 2004, and references
therein.
5
S.M.D. Queiros, C. Anteneodo, C. Tsallis, Power Law Distributions In
Economics: A Nonextensive Statistical Approach, Proceedings of SPIE, Vol.
5848, pp. 151-164 (May 2005).
13/14
14/14