Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66750 - trunk/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists
From: pbristow_at_[hidden]
Date: 2010-11-25 07:01:26


Author: pbristow
Date: 2010-11-25 07:01:15 EST (Thu, 25 Nov 2010)
New Revision: 66750
URL: http://svn.boost.org/trac/boost/changeset/66750

Log:
missing distribs
Added:
   trunk/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/geometric_dist.html (contents, props changed)
   trunk/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_gaussian_dist.html (contents, props changed)
Removed:
   trunk/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull.html

Added: trunk/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/geometric_dist.html
==============================================================================
--- (empty file)
+++ trunk/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/geometric_dist.html 2010-11-25 07:01:15 EST (Thu, 25 Nov 2010)
@@ -0,0 +1,868 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Geometric Distribution</title>
+<link rel="stylesheet" href="../../../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../../../index.html" title="Math Toolkit">
+<link rel="up" href="../dists.html" title="Distributions">
+<link rel="prev" href="gamma_dist.html" title="Gamma (and Erlang) Distribution">
+<link rel="next" href="inverse_chi_squared_dist.html" title="Inverse Chi Squared Distribution">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="gamma_dist.html"><img src="../../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.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="inverse_chi_squared_dist.html"><img src="../../../../../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="math_toolkit.dist.dist_ref.dists.geometric_dist"></a><a class="link" href="geometric_dist.html" title="Geometric Distribution">Geometric
+ Distribution</a>
+</h5></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">distributions</span><span class="special">/</span><span class="identifier">geometric</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></pre>
+<p>
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">math</span><span class="special">{</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RealType</span> <span class="special">=</span> <span class="keyword">double</span><span class="special">,</span>
+ <span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Policies">Policy</a> <span class="special">=</span> <a class="link" href="../../../policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">policies::policy&lt;&gt;</a> <span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">geometric_distribution</span><span class="special">;</span>
+
+<span class="keyword">typedef</span> <span class="identifier">geometric_distribution</span><span class="special">&lt;&gt;</span> <span class="identifier">geometric</span><span class="special">;</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RealType</span><span class="special">,</span> <span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Policies">Policy</a><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">geometric_distribution</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">RealType</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Policy</span> <span class="identifier">policy_type</span><span class="special">;</span>
+ <span class="comment">// Constructor from success_fraction:
+</span> <span class="identifier">geometric_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">p</span><span class="special">);</span>
+
+ <span class="comment">// Parameter accessors:
+</span> <span class="identifier">RealType</span> <span class="identifier">success_fraction</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">RealType</span> <span class="identifier">successes</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="comment">// Bounds on success fraction:
+</span> <span class="keyword">static</span> <span class="identifier">RealType</span> <span class="identifier">find_lower_bound_on_p</span><span class="special">(</span>
+ <span class="identifier">RealType</span> <span class="identifier">trials</span><span class="special">,</span>
+ <span class="identifier">RealType</span> <span class="identifier">successes</span><span class="special">,</span>
+ <span class="identifier">RealType</span> <span class="identifier">probability</span><span class="special">);</span> <span class="comment">// alpha
+</span> <span class="keyword">static</span> <span class="identifier">RealType</span> <span class="identifier">find_upper_bound_on_p</span><span class="special">(</span>
+ <span class="identifier">RealType</span> <span class="identifier">trials</span><span class="special">,</span>
+ <span class="identifier">RealType</span> <span class="identifier">successes</span><span class="special">,</span>
+ <span class="identifier">RealType</span> <span class="identifier">probability</span><span class="special">);</span> <span class="comment">// alpha
+</span>
+ <span class="comment">// Estimate min/max number of trials:
+</span> <span class="keyword">static</span> <span class="identifier">RealType</span> <span class="identifier">find_minimum_number_of_trials</span><span class="special">(</span>
+ <span class="identifier">RealType</span> <span class="identifier">k</span><span class="special">,</span> <span class="comment">// Number of failures.
+</span> <span class="identifier">RealType</span> <span class="identifier">p</span><span class="special">,</span> <span class="comment">// Success fraction.
+</span> <span class="identifier">RealType</span> <span class="identifier">probability</span><span class="special">);</span> <span class="comment">// Probability threshold alpha.
+</span> <span class="keyword">static</span> <span class="identifier">RealType</span> <span class="identifier">find_maximum_number_of_trials</span><span class="special">(</span>
+ <span class="identifier">RealType</span> <span class="identifier">k</span><span class="special">,</span> <span class="comment">// Number of failures.
+</span> <span class="identifier">RealType</span> <span class="identifier">p</span><span class="special">,</span> <span class="comment">// Success fraction.
+</span> <span class="identifier">RealType</span> <span class="identifier">probability</span><span class="special">);</span> <span class="comment">// Probability threshold alpha.
+</span><span class="special">};</span>
+
+<span class="special">}}</span> <span class="comment">// namespaces
+</span></pre>
+<p>
+ The class type <code class="computeroutput"><span class="identifier">geometric_distribution</span></code>
+ represents a <a href="http://en.wikipedia.org/wiki/geometric_distribution" target="_top">geometric
+ distribution</a>: it is used when there are exactly two mutually
+ exclusive outcomes of a <a href="http://en.wikipedia.org/wiki/Bernoulli_trial" target="_top">Bernoulli
+ trial</a>: these outcomes are labelled "success" and "failure".
+ </p>
+<p>
+ For <a href="http://en.wikipedia.org/wiki/Bernoulli_trial" target="_top">Bernoulli
+ trials</a> each with success fraction <span class="emphasis"><em>p</em></span>, the
+ geometric distribution gives the probability of observing <span class="emphasis"><em>k</em></span>
+ trials (failures, events, occurrences, or arrivals) before the first
+ success.
+ </p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ For this implementation, the set of trials <span class="bold"><strong>includes
+ zero</strong></span> (unlike another definition where the set of trials
+ starts at one, sometimes named <span class="emphasis"><em>shifted</em></span>).
+ </p></td></tr>
+</table></div>
+<p>
+ The geometric distribution assumes that success_fraction <span class="emphasis"><em>p</em></span>
+ is fixed for all <span class="emphasis"><em>k</em></span> trials.
+ </p>
+<p>
+ The probability that there are <span class="emphasis"><em>k</em></span> failures before
+ the first success is
+ </p>
+<p>
+ &#8192;&#8192; Pr(Y=<span class="emphasis"><em>k</em></span>) = (1-<span class="emphasis"><em>p</em></span>)<sup><span class="emphasis"><em>k</em></span></sup><span class="emphasis"><em>p</em></span>
+ </p>
+<p>
+ For example, when throwing a 6-face dice the success probability <span class="emphasis"><em>p</em></span>
+ = 1/6 = 0.1666&#8202;&#775; &#160;. Throwing repeatedly until a <span class="emphasis"><em>three</em></span>
+ appears, the probability distribution of the number of times <span class="emphasis"><em>not-a-three</em></span>
+ is thrown is geometric.
+ </p>
+<p>
+ Geometric distribution has the Probability Density Function PDF:
+ </p>
+<p>
+ &#8192;&#8192; (1-<span class="emphasis"><em>p</em></span>)<sup><span class="emphasis"><em>k</em></span></sup><span class="emphasis"><em>p</em></span>
+ </p>
+<p>
+ The following graph illustrates how the PDF and CDF vary for three examples
+ of the success fraction <span class="emphasis"><em>p</em></span>, (when considering the
+ geometric distribution as a continuous function),
+ </p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../../../graphs/geometric_pdf_2.png" align="middle"></span>
+ </p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../../../graphs/geometric_cdf_2.png" align="middle"></span>
+ </p>
+<p>
+ and as discrete.
+ </p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../../../graphs/geometric_pdf_discrete.png" align="middle"></span>
+ </p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../../../graphs/geometric_cdf_discrete.png" align="middle"></span>
+ </p>
+<a name="math_toolkit.dist.dist_ref.dists.geometric_dist.related_distributions"></a><h5>
+<a name="id1027789"></a>
+ <a class="link" href="geometric_dist.html#math_toolkit.dist.dist_ref.dists.geometric_dist.related_distributions">Related
+ Distributions</a>
+ </h5>
+<p>
+ The geometric distribution is a special case of the <a class="link" href="negative_binomial_dist.html" title="Negative Binomial Distribution">Negative
+ Binomial Distribution</a> with successes parameter <span class="emphasis"><em>r</em></span>
+ = 1, so only one first and only success is required : thus by definition
+ &#8192;&#8192; <code class="computeroutput"><span class="identifier">geometric</span><span class="special">(</span><span class="identifier">p</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">negative_binomial</span><span class="special">(</span><span class="number">1</span><span class="special">,</span>
+ <span class="identifier">p</span><span class="special">)</span></code>
+ </p>
+<pre class="programlisting"><span class="identifier">negative_binomial_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">r</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">success_fraction</span><span class="special">);</span>
+<span class="identifier">negative_binomial</span> <span class="identifier">nb</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="identifier">success_fraction</span><span class="special">);</span>
+<span class="identifier">geometric</span> <span class="identifier">g</span><span class="special">(</span><span class="identifier">success_fraction</span><span class="special">);</span>
+<span class="identifier">ASSERT</span><span class="special">(</span><span class="identifier">pdf</span><span class="special">(</span><span class="identifier">nb</span><span class="special">,</span> <span class="number">1</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">pdf</span><span class="special">(</span><span class="identifier">g</span><span class="special">,</span> <span class="number">1</span><span class="special">));</span>
+</pre>
+<p>
+ This implementation uses real numbers for the computation throughout
+ (because it uses the <span class="bold"><strong>real-valued</strong></span> power
+ and exponential functions). So to obtain a conventional strictly-discrete
+ geometric distribution you must ensure that an integer value is provided
+ for the number of trials (random variable) <span class="emphasis"><em>k</em></span>, and
+ take integer values (floor or ceil functions) from functions that return
+ a number of successes.
+ </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 geometric distribution is a discrete distribution: internally,
+ functions like the <code class="computeroutput"><span class="identifier">cdf</span></code>
+ and <code class="computeroutput"><span class="identifier">pdf</span></code> are treated
+ "as if" they are continuous functions, but in reality the
+ results returned from these functions only have meaning if an integer
+ value is provided for the random variate argument.
+ </p>
+<p>
+ The quantile function 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="../../../policy/pol_overview.html" title="Policy Overview">Policies</a>.
+ It is strongly recommended that you read the tutorial <a class="link" href="../../../policy/pol_tutorial/understand_dis_quant.html" title="Understanding Quantiles of Discrete Distributions">Understanding
+ Quantiles of Discrete Distributions</a> before using the quantile
+ function on the geometric distribution. The <a class="link" href="../../../policy/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>
+<a name="math_toolkit.dist.dist_ref.dists.geometric_dist.member_functions"></a><h5>
+<a name="id1028074"></a>
+ <a class="link" href="geometric_dist.html#math_toolkit.dist.dist_ref.dists.geometric_dist.member_functions">Member
+ Functions</a>
+ </h5>
+<a name="math_toolkit.dist.dist_ref.dists.geometric_dist.constructor"></a><h6>
+<a name="id1028090"></a>
+ <a class="link" href="geometric_dist.html#math_toolkit.dist.dist_ref.dists.geometric_dist.constructor">Constructor</a>
+ </h6>
+<pre class="programlisting"><span class="identifier">geometric_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">p</span><span class="special">);</span>
+</pre>
+<p>
+ Constructor: <span class="emphasis"><em>p</em></span> or success_fraction is the probability
+ of success of a single trial.
+ </p>
+<p>
+ Requires: <code class="computeroutput"><span class="number">0</span> <span class="special">&lt;=</span>
+ <span class="identifier">p</span> <span class="special">&lt;=</span>
+ <span class="number">1</span></code>.
+ </p>
+<a name="math_toolkit.dist.dist_ref.dists.geometric_dist.accessors"></a><h6>
+<a name="id1028169"></a>
+ <a class="link" href="geometric_dist.html#math_toolkit.dist.dist_ref.dists.geometric_dist.accessors">Accessors</a>
+ </h6>
+<pre class="programlisting"><span class="identifier">RealType</span> <span class="identifier">success_fraction</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span> <span class="comment">// successes / trials (0 &lt;= p &lt;= 1)
+</span></pre>
+<p>
+ Returns the success_fraction parameter <span class="emphasis"><em>p</em></span> from which
+ this distribution was constructed.
+ </p>
+<pre class="programlisting"><span class="identifier">RealType</span> <span class="identifier">successes</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span> <span class="comment">// required successes always one,
+</span><span class="comment">// included for compatibility with negative binomial distribution
+</span><span class="comment">// with successes r == 1.
+</span></pre>
+<p>
+ Returns unity.
+ </p>
+<p>
+ The following functions are equivalent to those provided for the negative
+ binomial, with successes = 1, but are provided here for completeness.
+ </p>
+<p>
+ The best method of calculation for the following functions is disputed:
+ see <a class="link" href="binomial_dist.html" title="Binomial Distribution">Binomial
+ Distribution</a> and <a class="link" href="negative_binomial_dist.html" title="Negative Binomial Distribution">Negative
+ Binomial Distribution</a> for more discussion.
+ </p>
+<a name="math_toolkit.dist.dist_ref.dists.geometric_dist.lower_bound_on_success_fraction_parameter__emphasis_p__emphasis_"></a><h6>
+<a name="id1028277"></a>
+ <a class="link" href="geometric_dist.html#math_toolkit.dist.dist_ref.dists.geometric_dist.lower_bound_on_success_fraction_parameter__emphasis_p__emphasis_">Lower
+ Bound on success_fraction Parameter <span class="emphasis"><em>p</em></span></a>
+ </h6>
+<pre class="programlisting"><span class="keyword">static</span> <span class="identifier">RealType</span> <span class="identifier">find_lower_bound_on_p</span><span class="special">(</span>
+ <span class="identifier">RealType</span> <span class="identifier">failures</span><span class="special">,</span>
+ <span class="identifier">RealType</span> <span class="identifier">probability</span><span class="special">)</span> <span class="comment">// (0 &lt;= alpha &lt;= 1), 0.05 equivalent to 95% confidence.
+</span></pre>
+<p>
+ Returns a <span class="bold"><strong>lower bound</strong></span> on the success
+ fraction:
+ </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">failures</span></dt>
+<dd><p>
+ The total number of failures before the 1st success.
+ </p></dd>
+<dt><span class="term">alpha</span></dt>
+<dd><p>
+ The largest acceptable probability that the true value of the success
+ fraction is <span class="bold"><strong>less than</strong></span> the value
+ returned.
+ </p></dd>
+</dl>
+</div>
+<p>
+ For example, if you observe <span class="emphasis"><em>k</em></span> failures from <span class="emphasis"><em>n</em></span>
+ trials the best estimate for the success fraction is simply 1/<span class="emphasis"><em>n</em></span>,
+ but if you want to be 95% sure that the true value is <span class="bold"><strong>greater
+ than</strong></span> some value, <span class="emphasis"><em>p<sub>min</sub></em></span>, then:
+ </p>
+<pre class="programlisting"><span class="identifier">p</span><sub>min</sub> <span class="special">=</span> <span class="identifier">geometric_distribution</span><span class="special">&lt;</span><span class="identifier">RealType</span><span class="special">&gt;::</span>
+ <span class="identifier">find_lower_bound_on_p</span><span class="special">(</span><span class="identifier">failures</span><span class="special">,</span> <span class="number">0.05</span><span class="special">);</span>
+</pre>
+<p>
+ <a class="link" href="../../stat_tut/weg/neg_binom_eg/neg_binom_conf.html" title="Calculating Confidence Limits on the Frequency of Occurrence for the Negative Binomial Distribution">See
+ negative_binomial confidence interval example.</a>
+ </p>
+<p>
+ This function uses the Clopper-Pearson method of computing the lower
+ bound on the success fraction, whilst many texts refer to this method
+ as giving an "exact" result in practice it produces an interval
+ that guarantees <span class="emphasis"><em>at least</em></span> the coverage required,
+ and may produce pessimistic estimates for some combinations of <span class="emphasis"><em>failures</em></span>
+ and <span class="emphasis"><em>successes</em></span>. See:
+ </p>
+<p>
+ <a href="http://www.ucs.louisiana.edu/~kxk4695/Discrete_new.pdf" target="_top">Yong
+ Cai and K. Krishnamoorthy, A Simple Improved Inferential Method for Some
+ Discrete Distributions. Computational statistics and data analysis, 2005,
+ vol. 48, no3, 605-621</a>.
+ </p>
+<a name="math_toolkit.dist.dist_ref.dists.geometric_dist.upper_bound_on_success_fraction_parameter_p"></a><h6>
+<a name="id1028507"></a>
+ <a class="link" href="geometric_dist.html#math_toolkit.dist.dist_ref.dists.geometric_dist.upper_bound_on_success_fraction_parameter_p">Upper
+ Bound on success_fraction Parameter p</a>
+ </h6>
+<pre class="programlisting"><span class="keyword">static</span> <span class="identifier">RealType</span> <span class="identifier">find_upper_bound_on_p</span><span class="special">(</span>
+ <span class="identifier">RealType</span> <span class="identifier">trials</span><span class="special">,</span>
+ <span class="identifier">RealType</span> <span class="identifier">alpha</span><span class="special">);</span> <span class="comment">// (0 &lt;= alpha &lt;= 1), 0.05 equivalent to 95% confidence.
+</span></pre>
+<p>
+ Returns an <span class="bold"><strong>upper bound</strong></span> on the success
+ fraction:
+ </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">trials</span></dt>
+<dd><p>
+ The total number of trials conducted.
+ </p></dd>
+<dt><span class="term">alpha</span></dt>
+<dd><p>
+ The largest acceptable probability that the true value of the success
+ fraction is <span class="bold"><strong>greater than</strong></span> the value
+ returned.
+ </p></dd>
+</dl>
+</div>
+<p>
+ For example, if you observe <span class="emphasis"><em>k</em></span> successes from <span class="emphasis"><em>n</em></span>
+ trials the best estimate for the success fraction is simply <span class="emphasis"><em>k/n</em></span>,
+ but if you want to be 95% sure that the true value is <span class="bold"><strong>less
+ than</strong></span> some value, <span class="emphasis"><em>p<sub>max</sub></em></span>, then:
+ </p>
+<pre class="programlisting"><span class="identifier">p</span><sub>max</sub> <span class="special">=</span> <span class="identifier">geometric_distribution</span><span class="special">&lt;</span><span class="identifier">RealType</span><span class="special">&gt;::</span><span class="identifier">find_upper_bound_on_p</span><span class="special">(</span>
+ <span class="identifier">k</span><span class="special">,</span> <span class="number">0.05</span><span class="special">);</span>
+</pre>
+<p>
+ <a class="link" href="../../stat_tut/weg/neg_binom_eg/neg_binom_conf.html" title="Calculating Confidence Limits on the Frequency of Occurrence for the Negative Binomial Distribution">See
+ negative binomial confidence interval example.</a>
+ </p>
+<p>
+ This function uses the Clopper-Pearson method of computing the lower
+ bound on the success fraction, whilst many texts refer to this method
+ as giving an "exact" result in practice it produces an interval
+ that guarantees <span class="emphasis"><em>at least</em></span> the coverage required,
+ and may produce pessimistic estimates for some combinations of <span class="emphasis"><em>failures</em></span>
+ and <span class="emphasis"><em>successes</em></span>. See:
+ </p>
+<p>
+ <a href="http://www.ucs.louisiana.edu/~kxk4695/Discrete_new.pdf" target="_top">Yong
+ Cai and K. Krishnamoorthy, A Simple Improved Inferential Method for Some
+ Discrete Distributions. Computational statistics and data analysis, 2005,
+ vol. 48, no3, 605-621</a>.
+ </p>
+<a name="math_toolkit.dist.dist_ref.dists.geometric_dist.estimating_number_of_trials_to_ensure_at_least_a_certain_number_of_failures"></a><h6>
+<a name="id1028735"></a>
+ <a class="link" href="geometric_dist.html#math_toolkit.dist.dist_ref.dists.geometric_dist.estimating_number_of_trials_to_ensure_at_least_a_certain_number_of_failures">Estimating
+ Number of Trials to Ensure at Least a Certain Number of Failures</a>
+ </h6>
+<pre class="programlisting"><span class="keyword">static</span> <span class="identifier">RealType</span> <span class="identifier">find_minimum_number_of_trials</span><span class="special">(</span>
+ <span class="identifier">RealType</span> <span class="identifier">k</span><span class="special">,</span> <span class="comment">// number of failures.
+</span> <span class="identifier">RealType</span> <span class="identifier">p</span><span class="special">,</span> <span class="comment">// success fraction.
+</span> <span class="identifier">RealType</span> <span class="identifier">alpha</span><span class="special">);</span> <span class="comment">// probability threshold (0.05 equivalent to 95%).
+</span></pre>
+<p>
+ This functions estimates the number of trials required to achieve a certain
+ probability that <span class="bold"><strong>more than <span class="emphasis"><em>k</em></span>
+ failures will be observed</strong></span>.
+ </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">k</span></dt>
+<dd><p>
+ The target number of failures to be observed.
+ </p></dd>
+<dt><span class="term">p</span></dt>
+<dd><p>
+ The probability of <span class="emphasis"><em>success</em></span> for each trial.
+ </p></dd>
+<dt><span class="term">alpha</span></dt>
+<dd><p>
+ The maximum acceptable <span class="emphasis"><em>risk</em></span> that only <span class="emphasis"><em>k</em></span>
+ failures or fewer will be observed.
+ </p></dd>
+</dl>
+</div>
+<p>
+ For example:
+ </p>
+<pre class="programlisting"><span class="identifier">geometric_distribution</span><span class="special">&lt;</span><span class="identifier">RealType</span><span class="special">&gt;::</span><span class="identifier">find_minimum_number_of_trials</span><span class="special">(</span><span class="number">10</span><span class="special">,</span> <span class="number">0.5</span><span class="special">,</span> <span class="number">0.05</span><span class="special">);</span>
+</pre>
+<p>
+ Returns the smallest number of trials we must conduct to be 95% (1-0.05)
+ sure of seeing 10 failures that occur with frequency one half.
+ </p>
+<p>
+ <a class="link" href="../../stat_tut/weg/neg_binom_eg/neg_binom_size_eg.html" title="Estimating Sample Sizes for the Negative Binomial.">Worked
+ Example.</a>
+ </p>
+<p>
+ This function uses numeric inversion of the geometric distribution to
+ obtain the result: another interpretation of the result is that it finds
+ the number of trials (failures) that will lead to an <span class="emphasis"><em>alpha</em></span>
+ probability of observing <span class="emphasis"><em>k</em></span> failures or fewer.
+ </p>
+<a name="math_toolkit.dist.dist_ref.dists.geometric_dist.estimating_number_of_trials_to_ensure_a_maximum_number_of_failures_or_less"></a><h6>
+<a name="id1028974"></a>
+ <a class="link" href="geometric_dist.html#math_toolkit.dist.dist_ref.dists.geometric_dist.estimating_number_of_trials_to_ensure_a_maximum_number_of_failures_or_less">Estimating
+ Number of Trials to Ensure a Maximum Number of Failures or Less</a>
+ </h6>
+<pre class="programlisting"><span class="keyword">static</span> <span class="identifier">RealType</span> <span class="identifier">find_maximum_number_of_trials</span><span class="special">(</span>
+ <span class="identifier">RealType</span> <span class="identifier">k</span><span class="special">,</span> <span class="comment">// number of failures.
+</span> <span class="identifier">RealType</span> <span class="identifier">p</span><span class="special">,</span> <span class="comment">// success fraction.
+</span> <span class="identifier">RealType</span> <span class="identifier">alpha</span><span class="special">);</span> <span class="comment">// probability threshold (0.05 equivalent to 95%).
+</span></pre>
+<p>
+ This functions estimates the maximum number of trials we can conduct
+ and achieve a certain probability that <span class="bold"><strong>k failures
+ or fewer will be observed</strong></span>.
+ </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">k</span></dt>
+<dd><p>
+ The maximum number of failures to be observed.
+ </p></dd>
+<dt><span class="term">p</span></dt>
+<dd><p>
+ The probability of <span class="emphasis"><em>success</em></span> for each trial.
+ </p></dd>
+<dt><span class="term">alpha</span></dt>
+<dd><p>
+ The maximum acceptable <span class="emphasis"><em>risk</em></span> that more than
+ <span class="emphasis"><em>k</em></span> failures will be observed.
+ </p></dd>
+</dl>
+</div>
+<p>
+ For example:
+ </p>
+<pre class="programlisting"><span class="identifier">geometric_distribution</span><span class="special">&lt;</span><span class="identifier">RealType</span><span class="special">&gt;::</span><span class="identifier">find_maximum_number_of_trials</span><span class="special">(</span><span class="number">0</span><span class="special">,</span> <span class="number">1.0</span><span class="special">-</span><span class="number">1.0</span><span class="special">/</span><span class="number">1000000</span><span class="special">,</span> <span class="number">0.05</span><span class="special">);</span>
+</pre>
+<p>
+ Returns the largest number of trials we can conduct and still be 95%
+ sure of seeing no failures that occur with frequency one in one million.
+ </p>
+<p>
+ This function uses numeric inversion of the geometric distribution to
+ obtain the result: another interpretation of the result, is that it finds
+ the number of trials that will lead to an <span class="emphasis"><em>alpha</em></span>
+ probability of observing more than k failures.
+ </p>
+<a name="math_toolkit.dist.dist_ref.dists.geometric_dist.non_member_accessors"></a><h5>
+<a name="id1029209"></a>
+ <a class="link" href="geometric_dist.html#math_toolkit.dist.dist_ref.dists.geometric_dist.non_member_accessors">Non-member
+ Accessors</a>
+ </h5>
+<p>
+ All the <a class="link" href="../nmp.html" title="Non-Member Properties">usual non-member
+ accessor functions</a> that are generic to all distributions are supported:
+ <a class="link" href="../nmp.html#math.dist.cdf">Cumulative Distribution Function</a>,
+ <a class="link" href="../nmp.html#math.dist.pdf">Probability Density Function</a>, <a class="link" href="../nmp.html#math.dist.quantile">Quantile</a>, <a class="link" href="../nmp.html#math.dist.hazard">Hazard
+ Function</a>, <a class="link" href="../nmp.html#math.dist.chf">Cumulative Hazard Function</a>,
+ <a class="link" href="../nmp.html#math.dist.mean">mean</a>, <a class="link" href="../nmp.html#math.dist.median">median</a>,
+ <a class="link" href="../nmp.html#math.dist.mode">mode</a>, <a class="link" href="../nmp.html#math.dist.variance">variance</a>,
+ <a class="link" href="../nmp.html#math.dist.sd">standard deviation</a>, <a class="link" href="../nmp.html#math.dist.skewness">skewness</a>,
+ <a class="link" href="../nmp.html#math.dist.kurtosis">kurtosis</a>, <a class="link" href="../nmp.html#math.dist.kurtosis_excess">kurtosis_excess</a>,
+ <a class="link" href="../nmp.html#math.dist.range">range</a> and <a class="link" href="../nmp.html#math.dist.support">support</a>.
+ </p>
+<p>
+ However it's worth taking a moment to define what these actually mean
+ in the context of this distribution:
+ </p>
+<div class="table">
+<a name="math_toolkit.dist.dist_ref.dists.geometric_dist.meaning_of_the_non_member_accessors_"></a><p class="title"><b>Table&#160;14.&#160;Meaning of the non-member accessors.</b></p>
+<div class="table-contents"><table class="table" summary="Meaning of the non-member accessors.">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Function
+ </p>
+ </th>
+<th>
+ <p>
+ Meaning
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../nmp.html#math.dist.pdf">Probability Density Function</a>
+ </p>
+ </td>
+<td>
+ <p>
+ The probability of obtaining <span class="bold"><strong>exactly
+ k failures</strong></span> from <span class="emphasis"><em>k</em></span> trials with
+ success fraction p. For example:
+ </p>
+ <p>
+
+</p>
+<pre class="programlisting"><span class="identifier">pdf</span><span class="special">(</span><span class="identifier">geometric</span><span class="special">(</span><span class="identifier">p</span><span class="special">),</span> <span class="identifier">k</span><span class="special">)</span></pre>
+<p>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../nmp.html#math.dist.cdf">Cumulative Distribution Function</a>
+ </p>
+ </td>
+<td>
+ <p>
+ The probability of obtaining <span class="bold"><strong>k failures
+ or fewer</strong></span> from <span class="emphasis"><em>k</em></span> trials with
+ success fraction p and success on the last trial. For example:
+ </p>
+ <p>
+
+</p>
+<pre class="programlisting"><span class="identifier">cdf</span><span class="special">(</span><span class="identifier">geometric</span><span class="special">(</span><span class="identifier">p</span><span class="special">),</span> <span class="identifier">k</span><span class="special">)</span></pre>
+<p>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../nmp.html#math.dist.ccdf">Complement of the Cumulative
+ Distribution Function</a>
+ </p>
+ </td>
+<td>
+ <p>
+ The probability of obtaining <span class="bold"><strong>more than
+ k failures</strong></span> from <span class="emphasis"><em>k</em></span> trials with
+ success fraction p and success on the last trial. For example:
+ </p>
+ <p>
+
+</p>
+<pre class="programlisting"><span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">geometric</span><span class="special">(</span><span class="identifier">p</span><span class="special">),</span> <span class="identifier">k</span><span class="special">))</span></pre>
+<p>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../nmp.html#math.dist.quantile">Quantile</a>
+ </p>
+ </td>
+<td>
+ <p>
+ The <span class="bold"><strong>greatest</strong></span> number of failures
+ <span class="emphasis"><em>k</em></span> expected to be observed from <span class="emphasis"><em>k</em></span>
+ trials with success fraction <span class="emphasis"><em>p</em></span>, at probability
+ <span class="emphasis"><em>P</em></span>. Note that the value returned is a real-number,
+ and not an integer. Depending on the use case you may want
+ to take either the floor or ceiling of the real result. For
+ example:
+</p>
+<pre class="programlisting"><span class="identifier">quantile</span><span class="special">(</span><span class="identifier">geometric</span><span class="special">(</span><span class="identifier">p</span><span class="special">),</span> <span class="identifier">P</span><span class="special">)</span></pre>
+<p>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../nmp.html#math.dist.quantile_c">Quantile from the complement
+ of the probability</a>
+ </p>
+ </td>
+<td>
+ <p>
+ The <span class="bold"><strong>smallest</strong></span> number of failures
+ <span class="emphasis"><em>k</em></span> expected to be observed from <span class="emphasis"><em>k</em></span>
+ trials with success fraction <span class="emphasis"><em>p</em></span>, at probability
+ <span class="emphasis"><em>P</em></span>. Note that the value returned is a real-number,
+ and not an integer. Depending on the use case you may want
+ to take either the floor or ceiling of the real result. For
+ example:
+</p>
+<pre class="programlisting"><span class="identifier">quantile</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">geometric</span><span class="special">(</span><span class="identifier">p</span><span class="special">),</span> <span class="identifier">P</span><span class="special">))</span></pre>
+<p>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><a name="math_toolkit.dist.dist_ref.dists.geometric_dist.accuracy"></a><h5>
+<a name="id1029719"></a>
+ <a class="link" href="geometric_dist.html#math_toolkit.dist.dist_ref.dists.geometric_dist.accuracy">Accuracy</a>
+ </h5>
+<p>
+ This distribution is implemented using the pow and exp functions, so
+ most results are accurate within a few epsilon for the RealType. For
+ extreme values of <code class="computeroutput"><span class="keyword">double</span></code>
+ <span class="emphasis"><em>p</em></span>, for example 0.9999999999, accuracy can fall significantly,
+ for example to 10 decimal digits (from 16).
+ </p>
+<a name="math_toolkit.dist.dist_ref.dists.geometric_dist.implementation"></a><h5>
+<a name="id1029752"></a>
+ <a class="link" href="geometric_dist.html#math_toolkit.dist.dist_ref.dists.geometric_dist.implementation">Implementation</a>
+ </h5>
+<p>
+ In the following table, <span class="emphasis"><em>p</em></span> is the probability that
+ any one trial will be successful (the success fraction), <span class="emphasis"><em>k</em></span>
+ is the number of failures, <span class="emphasis"><em>p</em></span> is the probability
+ and <span class="emphasis"><em>q = 1-p</em></span>, <span class="emphasis"><em>x</em></span> is the given
+ probability to estimate the expected number of failures using the quantile.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Function
+ </p>
+ </th>
+<th>
+ <p>
+ Implementation Notes
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ pdf
+ </p>
+ </td>
+<td>
+ <p>
+ pdf = p * pow(q, k)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cdf
+ </p>
+ </td>
+<td>
+ <p>
+ cdf = 1 - q<sup>k=1</sup>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cdf complement
+ </p>
+ </td>
+<td>
+ <p>
+ exp(log1p(-p) * (k+1))
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ quantile
+ </p>
+ </td>
+<td>
+ <p>
+ k = log1p(-x) / log1p(-p) -1
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ quantile from the complement
+ </p>
+ </td>
+<td>
+ <p>
+ k = log(x) / log1p(-p) -1
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mean
+ </p>
+ </td>
+<td>
+ <p>
+ (1-p)/p
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ variance
+ </p>
+ </td>
+<td>
+ <p>
+ (1-p)/p&#178;
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mode
+ </p>
+ </td>
+<td>
+ <p>
+ 0
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ skewness
+ </p>
+ </td>
+<td>
+ <p>
+ (2-p)/&#8730;q
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ kurtosis
+ </p>
+ </td>
+<td>
+ <p>
+ 9+p&#178;/q
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ kurtosis excess
+ </p>
+ </td>
+<td>
+ <p>
+ 6 +p&#178;/q
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ parameter estimation member functions
+ </p>
+ </td>
+<td>
+ <p>
+ See <a class="link" href="negative_binomial_dist.html" title="Negative Binomial Distribution">Negative
+ Binomial Distribution</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">find_lower_bound_on_p</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ See <a class="link" href="negative_binomial_dist.html" title="Negative Binomial Distribution">Negative
+ Binomial Distribution</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">find_upper_bound_on_p</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ See <a class="link" href="negative_binomial_dist.html" title="Negative Binomial Distribution">Negative
+ Binomial Distribution</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">find_minimum_number_of_trials</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ See <a class="link" href="negative_binomial_dist.html" title="Negative Binomial Distribution">Negative
+ Binomial Distribution</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">find_maximum_number_of_trials</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ See <a class="link" href="negative_binomial_dist.html" title="Negative Binomial Distribution">Negative
+ Binomial Distribution</a>
+ </p>
+ </td>
+</tr>
+</tbody>
+</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 &#169; 2006 , 2007, 2008, 2009, 2010 John Maddock, Paul A. Bristow,
+ Hubert Holin, Xiaogang Zhang, Bruno Lalande, Johan R&#229;de, Gautam Sewani and
+ Thijs van den Berg<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="gamma_dist.html"><img src="../../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.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="inverse_chi_squared_dist.html"><img src="../../../../../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_gaussian_dist.html
==============================================================================
--- (empty file)
+++ trunk/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/inverse_gaussian_dist.html 2010-11-25 07:01:15 EST (Thu, 25 Nov 2010)
@@ -0,0 +1,454 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Inverse Gaussian (or Inverse Normal) Distribution</title>
+<link rel="stylesheet" href="../../../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../../../index.html" title="Math Toolkit">
+<link rel="up" href="../dists.html" title="Distributions">
+<link rel="prev" href="inverse_gamma_dist.html" title="Inverse Gamma Distribution">
+<link rel="next" href="hypergeometric_dist.html" title="Hypergeometric Distribution">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="inverse_gamma_dist.html"><img src="../../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.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="hypergeometric_dist.html"><img src="../../../../../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="math_toolkit.dist.dist_ref.dists.inverse_gaussian_dist"></a><a class="link" href="inverse_gaussian_dist.html" title="Inverse Gaussian (or Inverse Normal) Distribution">Inverse
+ Gaussian (or Inverse Normal) Distribution</a>
+</h5></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">distributions</span><span class="special">/</span><span class="identifier">wald</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></pre>
+<p>
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">math</span><span class="special">{</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RealType</span> <span class="special">=</span> <span class="keyword">double</span><span class="special">,</span>
+ <span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Policies">Policy</a> <span class="special">=</span> <a class="link" href="../../../policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">policies::policy&lt;&gt;</a> <span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">wald_distribution</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">RealType</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Policy</span> <span class="identifier">policy_type</span><span class="special">;</span>
+
+ <span class="identifier">wald_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">mean</span> <span class="special">=</span> <span class="number">1</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">scale</span> <span class="special">=</span> <span class="number">1</span><span class="special">);</span>
+
+ <span class="identifier">RealType</span> <span class="identifier">mean</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span> <span class="comment">// mean default 1.
+</span> <span class="identifier">RealType</span> <span class="identifier">scale</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span> <span class="comment">// Optional scale, default 1 (unscaled).
+</span> <span class="identifier">RealType</span> <span class="identifier">scale</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span> <span class="comment">// Shape = scale/mean.
+</span><span class="special">};</span>
+<span class="keyword">typedef</span> <span class="identifier">inverse_gaussian_distribution</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">inverse_gaussian</span><span class="special">;</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost // namespace math
+</span></pre>
+<p>
+ The Inverse Gaussian distribution distribution is a continuous probability
+ distribution.
+ </p>
+<p>
+ The distribution is also called 'normal-inverse Gaussian distribution',
+ and 'normal Inverse' distribution.
+ </p>
+<p>
+ It is also convenient to provide unity as default for both mean and scale.
+ This is the Standard form for all distributions. The Inverse Gaussian
+ distribution was first studied in relation to Brownian motion. In 1956
+ M.C.K. Tweedie used the name Inverse Gaussian because there is an inverse
+ relationship between the time to cover a unit distance and distance covered
+ in unit time. The inverse Gaussian is one of family of distributions
+ that have been called the <a href="http://en.wikipedia.org/wiki/Tweedie_distributions" target="_top">Tweedie
+ distributions</a>.
+ </p>
+<p>
+ (So <span class="emphasis"><em>inverse</em></span> in the name may mislead: it does <span class="bold"><strong>not</strong></span> relate to the inverse of a distribution).
+ </p>
+<p>
+ The tails of the distribution decrease more slowly than the normal distribution.
+ It is therefore suitable to model phenomena where numerically large values
+ are more probable than is the case for the normal distribution. For stock
+ market returns and prices, a key characteristic is that it models that
+ extremely large variations from typical (crashes) can occur even when
+ almost all (normal) variations are small.
+ </p>
+<p>
+ Examples are returns from financial assets and turbulent wind speeds.
+ </p>
+<p>
+ The normal-inverse Gaussian distributions form a subclass of the generalised
+ hyperbolic distributions.
+ </p>
+<p>
+ See distribution.
+ <a href="http://mathworld.wolfram.com/InverseGaussianDistribution.html" target="_top">Weisstein,
+ Eric W. "Inverse Gaussian Distribution." From MathWorld--A
+ Wolfram Web Resource.</a>
+ </p>
+<p>
+ If you want a <code class="computeroutput"><span class="keyword">double</span></code> precision
+ inverse_gaussian distribution you can use
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">inverse_gaussian_distribution</span><span class="special">&lt;&gt;</span></pre>
+<p>
+ </p>
+<p>
+ or, more conveniently, you can write
+ </p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">inverse_gaussian</span><span class="special">;</span>
+<span class="identifier">inverse_gaussian</span> <span class="identifier">my_ig</span><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">);</span>
+</pre>
+<p>
+ For mean parameters &#956; and scale (also called precision) parameter &#955;, and
+ random variate x, the inverse_gaussian distribution is defined by the
+ probability density function (PDF):
+ </p>
+<p>
+ &#8192;&#8192; f(x;&#956;, &#955;) = &#8730;(&#955;/2&#960;x<sup>3</sup>) e<sup>-&#955;(x-&#956;)&#178;/2&#956;&#178;x</sup>
+ </p>
+<p>
+ and Cumulative Density Function (CDF):
+ </p>
+<p>
+ &#8192;&#8192; F(x;&#956;, &#955;) = &#934;{&#8730;(&#955;<span class="emphasis"><em>x) (x</em></span>&#956;-1)} + e<sup>2&#956;/&#955;</sup> &#934;{-&#8730;(&#955;/&#956;) (1+x/&#956;)}
+ </p>
+<p>
+ where &#934; is the standard normal distribution CDF.
+ </p>
+<p>
+ The following graphs illustrate how the PDF and CDF of the inverse_gaussian
+ distribution varies for a few values of parameters &#956; and &#955;:
+ </p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../../../graphs/inverse_gaussian_pdf.png" align="middle"></span>
+ </p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../../../graphs/inverse_gaussian_cdf.png" align="middle"></span>
+ </p>
+<p>
+ Tweedie also provided 3 other parameterisations where (&#956; and &#955;) are replaced
+ by their ratio &#966; = &#955;/&#956; and by 1/&#956;: these forms may be more suitable for Bayesian
+ applications. These can be found on Seshadri, page 2 and are also discussed
+ by Chhikara and Folks on page 105. Another related parameterisation,
+ the __wald_distrib (where mean &#956; is unity) is also provided.
+ </p>
+<a name="math_toolkit.dist.dist_ref.dists.inverse_gaussian_dist.member_functions"></a><h5>
+<a name="id1034890"></a>
+ <a class="link" href="inverse_gaussian_dist.html#math_toolkit.dist.dist_ref.dists.inverse_gaussian_dist.member_functions">Member
+ Functions</a>
+ </h5>
+<pre class="programlisting"><span class="identifier">inverse_gaussian_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">df</span> <span class="special">=</span> <span class="number">1</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">scale</span> <span class="special">=</span> <span class="number">1</span><span class="special">);</span> <span class="comment">// optionally scaled.
+</span></pre>
+<p>
+ Constructs an inverse_gaussian distribution with &#956; mean, and scale &#955;, with
+ both default values 1.
+ </p>
+<p>
+ Requires that both the mean &#956; parameter and scale &#955; are greater than zero,
+ otherwise calls <a class="link" href="../../../main_overview/error_handling.html#domain_error">domain_error</a>.
+ </p>
+<pre class="programlisting"><span class="identifier">RealType</span> <span class="identifier">mean</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
+</pre>
+<p>
+ Returns the mean &#956; parameter of this distribution.
+ </p>
+<pre class="programlisting"><span class="identifier">RealType</span> <span class="identifier">scale</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
+</pre>
+<p>
+ Returns the scale &#955; parameter of this distribution.
+ </p>
+<a name="math_toolkit.dist.dist_ref.dists.inverse_gaussian_dist.non_member_accessors"></a><h5>
+<a name="id1035030"></a>
+ <a class="link" href="inverse_gaussian_dist.html#math_toolkit.dist.dist_ref.dists.inverse_gaussian_dist.non_member_accessors">Non-member
+ Accessors</a>
+ </h5>
+<p>
+ All the <a class="link" href="../nmp.html" title="Non-Member Properties">usual non-member
+ accessor functions</a> that are generic to all distributions are supported:
+ <a class="link" href="../nmp.html#math.dist.cdf">Cumulative Distribution Function</a>,
+ <a class="link" href="../nmp.html#math.dist.pdf">Probability Density Function</a>, <a class="link" href="../nmp.html#math.dist.quantile">Quantile</a>, <a class="link" href="../nmp.html#math.dist.hazard">Hazard
+ Function</a>, <a class="link" href="../nmp.html#math.dist.chf">Cumulative Hazard Function</a>,
+ <a class="link" href="../nmp.html#math.dist.mean">mean</a>, <a class="link" href="../nmp.html#math.dist.median">median</a>,
+ <a class="link" href="../nmp.html#math.dist.mode">mode</a>, <a class="link" href="../nmp.html#math.dist.variance">variance</a>,
+ <a class="link" href="../nmp.html#math.dist.sd">standard deviation</a>, <a class="link" href="../nmp.html#math.dist.skewness">skewness</a>,
+ <a class="link" href="../nmp.html#math.dist.kurtosis">kurtosis</a>, <a class="link" href="../nmp.html#math.dist.kurtosis_excess">kurtosis_excess</a>,
+ <a class="link" href="../nmp.html#math.dist.range">range</a> and <a class="link" href="../nmp.html#math.dist.support">support</a>.
+ </p>
+<p>
+ The domain of the random variate is [0,+&#8734;).
+ </p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Unlike some definitions, this implementation supports a random variate
+ equal to zero as a special case, returning zero for both pdf and cdf.
+ </p></td></tr>
+</table></div>
+<a name="math_toolkit.dist.dist_ref.dists.inverse_gaussian_dist.accuracy"></a><h5>
+<a name="id1035137"></a>
+ <a class="link" href="inverse_gaussian_dist.html#math_toolkit.dist.dist_ref.dists.inverse_gaussian_dist.accuracy">Accuracy</a>
+ </h5>
+<p>
+ The inverse_gaussian distribution is implemented in terms of the exponential
+ function and standard normal distribution <span class="emphasis"><em>N</em></span>0,1 &#934; :
+ refer to the accuracy data for those functions for more information.
+ But in general, gamma (and thus inverse gamma) results are often accurate
+ to a few epsilon, &gt;14 decimal digits accuracy for 64-bit double.
+ </p>
+<a name="math_toolkit.dist.dist_ref.dists.inverse_gaussian_dist.implementation"></a><h5>
+<a name="id1035160"></a>
+ <a class="link" href="inverse_gaussian_dist.html#math_toolkit.dist.dist_ref.dists.inverse_gaussian_dist.implementation">Implementation</a>
+ </h5>
+<p>
+ In the following table &#956; is the mean parameter and &#955; is the scale parameter
+ of the inverse_gaussian distribution, <span class="emphasis"><em>x</em></span> is the random
+ variate, <span class="emphasis"><em>p</em></span> is the probability and <span class="emphasis"><em>q =
+ 1-p</em></span> its complement. Parameters &#956; for shape and &#955; for scale are
+ used for the inverse gaussian function.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Function
+ </p>
+ </th>
+<th>
+ <p>
+ Implementation Notes
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ pdf
+ </p>
+ </td>
+<td>
+ <p>
+ &#8730;(&#955;/ 2&#960;x<sup>3</sup>) e<sup>-&#955;(x - &#956;)&#178;/ 2&#956;&#178;x</sup>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cdf
+ </p>
+ </td>
+<td>
+ <p>
+ &#934;{&#8730;(&#955;<span class="emphasis"><em>x) (x</em></span>&#956;-1)} + e<sup>2&#956;/&#955;</sup> &#934;{-&#8730;(&#955;/&#956;) (1+x/&#956;)}
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cdf complement
+ </p>
+ </td>
+<td>
+ <p>
+ using complement of &#934; above.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ quantile
+ </p>
+ </td>
+<td>
+ <p>
+ No closed form known. Estimated using a guess refined by Newton-Raphson
+ iteration.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ quantile from the complement
+ </p>
+ </td>
+<td>
+ <p>
+ No closed form known. Estimated using a guess refined by Newton-Raphson
+ iteration.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mode
+ </p>
+ </td>
+<td>
+ <p>
+ &#956; {&#8730;(1+9&#956;&#178;/4&#955;&#178;)&#178; - 3&#956;/2&#955;}
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ median
+ </p>
+ </td>
+<td>
+ <p>
+ no closed form analytic equation is known, but is evaluated
+ as quantile(0.5)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mean
+ </p>
+ </td>
+<td>
+ <p>
+ &#956;
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ variance
+ </p>
+ </td>
+<td>
+ <p>
+ &#956;&#179;/&#955;
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ skewness
+ </p>
+ </td>
+<td>
+ <p>
+ 3 &#8730; (&#956;/&#955;)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ kurtosis_excess
+ </p>
+ </td>
+<td>
+ <p>
+ 15&#956;/&#955;
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ kurtosis
+ </p>
+ </td>
+<td>
+ <p>
+ 12&#956;/&#955;
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="math_toolkit.dist.dist_ref.dists.inverse_gaussian_dist.references"></a><h5>
+<a name="id1035455"></a>
+ <a class="link" href="inverse_gaussian_dist.html#math_toolkit.dist.dist_ref.dists.inverse_gaussian_dist.references">References</a>
+ </h5>
+<div class="orderedlist"><ol type="1">
+<li>
+ Wald, A. (1947). Sequential analysis. Wiley, NY.
+ </li>
+<li>
+ The Tnverse Gaussian distribution : theory, methodology, and applications,
+ Raj S. Chhikara, J. Leroy Folks. ISBN 0824779975 (1989).
+ </li>
+<li>
+ The Inverse Gaussian distribution : statistical theory and applications,
+ Seshadri, V , ISBN - 0387986189 (pbk) (Dewey 519.2) (1998).
+ </li>
+<li>
+ <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.wald.html" target="_top">Numpy
+ and Scipy Documentation</a>.
+ </li>
+<li>
+ <a href="http://bm2.genes.nig.ac.jp/RGM2/R_current/library/statmod/man/invgauss.html" target="_top">R
+ statmod invgauss functions</a>.
+ </li>
+<li>
+ <a href="http://cran.r-project.org/web/packages/SuppDists/index.html" target="_top">R
+ SuppDists invGauss functions</a>. (Note that these R implementations
+ names differ in case).
+ </li>
+<li>
+ <a href="http://www.statsci.org/s/invgauss.html" target="_top">StatSci.org invgauss
+ help</a>.
+ </li>
+<li>
+ <a href="http://www.statsci.org/s/invgauss.statSci.org" target="_top">invgauss
+ R source</a>.
+ </li>
+<li>
+ <a href="http://www.biostat.wustl.edu/archives/html/s-news/2001-12/msg00144.html" target="_top">pwald,
+ qwald</a>.
+ </li>
+<li>
+ <a href="http://www.brighton-webs.co.uk/distributions/wald.asp" target="_top">Brighton
+ Webs wald</a>.
+ </li>
+</ol></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 &#169; 2006 , 2007, 2008, 2009, 2010 John Maddock, Paul A. Bristow,
+ Hubert Holin, Xiaogang Zhang, Bruno Lalande, Johan R&#229;de, Gautam Sewani and
+ Thijs van den Berg<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="inverse_gamma_dist.html"><img src="../../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.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="hypergeometric_dist.html"><img src="../../../../../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Deleted: trunk/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull.html
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/weibull.html 2010-11-25 07:01:15 EST (Thu, 25 Nov 2010)
+++ (empty file)
@@ -1,373 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Weibull Distribution</title>
-<link rel="stylesheet" href="../../../../../../../../../doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
-<link rel="home" href="../../../../index.html" title="Math Toolkit">
-<link rel="up" href="../dists.html" title="Distributions">
-<link rel="prev" href="triangular_dist.html" title="Triangular Distribution">
-<link rel="next" href="uniform_dist.html" title="Uniform Distribution">
-</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">Home</td>
-<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
-<td align="center">More</td>
-</tr></table>
-<hr>
-<div class="spirit-nav">
-<a accesskey="p" href="triangular_dist.html"><img src="../../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.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="uniform_dist.html"><img src="../../../../../../../../../doc/src/images/next.png" alt="Next"></a>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="math_toolkit.dist.dist_ref.dists.weibull"></a><a class="link" href="weibull.html" title="Weibull Distribution"> Weibull
- Distribution</a>
-</h5></div></div></div>
-<p>
-
-</p>
-<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">distributions</span><span class="special">/</span><span class="identifier">weibull</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></pre>
-<p>
- </p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">math</span><span class="special">{</span>
-
-<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RealType</span> <span class="special">=</span> <span class="keyword">double</span><span class="special">,</span>
- <span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Policies">Policy</a> <span class="special">=</span> <a class="link" href="../../../policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">policies::policy&lt;&gt;</a> <span class="special">&gt;</span>
-<span class="keyword">class</span> <span class="identifier">weibull_distribution</span><span class="special">;</span>
-
-<span class="keyword">typedef</span> <span class="identifier">weibull_distribution</span><span class="special">&lt;&gt;</span> <span class="identifier">weibull</span><span class="special">;</span>
-
-<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RealType</span><span class="special">,</span> <span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Policies">Policy</a><span class="special">&gt;</span>
-<span class="keyword">class</span> <span class="identifier">weibull_distribution</span>
-<span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">typedef</span> <span class="identifier">RealType</span> <span class="identifier">value_type</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">Policy</span> <span class="identifier">policy_type</span><span class="special">;</span>
- <span class="comment">// Construct:
-</span> <span class="identifier">weibull_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">shape</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">scale</span> <span class="special">=</span> <span class="number">1</span><span class="special">)</span>
- <span class="comment">// Accessors:
-</span> <span class="identifier">RealType</span> <span class="identifier">shape</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
- <span class="identifier">RealType</span> <span class="identifier">scale</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
-<span class="special">};</span>
-
-<span class="special">}}</span> <span class="comment">// namespaces
-</span></pre>
-<p>
- The <a href="http://en.wikipedia.org/wiki/Weibull_distribution" target="_top">Weibull
- distribution</a> is a continuous distribution with the <a href="http://en.wikipedia.org/wiki/Probability_density_function" target="_top">probability
- density function</a>:
- </p>
-<p>
- f(x; &#945;, &#946;) = (&#945;/&#946;) * (x / &#946;)<sup>&#945; - 1</sup> * e<sup>-(x/&#946;)<sup>&#945;</sup></sup>
- </p>
-<p>
- For shape parameter &#945; &#8203; &gt; 0, and scale parameter &#946; &#8203; &gt; 0, and x &gt; 0.
- </p>
-<p>
- The Weibull distribution is often used in the field of failure analysis;
- in particular it can mimic distributions where the failure rate varies
- over time. If the failure rate is:
- </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
- constant over time, then &#945; &#8203; = 1, suggests that items are failing from
- random events.
- </li>
-<li>
- decreases over time, then &#945; &#8203; &lt; 1, suggesting "infant mortality".
- </li>
-<li>
- increases over time, then &#945; &#8203; &gt; 1, suggesting "wear out"
- - more likely to fail as time goes by.
- </li>
-</ul></div>
-<p>
- The following graph illustrates how the PDF varies with the shape parameter
- &#945;:
- </p>
-<p>
- <span class="inlinemediaobject"><img src="../../../../../graphs/weibull_pdf1.png" align="middle"></span>
- </p>
-<p>
- While this graph illustrates how the PDF varies with the scale parameter
- &#946;:
- </p>
-<p>
- <span class="inlinemediaobject"><img src="../../../../../graphs/weibull_pdf2.png" align="middle"></span>
- </p>
-<a name="math_toolkit.dist.dist_ref.dists.weibull.related_distributions"></a><h5>
-<a name="id1156987"></a>
- <a class="link" href="weibull.html#math_toolkit.dist.dist_ref.dists.weibull.related_distributions">Related
- distributions</a>
- </h5>
-<p>
- When &#945; &#8203; = 3, the <a href="http://en.wikipedia.org/wiki/Weibull_distribution" target="_top">Weibull
- distribution</a> appears similar to the <a href="http://en.wikipedia.org/wiki/Normal_distribution" target="_top">normal
- distribution</a>. When &#945; &#8203; = 1, the Weibull distribution reduces to the
- <a href="http://en.wikipedia.org/wiki/Exponential_distribution" target="_top">exponential
- distribution</a>. The relationship of the types of extreme value
- distributions, of which the Weibull is but one, is discussed by <a href="http://www.worldscibooks.com/mathematics/p191.html" target="_top">Extreme Value
- Distributions, Theory and Applications Samuel Kotz &amp; Saralees Nadarajah</a>.
- </p>
-<a name="math_toolkit.dist.dist_ref.dists.weibull.member_functions"></a><h5>
-<a name="id1157028"></a>
- <a class="link" href="weibull.html#math_toolkit.dist.dist_ref.dists.weibull.member_functions">Member
- Functions</a>
- </h5>
-<pre class="programlisting"><span class="identifier">weibull_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">shape</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">scale</span> <span class="special">=</span> <span class="number">1</span><span class="special">);</span>
-</pre>
-<p>
- Constructs a <a href="http://en.wikipedia.org/wiki/Weibull_distribution" target="_top">Weibull
- distribution</a> with shape <span class="emphasis"><em>shape</em></span> and scale
- <span class="emphasis"><em>scale</em></span>.
- </p>
-<p>
- Requires that the <span class="emphasis"><em>shape</em></span> and <span class="emphasis"><em>scale</em></span>
- parameters are both greater than zero, otherwise calls <a class="link" href="../../../main_overview/error_handling.html#domain_error">domain_error</a>.
- </p>
-<pre class="programlisting"><span class="identifier">RealType</span> <span class="identifier">shape</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- Returns the <span class="emphasis"><em>shape</em></span> parameter of this distribution.
- </p>
-<pre class="programlisting"><span class="identifier">RealType</span> <span class="identifier">scale</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- Returns the <span class="emphasis"><em>scale</em></span> parameter of this distribution.
- </p>
-<a name="math_toolkit.dist.dist_ref.dists.weibull.non_member_accessors"></a><h5>
-<a name="id1157217"></a>
- <a class="link" href="weibull.html#math_toolkit.dist.dist_ref.dists.weibull.non_member_accessors">Non-member
- Accessors</a>
- </h5>
-<p>
- All the <a class="link" href="../nmp.html" title="Non-Member Properties">usual non-member
- accessor functions</a> that are generic to all distributions are supported:
- <a class="link" href="../nmp.html#math.dist.cdf">Cumulative Distribution Function</a>,
- <a class="link" href="../nmp.html#math.dist.pdf">Probability Density Function</a>, <a class="link" href="../nmp.html#math.dist.quantile">Quantile</a>, <a class="link" href="../nmp.html#math.dist.hazard">Hazard
- Function</a>, <a class="link" href="../nmp.html#math.dist.chf">Cumulative Hazard Function</a>,
- <a class="link" href="../nmp.html#math.dist.mean">mean</a>, <a class="link" href="../nmp.html#math.dist.median">median</a>,
- <a class="link" href="../nmp.html#math.dist.mode">mode</a>, <a class="link" href="../nmp.html#math.dist.variance">variance</a>,
- <a class="link" href="../nmp.html#math.dist.sd">standard deviation</a>, <a class="link" href="../nmp.html#math.dist.skewness">skewness</a>,
- <a class="link" href="../nmp.html#math.dist.kurtosis">kurtosis</a>, <a class="link" href="../nmp.html#math.dist.kurtosis_excess">kurtosis_excess</a>,
- <a class="link" href="../nmp.html#math.dist.range">range</a> and <a class="link" href="../nmp.html#math.dist.support">support</a>.
- </p>
-<p>
- The domain of the random variable is [0, &#8734;].
- </p>
-<a name="math_toolkit.dist.dist_ref.dists.weibull.accuracy"></a><h5>
-<a name="id1157317"></a>
- <a class="link" href="weibull.html#math_toolkit.dist.dist_ref.dists.weibull.accuracy">Accuracy</a>
- </h5>
-<p>
- The Weibull distribution is implemented in terms of the standard library
- <code class="computeroutput"><span class="identifier">log</span></code> and <code class="computeroutput"><span class="identifier">exp</span></code> functions plus <a class="link" href="../../../special/powers/expm1.html" title="expm1">expm1</a>
- and <a class="link" href="../../../special/powers/log1p.html" title="log1p">log1p</a> and
- as such should have very low error rates.
- </p>
-<a name="math_toolkit.dist.dist_ref.dists.weibull.implementation"></a><h5>
-<a name="id1157357"></a>
- <a class="link" href="weibull.html#math_toolkit.dist.dist_ref.dists.weibull.implementation">Implementation</a>
- </h5>
-<p>
- In the following table &#945; &#8203; is the shape parameter of the distribution, &#946; &#8203; is
- it's scale parameter, <span class="emphasis"><em>x</em></span> is the random variate,
- <span class="emphasis"><em>p</em></span> is the probability and <span class="emphasis"><em>q = 1-p</em></span>.
- </p>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- Function
- </p>
- </th>
-<th>
- <p>
- Implementation Notes
- </p>
- </th>
-</tr></thead>
-<tbody>
-<tr>
-<td>
- <p>
- pdf
- </p>
- </td>
-<td>
- <p>
- Using the relation: pdf = &#945;&#946;<sup>-&#945; </sup>x<sup>&#945; - 1</sup> e<sup>-(x/beta)<sup>alpha</sup></sup>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- cdf
- </p>
- </td>
-<td>
- <p>
- Using the relation: p = -<a class="link" href="../../../special/powers/expm1.html" title="expm1">expm1</a>(-(x/&#946;)<sup>&#945;</sup>)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- cdf complement
- </p>
- </td>
-<td>
- <p>
- Using the relation: q = e<sup>-(x/&#946;)<sup>&#945;</sup></sup>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- quantile
- </p>
- </td>
-<td>
- <p>
- Using the relation: x = &#946; * (-<a class="link" href="../../../special/powers/log1p.html" title="log1p">log1p</a>(-p))<sup>1/&#945;</sup>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- quantile from the complement
- </p>
- </td>
-<td>
- <p>
- Using the relation: x = &#946; * (-log(q))<sup>1/&#945;</sup>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- mean
- </p>
- </td>
-<td>
- <p>
- &#946; * &#915;(1 + 1/&#945;)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- variance
- </p>
- </td>
-<td>
- <p>
- &#946;<sup>2</sup>(&#915;(1 + 2/&#945;) - &#915;<sup>2</sup>(1 + 1/&#945;))
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- mode
- </p>
- </td>
-<td>
- <p>
- &#946;((&#945; - 1) / &#945;)<sup>1/&#945;</sup>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- skewness
- </p>
- </td>
-<td>
- <p>
- Refer to <a href="http://mathworld.wolfram.com/WeibullDistribution.html" target="_top">Weisstein,
- Eric W. "Weibull Distribution." From MathWorld--A
- Wolfram Web Resource.</a>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- kurtosis
- </p>
- </td>
-<td>
- <p>
- Refer to <a href="http://mathworld.wolfram.com/WeibullDistribution.html" target="_top">Weisstein,
- Eric W. "Weibull Distribution." From MathWorld--A
- Wolfram Web Resource.</a>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- kurtosis excess
- </p>
- </td>
-<td>
- <p>
- Refer to <a href="http://mathworld.wolfram.com/WeibullDistribution.html" target="_top">Weisstein,
- Eric W. "Weibull Distribution." From MathWorld--A
- Wolfram Web Resource.</a>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<a name="math_toolkit.dist.dist_ref.dists.weibull.references"></a><h5>
-<a name="id1157685"></a>
- <a class="link" href="weibull.html#math_toolkit.dist.dist_ref.dists.weibull.references">References</a>
- </h5>
-<div class="itemizedlist"><ul type="disc">
-<li>
- http://en.wikipedia.org/wiki/Weibull_distribution
- </li>
-<li>
- <a href="http://mathworld.wolfram.com/WeibullDistribution.html" target="_top">Weisstein,
- Eric W. "Weibull Distribution." From MathWorld--A Wolfram
- Web Resource.</a>
- </li>
-<li>
- <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda3668.htm" target="_top">Weibull
- in NIST Exploratory Data Analysis</a>
- </li>
-</ul></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 &#169; 2006 , 2007, 2008, 2009, 2010 John Maddock, Paul A. Bristow,
- Hubert Holin, Xiaogang Zhang, Bruno Lalande, Johan R&#229;de, Gautam Sewani and
- Thijs van den Berg<p>
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- </p>
-</div></td>
-</tr></table>
-<hr>
-<div class="spirit-nav">
-<a accesskey="p" href="triangular_dist.html"><img src="../../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.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="uniform_dist.html"><img src="../../../../../../../../../doc/src/images/next.png" alt="Next"></a>
-</div>
-</body>
-</html>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk