1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 The GSL Team.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "GNU General Public License" and "Free Software
Needs Free Documentation", the Front-Cover text being "A GNU Manual",
and with the Back-Cover Text being (a) (see below). A copy of the
license is included in the section entitled "GNU Free Documentation
License".
(a) The Back-Cover Text is: "You have the freedom to copy and modify this
GNU Manual." -->
<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
<head>
<title>GNU Scientific Library – Reference Manual: Random Number Distributions</title>
<meta name="description" content="GNU Scientific Library – Reference Manual: Random Number Distributions">
<meta name="keywords" content="GNU Scientific Library – Reference Manual: Random Number Distributions">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Function-Index.html#Function-Index" rel="index" title="Function Index">
<link href="index.html#Top" rel="up" title="Top">
<link href="Random-Number-Distribution-Introduction.html#Random-Number-Distribution-Introduction" rel="next" title="Random Number Distribution Introduction">
<link href="Quasi_002drandom-number-references.html#Quasi_002drandom-number-references" rel="previous" title="Quasi-random number references">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Random-Number-Distributions"></a>
<div class="header">
<p>
Next: <a href="Statistics.html#Statistics" accesskey="n" rel="next">Statistics</a>, Previous: <a href="Quasi_002dRandom-Sequences.html#Quasi_002dRandom-Sequences" accesskey="p" rel="previous">Quasi-Random Sequences</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="Function-Index.html#Function-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Random-Number-Distributions-1"></a>
<h2 class="chapter">20 Random Number Distributions</h2>
<a name="index-random-number-distributions"></a>
<a name="index-cumulative-distribution-functions-_0028CDFs_0029"></a>
<a name="index-CDFs_002c-cumulative-distribution-functions"></a>
<a name="index-inverse-cumulative-distribution-functions"></a>
<a name="index-quantile-functions"></a>
<p>This chapter describes functions for generating random variates and
computing their probability distributions. Samples from the
distributions described in this chapter can be obtained using any of the
random number generators in the library as an underlying source of
randomness.
</p>
<p>In the simplest cases a non-uniform distribution can be obtained
analytically from the uniform distribution of a random number generator
by applying an appropriate transformation. This method uses one call to
the random number generator. More complicated distributions are created
by the <em>acceptance-rejection</em> method, which compares the desired
distribution against a distribution which is similar and known
analytically. This usually requires several samples from the generator.
</p>
<p>The library also provides cumulative distribution functions and inverse
cumulative distribution functions, sometimes referred to as quantile
functions. The cumulative distribution functions and their inverses are
computed separately for the upper and lower tails of the distribution,
allowing full accuracy to be retained for small results.
</p>
<p>The functions for random variates and probability density functions
described in this section are declared in <samp>gsl_randist.h</samp>. The
corresponding cumulative distribution functions are declared in
<samp>gsl_cdf.h</samp>.
</p>
<p>Note that the discrete random variate functions always
return a value of type <code>unsigned int</code>, and on most platforms this
has a maximum value of <em>2^32-1 ~=~ 4.29e9</em>. They should only be called with
a safe range of parameters (where there is a negligible probability of
a variate exceeding this limit) to prevent incorrect results due to
overflow.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">• <a href="Random-Number-Distribution-Introduction.html#Random-Number-Distribution-Introduction" accesskey="1">Random Number Distribution Introduction</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Gaussian-Distribution.html#The-Gaussian-Distribution" accesskey="2">The Gaussian Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Gaussian-Tail-Distribution.html#The-Gaussian-Tail-Distribution" accesskey="3">The Gaussian Tail Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Bivariate-Gaussian-Distribution.html#The-Bivariate-Gaussian-Distribution" accesskey="4">The Bivariate Gaussian Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Multivariate-Gaussian-Distribution.html#The-Multivariate-Gaussian-Distribution" accesskey="5">The Multivariate Gaussian Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Exponential-Distribution.html#The-Exponential-Distribution" accesskey="6">The Exponential Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Laplace-Distribution.html#The-Laplace-Distribution" accesskey="7">The Laplace Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Exponential-Power-Distribution.html#The-Exponential-Power-Distribution" accesskey="8">The Exponential Power Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Cauchy-Distribution.html#The-Cauchy-Distribution" accesskey="9">The Cauchy Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Rayleigh-Distribution.html#The-Rayleigh-Distribution">The Rayleigh Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Rayleigh-Tail-Distribution.html#The-Rayleigh-Tail-Distribution">The Rayleigh Tail Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Landau-Distribution.html#The-Landau-Distribution">The Landau Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Levy-alpha_002dStable-Distributions.html#The-Levy-alpha_002dStable-Distributions">The Levy alpha-Stable Distributions</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Levy-skew-alpha_002dStable-Distribution.html#The-Levy-skew-alpha_002dStable-Distribution">The Levy skew alpha-Stable Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Gamma-Distribution.html#The-Gamma-Distribution">The Gamma Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Flat-_0028Uniform_0029-Distribution.html#The-Flat-_0028Uniform_0029-Distribution">The Flat (Uniform) Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Lognormal-Distribution.html#The-Lognormal-Distribution">The Lognormal Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Chi_002dsquared-Distribution.html#The-Chi_002dsquared-Distribution">The Chi-squared Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-F_002ddistribution.html#The-F_002ddistribution">The F-distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-t_002ddistribution.html#The-t_002ddistribution">The t-distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Beta-Distribution.html#The-Beta-Distribution">The Beta Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Logistic-Distribution.html#The-Logistic-Distribution">The Logistic Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Pareto-Distribution.html#The-Pareto-Distribution">The Pareto Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="Spherical-Vector-Distributions.html#Spherical-Vector-Distributions">Spherical Vector Distributions</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Weibull-Distribution.html#The-Weibull-Distribution">The Weibull Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Type_002d1-Gumbel-Distribution.html#The-Type_002d1-Gumbel-Distribution">The Type-1 Gumbel Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Type_002d2-Gumbel-Distribution.html#The-Type_002d2-Gumbel-Distribution">The Type-2 Gumbel Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Dirichlet-Distribution.html#The-Dirichlet-Distribution">The Dirichlet Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="General-Discrete-Distributions.html#General-Discrete-Distributions">General Discrete Distributions</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Poisson-Distribution.html#The-Poisson-Distribution">The Poisson Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Bernoulli-Distribution.html#The-Bernoulli-Distribution">The Bernoulli Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Binomial-Distribution.html#The-Binomial-Distribution">The Binomial Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Multinomial-Distribution.html#The-Multinomial-Distribution">The Multinomial Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Negative-Binomial-Distribution.html#The-Negative-Binomial-Distribution">The Negative Binomial Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Pascal-Distribution.html#The-Pascal-Distribution">The Pascal Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Geometric-Distribution.html#The-Geometric-Distribution">The Geometric Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Hypergeometric-Distribution.html#The-Hypergeometric-Distribution">The Hypergeometric Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="The-Logarithmic-Distribution.html#The-Logarithmic-Distribution">The Logarithmic Distribution</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="Shuffling-and-Sampling.html#Shuffling-and-Sampling">Shuffling and Sampling</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="Random-Number-Distribution-Examples.html#Random-Number-Distribution-Examples">Random Number Distribution Examples</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">• <a href="Random-Number-Distribution-References-and-Further-Reading.html#Random-Number-Distribution-References-and-Further-Reading">Random Number Distribution References and Further Reading</a>:</td><td> </td><td align="left" valign="top">
</td></tr>
</table>
<hr>
<div class="header">
<p>
Next: <a href="Statistics.html#Statistics" accesskey="n" rel="next">Statistics</a>, Previous: <a href="Quasi_002dRandom-Sequences.html#Quasi_002dRandom-Sequences" accesskey="p" rel="previous">Quasi-Random Sequences</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="Function-Index.html#Function-Index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>
|