72e469da0a
[CI SKIP]
102 lines
6.5 KiB
HTML
102 lines
6.5 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
<title>Discrete Probability Distributions</title>
|
|
<link rel="stylesheet" href="../../math.css" type="text/css">
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
|
<link rel="home" href="../../index.html" title="Math Toolkit 2.11.0">
|
|
<link rel="up" href="../stat_tut.html" title="Statistical Distributions Tutorial">
|
|
<link rel="prev" href="variates.html" title="Random Variates and Distribution Parameters">
|
|
<link rel="next" href="../dist_ref.html" title="Statistical Distributions Reference">
|
|
</head>
|
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
<table cellpadding="2" width="100%"><tr>
|
|
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
|
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
|
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
|
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
|
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
|
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="variates.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../stat_tut.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../dist_ref.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
|
</div>
|
|
<div class="section">
|
|
<div class="titlepage"><div><div><h3 class="title">
|
|
<a name="math_toolkit.stat_tut.dist_params"></a><a class="link" href="dist_params.html" title="Discrete Probability Distributions">Discrete Probability
|
|
Distributions</a>
|
|
</h3></div></div></div>
|
|
<p>
|
|
Note that the <a href="http://en.wikipedia.org/wiki/Discrete_probability_distribution" target="_top">discrete
|
|
distributions</a>, including the binomial, negative binomial, Poisson
|
|
& Bernoulli, are all mathematically defined as discrete functions: only
|
|
integral values of the <a href="http://en.wikipedia.org/wiki/Random_variate" target="_top">random
|
|
variate</a> are envisaged and the functions are only defined at these
|
|
integral values. However because the method of calculation often uses continuous
|
|
functions, it is convenient to treat them as if they were continuous functions,
|
|
and permit non-integral values of their parameters.
|
|
</p>
|
|
<p>
|
|
To enforce a strict mathematical model, users may use floor or ceil functions
|
|
on the <a href="http://en.wikipedia.org/wiki/Random_variate" target="_top">random variate</a>,
|
|
prior to calling the distribution function, to enforce integral values.
|
|
</p>
|
|
<p>
|
|
For similar reasons, in continuous distributions, parameters like degrees
|
|
of freedom that might appear to be integral, are treated as real values (and
|
|
are promoted from integer to floating-point if necessary). In this case however,
|
|
that there are a small number of situations where non-integral degrees of
|
|
freedom do have a genuine meaning.
|
|
</p>
|
|
<p>
|
|
Generally speaking there is no loss of performance from allowing real-values
|
|
parameters: the underlying special functions contain optimizations for integer-valued
|
|
arguments when applicable.
|
|
</p>
|
|
<div class="caution"><table border="0" summary="Caution">
|
|
<tr>
|
|
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../../../doc/src/images/caution.png"></td>
|
|
<th align="left">Caution</th>
|
|
</tr>
|
|
<tr><td align="left" valign="top">
|
|
<p>
|
|
The quantile function of a discrete distribution will by default return
|
|
an integer result that has been <span class="emphasis"><em>rounded outwards</em></span>.
|
|
That is to say lower quantiles (where the probability is less than 0.5)
|
|
are rounded downward, and upper quantiles (where the probability is greater
|
|
than 0.5) are rounded upwards. This behaviour ensures that if an X% quantile
|
|
is requested, then <span class="emphasis"><em>at least</em></span> the requested coverage
|
|
will be present in the central region, and <span class="emphasis"><em>no more than</em></span>
|
|
the requested coverage will be present in the tails.
|
|
</p>
|
|
<p>
|
|
This behaviour can be changed so that the quantile functions are rounded
|
|
differently, or even return a real-valued result using <a class="link" href="../pol_overview.html" title="Policy Overview">Policies</a>.
|
|
It is strongly recommended that you read the tutorial <a class="link" href="../pol_tutorial/understand_dis_quant.html" title="Understanding Quantiles of Discrete Distributions">Understanding
|
|
Quantiles of Discrete Distributions</a> before using the quantile function
|
|
on a discrete distribution. The <a class="link" href="../pol_ref/discrete_quant_ref.html" title="Discrete Quantile Policies">reference
|
|
docs</a> describe how to change the rounding policy for these distributions.
|
|
</p>
|
|
</td></tr>
|
|
</table></div>
|
|
</div>
|
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
|
<td align="left"></td>
|
|
<td align="right"><div class="copyright-footer">Copyright © 2006-2019 Nikhar
|
|
Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos,
|
|
Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan
|
|
Råde, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg,
|
|
Daryle Walker and Xiaogang Zhang<p>
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
|
</p>
|
|
</div></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="variates.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../stat_tut.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../dist_ref.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
|
</div>
|
|
</body>
|
|
</html>
|