mirror of
https://github.com/boostorg/auto_index.git
synced 2025-05-11 13:34:10 +00:00
Refactor to use generic file scanning mechanism, and regenerated some of the example docs.
[SVN r67390]
This commit is contained in:
parent
5758421e85
commit
07bbb7b3eb
@ -514,7 +514,7 @@ will be found by the scanner and indexed. The default regular expression prefix
|
||||
|
||||
[table
|
||||
[[Type][Prefix][Suffix]]
|
||||
[[class]["class[^;{]+\\<"]["\\>[^;{]+\\{"]]
|
||||
[[class]["class\[\^;{\]+\\<"]["\\>\[\^;{\]+\\{"]]
|
||||
[[function]["\\<\\w+\\>\\s+\\<"]["\\>\\s\*\\(\[^;{\]\*\\)\\s\*\[;{\]"]]
|
||||
[[typedef]["typedef\[^;\]+\\<"]["\\>\\s\*;"]]
|
||||
[[macro]["\\<"]["\\>"]]
|
||||
|
@ -23,7 +23,7 @@
|
||||
The following elements can occur in a script:
|
||||
</p>
|
||||
<a name="autoindex.script_ref.comments_and_blank_lines"></a><h5>
|
||||
<a name="id1003329"></a>
|
||||
<a name="id978207"></a>
|
||||
<a class="link" href="script_ref.html#autoindex.script_ref.comments_and_blank_lines">Comments and
|
||||
blank lines</a>
|
||||
</h5>
|
||||
@ -32,7 +32,7 @@
|
||||
with a '#'.
|
||||
</p>
|
||||
<a name="autoindex.script_ref.simple_inclusions"></a><h5>
|
||||
<a name="id1003346"></a>
|
||||
<a name="id978224"></a>
|
||||
<a class="link" href="script_ref.html#autoindex.script_ref.simple_inclusions">Simple Inclusions</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="identifier">term</span> <span class="special">[</span><span class="identifier">regular</span><span class="special">-</span><span class="identifier">expression1</span> <span class="special">[</span><span class="identifier">regular</span><span class="special">-</span><span class="identifier">expression2</span> <span class="special">[</span><span class="identifier">category</span><span class="special">]]]</span>
|
||||
@ -99,7 +99,7 @@
|
||||
</dl>
|
||||
</div>
|
||||
<a name="autoindex.script_ref.source_file_scanning"></a><h5>
|
||||
<a name="id1003555"></a>
|
||||
<a name="id978433"></a>
|
||||
<a class="link" href="script_ref.html#autoindex.script_ref.source_file_scanning">Source File Scanning</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="special">!</span><span class="identifier">scan</span> <span class="identifier">source</span><span class="special">-</span><span class="identifier">file</span><span class="special">-</span><span class="identifier">name</span>
|
||||
@ -128,7 +128,7 @@
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="autoindex.script_ref.directory_and_source_file_scanning"></a><h5>
|
||||
<a name="id1003633"></a>
|
||||
<a name="id978511"></a>
|
||||
<a class="link" href="script_ref.html#autoindex.script_ref.directory_and_source_file_scanning">Directory
|
||||
and Source File Scanning</a>
|
||||
</h5>
|
||||
@ -157,7 +157,7 @@
|
||||
</dl>
|
||||
</div>
|
||||
<a name="autoindex.script_ref.excluding_terms"></a><h5>
|
||||
<a name="id1003758"></a>
|
||||
<a name="id978636"></a>
|
||||
<a class="link" href="script_ref.html#autoindex.script_ref.excluding_terms">Excluding Terms</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="special">!</span><span class="identifier">exclude</span> <span class="identifier">term</span><span class="special">-</span><span class="identifier">list</span>
|
||||
@ -170,7 +170,7 @@
|
||||
of things to index.
|
||||
</p>
|
||||
<a name="autoindex.script_ref.rewriting_section_names"></a><h5>
|
||||
<a name="id1003813"></a>
|
||||
<a name="id978691"></a>
|
||||
<a class="link" href="script_ref.html#autoindex.script_ref.rewriting_section_names">Rewriting Section
|
||||
Names</a>
|
||||
</h5>
|
||||
@ -208,7 +208,7 @@
|
||||
</dl>
|
||||
</div>
|
||||
<a name="autoindex.script_ref.changing_the_regular_expressions_used_when_scanning"></a><h5>
|
||||
<a name="id1003951"></a>
|
||||
<a name="id978829"></a>
|
||||
<a class="link" href="script_ref.html#autoindex.script_ref.changing_the_regular_expressions_used_when_scanning">Changing
|
||||
the regular expressions used when scanning</a>
|
||||
</h5>
|
||||
@ -265,12 +265,12 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
"class<code class="literal">;{</code>+\<"
|
||||
"class[^;{]+\<"
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
"\><code class="literal">;{</code>+\{"
|
||||
"\>[^;{]+\{"
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -349,7 +349,7 @@
|
||||
</dl>
|
||||
</div>
|
||||
<a name="autoindex.script_ref.debugging"></a><h5>
|
||||
<a name="id1004239"></a>
|
||||
<a name="id979108"></a>
|
||||
<a class="link" href="script_ref.html#autoindex.script_ref.debugging">Debugging</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -20,7 +20,7 @@
|
||||
<a name="autoindex.tut"></a><a class="link" href="tut.html" title="Getting Started and Tutorial">Getting Started and Tutorial</a>
|
||||
</h2></div></div></div>
|
||||
<a name="autoindex.tut.step_1__build_the_tool"></a><h5>
|
||||
<a name="id994380"></a>
|
||||
<a name="id969258"></a>
|
||||
<a class="link" href="tut.html#autoindex.tut.step_1__build_the_tool">Step 1: Build the tool</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -62,7 +62,7 @@
|
||||
is accepted into Boost.
|
||||
</p>
|
||||
<a name="autoindex.tut.step_2__configure_boost_build"></a><h5>
|
||||
<a name="id994545"></a>
|
||||
<a name="id969423"></a>
|
||||
<a class="link" href="tut.html#autoindex.tut.step_2__configure_boost_build">Step 2: Configure
|
||||
Boost.Build</a>
|
||||
</h5>
|
||||
@ -155,7 +155,7 @@
|
||||
</dl>
|
||||
</div>
|
||||
<a name="autoindex.tut.step_3__add_indexes_to_your_documentation"></a><h5>
|
||||
<a name="id994708"></a>
|
||||
<a name="id969586"></a>
|
||||
<a class="link" href="tut.html#autoindex.tut.step_3__add_indexes_to_your_documentation">Step
|
||||
3: Add indexes to your documentation</a>
|
||||
</h5>
|
||||
@ -249,7 +249,7 @@ boostbook standalone
|
||||
<xsl:param>index.on.type=1
|
||||
</pre>
|
||||
<a name="autoindex.tut.step_4__create_the_script_file"></a><h5>
|
||||
<a name="id1002762"></a>
|
||||
<a name="id977640"></a>
|
||||
<a class="link" href="tut.html#autoindex.tut.step_4__create_the_script_file">Step 4: Create
|
||||
the script file</a>
|
||||
</h5>
|
||||
@ -322,7 +322,7 @@ boostbook standalone
|
||||
<pre class="programlisting"><span class="special">!</span><span class="identifier">rewrite</span><span class="special">-</span><span class="identifier">name</span> <span class="string">"(?i)(?:A|The)\s+(.*)"</span> <span class="string">"\1"</span>
|
||||
</pre>
|
||||
<a name="autoindex.tut.step_5__add_manual_index_entries___optional"></a><h5>
|
||||
<a name="id1003020"></a>
|
||||
<a name="id977898"></a>
|
||||
<a class="link" href="tut.html#autoindex.tut.step_5__add_manual_index_entries___optional">Step
|
||||
5: Add Manual Index Entries - Optional</a>
|
||||
</h5>
|
||||
@ -338,7 +338,7 @@ boostbook standalone
|
||||
index itself, with the exception of the "type" attribute.
|
||||
</p>
|
||||
<a name="autoindex.tut.step_6__build_the_your_docs"></a><h5>
|
||||
<a name="id1003140"></a>
|
||||
<a name="id978018"></a>
|
||||
<a class="link" href="tut.html#autoindex.tut.step_6__build_the_your_docs">Step 6: Build the
|
||||
Your Docs</a>
|
||||
</h5>
|
||||
@ -365,7 +365,7 @@ boostbook standalone
|
||||
If you don't see that, or if it's indexing 0 terms then something is wrong!
|
||||
</p>
|
||||
<a name="autoindex.tut.step_7__iterate"></a><h5>
|
||||
<a name="id1003250"></a>
|
||||
<a name="id978128"></a>
|
||||
<a class="link" href="tut.html#autoindex.tut.step_7__iterate">Step 7: Iterate</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -21,7 +21,7 @@
|
||||
</h3></div></div></div>
|
||||
<div><p class="copyright">Copyright © 2008 John Maddock</p></div>
|
||||
<div><div class="legalnotice">
|
||||
<a name="id994092"></a><p>
|
||||
<a name="id968970"></a><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>
|
||||
@ -40,7 +40,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><p><small>Last revised: December 20, 2010 at 13:16:00 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: December 20, 2010 at 18:55:27 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
@ -39,7 +39,7 @@
|
||||
<div><p class="copyright">Copyright © 2006 , 2007, 2008 John Maddock, Paul A. Bristow, Hubert
|
||||
Holin, Xiaogang Zhang, Bruno Lalande and Gautam Sewani</p></div>
|
||||
<div><div class="legalnotice">
|
||||
<a name="id968942"></a><p>
|
||||
<a name="id970148"></a><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>
|
||||
@ -57,8 +57,8 @@
|
||||
<dt><span class="section"><a href="math_toolkit/main_overview/directories.html">Directory and
|
||||
File Structure</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/main_overview/namespaces.html">Namespaces</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/main_overview/result_type.html"> Calculation
|
||||
of the Type of the Result</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/main_overview/result_type.html">Calculation of
|
||||
the Type of the Result</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/main_overview/error_handling.html">Error Handling</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/main_overview/compilers_overview.html">Compilers</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/main_overview/pol_overview.html">Configuration
|
||||
@ -81,10 +81,10 @@
|
||||
<dt><span class="section"><a href="math_toolkit/dist/stat_tut/overview.html">Overview</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/stat_tut/weg.html">Worked Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/stat_tut/weg/dist_construct_eg.html">
|
||||
Distribution Construction Example</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/stat_tut/weg/st_eg.html"> Student's
|
||||
t Distribution Examples</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/stat_tut/weg/dist_construct_eg.html">Distribution
|
||||
Construction Example</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/stat_tut/weg/st_eg.html">Student's t
|
||||
Distribution Examples</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/stat_tut/weg/cs_eg.html">Chi Squared
|
||||
Distribution Examples</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/stat_tut/weg/f_eg.html">F Distribution
|
||||
@ -115,16 +115,16 @@
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/nmp.html">Non-Member Properties</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists.html">Distributions</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/bernoulli_dist.html">
|
||||
Bernoulli Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/bernoulli_dist.html">Bernoulli
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/beta_dist.html">Beta
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/binomial_dist.html">
|
||||
Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/binomial_dist.html">Binomial
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/cauchy_dist.html">Cauchy-Lorentz
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/chi_squared_dist.html">
|
||||
Chi Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/chi_squared_dist.html">Chi
|
||||
Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/exp_dist.html">Exponential
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/extreme_dist.html">Extreme
|
||||
@ -132,32 +132,31 @@
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/f_dist.html">F Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/gamma_dist.html">Gamma
|
||||
(and Erlang) Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/logistic_dist.html">
|
||||
Logistic Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/lognormal_dist.html">
|
||||
Log Normal Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html">
|
||||
Negative Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/logistic_dist.html">Logistic
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/lognormal_dist.html">Log
|
||||
Normal Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html">Negative
|
||||
Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/nc_beta_dist.html">Noncentral
|
||||
Beta Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/nc_chi_squared_dist.html">
|
||||
Noncentral Chi-Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/nc_chi_squared_dist.html">Noncentral
|
||||
Chi-Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/nc_f_dist.html">Noncentral
|
||||
F Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/nc_t_dist.html">Noncentral
|
||||
T Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/normal_dist.html">Normal
|
||||
(Gaussian) Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/pareto.html"> Pareto
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/pareto.html">Pareto Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/poisson_dist.html">Poisson
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/rayleigh.html">Rayleigh
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/students_t_dist.html">
|
||||
Students t Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/triangular_dist.html">
|
||||
Triangular Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/students_t_dist.html">Students
|
||||
t Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/triangular_dist.html">Triangular
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/weibull.html">Weibull
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/dist/dist_ref/dists/uniform_dist.html">Uniform
|
||||
@ -188,12 +187,12 @@
|
||||
Coefficients</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="math_toolkit/special/factorials/sf_factorial.html">Factorial</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/factorials/sf_double_factorial.html">
|
||||
Double Factorial</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/factorials/sf_rising_factorial.html">
|
||||
Rising Factorial</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/factorials/sf_falling_factorial.html">
|
||||
Falling Factorial</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/factorials/sf_double_factorial.html">Double
|
||||
Factorial</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/factorials/sf_rising_factorial.html">Rising
|
||||
Factorial</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/factorials/sf_falling_factorial.html">Falling
|
||||
Factorial</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/factorials/sf_binomial.html">Binomial
|
||||
Coefficients</a></span></dt>
|
||||
</dl></dd>
|
||||
@ -209,8 +208,7 @@
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="math_toolkit/special/sf_erf.html">Error Functions</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="math_toolkit/special/sf_erf/error_function.html"> Error
|
||||
Functions</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/sf_erf/error_function.html">Error Functions</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/sf_erf/error_inv.html">Error Function
|
||||
Inverses</a></span></dt>
|
||||
</dl></dd>
|
||||
@ -231,8 +229,8 @@
|
||||
of the First and Second Kinds</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/bessel/mbessel.html">Modified Bessel
|
||||
Functions of the First and Second Kinds</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/bessel/sph_bessel.html"> Spherical
|
||||
Bessel Functions of the First and Second Kinds</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/bessel/sph_bessel.html">Spherical Bessel
|
||||
Functions of the First and Second Kinds</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="math_toolkit/special/ellint.html">Elliptic Integrals</a></span></dt>
|
||||
<dd><dl>
|
||||
@ -251,10 +249,10 @@
|
||||
<dd><dl><dt><span class="section"><a href="math_toolkit/special/zetas/zeta.html">Riemann Zeta Function</a></span></dt></dl></dd>
|
||||
<dt><span class="section"><a href="math_toolkit/special/expint.html">Exponential Integrals</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="math_toolkit/special/expint/expint_n.html"> Exponential
|
||||
Integral En</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/expint/expint_i.html"> Exponential
|
||||
Integral Ei</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/expint/expint_n.html">Exponential Integral
|
||||
En</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/expint/expint_i.html">Exponential Integral
|
||||
Ei</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="math_toolkit/special/powers.html">Logs, Powers, Roots and
|
||||
Exponentials</a></span></dt>
|
||||
@ -308,8 +306,8 @@
|
||||
<dt><span class="section"><a href="math_toolkit/special/next_float/float_advance.html">Advancing
|
||||
a Floating Point Value by a Specific Representation Distance (ULP) float_advance</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="math_toolkit/special/extern_c.html"> TR1 and C99 external
|
||||
"C" Functions</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/special/extern_c.html">TR1 and C99 external "C"
|
||||
Functions</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="math_toolkit/special/extern_c/tr1.html">C99 and TR1 C Functions
|
||||
Overview</a></span></dt>
|
||||
@ -325,8 +323,8 @@
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="math_toolkit/toolkit/internals1/constants.html">Numeric
|
||||
Constants</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/toolkit/internals1/series_evaluation.html">
|
||||
Series Evaluation</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/toolkit/internals1/series_evaluation.html">Series
|
||||
Evaluation</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/toolkit/internals1/cf.html">Continued Fraction
|
||||
Evaluation</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/toolkit/internals1/rational.html">Polynomial
|
||||
@ -368,29 +366,29 @@
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_overview.html">Policy Overview</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial.html">Policy Tutorial</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/what_is_a_policy.html">
|
||||
So Just What is a Policy Anyway?</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/policy_tut_defaults.html">
|
||||
Policies Have Sensible Defaults</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/policy_usage.html"> So
|
||||
How are Policies Used Anyway?</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/changing_policy_defaults.html">
|
||||
Changing the Policy Defaults</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/ad_hoc_dist_policies.html">
|
||||
Setting Policies for Distributions on an Ad Hoc Basis</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/ad_hoc_sf_policies.html">
|
||||
Changing the Policy on an Ad Hoc Basis for the Special Functions</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/namespace_policies.html">
|
||||
Setting Policies at Namespace or Translation Unit Scope</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/user_def_err_pol.html">
|
||||
Calling User Defined Error Handlers</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/understand_dis_quant.html">
|
||||
Understanding Quantiles of Discrete Distributions</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/what_is_a_policy.html">So
|
||||
Just What is a Policy Anyway?</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/policy_tut_defaults.html">Policies
|
||||
Have Sensible Defaults</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/policy_usage.html">So How
|
||||
are Policies Used Anyway?</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/changing_policy_defaults.html">Changing
|
||||
the Policy Defaults</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/ad_hoc_dist_policies.html">Setting
|
||||
Policies for Distributions on an Ad Hoc Basis</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/ad_hoc_sf_policies.html">Changing
|
||||
the Policy on an Ad Hoc Basis for the Special Functions</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/namespace_policies.html">Setting
|
||||
Policies at Namespace or Translation Unit Scope</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/user_def_err_pol.html">Calling
|
||||
User Defined Error Handlers</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_tutorial/understand_dis_quant.html">Understanding
|
||||
Quantiles of Discrete Distributions</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_ref.html">Policy Reference</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_ref/error_handling_policies.html">
|
||||
Error Handling Policies</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_ref/error_handling_policies.html">Error
|
||||
Handling Policies</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_ref/internal_promotion.html">Internal
|
||||
Promotion Policies</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/policy/pol_ref/assert_undefined.html">Mathematically
|
||||
@ -417,8 +415,8 @@
|
||||
from this Library</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/perf/comp_compilers.html">Comparing Compilers</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/perf/tuning.html">Performance Tuning Macros</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/perf/comparisons.html"> Comparisons to Other
|
||||
Open Source Libraries</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/perf/comparisons.html">Comparisons to Other Open
|
||||
Source Libraries</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/perf/perf_test_app.html">The Performance Test
|
||||
Application</a></span></dt>
|
||||
</dl></dd>
|
||||
@ -426,8 +424,7 @@
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="math_toolkit/backgrounders/implementation.html">Additional
|
||||
Implementation Notes</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/backgrounders/relative_error.html"> Relative
|
||||
Error</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/backgrounders/relative_error.html">Relative Error</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/backgrounders/lanczos.html">The Lanczos Approximation</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/backgrounders/remez.html">The Remez Method</a></span></dt>
|
||||
<dt><span class="section"><a href="math_toolkit/backgrounders/refs.html">References</a></span></dt>
|
||||
@ -446,16 +443,13 @@
|
||||
<dt><span class="section"><a href="index/s14.html">Index</a></span></dt>
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
ISBN 0-9504833-2-X 978-0-9504833-2-0, Classification 519.2-dc22
|
||||
</p>
|
||||
<p>
|
||||
This manual is also available in <a href="http://svn.boost.org/svn/boost/sandbox/pdf/math/release/math.pdf" target="_top">printer
|
||||
friendly PDF format</a>.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><p><small>Last revised: December 19, 2010 at 18:06:46 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: December 21, 2010 at 18:22:46 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="id1365234"></a>Class Index</h2></div></div></div>
|
||||
<a name="id1365162"></a>Class Index</h2></div></div></div>
|
||||
<p><a class="link" href="s10.html#idx_id_0">B</a> <a class="link" href="s10.html#idx_id_1">C</a> <a class="link" href="s10.html#idx_id_2">E</a> <a class="link" href="s10.html#idx_id_3">F</a> <a class="link" href="s10.html#idx_id_4">G</a> <a class="link" href="s10.html#idx_id_5">L</a> <a class="link" href="s10.html#idx_id_6">N</a> <a class="link" href="s10.html#idx_id_7">P</a> <a class="link" href="s10.html#idx_id_8">R</a> <a class="link" href="s10.html#idx_id_9">S</a> <a class="link" href="s10.html#idx_id_10">T</a> <a class="link" href="s10.html#idx_id_11">U</a> <a class="link" href="s10.html#idx_id_12">W</a> </p>
|
||||
<div class="variablelist"><dl>
|
||||
<dt>
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="id1365729"></a>Typedef Index</h2></div></div></div>
|
||||
<p><a class="link" href="s11.html#idx_id_13">A</a> <a class="link" href="s11.html#idx_id_14">B</a> <a class="link" href="s11.html#idx_id_15">D</a> <a class="link" href="s11.html#idx_id_16">E</a> <a class="link" href="s11.html#idx_id_17">F</a> <a class="link" href="s11.html#idx_id_18">I</a> <a class="link" href="s11.html#idx_id_19">N</a> <a class="link" href="s11.html#idx_id_20">O</a> <a class="link" href="s11.html#idx_id_21">P</a> <a class="link" href="s11.html#idx_id_22">R</a> <a class="link" href="s11.html#idx_id_23">U</a> <a class="link" href="s11.html#idx_id_24">V</a> </p>
|
||||
<a name="id1365658"></a>Typedef Index</h2></div></div></div>
|
||||
<p><a class="link" href="s11.html#idx_id_13">A</a> <a class="link" href="s11.html#idx_id_14">D</a> <a class="link" href="s11.html#idx_id_15">E</a> <a class="link" href="s11.html#idx_id_16">F</a> <a class="link" href="s11.html#idx_id_17">I</a> <a class="link" href="s11.html#idx_id_18">O</a> <a class="link" href="s11.html#idx_id_19">P</a> <a class="link" href="s11.html#idx_id_20">R</a> <a class="link" href="s11.html#idx_id_21">U</a> <a class="link" href="s11.html#idx_id_22">V</a> </p>
|
||||
<div class="variablelist"><dl>
|
||||
<dt>
|
||||
<a name="idx_id_13"></a><span class="term">A</span>
|
||||
@ -28,14 +28,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">Policy Class Reference</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_14"></a><span class="term">B</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">beta</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/dist_construct_eg.html" title="Distribution Construction Example">Distribution Construction Example</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_15"></a><span class="term">D</span>
|
||||
<a name="idx_id_14"></a><span class="term">D</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">denorm_error_type</span></dt>
|
||||
@ -52,14 +45,14 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_16"></a><span class="term">E</span>
|
||||
<a name="idx_id_15"></a><span class="term">E</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">evaluation_error_type</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">Policy Class Reference</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_17"></a><span class="term">F</span>
|
||||
<a name="idx_id_16"></a><span class="term">F</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">float_t</span></dt>
|
||||
@ -70,28 +63,21 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_18"></a><span class="term">I</span>
|
||||
<a name="idx_id_17"></a><span class="term">I</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">indeterminate_result_error_type</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">Policy Class Reference</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_19"></a><span class="term">N</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">negative_binomial</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/dist_construct_eg.html" title="Distribution Construction Example">Distribution Construction Example</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_20"></a><span class="term">O</span>
|
||||
<a name="idx_id_18"></a><span class="term">O</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">overflow_error_type</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">Policy Class Reference</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_21"></a><span class="term">P</span>
|
||||
<a name="idx_id_19"></a><span class="term">P</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">pole_error_type</span></dt>
|
||||
@ -127,21 +113,21 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">Policy Class Reference</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_22"></a><span class="term">R</span>
|
||||
<a name="idx_id_20"></a><span class="term">R</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">rounding_error_type</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">Policy Class Reference</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_23"></a><span class="term">U</span>
|
||||
<a name="idx_id_21"></a><span class="term">U</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">underflow_error_type</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">Policy Class Reference</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_24"></a><span class="term">V</span>
|
||||
<a name="idx_id_22"></a><span class="term">V</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">value_type</span></dt>
|
||||
|
@ -17,11 +17,11 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="id1366416"></a>Function Index</h2></div></div></div>
|
||||
<p><a class="link" href="s12.html#idx_id_25">A</a> <a class="link" href="s12.html#idx_id_26">B</a> <a class="link" href="s12.html#idx_id_27">C</a> <a class="link" href="s12.html#idx_id_28">D</a> <a class="link" href="s12.html#idx_id_29">E</a> <a class="link" href="s12.html#idx_id_30">F</a> <a class="link" href="s12.html#idx_id_31">G</a> <a class="link" href="s12.html#idx_id_32">H</a> <a class="link" href="s12.html#idx_id_33">I</a> <a class="link" href="s12.html#idx_id_34">L</a> <a class="link" href="s12.html#idx_id_35">M</a> <a class="link" href="s12.html#idx_id_36">N</a> <a class="link" href="s12.html#idx_id_37">P</a> <a class="link" href="s12.html#idx_id_38">Q</a> <a class="link" href="s12.html#idx_id_39">R</a> <a class="link" href="s12.html#idx_id_40">S</a> <a class="link" href="s12.html#idx_id_41">T</a> <a class="link" href="s12.html#idx_id_42">U</a> <a class="link" href="s12.html#idx_id_43">Z</a> </p>
|
||||
<a name="id1366294"></a>Function Index</h2></div></div></div>
|
||||
<p><a class="link" href="s12.html#idx_id_23">A</a> <a class="link" href="s12.html#idx_id_24">B</a> <a class="link" href="s12.html#idx_id_25">C</a> <a class="link" href="s12.html#idx_id_26">D</a> <a class="link" href="s12.html#idx_id_27">E</a> <a class="link" href="s12.html#idx_id_28">F</a> <a class="link" href="s12.html#idx_id_29">G</a> <a class="link" href="s12.html#idx_id_30">H</a> <a class="link" href="s12.html#idx_id_31">I</a> <a class="link" href="s12.html#idx_id_32">L</a> <a class="link" href="s12.html#idx_id_33">M</a> <a class="link" href="s12.html#idx_id_34">N</a> <a class="link" href="s12.html#idx_id_35">P</a> <a class="link" href="s12.html#idx_id_36">R</a> <a class="link" href="s12.html#idx_id_37">S</a> <a class="link" href="s12.html#idx_id_38">T</a> <a class="link" href="s12.html#idx_id_39">U</a> <a class="link" href="s12.html#idx_id_40">Z</a> </p>
|
||||
<div class="variablelist"><dl>
|
||||
<dt>
|
||||
<a name="idx_id_25"></a><span class="term">A</span>
|
||||
<a name="idx_id_23"></a><span class="term">A</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">acosh</span></dt>
|
||||
@ -47,9 +47,17 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_26"></a><span class="term">B</span>
|
||||
<a name="idx_id_24"></a><span class="term">B</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">beta</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list">
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/sf_beta/beta_function.html" title="Beta">Beta</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/main_overview/tr1.html" title="C99 and TR1 C Functions">C99 and TR1 C Functions</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1.html" title="C99 and TR1 C Functions Overview">C99 and TR1 C Functions Overview</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/sf_beta/ibeta_function.html" title="Incomplete Beta Functions">Incomplete Beta Functions</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1_ref.html" title="TR1 C Functions Quick Reference">TR1 C Functions Quick Reference</a></p></td></tr>
|
||||
</table></dd>
|
||||
<dt><span class="term">betac</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/special/sf_beta/ibeta_function.html" title="Incomplete Beta Functions">Incomplete Beta Functions</a></p></td></tr></table></dd>
|
||||
<dt><span class="term">betaf</span></dt>
|
||||
@ -62,7 +70,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/special/factorials/sf_binomial.html" title="Binomial Coefficients">Binomial Coefficients</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_27"></a><span class="term">C</span>
|
||||
<a name="idx_id_25"></a><span class="term">C</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">cbrt</span></dt>
|
||||
@ -115,7 +123,7 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_28"></a><span class="term">D</span>
|
||||
<a name="idx_id_26"></a><span class="term">D</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">digamma</span></dt>
|
||||
@ -124,7 +132,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/special/factorials/sf_double_factorial.html" title="Double Factorial">Double Factorial</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_29"></a><span class="term">E</span>
|
||||
<a name="idx_id_27"></a><span class="term">E</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">e</span></dt>
|
||||
@ -193,7 +201,7 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_30"></a><span class="term">F</span>
|
||||
<a name="idx_id_28"></a><span class="term">F</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">factorial</span></dt>
|
||||
@ -230,7 +238,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/special/next_float/float_prior.html" title="Finding the Next Smaller Representable Value (float_prior)">Finding the Next Smaller Representable Value (float_prior)</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_31"></a><span class="term">G</span>
|
||||
<a name="idx_id_29"></a><span class="term">G</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">gamma_p</span></dt>
|
||||
@ -249,7 +257,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/special/sf_gamma/igamma_inv.html" title="Incomplete Gamma Function Inverses">Incomplete Gamma Function Inverses</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_32"></a><span class="term">H</span>
|
||||
<a name="idx_id_30"></a><span class="term">H</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">halley_iterate</span></dt>
|
||||
@ -272,7 +280,7 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_33"></a><span class="term">I</span>
|
||||
<a name="idx_id_31"></a><span class="term">I</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">ibeta</span></dt>
|
||||
@ -297,7 +305,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/special/fpclass.html" title="Floating-Point Classification: Infinities and NaN's">Floating-Point Classification: Infinities and NaN's</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_34"></a><span class="term">L</span>
|
||||
<a name="idx_id_32"></a><span class="term">L</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">laguerre</span></dt>
|
||||
@ -345,18 +353,16 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_35"></a><span class="term">M</span>
|
||||
<a name="idx_id_33"></a><span class="term">M</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">make_policy</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">Policy Class Reference</a></p></td></tr></table></dd>
|
||||
<dt><span class="term">mean</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html" title="Find Location (Mean) Example">Find Location (Mean) Example</a></p></td></tr></table></dd>
|
||||
<dt><span class="term">msg</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_tutorial/user_def_err_pol.html" title="Calling User Defined Error Handlers">Calling User Defined Error Handlers</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_36"></a><span class="term">N</span>
|
||||
<a name="idx_id_34"></a><span class="term">N</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">newton_raphson_iterate</span></dt>
|
||||
@ -372,21 +378,14 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_tutorial/namespace_policies.html" title="Setting Policies at Namespace or Translation Unit Scope">Setting Policies at Namespace or Translation Unit Scope</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_37"></a><span class="term">P</span>
|
||||
<a name="idx_id_35"></a><span class="term">P</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">powm1</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/special/powers/powm1.html" title="powm1">powm1</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_38"></a><span class="term">Q</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">quantile</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/neg_binom_eg/negative_binomial_example1.html" title="Negative Binomial Sales Quota Example.">Negative Binomial Sales Quota Example.</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_39"></a><span class="term">R</span>
|
||||
<a name="idx_id_36"></a><span class="term">R</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">relative_error</span></dt>
|
||||
@ -401,7 +400,7 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_40"></a><span class="term">S</span>
|
||||
<a name="idx_id_37"></a><span class="term">S</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">schroeder_iterate</span></dt>
|
||||
@ -432,7 +431,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/special/powers/sqrt1pm1.html" title="sqrt1pm1">sqrt1pm1</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_41"></a><span class="term">T</span>
|
||||
<a name="idx_id_38"></a><span class="term">T</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">tgamma</span></dt>
|
||||
@ -463,14 +462,14 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_42"></a><span class="term">U</span>
|
||||
<a name="idx_id_39"></a><span class="term">U</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">user_domain_error</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_tutorial/user_def_err_pol.html" title="Calling User Defined Error Handlers">Calling User Defined Error Handlers</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_43"></a><span class="term">Z</span>
|
||||
<a name="idx_id_40"></a><span class="term">Z</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">zeta</span></dt>
|
||||
|
@ -17,11 +17,11 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="id1368682"></a>Macro Index</h2></div></div></div>
|
||||
<p><a class="link" href="s13.html#idx_id_44">B</a> <a class="link" href="s13.html#idx_id_45">F</a> </p>
|
||||
<a name="id1370351"></a>Macro Index</h2></div></div></div>
|
||||
<p><a class="link" href="s13.html#idx_id_41">B</a> <a class="link" href="s13.html#idx_id_42">F</a> </p>
|
||||
<div class="variablelist"><dl>
|
||||
<dt>
|
||||
<a name="idx_id_44"></a><span class="term">B</span>
|
||||
<a name="idx_id_41"></a><span class="term">B</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">BOOST_DEFINE_MATH_CONSTANT</span></dt>
|
||||
@ -108,7 +108,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/policy_defaults.html" title="Using macros to Change the Policy Defaults">Using macros to Change the Policy Defaults</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_45"></a><span class="term">F</span>
|
||||
<a name="idx_id_42"></a><span class="term">F</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">FP_INFINITE</span></dt>
|
||||
|
@ -16,11 +16,11 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="id1371935"></a>Index</h2></div></div></div>
|
||||
<p><a class="link" href="s14.html#idx_id_46">A</a> <a class="link" href="s14.html#idx_id_47">B</a> <a class="link" href="s14.html#idx_id_48">C</a> <a class="link" href="s14.html#idx_id_49">D</a> <a class="link" href="s14.html#idx_id_50">E</a> <a class="link" href="s14.html#idx_id_51">F</a> <a class="link" href="s14.html#idx_id_52">G</a> <a class="link" href="s14.html#idx_id_53">H</a> <a class="link" href="s14.html#idx_id_54">I</a> <a class="link" href="s14.html#idx_id_55">K</a> <a class="link" href="s14.html#idx_id_56">L</a> <a class="link" href="s14.html#idx_id_57">M</a> <a class="link" href="s14.html#idx_id_58">N</a> <a class="link" href="s14.html#idx_id_59">O</a> <a class="link" href="s14.html#idx_id_60">P</a> <a class="link" href="s14.html#idx_id_61">Q</a> <a class="link" href="s14.html#idx_id_62">R</a> <a class="link" href="s14.html#idx_id_63">S</a> <a class="link" href="s14.html#idx_id_64">T</a> <a class="link" href="s14.html#idx_id_65">U</a> <a class="link" href="s14.html#idx_id_66">V</a> <a class="link" href="s14.html#idx_id_67">W</a> <a class="link" href="s14.html#idx_id_68">Z</a> </p>
|
||||
<a name="id1370873"></a>Index</h2></div></div></div>
|
||||
<p><a class="link" href="s14.html#idx_id_43">A</a> <a class="link" href="s14.html#idx_id_44">B</a> <a class="link" href="s14.html#idx_id_45">C</a> <a class="link" href="s14.html#idx_id_46">D</a> <a class="link" href="s14.html#idx_id_47">E</a> <a class="link" href="s14.html#idx_id_48">F</a> <a class="link" href="s14.html#idx_id_49">G</a> <a class="link" href="s14.html#idx_id_50">H</a> <a class="link" href="s14.html#idx_id_51">I</a> <a class="link" href="s14.html#idx_id_52">K</a> <a class="link" href="s14.html#idx_id_53">L</a> <a class="link" href="s14.html#idx_id_54">M</a> <a class="link" href="s14.html#idx_id_55">N</a> <a class="link" href="s14.html#idx_id_56">O</a> <a class="link" href="s14.html#idx_id_57">P</a> <a class="link" href="s14.html#idx_id_58">R</a> <a class="link" href="s14.html#idx_id_59">S</a> <a class="link" href="s14.html#idx_id_60">T</a> <a class="link" href="s14.html#idx_id_61">U</a> <a class="link" href="s14.html#idx_id_62">V</a> <a class="link" href="s14.html#idx_id_63">W</a> <a class="link" href="s14.html#idx_id_64">Z</a> </p>
|
||||
<div class="variablelist"><dl>
|
||||
<dt>
|
||||
<a name="idx_id_46"></a><span class="term">A</span>
|
||||
<a name="idx_id_43"></a><span class="term">A</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">acosh</span></dt>
|
||||
@ -50,7 +50,7 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_47"></a><span class="term">B</span>
|
||||
<a name="idx_id_44"></a><span class="term">B</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">Bernoulli Distribution</span></dt>
|
||||
@ -67,9 +67,18 @@
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/bessel/bessel.html" title="Bessel Functions of the First and Second Kinds">cyl_neumann</a></p></td></tr>
|
||||
</table></dd>
|
||||
<dt><span class="term">Beta</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/special/sf_beta/beta_function.html" title="Beta">Lanczos approximation</a></p></td></tr></table></dd>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list">
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/sf_beta/beta_function.html" title="Beta">beta</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/sf_beta/beta_function.html" title="Beta">Lanczos approximation</a></p></td></tr>
|
||||
</table></dd>
|
||||
<dt><span class="term">beta</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/dist_construct_eg.html" title="Distribution Construction Example">Distribution Construction Example</a></p></td></tr></table></dd>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list">
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/sf_beta/beta_function.html" title="Beta">Beta</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/main_overview/tr1.html" title="C99 and TR1 C Functions">C99 and TR1 C Functions</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1.html" title="C99 and TR1 C Functions Overview">C99 and TR1 C Functions Overview</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/sf_beta/ibeta_function.html" title="Incomplete Beta Functions">Incomplete Beta Functions</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1_ref.html" title="TR1 C Functions Quick Reference">TR1 C Functions Quick Reference</a></p></td></tr>
|
||||
</table></dd>
|
||||
<dt><span class="term">Beta Distribution</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list">
|
||||
<tr><td><p><a class="link" href="../math_toolkit/dist/dist_ref/dists/beta_dist.html" title="Beta Distribution">beta_distribution</a></p></td></tr>
|
||||
@ -185,7 +194,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/policy_defaults.html" title="Using macros to Change the Policy Defaults">Using macros to Change the Policy Defaults</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_48"></a><span class="term">C</span>
|
||||
<a name="idx_id_45"></a><span class="term">C</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">C99 and TR1 C Functions</span></dt>
|
||||
@ -193,6 +202,7 @@
|
||||
<tr><td><p><a class="link" href="../math_toolkit/main_overview/tr1.html" title="C99 and TR1 C Functions">acosh</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/main_overview/tr1.html" title="C99 and TR1 C Functions">asinh</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/main_overview/tr1.html" title="C99 and TR1 C Functions">atanh</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/main_overview/tr1.html" title="C99 and TR1 C Functions">beta</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/main_overview/tr1.html" title="C99 and TR1 C Functions">betaf</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/main_overview/tr1.html" title="C99 and TR1 C Functions">cbrt</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/main_overview/tr1.html" title="C99 and TR1 C Functions">comp_ellint_2</a></p></td></tr>
|
||||
@ -229,6 +239,7 @@
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1.html" title="C99 and TR1 C Functions Overview">acosh</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1.html" title="C99 and TR1 C Functions Overview">asinh</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1.html" title="C99 and TR1 C Functions Overview">atanh</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1.html" title="C99 and TR1 C Functions Overview">beta</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1.html" title="C99 and TR1 C Functions Overview">betaf</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1.html" title="C99 and TR1 C Functions Overview">cbrt</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1.html" title="C99 and TR1 C Functions Overview">comp_ellint_2</a></p></td></tr>
|
||||
@ -369,7 +380,7 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_49"></a><span class="term">D</span>
|
||||
<a name="idx_id_46"></a><span class="term">D</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">denorm_error_type</span></dt>
|
||||
@ -401,7 +412,7 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_50"></a><span class="term">E</span>
|
||||
<a name="idx_id_47"></a><span class="term">E</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">e</span></dt>
|
||||
@ -473,13 +484,9 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">Policy Class Reference</a></p></td></tr></table></dd>
|
||||
<dt><span class="term">Examples</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list">
|
||||
<tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/dist_construct_eg.html" title="Distribution Construction Example">beta</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/binom_eg/binomial_quiz_example.html" title="Binomial Quiz Example">BOOST_MATH_DISCRETE_QUANTILE_POLICY</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/error_eg.html" title="Error Handling Example">BOOST_MATH_DOMAIN_ERROR_POLICY</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/neg_binom_eg/negative_binomial_example1.html" title="Negative Binomial Sales Quota Example.">BOOST_MATH_OVERFLOW_ERROR_POLICY</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html" title="Find Location (Mean) Example">mean</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/dist_construct_eg.html" title="Distribution Construction Example">negative_binomial</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/neg_binom_eg/negative_binomial_example1.html" title="Negative Binomial Sales Quota Example.">quantile</a></p></td></tr>
|
||||
</table></dd>
|
||||
<dt><span class="term">expint</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list">
|
||||
@ -517,7 +524,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/dist/dist_ref/dists/extreme_dist.html" title="Extreme Value Distribution">Extreme Value Distribution</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_51"></a><span class="term">F</span>
|
||||
<a name="idx_id_48"></a><span class="term">F</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">F Distribution</span></dt>
|
||||
@ -596,7 +603,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/special/fpclass.html" title="Floating-Point Classification: Infinities and NaN's">Floating-Point Classification: Infinities and NaN's</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_52"></a><span class="term">G</span>
|
||||
<a name="idx_id_49"></a><span class="term">G</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">Gamma</span></dt>
|
||||
@ -634,7 +641,7 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_53"></a><span class="term">H</span>
|
||||
<a name="idx_id_50"></a><span class="term">H</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">halley_iterate</span></dt>
|
||||
@ -662,7 +669,7 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_54"></a><span class="term">I</span>
|
||||
<a name="idx_id_51"></a><span class="term">I</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">ibeta</span></dt>
|
||||
@ -699,6 +706,7 @@
|
||||
</table></dd>
|
||||
<dt><span class="term">Incomplete Beta Functions</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list">
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/sf_beta/ibeta_function.html" title="Incomplete Beta Functions">beta</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/sf_beta/ibeta_function.html" title="Incomplete Beta Functions">betac</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/sf_beta/ibeta_function.html" title="Incomplete Beta Functions">ibeta</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/sf_beta/ibeta_function.html" title="Incomplete Beta Functions">ibetac</a></p></td></tr>
|
||||
@ -729,14 +737,14 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_55"></a><span class="term">K</span>
|
||||
<a name="idx_id_52"></a><span class="term">K</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">Known Issues, and Todo List</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/status/issues.html" title="Known Issues, and Todo List">Lanczos approximation</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_56"></a><span class="term">L</span>
|
||||
<a name="idx_id_53"></a><span class="term">L</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">laguerre</span></dt>
|
||||
@ -834,13 +842,11 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_57"></a><span class="term">M</span>
|
||||
<a name="idx_id_54"></a><span class="term">M</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">make_policy</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">Policy Class Reference</a></p></td></tr></table></dd>
|
||||
<dt><span class="term">mean</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/find_eg/find_location_eg.html" title="Find Location (Mean) Example">Find Location (Mean) Example</a></p></td></tr></table></dd>
|
||||
<dt><span class="term">Modified Bessel Functions of the First and Second Kinds</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list">
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/bessel/mbessel.html" title="Modified Bessel Functions of the First and Second Kinds">cyl_bessel_i</a></p></td></tr>
|
||||
@ -850,7 +856,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_tutorial/user_def_err_pol.html" title="Calling User Defined Error Handlers">Calling User Defined Error Handlers</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_58"></a><span class="term">N</span>
|
||||
<a name="idx_id_55"></a><span class="term">N</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">Negative Binomial Distribution</span></dt>
|
||||
@ -862,8 +868,6 @@
|
||||
<tr><td><p><a class="link" href="../math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html" title="Negative Binomial Distribution">policy_type</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html" title="Negative Binomial Distribution">value_type</a></p></td></tr>
|
||||
</table></dd>
|
||||
<dt><span class="term">negative_binomial</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/dist_construct_eg.html" title="Distribution Construction Example">Distribution Construction Example</a></p></td></tr></table></dd>
|
||||
<dt><span class="term">negative_binomial_distribution</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html" title="Negative Binomial Distribution">Negative Binomial Distribution</a></p></td></tr></table></dd>
|
||||
<dt><span class="term">newton_raphson_iterate</span></dt>
|
||||
@ -923,14 +927,14 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/toolkit/internals1/constants.html" title="Numeric Constants">e</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_59"></a><span class="term">O</span>
|
||||
<a name="idx_id_56"></a><span class="term">O</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">overflow_error_type</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">Policy Class Reference</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_60"></a><span class="term">P</span>
|
||||
<a name="idx_id_57"></a><span class="term">P</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">Pareto Distribution</span></dt>
|
||||
@ -1016,14 +1020,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">Policy Class Reference</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_61"></a><span class="term">Q</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">quantile</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/dist/stat_tut/weg/neg_binom_eg/negative_binomial_example1.html" title="Negative Binomial Sales Quota Example.">Negative Binomial Sales Quota Example.</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_62"></a><span class="term">R</span>
|
||||
<a name="idx_id_58"></a><span class="term">R</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">Ratios of Gamma Functions</span></dt>
|
||||
@ -1070,7 +1067,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/policy/pol_ref/pol_ref_ref.html" title="Policy Class Reference">Policy Class Reference</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_63"></a><span class="term">S</span>
|
||||
<a name="idx_id_59"></a><span class="term">S</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">schroeder_iterate</span></dt>
|
||||
@ -1136,7 +1133,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/dist/dist_ref/dists/students_t_dist.html" title="Students t Distribution">Students t Distribution</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_64"></a><span class="term">T</span>
|
||||
<a name="idx_id_60"></a><span class="term">T</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">test_data</span></dt>
|
||||
@ -1163,6 +1160,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/special/sf_gamma/gamma_ratios.html" title="Ratios of Gamma Functions">Ratios of Gamma Functions</a></p></td></tr></table></dd>
|
||||
<dt><span class="term">TR1 C Functions Quick Reference</span></dt>
|
||||
<dd><table class="simplelist" border="0" summary="Simple list">
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1_ref.html" title="TR1 C Functions Quick Reference">beta</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1_ref.html" title="TR1 C Functions Quick Reference">betaf</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1_ref.html" title="TR1 C Functions Quick Reference">comp_ellint_2</a></p></td></tr>
|
||||
<tr><td><p><a class="link" href="../math_toolkit/special/extern_c/tr1_ref.html" title="TR1 C Functions Quick Reference">comp_ellint_3</a></p></td></tr>
|
||||
@ -1195,7 +1193,7 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_65"></a><span class="term">U</span>
|
||||
<a name="idx_id_61"></a><span class="term">U</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">underflow_error_type</span></dt>
|
||||
@ -1233,7 +1231,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/using_udt/use_ntl.html" title="Using With NTL - a High-Precision Floating-Point Library">Lanczos approximation</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_66"></a><span class="term">V</span>
|
||||
<a name="idx_id_62"></a><span class="term">V</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">value_type</span></dt>
|
||||
@ -1266,7 +1264,7 @@
|
||||
</table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_67"></a><span class="term">W</span>
|
||||
<a name="idx_id_63"></a><span class="term">W</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">Weibull Distribution</span></dt>
|
||||
@ -1279,7 +1277,7 @@
|
||||
<dd><table class="simplelist" border="0" summary="Simple list"><tr><td><p><a class="link" href="../math_toolkit/dist/dist_ref/dists/weibull.html" title="Weibull Distribution">Weibull Distribution</a></p></td></tr></table></dd>
|
||||
</dl></div></dd>
|
||||
<dt>
|
||||
<a name="idx_id_68"></a><span class="term">Z</span>
|
||||
<a name="idx_id_64"></a><span class="term">Z</span>
|
||||
</dt>
|
||||
<dd><div class="variablelist"><dl>
|
||||
<dt><span class="term">zeta</span></dt>
|
||||
|
@ -22,8 +22,7 @@
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="backgrounders/implementation.html">Additional
|
||||
Implementation Notes</a></span></dt>
|
||||
<dt><span class="section"><a href="backgrounders/relative_error.html"> Relative
|
||||
Error</a></span></dt>
|
||||
<dt><span class="section"><a href="backgrounders/relative_error.html">Relative Error</a></span></dt>
|
||||
<dt><span class="section"><a href="backgrounders/lanczos.html">The Lanczos Approximation</a></span></dt>
|
||||
<dt><span class="section"><a href="backgrounders/remez.html">The Remez Method</a></span></dt>
|
||||
<dt><span class="section"><a href="backgrounders/refs.html">References</a></span></dt>
|
||||
|
@ -26,7 +26,7 @@
|
||||
and reflect more the general implementation philosophy used.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.implementation.implemention_philosophy"></a><h5>
|
||||
<a name="id1352305"></a>
|
||||
<a name="id1352034"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.implemention_philosophy">Implemention
|
||||
philosophy</a>
|
||||
</h5>
|
||||
@ -78,7 +78,7 @@
|
||||
These could still provide sufficient accuracy for some speed-critical applications.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.implementation.accuracy_and_representation_of_test_values"></a><h5>
|
||||
<a name="id1352368"></a>
|
||||
<a name="id1352098"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.accuracy_and_representation_of_test_values">Accuracy
|
||||
and Representation of Test Values</a>
|
||||
</h5>
|
||||
@ -123,7 +123,7 @@
|
||||
binary value).
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.implementation.tolerance_of_tests"></a><h5>
|
||||
<a name="id1353834"></a>
|
||||
<a name="id1352242"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.tolerance_of_tests">Tolerance
|
||||
of Tests</a>
|
||||
</h5>
|
||||
@ -149,7 +149,7 @@
|
||||
first that the suffix L is present, and then that the tolerance is big enough.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.implementation.handling_unsuitable_arguments"></a><h5>
|
||||
<a name="id1353879"></a>
|
||||
<a name="id1352286"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.handling_unsuitable_arguments">Handling
|
||||
Unsuitable Arguments</a>
|
||||
</h5>
|
||||
@ -217,7 +217,7 @@
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="math_toolkit.backgrounders.implementation.handling_of_functions_that_are_not_mathematically_defined"></a><h5>
|
||||
<a name="id1354011"></a>
|
||||
<a name="id1352418"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.handling_of_functions_that_are_not_mathematically_defined">Handling
|
||||
of Functions that are Not Mathematically defined</a>
|
||||
</h5>
|
||||
@ -251,7 +251,7 @@
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="math_toolkit.backgrounders.implementation.median_of_distributions"></a><h5>
|
||||
<a name="id1354097"></a>
|
||||
<a name="id1352505"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.median_of_distributions">Median
|
||||
of distributions</a>
|
||||
</h5>
|
||||
@ -284,7 +284,7 @@
|
||||
Basic Statistics.</a> give more detail, in particular for discrete distributions.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.implementation.handling_of_floating_point_infinity"></a><h5>
|
||||
<a name="id1354197"></a>
|
||||
<a name="id1352604"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.handling_of_floating_point_infinity">Handling
|
||||
of Floating-Point Infinity</a>
|
||||
</h5>
|
||||
@ -328,7 +328,7 @@
|
||||
handling policies</a>.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.implementation.scale__shape_and_location"></a><h5>
|
||||
<a name="id1354285"></a>
|
||||
<a name="id1352693"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.scale__shape_and_location">Scale,
|
||||
Shape and Location</a>
|
||||
</h5>
|
||||
@ -355,7 +355,7 @@
|
||||
functions, they can be added if required.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.implementation.notes_on_implementation_of_specific_functions__amp__distributions"></a><h5>
|
||||
<a name="id1354620"></a>
|
||||
<a name="id1354863"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.notes_on_implementation_of_specific_functions__amp__distributions">Notes
|
||||
on Implementation of Specific Functions & Distributions</a>
|
||||
</h5>
|
||||
@ -367,7 +367,7 @@
|
||||
lower = -1, mode = 0 and upper = 1 would be more suitable.
|
||||
</li></ul></div>
|
||||
<a name="math_toolkit.backgrounders.implementation.rational_approximations_used"></a><h5>
|
||||
<a name="id1354644"></a>
|
||||
<a name="id1354887"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.rational_approximations_used">Rational
|
||||
Approximations Used</a>
|
||||
</h5>
|
||||
@ -410,7 +410,7 @@
|
||||
to the "true" minimax solution.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.implementation.representation_of_mathematical_constants"></a><h5>
|
||||
<a name="id1354689"></a>
|
||||
<a name="id1354931"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.representation_of_mathematical_constants">Representation
|
||||
of Mathematical Constants</a>
|
||||
</h5>
|
||||
@ -471,7 +471,7 @@
|
||||
</span><span class="keyword">double</span> <span class="identifier">p</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">constants</span><span class="special">::</span><span class="identifier">pi</span><span class="special">();</span> <span class="comment">// Context does not allow for disambiguation of overloaded function
|
||||
</span></pre>
|
||||
<a name="math_toolkit.backgrounders.implementation.thread_safety"></a><h5>
|
||||
<a name="id1355076"></a>
|
||||
<a name="id1355319"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.thread_safety">Thread
|
||||
safety</a>
|
||||
</h5>
|
||||
@ -496,7 +496,7 @@
|
||||
the right thing here at some point.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.implementation.sources_of_test_data"></a><h5>
|
||||
<a name="id1355112"></a>
|
||||
<a name="id1355355"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.sources_of_test_data">Sources
|
||||
of Test Data</a>
|
||||
</h5>
|
||||
@ -534,7 +534,7 @@
|
||||
the underlying special function is known to be difficult to implement.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.implementation.creating_and_managing_the_equations"></a><h5>
|
||||
<a name="id1355177"></a>
|
||||
<a name="id1355420"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.creating_and_managing_the_equations">Creating
|
||||
and Managing the Equations</a>
|
||||
</h5>
|
||||
@ -695,7 +695,7 @@ done</pre>
|
||||
HTML: this needs further investigation.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.implementation.producing_graphs"></a><h5>
|
||||
<a name="id1355359"></a>
|
||||
<a name="id1355602"></a>
|
||||
<a class="link" href="implementation.html#math_toolkit.backgrounders.implementation.producing_graphs">Producing
|
||||
Graphs</a>
|
||||
</h5>
|
||||
|
@ -20,7 +20,7 @@
|
||||
<a name="math_toolkit.backgrounders.lanczos"></a><a class="link" href="lanczos.html" title="The Lanczos Approximation">The Lanczos Approximation</a>
|
||||
</h3></div></div></div>
|
||||
<a name="math_toolkit.backgrounders.lanczos.motivation"></a><h5>
|
||||
<a name="id1355585"></a>
|
||||
<a name="id1355824"></a>
|
||||
<a class="link" href="lanczos.html#math_toolkit.backgrounders.lanczos.motivation">Motivation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -92,7 +92,7 @@
|
||||
functions divided by large powers into single (simpler) expressions.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.lanczos.the_approximation"></a><h5>
|
||||
<a name="id1355841"></a>
|
||||
<a name="id1356080"></a>
|
||||
<a class="link" href="lanczos.html#math_toolkit.backgrounders.lanczos.the_approximation">The
|
||||
Approximation</a>
|
||||
</h5>
|
||||
@ -154,7 +154,7 @@
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="math_toolkit.backgrounders.lanczos.computing_the_coefficients"></a><h5>
|
||||
<a name="id1356557"></a>
|
||||
<a name="id1356272"></a>
|
||||
<a class="link" href="lanczos.html#math_toolkit.backgrounders.lanczos.computing_the_coefficients">Computing
|
||||
the Coefficients</a>
|
||||
</h5>
|
||||
@ -198,7 +198,7 @@
|
||||
multiplied by <span class="emphasis"><em>F</em></span> as the last step.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.lanczos.choosing_the_right_parameters"></a><h5>
|
||||
<a name="id1356714"></a>
|
||||
<a name="id1356429"></a>
|
||||
<a class="link" href="lanczos.html#math_toolkit.backgrounders.lanczos.choosing_the_right_parameters">Choosing
|
||||
the Right Parameters</a>
|
||||
</h5>
|
||||
@ -222,7 +222,7 @@
|
||||
computing to float precision with double precision arithmetic.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1356768"></a><p class="title"><b>Table 53. Optimal choices for N and g when computing with guard digits (source:
|
||||
<a name="id1356483"></a><p class="title"><b>Table 53. Optimal choices for N and g when computing with guard digits (source:
|
||||
Pugh)</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Optimal choices for N and g when computing with guard digits (source:
|
||||
Pugh)">
|
||||
@ -365,7 +365,7 @@
|
||||
exactly matches the machine epsilon for the type in question.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1356991"></a><p class="title"><b>Table 54. Optimum value for N and g when computing at fixed precision</b></p>
|
||||
<a name="id1356706"></a><p class="title"><b>Table 54. Optimum value for N and g when computing at fixed precision</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Optimum value for N and g when computing at fixed precision">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -528,16 +528,16 @@
|
||||
is exact, and so isn't used for the gamma function.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.lanczos.references"></a><h5>
|
||||
<a name="id1357249"></a>
|
||||
<a name="id1358334"></a>
|
||||
<a class="link" href="lanczos.html#math_toolkit.backgrounders.lanczos.references">References</a>
|
||||
</h5>
|
||||
<a name="godfrey"></a><a name="pugh"></a><div class="orderedlist"><ol type="1">
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
Paul Godfrey, <a href="http://my.fit.edu/~gabdo/gamma.txt" target="_top">"A
|
||||
<a name="godfrey"></a> Paul Godfrey, <a href="http://my.fit.edu/~gabdo/gamma.txt" target="_top">"A
|
||||
note on the computation of the convergent Lanczos complex Gamma approximation"</a>.
|
||||
</li>
|
||||
<li>
|
||||
Glendon Ralph Pugh, <a href="http://bh0.physics.ubc.ca/People/matt/Doc/ThesesOthers/Phd/pugh.pdf" target="_top">"An
|
||||
<a name="pugh"></a> Glendon Ralph Pugh, <a href="http://bh0.physics.ubc.ca/People/matt/Doc/ThesesOthers/Phd/pugh.pdf" target="_top">"An
|
||||
Analysis of the Lanczos Gamma Approximation"</a>, PhD Thesis
|
||||
November 2004.
|
||||
</li>
|
||||
|
@ -20,7 +20,7 @@
|
||||
<a name="math_toolkit.backgrounders.refs"></a><a class="link" href="refs.html" title="References">References</a>
|
||||
</h3></div></div></div>
|
||||
<a name="math_toolkit.backgrounders.refs.general_references"></a><h5>
|
||||
<a name="id1358172"></a>
|
||||
<a name="id1359257"></a>
|
||||
<a class="link" href="refs.html#math_toolkit.backgrounders.refs.general_references">General
|
||||
references</a>
|
||||
</h5>
|
||||
@ -84,7 +84,7 @@
|
||||
Library (version 2), Walter E. Brown</a>
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.refs.calculators__that_we_found__and_used_to_cross_check___as_far_as_their_widely_varying_accuracy_allowed__"></a><h5>
|
||||
<a name="id1358263"></a>
|
||||
<a name="id1359348"></a>
|
||||
<a class="link" href="refs.html#math_toolkit.backgrounders.refs.calculators__that_we_found__and_used_to_cross_check___as_far_as_their_widely_varying_accuracy_allowed__">Calculators*
|
||||
that we found (and used to cross-check - as far as their widely-varying accuracy
|
||||
allowed).</a>
|
||||
@ -94,7 +94,7 @@
|
||||
Binomial Probability Distribution Calculator.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.refs.other_libraries"></a><h5>
|
||||
<a name="id1358287"></a>
|
||||
<a name="id1359372"></a>
|
||||
<a class="link" href="refs.html#math_toolkit.backgrounders.refs.other_libraries">Other Libraries</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -17,8 +17,7 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="math_toolkit.backgrounders.relative_error"></a><a class="link" href="relative_error.html" title="Relative Error"> Relative
|
||||
Error</a>
|
||||
<a name="math_toolkit.backgrounders.relative_error"></a><a class="link" href="relative_error.html" title="Relative Error">Relative Error</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
Given an actual value <span class="emphasis"><em>a</em></span> and a found value <span class="emphasis"><em>v</em></span>
|
||||
@ -71,10 +70,8 @@
|
||||
errors differ by a factor of 2, can actually be accurate to the same number
|
||||
of binary digits. You have been warned!
|
||||
</p>
|
||||
<a name="zero_error"></a><p>
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.relative_error.the_impossibility_of_zero_error"></a><h5>
|
||||
<a name="id1355542"></a>
|
||||
<a name="zero_error"></a><a name="math_toolkit.backgrounders.relative_error.the_impossibility_of_zero_error"></a><h5>
|
||||
<a name="id1355781"></a>
|
||||
<a class="link" href="relative_error.html#math_toolkit.backgrounders.relative_error.the_impossibility_of_zero_error">The
|
||||
Impossibility of Zero Error</a>
|
||||
</h5>
|
||||
|
@ -87,7 +87,7 @@
|
||||
are located!</em></span>
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.remez.the_remez_method"></a><h5>
|
||||
<a name="id1357433"></a>
|
||||
<a name="id1358518"></a>
|
||||
<a class="link" href="remez.html#math_toolkit.backgrounders.remez.the_remez_method">The Remez
|
||||
Method</a>
|
||||
</h5>
|
||||
@ -167,7 +167,7 @@
|
||||
</td></tr>
|
||||
</table></div>
|
||||
<a name="math_toolkit.backgrounders.remez.remez_step_1"></a><h5>
|
||||
<a name="id1357585"></a>
|
||||
<a name="id1358670"></a>
|
||||
<a class="link" href="remez.html#math_toolkit.backgrounders.remez.remez_step_1">Remez Step
|
||||
1</a>
|
||||
</h5>
|
||||
@ -198,7 +198,7 @@
|
||||
to 5.6x10<sup>-4</sup>.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.remez.remez_step_2"></a><h5>
|
||||
<a name="id1357660"></a>
|
||||
<a name="id1358745"></a>
|
||||
<a class="link" href="remez.html#math_toolkit.backgrounders.remez.remez_step_2">Remez Step
|
||||
2</a>
|
||||
</h5>
|
||||
@ -227,7 +227,7 @@
|
||||
In our example we perform multi-point exchange.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.remez.iteration"></a><h5>
|
||||
<a name="id1357691"></a>
|
||||
<a name="id1358776"></a>
|
||||
<a class="link" href="remez.html#math_toolkit.backgrounders.remez.iteration">Iteration</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -243,7 +243,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../graphs/remez-4.png" alt="remez-4"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.remez.rational_approximations"></a><h5>
|
||||
<a name="id1357735"></a>
|
||||
<a name="id1358820"></a>
|
||||
<a class="link" href="remez.html#math_toolkit.backgrounders.remez.rational_approximations">Rational
|
||||
Approximations</a>
|
||||
</h5>
|
||||
@ -292,7 +292,7 @@
|
||||
number of terms overall.
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.remez.practical_considerations"></a><h5>
|
||||
<a name="id1357816"></a>
|
||||
<a name="id1358901"></a>
|
||||
<a class="link" href="remez.html#math_toolkit.backgrounders.remez.practical_considerations">Practical
|
||||
Considerations</a>
|
||||
</h5>
|
||||
@ -400,7 +400,7 @@
|
||||
desired minimax solution (5x10<sup>-4</sup>).
|
||||
</p>
|
||||
<a name="math_toolkit.backgrounders.remez.remez_method_checklist"></a><h5>
|
||||
<a name="id1357970"></a>
|
||||
<a name="id1359055"></a>
|
||||
<a class="link" href="remez.html#math_toolkit.backgrounders.remez.remez_method_checklist">Remez
|
||||
Method Checklist</a>
|
||||
</h5>
|
||||
@ -454,7 +454,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="math_toolkit.backgrounders.remez.references"></a><h5>
|
||||
<a name="id1358053"></a>
|
||||
<a name="id1359138"></a>
|
||||
<a class="link" href="remez.html#math_toolkit.backgrounders.remez.references">References</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -26,81 +26,79 @@
|
||||
<dt><span class="section"><a href="dist/stat_tut/overview.html">Overview</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg.html">Worked Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/dist_construct_eg.html">
|
||||
Distribution Construction Example</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/st_eg.html"> Student's
|
||||
t Distribution Examples</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/dist_construct_eg.html">Distribution
|
||||
Construction Example</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/st_eg.html">Student's t
|
||||
Distribution Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/st_eg/tut_mean_intervals.html">
|
||||
Calculating confidence intervals on the mean with the Students-t distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/st_eg/tut_mean_test.html">
|
||||
Testing a sample mean for difference from a "true" mean</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/st_eg/tut_mean_size.html">
|
||||
Estimating how large a sample size would have to become in order to give
|
||||
a significant Students-t test result with a single sample test</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/st_eg/two_sample_students_t.html">
|
||||
Comparing the means of two samples with the Students-t test</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/st_eg/paired_st.html">
|
||||
Comparing two paired samples with the Student's t distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/st_eg/tut_mean_intervals.html">Calculating
|
||||
confidence intervals on the mean with the Students-t distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/st_eg/tut_mean_test.html">Testing
|
||||
a sample mean for difference from a "true" mean</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/st_eg/tut_mean_size.html">Estimating
|
||||
how large a sample size would have to become in order to give a significant
|
||||
Students-t test result with a single sample test</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/st_eg/two_sample_students_t.html">Comparing
|
||||
the means of two samples with the Students-t test</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/st_eg/paired_st.html">Comparing
|
||||
two paired samples with the Student's t distribution</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/cs_eg.html">Chi Squared
|
||||
Distribution Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/cs_eg/chi_sq_intervals.html">
|
||||
Confidence Intervals on the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/cs_eg/chi_sq_test.html">
|
||||
Chi-Square Test for the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/cs_eg/chi_sq_size.html">
|
||||
Estimating the Required Sample Sizes for a Chi-Square Test for the Standard
|
||||
Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/cs_eg/chi_sq_intervals.html">Confidence
|
||||
Intervals on the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/cs_eg/chi_sq_test.html">Chi-Square
|
||||
Test for the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/cs_eg/chi_sq_size.html">Estimating
|
||||
the Required Sample Sizes for a Chi-Square Test for the Standard Deviation</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/f_eg.html">F Distribution
|
||||
Examples</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/binom_eg.html">Binomial
|
||||
Distribution Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/binom_eg/binomial_coinflip_example.html">
|
||||
Binomial Coin-Flipping Example</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/binom_eg/binomial_quiz_example.html">
|
||||
Binomial Quiz Example</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/binom_eg/binom_conf.html">
|
||||
Calculating Confidence Limits on the Frequency of Occurrence for a Binomial
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/binom_eg/binom_size_eg.html">
|
||||
Estimating Sample Sizes for a Binomial Distribution.</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/binom_eg/binomial_coinflip_example.html">Binomial
|
||||
Coin-Flipping Example</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/binom_eg/binomial_quiz_example.html">Binomial
|
||||
Quiz Example</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/binom_eg/binom_conf.html">Calculating
|
||||
Confidence Limits on the Frequency of Occurrence for a Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/binom_eg/binom_size_eg.html">Estimating
|
||||
Sample Sizes for a Binomial Distribution.</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/neg_binom_eg.html">Negative
|
||||
Binomial Distribution Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/neg_binom_eg/neg_binom_conf.html">
|
||||
Calculating Confidence Limits on the Frequency of Occurrence for the
|
||||
Negative Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/neg_binom_eg/neg_binom_size_eg.html">
|
||||
Estimating Sample Sizes for the Negative Binomial.</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/neg_binom_eg/negative_binomial_example1.html">
|
||||
Negative Binomial Sales Quota Example.</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/neg_binom_eg/negative_binomial_example2.html">
|
||||
Negative Binomial Table Printing Example.</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/neg_binom_eg/neg_binom_conf.html">Calculating
|
||||
Confidence Limits on the Frequency of Occurrence for the Negative Binomial
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/neg_binom_eg/neg_binom_size_eg.html">Estimating
|
||||
Sample Sizes for the Negative Binomial.</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/neg_binom_eg/negative_binomial_example1.html">Negative
|
||||
Binomial Sales Quota Example.</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/neg_binom_eg/negative_binomial_example2.html">Negative
|
||||
Binomial Table Printing Example.</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/normal_example.html">Normal
|
||||
Distribution Examples</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="dist/stat_tut/weg/normal_example/normal_misc.html">
|
||||
Some Miscellaneous Examples of the Normal (Gaussian) Distribution</a></span></dt></dl></dd>
|
||||
<dd><dl><dt><span class="section"><a href="dist/stat_tut/weg/normal_example/normal_misc.html">Some
|
||||
Miscellaneous Examples of the Normal (Gaussian) Distribution</a></span></dt></dl></dd>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/nccs_eg.html">Non Central
|
||||
Chi Squared Example</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="dist/stat_tut/weg/nccs_eg/nccs_power_eg.html">
|
||||
Tables of the power function of the χ<sup>2</sup> test.</a></span></dt></dl></dd>
|
||||
<dd><dl><dt><span class="section"><a href="dist/stat_tut/weg/nccs_eg/nccs_power_eg.html">Tables
|
||||
of the power function of the χ<sup>2</sup> test.</a></span></dt></dl></dd>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/error_eg.html">Error Handling
|
||||
Example</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/find_eg.html">Find Location
|
||||
and Scale Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/find_eg/find_location_eg.html">
|
||||
Find Location (Mean) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/find_eg/find_scale_eg.html">
|
||||
Find Scale (Standard Deviation) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/find_eg/find_mean_and_sd_eg.html">
|
||||
Find mean and standard deviation example</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/find_eg/find_location_eg.html">Find
|
||||
Location (Mean) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/find_eg/find_scale_eg.html">Find
|
||||
Scale (Standard Deviation) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/find_eg/find_mean_and_sd_eg.html">Find
|
||||
mean and standard deviation example</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="dist/stat_tut/weg/nag_library.html">Comparison
|
||||
with C, R, FORTRAN-style Free Functions</a></span></dt>
|
||||
@ -116,16 +114,16 @@
|
||||
<dt><span class="section"><a href="dist/dist_ref/nmp.html">Non-Member Properties</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists.html">Distributions</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/bernoulli_dist.html">
|
||||
Bernoulli Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/bernoulli_dist.html">Bernoulli
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/beta_dist.html">Beta
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/binomial_dist.html">
|
||||
Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/binomial_dist.html">Binomial
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/cauchy_dist.html">Cauchy-Lorentz
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/chi_squared_dist.html">
|
||||
Chi Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/chi_squared_dist.html">Chi
|
||||
Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/exp_dist.html">Exponential
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/extreme_dist.html">Extreme
|
||||
@ -133,32 +131,31 @@
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/f_dist.html">F Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/gamma_dist.html">Gamma
|
||||
(and Erlang) Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/logistic_dist.html">
|
||||
Logistic Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/lognormal_dist.html">
|
||||
Log Normal Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/negative_binomial_dist.html">
|
||||
Negative Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/logistic_dist.html">Logistic
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/lognormal_dist.html">Log
|
||||
Normal Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/negative_binomial_dist.html">Negative
|
||||
Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/nc_beta_dist.html">Noncentral
|
||||
Beta Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/nc_chi_squared_dist.html">
|
||||
Noncentral Chi-Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/nc_chi_squared_dist.html">Noncentral
|
||||
Chi-Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/nc_f_dist.html">Noncentral
|
||||
F Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/nc_t_dist.html">Noncentral
|
||||
T Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/normal_dist.html">Normal
|
||||
(Gaussian) Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/pareto.html"> Pareto
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/pareto.html">Pareto Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/poisson_dist.html">Poisson
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/rayleigh.html">Rayleigh
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/students_t_dist.html">
|
||||
Students t Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/triangular_dist.html">
|
||||
Triangular Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/students_t_dist.html">Students
|
||||
t Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/triangular_dist.html">Triangular
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/weibull.html">Weibull
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist/dist_ref/dists/uniform_dist.html">Uniform
|
||||
|
@ -24,16 +24,16 @@
|
||||
<dt><span class="section"><a href="dist_ref/nmp.html">Non-Member Properties</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists.html">Distributions</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="dist_ref/dists/bernoulli_dist.html">
|
||||
Bernoulli Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/bernoulli_dist.html">Bernoulli
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/beta_dist.html">Beta
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/binomial_dist.html">
|
||||
Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/binomial_dist.html">Binomial
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/cauchy_dist.html">Cauchy-Lorentz
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/chi_squared_dist.html">
|
||||
Chi Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/chi_squared_dist.html">Chi
|
||||
Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/exp_dist.html">Exponential
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/extreme_dist.html">Extreme
|
||||
@ -41,32 +41,31 @@
|
||||
<dt><span class="section"><a href="dist_ref/dists/f_dist.html">F Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/gamma_dist.html">Gamma
|
||||
(and Erlang) Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/logistic_dist.html">
|
||||
Logistic Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/lognormal_dist.html">
|
||||
Log Normal Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/negative_binomial_dist.html">
|
||||
Negative Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/logistic_dist.html">Logistic
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/lognormal_dist.html">Log
|
||||
Normal Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/negative_binomial_dist.html">Negative
|
||||
Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/nc_beta_dist.html">Noncentral
|
||||
Beta Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/nc_chi_squared_dist.html">
|
||||
Noncentral Chi-Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/nc_chi_squared_dist.html">Noncentral
|
||||
Chi-Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/nc_f_dist.html">Noncentral
|
||||
F Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/nc_t_dist.html">Noncentral
|
||||
T Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/normal_dist.html">Normal
|
||||
(Gaussian) Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/pareto.html"> Pareto
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/pareto.html">Pareto Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/poisson_dist.html">Poisson
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/rayleigh.html">Rayleigh
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/students_t_dist.html">
|
||||
Students t Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/triangular_dist.html">
|
||||
Triangular Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/students_t_dist.html">Students
|
||||
t Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/triangular_dist.html">Triangular
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/weibull.html">Weibull
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dist_ref/dists/uniform_dist.html">Uniform
|
||||
|
@ -21,7 +21,7 @@
|
||||
Algorithms</a>
|
||||
</h4></div></div></div>
|
||||
<a name="math_toolkit.dist.dist_ref.dist_algorithms.finding_the_location_and_scale_for_normal_and_similar_distributions"></a><h5>
|
||||
<a name="id1133481"></a>
|
||||
<a name="id1133791"></a>
|
||||
<a class="link" href="dist_algorithms.html#math_toolkit.dist.dist_ref.dist_algorithms.finding_the_location_and_scale_for_normal_and_similar_distributions">Finding
|
||||
the Location and Scale for Normal and similar distributions</a>
|
||||
</h5>
|
||||
@ -43,7 +43,7 @@
|
||||
</span><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">complement</span><span class="special">;</span> <span class="comment">// Will be needed by users who want to use complements.
|
||||
</span></pre>
|
||||
<a name="math_toolkit.dist.dist_ref.dist_algorithms.find_location_function"></a><h5>
|
||||
<a name="id1133578"></a>
|
||||
<a name="id1133888"></a>
|
||||
<a class="link" href="dist_algorithms.html#math_toolkit.dist.dist_ref.dist_algorithms.find_location_function">find_location
|
||||
function</a>
|
||||
</h5>
|
||||
@ -73,7 +73,7 @@
|
||||
<span class="special">}}</span> <span class="comment">// namespaces
|
||||
</span></pre>
|
||||
<a name="math_toolkit.dist.dist_ref.dist_algorithms.find_scale_function"></a><h5>
|
||||
<a name="id1134024"></a>
|
||||
<a name="id1134334"></a>
|
||||
<a class="link" href="dist_algorithms.html#math_toolkit.dist.dist_ref.dist_algorithms.find_scale_function">find_scale
|
||||
function</a>
|
||||
</h5>
|
||||
|
@ -20,16 +20,16 @@
|
||||
<a name="math_toolkit.dist.dist_ref.dists"></a><a class="link" href="dists.html" title="Distributions">Distributions</a>
|
||||
</h4></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="dists/bernoulli_dist.html">
|
||||
Bernoulli Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/bernoulli_dist.html">Bernoulli
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/beta_dist.html">Beta
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/binomial_dist.html">
|
||||
Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/binomial_dist.html">Binomial
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/cauchy_dist.html">Cauchy-Lorentz
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/chi_squared_dist.html">
|
||||
Chi Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/chi_squared_dist.html">Chi
|
||||
Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/exp_dist.html">Exponential
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/extreme_dist.html">Extreme
|
||||
@ -37,32 +37,31 @@
|
||||
<dt><span class="section"><a href="dists/f_dist.html">F Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/gamma_dist.html">Gamma
|
||||
(and Erlang) Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/logistic_dist.html">
|
||||
Logistic Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/lognormal_dist.html">
|
||||
Log Normal Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/negative_binomial_dist.html">
|
||||
Negative Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/logistic_dist.html">Logistic
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/lognormal_dist.html">Log
|
||||
Normal Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/negative_binomial_dist.html">Negative
|
||||
Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/nc_beta_dist.html">Noncentral
|
||||
Beta Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/nc_chi_squared_dist.html">
|
||||
Noncentral Chi-Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/nc_chi_squared_dist.html">Noncentral
|
||||
Chi-Squared Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/nc_f_dist.html">Noncentral
|
||||
F Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/nc_t_dist.html">Noncentral
|
||||
T Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/normal_dist.html">Normal
|
||||
(Gaussian) Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/pareto.html"> Pareto
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/pareto.html">Pareto Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/poisson_dist.html">Poisson
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/rayleigh.html">Rayleigh
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/students_t_dist.html">
|
||||
Students t Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/triangular_dist.html">
|
||||
Triangular Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/students_t_dist.html">Students
|
||||
t Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/triangular_dist.html">Triangular
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/weibull.html">Weibull
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="dists/uniform_dist.html">Uniform
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="math_toolkit.dist.dist_ref.dists.bernoulli_dist"></a><a class="link" href="bernoulli_dist.html" title="Bernoulli Distribution">
|
||||
Bernoulli Distribution</a>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.bernoulli_dist"></a><a class="link" href="bernoulli_dist.html" title="Bernoulli Distribution">Bernoulli
|
||||
Distribution</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/bernoulli_cdf.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.bernoulli_dist.member_functions"></a><h5>
|
||||
<a name="id1083458"></a>
|
||||
<a name="id1083357"></a>
|
||||
<a class="link" href="bernoulli_dist.html#math_toolkit.dist.dist_ref.dists.bernoulli_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -96,7 +96,7 @@
|
||||
Returns the <span class="emphasis"><em>success_fraction</em></span> parameter of this distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.bernoulli_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1083537"></a>
|
||||
<a name="id1083436"></a>
|
||||
<a class="link" href="bernoulli_dist.html#math_toolkit.dist.dist_ref.dists.bernoulli_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -121,7 +121,7 @@
|
||||
exception and make an error message available.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.bernoulli_dist.accuracy"></a><h5>
|
||||
<a name="id1083640"></a>
|
||||
<a name="id1083540"></a>
|
||||
<a class="link" href="bernoulli_dist.html#math_toolkit.dist.dist_ref.dists.bernoulli_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -129,7 +129,7 @@
|
||||
and so should have errors within an epsilon or two.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.bernoulli_dist.implementation"></a><h5>
|
||||
<a name="id1083662"></a>
|
||||
<a name="id1083561"></a>
|
||||
<a class="link" href="bernoulli_dist.html#math_toolkit.dist.dist_ref.dists.bernoulli_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -320,7 +320,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.bernoulli_dist.references"></a><h5>
|
||||
<a name="id1083987"></a>
|
||||
<a name="id1083886"></a>
|
||||
<a class="link" href="bernoulli_dist.html#math_toolkit.dist.dist_ref.dists.bernoulli_dist.references">References</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
|
@ -126,12 +126,12 @@
|
||||
from the centre (where x = half).
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.beta_dist.member_functions"></a><h5>
|
||||
<a name="id1084813"></a>
|
||||
<a name="id1084711"></a>
|
||||
<a class="link" href="beta_dist.html#math_toolkit.dist.dist_ref.dists.beta_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.beta_dist.constructor"></a><h6>
|
||||
<a name="id1084830"></a>
|
||||
<a name="id1084728"></a>
|
||||
<a class="link" href="beta_dist.html#math_toolkit.dist.dist_ref.dists.beta_dist.constructor">Constructor</a>
|
||||
</h6>
|
||||
<pre class="programlisting"><span class="identifier">beta_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">alpha</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">beta</span><span class="special">);</span>
|
||||
@ -158,7 +158,7 @@
|
||||
yellow in the graph above).
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.beta_dist.parameter_accessors"></a><h6>
|
||||
<a name="id1086263"></a>
|
||||
<a name="id1084843"></a>
|
||||
<a class="link" href="beta_dist.html#math_toolkit.dist.dist_ref.dists.beta_dist.parameter_accessors">Parameter
|
||||
Accessors</a>
|
||||
</h6>
|
||||
@ -182,7 +182,7 @@
|
||||
</span><span class="identifier">assert</span><span class="special">(</span><span class="identifier">mybeta</span><span class="special">.</span><span class="identifier">beta</span><span class="special">()</span> <span class="special">==</span> <span class="number">5.</span><span class="special">);</span> <span class="comment">// mybeta.beta() returns 5
|
||||
</span></pre>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.beta_dist.parameter_estimators"></a><h5>
|
||||
<a name="id1086468"></a>
|
||||
<a name="id1085048"></a>
|
||||
<a class="link" href="beta_dist.html#math_toolkit.dist.dist_ref.dists.beta_dist.parameter_estimators">Parameter
|
||||
Estimators</a>
|
||||
</h5>
|
||||
@ -235,7 +235,7 @@ from presumed-known mean and variance.
|
||||
Returns the value of β that gives: <code class="computeroutput"><span class="identifier">cdf</span><span class="special">(</span><span class="identifier">beta_distribution</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">>(</span><span class="identifier">alpha</span><span class="special">,</span> <span class="identifier">beta</span><span class="special">),</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">probability</span></code>.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.beta_dist.non_member_accessor_functions"></a><h5>
|
||||
<a name="id1086920"></a>
|
||||
<a name="id1087706"></a>
|
||||
<a class="link" href="beta_dist.html#math_toolkit.dist.dist_ref.dists.beta_dist.non_member_accessor_functions">Non-member
|
||||
Accessor Functions</a>
|
||||
</h5>
|
||||
@ -257,7 +257,7 @@ from presumed-known mean and variance.
|
||||
Mathworld</a>.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.beta_dist.applications"></a><h5>
|
||||
<a name="id1087024"></a>
|
||||
<a name="id1087809"></a>
|
||||
<a class="link" href="beta_dist.html#math_toolkit.dist.dist_ref.dists.beta_dist.applications">Applications</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -270,7 +270,7 @@ from presumed-known mean and variance.
|
||||
statistical inference</a>.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.beta_dist.related_distributions"></a><h5>
|
||||
<a name="id1087049"></a>
|
||||
<a name="id1087834"></a>
|
||||
<a class="link" href="beta_dist.html#math_toolkit.dist.dist_ref.dists.beta_dist.related_distributions">Related
|
||||
distributions</a>
|
||||
</h5>
|
||||
@ -296,7 +296,7 @@ from presumed-known mean and variance.
|
||||
Distribution</a> with its p parameter set to x.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.beta_dist.accuracy"></a><h5>
|
||||
<a name="id1087096"></a>
|
||||
<a name="id1087881"></a>
|
||||
<a class="link" href="beta_dist.html#math_toolkit.dist.dist_ref.dists.beta_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -308,7 +308,7 @@ from presumed-known mean and variance.
|
||||
please refer to these functions for information on accuracy.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.beta_dist.implementation"></a><h5>
|
||||
<a name="id1087140"></a>
|
||||
<a name="id1087925"></a>
|
||||
<a class="link" href="beta_dist.html#math_toolkit.dist.dist_ref.dists.beta_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -493,8 +493,6 @@ from presumed-known mean and variance.
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -589,7 +587,7 @@ from presumed-known mean and variance.
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.beta_dist.references"></a><h5>
|
||||
<a name="id1088170"></a>
|
||||
<a name="id1088951"></a>
|
||||
<a class="link" href="beta_dist.html#math_toolkit.dist.dist_ref.dists.beta_dist.references">References</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="math_toolkit.dist.dist_ref.dists.binomial_dist"></a><a class="link" href="binomial_dist.html" title="Binomial Distribution">
|
||||
Binomial Distribution</a>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.binomial_dist"></a><a class="link" href="binomial_dist.html" title="Binomial Distribution">Binomial
|
||||
Distribution</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
|
||||
@ -120,8 +120,6 @@
|
||||
<p>
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/binomial_pdf_2.png" align="middle"></span>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="caution"><table border="0" summary="Caution">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../images/caution.png"></td>
|
||||
@ -129,43 +127,39 @@
|
||||
</tr>
|
||||
<tr><td align="left" valign="top">
|
||||
<p>
|
||||
The Binomial 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.
|
||||
The Binomial 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.
|
||||
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
|
||||
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 Binomial 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.
|
||||
docs</a> describe how to change the rounding policy for these distributions.
|
||||
</p>
|
||||
</td></tr>
|
||||
</table></div>
|
||||
<p>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.binomial_dist.member_functions"></a><h5>
|
||||
<a name="id1089818"></a>
|
||||
<a name="id1090546"></a>
|
||||
<a class="link" href="binomial_dist.html#math_toolkit.dist.dist_ref.dists.binomial_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.binomial_dist.construct"></a><h6>
|
||||
<a name="id1089837"></a>
|
||||
<a name="id1090566"></a>
|
||||
<a class="link" href="binomial_dist.html#math_toolkit.dist.dist_ref.dists.binomial_dist.construct">Construct</a>
|
||||
</h6>
|
||||
<pre class="programlisting"><span class="identifier">binomial_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">p</span><span class="special">);</span>
|
||||
@ -182,7 +176,7 @@
|
||||
otherwise calls <a class="link" href="../../../main_overview/error_handling.html#domain_error">domain_error</a>.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.binomial_dist.accessors"></a><h6>
|
||||
<a name="id1089956"></a>
|
||||
<a name="id1090684"></a>
|
||||
<a class="link" href="binomial_dist.html#math_toolkit.dist.dist_ref.dists.binomial_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>
|
||||
@ -198,7 +192,7 @@
|
||||
was constructed.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.binomial_dist.lower_bound_on_the_success_fraction"></a><h6>
|
||||
<a name="id1090037"></a>
|
||||
<a name="id1090765"></a>
|
||||
<a class="link" href="binomial_dist.html#math_toolkit.dist.dist_ref.dists.binomial_dist.lower_bound_on_the_success_fraction">Lower
|
||||
Bound on the Success Fraction</a>
|
||||
</h6>
|
||||
@ -304,7 +298,7 @@
|
||||
limits illustrated in the case of the binomial. Biometrika 26 404-413.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.binomial_dist.upper_bound_on_the_success_fraction"></a><h6>
|
||||
<a name="id1090491"></a>
|
||||
<a name="id1091220"></a>
|
||||
<a class="link" href="binomial_dist.html#math_toolkit.dist.dist_ref.dists.binomial_dist.upper_bound_on_the_success_fraction">Upper
|
||||
Bound on the Success Fraction</a>
|
||||
</h6>
|
||||
@ -382,7 +376,7 @@
|
||||
</td></tr>
|
||||
</table></div>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.binomial_dist.estimating_the_number_of_trials_required_for_a_certain_number_of_successes"></a><h6>
|
||||
<a name="id1090807"></a>
|
||||
<a name="id1091535"></a>
|
||||
<a class="link" href="binomial_dist.html#math_toolkit.dist.dist_ref.dists.binomial_dist.estimating_the_number_of_trials_required_for_a_certain_number_of_successes">Estimating
|
||||
the Number of Trials Required for a Certain Number of Successes</a>
|
||||
</h6>
|
||||
@ -424,7 +418,7 @@
|
||||
of seeing 10 events that occur with frequency one half.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.binomial_dist.estimating_the_maximum_number_of_trials_to_ensure_no_more_than_a_certain_number_of_successes"></a><h6>
|
||||
<a name="id1091009"></a>
|
||||
<a name="id1091737"></a>
|
||||
<a class="link" href="binomial_dist.html#math_toolkit.dist.dist_ref.dists.binomial_dist.estimating_the_maximum_number_of_trials_to_ensure_no_more_than_a_certain_number_of_successes">Estimating
|
||||
the Maximum Number of Trials to Ensure no more than a Certain Number
|
||||
of Successes</a>
|
||||
@ -472,7 +466,7 @@
|
||||
Worked Example.</a>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.binomial_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1091220"></a>
|
||||
<a name="id1091948"></a>
|
||||
<a class="link" href="binomial_dist.html#math_toolkit.dist.dist_ref.dists.binomial_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -497,7 +491,7 @@
|
||||
in the context of this distribution:
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1091879"></a><p class="title"><b>Table 11. Meaning of the non-member accessors</b></p>
|
||||
<a name="id1092080"></a><p class="title"><b>Table 11. Meaning of the non-member accessors</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Meaning of the non-member accessors">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -621,7 +615,7 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><a name="math_toolkit.dist.dist_ref.dists.binomial_dist.examples"></a><h5>
|
||||
<a name="id1092302"></a>
|
||||
<a name="id1092730"></a>
|
||||
<a class="link" href="binomial_dist.html#math_toolkit.dist.dist_ref.dists.binomial_dist.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -629,7 +623,7 @@
|
||||
examples</a> are available illustrating the use of the binomial distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.binomial_dist.accuracy"></a><h5>
|
||||
<a name="id1092323"></a>
|
||||
<a name="id1092751"></a>
|
||||
<a class="link" href="binomial_dist.html#math_toolkit.dist.dist_ref.dists.binomial_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -639,7 +633,7 @@
|
||||
please refer to these functions for information on accuracy.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.binomial_dist.implementation"></a><h5>
|
||||
<a name="id1092352"></a>
|
||||
<a name="id1092780"></a>
|
||||
<a class="link" href="binomial_dist.html#math_toolkit.dist.dist_ref.dists.binomial_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -883,7 +877,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.binomial_dist.references"></a><h5>
|
||||
<a name="id1093397"></a>
|
||||
<a name="id1093825"></a>
|
||||
<a class="link" href="binomial_dist.html#math_toolkit.dist.dist_ref.dists.binomial_dist.references">References</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
|
@ -81,7 +81,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/cauchy_pdf2.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.cauchy_dist.member_functions"></a><h5>
|
||||
<a name="id1093916"></a>
|
||||
<a name="id1094344"></a>
|
||||
<a class="link" href="cauchy_dist.html#math_toolkit.dist.dist_ref.dists.cauchy_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -107,7 +107,7 @@
|
||||
Returns the scale parameter of the distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.cauchy_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1095791"></a>
|
||||
<a name="id1094492"></a>
|
||||
<a class="link" href="cauchy_dist.html#math_toolkit.dist.dist_ref.dists.cauchy_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -141,7 +141,7 @@
|
||||
The domain of the random variable is [-[max_value], +[min_value]].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.cauchy_dist.accuracy"></a><h5>
|
||||
<a name="id1095934"></a>
|
||||
<a name="id1094635"></a>
|
||||
<a class="link" href="cauchy_dist.html#math_toolkit.dist.dist_ref.dists.cauchy_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -150,7 +150,7 @@
|
||||
have very low error rates.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.cauchy_dist.implementation"></a><h5>
|
||||
<a name="id1095968"></a>
|
||||
<a name="id1094669"></a>
|
||||
<a class="link" href="cauchy_dist.html#math_toolkit.dist.dist_ref.dists.cauchy_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -266,7 +266,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.cauchy_dist.references"></a><h5>
|
||||
<a name="id1096196"></a>
|
||||
<a name="id1096828"></a>
|
||||
<a class="link" href="cauchy_dist.html#math_toolkit.dist.dist_ref.dists.cauchy_dist.references">References</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="math_toolkit.dist.dist_ref.dists.chi_squared_dist"></a><a class="link" href="chi_squared_dist.html" title="Chi Squared Distribution">
|
||||
Chi Squared Distribution</a>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.chi_squared_dist"></a><a class="link" href="chi_squared_dist.html" title="Chi Squared Distribution">Chi
|
||||
Squared Distribution</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
|
||||
@ -80,7 +80,7 @@ independent, normally distributed random
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/chi_squared_pdf.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.chi_squared_dist.member_functions"></a><h5>
|
||||
<a name="id1096761"></a>
|
||||
<a name="id1097393"></a>
|
||||
<a class="link" href="chi_squared_dist.html#math_toolkit.dist.dist_ref.dists.chi_squared_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -163,7 +163,7 @@ independent, normally distributed random
|
||||
NIST Engineering Statistics Handbook, Section 7.2.3.2</a>.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.chi_squared_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1097092"></a>
|
||||
<a name="id1097725"></a>
|
||||
<a class="link" href="chi_squared_dist.html#math_toolkit.dist.dist_ref.dists.chi_squared_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -189,7 +189,7 @@ independent, normally distributed random
|
||||
The domain of the random variable is [0, +∞].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.chi_squared_dist.examples"></a><h5>
|
||||
<a name="id1097195"></a>
|
||||
<a name="id1097828"></a>
|
||||
<a class="link" href="chi_squared_dist.html#math_toolkit.dist.dist_ref.dists.chi_squared_dist.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -197,7 +197,7 @@ independent, normally distributed random
|
||||
are available illustrating the use of the Chi Squared Distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.chi_squared_dist.accuracy"></a><h5>
|
||||
<a name="id1097222"></a>
|
||||
<a name="id1097854"></a>
|
||||
<a class="link" href="chi_squared_dist.html#math_toolkit.dist.dist_ref.dists.chi_squared_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -205,7 +205,7 @@ independent, normally distributed random
|
||||
gamma functions</a>: please refer to the accuracy data for those functions.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.chi_squared_dist.implementation"></a><h5>
|
||||
<a name="id1097246"></a>
|
||||
<a name="id1097878"></a>
|
||||
<a class="link" href="chi_squared_dist.html#math_toolkit.dist.dist_ref.dists.chi_squared_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -372,7 +372,7 @@ independent, normally distributed random
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.chi_squared_dist.references"></a><h5>
|
||||
<a name="id1097536"></a>
|
||||
<a name="id1098169"></a>
|
||||
<a class="link" href="chi_squared_dist.html#math_toolkit.dist.dist_ref.dists.chi_squared_dist.references">References</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
|
@ -64,7 +64,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/exponential_pdf.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.exp_dist.member_functions"></a><h5>
|
||||
<a name="id1098063"></a>
|
||||
<a name="id1098603"></a>
|
||||
<a class="link" href="exp_dist.html#math_toolkit.dist.dist_ref.dists.exp_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -84,7 +84,7 @@
|
||||
Accessor function returns the lambda parameter of the distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.exp_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1098165"></a>
|
||||
<a name="id1098705"></a>
|
||||
<a class="link" href="exp_dist.html#math_toolkit.dist.dist_ref.dists.exp_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -104,7 +104,7 @@
|
||||
The domain of the random variable is [0, +∞].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.exp_dist.accuracy"></a><h5>
|
||||
<a name="id1098265"></a>
|
||||
<a name="id1098805"></a>
|
||||
<a class="link" href="exp_dist.html#math_toolkit.dist.dist_ref.dists.exp_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -115,7 +115,7 @@
|
||||
should have very low error rates.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.exp_dist.implementation"></a><h5>
|
||||
<a name="id1098313"></a>
|
||||
<a name="id1099150"></a>
|
||||
<a class="link" href="exp_dist.html#math_toolkit.dist.dist_ref.dists.exp_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -276,7 +276,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.exp_dist.references"></a><h5>
|
||||
<a name="id1098576"></a>
|
||||
<a name="id1099413"></a>
|
||||
<a class="link" href="exp_dist.html#math_toolkit.dist.dist_ref.dists.exp_dist.references">references</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
|
@ -93,7 +93,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/extreme_value_pdf2.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.extreme_dist.member_functions"></a><h5>
|
||||
<a name="id1099137"></a>
|
||||
<a name="id1099975"></a>
|
||||
<a class="link" href="extreme_dist.html#math_toolkit.dist.dist_ref.dists.extreme_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -118,7 +118,7 @@
|
||||
Returns the scale parameter of the distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.extreme_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1099294"></a>
|
||||
<a name="id1100132"></a>
|
||||
<a class="link" href="extreme_dist.html#math_toolkit.dist.dist_ref.dists.extreme_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -138,7 +138,7 @@
|
||||
The domain of the random parameter is [-∞, +∞].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.extreme_dist.accuracy"></a><h5>
|
||||
<a name="id1099392"></a>
|
||||
<a name="id1100229"></a>
|
||||
<a class="link" href="extreme_dist.html#math_toolkit.dist.dist_ref.dists.extreme_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -147,7 +147,7 @@
|
||||
very low error rates.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.extreme_dist.implementation"></a><h5>
|
||||
<a name="id1099425"></a>
|
||||
<a name="id1100263"></a>
|
||||
<a class="link" href="extreme_dist.html#math_toolkit.dist.dist_ref.dists.extreme_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -73,7 +73,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/fisher_f_pdf.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.f_dist.member_functions"></a><h5>
|
||||
<a name="id1100251"></a>
|
||||
<a name="id1101020"></a>
|
||||
<a class="link" href="f_dist.html#math_toolkit.dist.dist_ref.dists.f_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -99,7 +99,7 @@
|
||||
Returns the denominator degrees of freedom parameter of the distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.f_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1100406"></a>
|
||||
<a name="id1101175"></a>
|
||||
<a class="link" href="f_dist.html#math_toolkit.dist.dist_ref.dists.f_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -119,7 +119,7 @@
|
||||
The domain of the random variable is [0, +∞].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.f_dist.examples"></a><h5>
|
||||
<a name="id1100506"></a>
|
||||
<a name="id1101274"></a>
|
||||
<a class="link" href="f_dist.html#math_toolkit.dist.dist_ref.dists.f_dist.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -127,7 +127,7 @@
|
||||
are available illustrating the use of the F Distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.f_dist.accuracy"></a><h5>
|
||||
<a name="id1100527"></a>
|
||||
<a name="id1101569"></a>
|
||||
<a class="link" href="f_dist.html#math_toolkit.dist.dist_ref.dists.f_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -136,7 +136,7 @@
|
||||
refer to those functions for accuracy data.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.f_dist.implementation"></a><h5>
|
||||
<a name="id1100554"></a>
|
||||
<a name="id1101596"></a>
|
||||
<a class="link" href="f_dist.html#math_toolkit.dist.dist_ref.dists.f_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -130,7 +130,7 @@
|
||||
than a dedicated Erlang Distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.gamma_dist.member_functions"></a><h5>
|
||||
<a name="id1101593"></a>
|
||||
<a name="id1102635"></a>
|
||||
<a class="link" href="gamma_dist.html#math_toolkit.dist.dist_ref.dists.gamma_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -155,7 +155,7 @@
|
||||
Returns the <span class="emphasis"><em>scale</em></span> parameter of this distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.gamma_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1101739"></a>
|
||||
<a name="id1102781"></a>
|
||||
<a class="link" href="gamma_dist.html#math_toolkit.dist.dist_ref.dists.gamma_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -175,7 +175,7 @@
|
||||
The domain of the random variable is [0,+∞].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.gamma_dist.accuracy"></a><h5>
|
||||
<a name="id1101836"></a>
|
||||
<a name="id1102879"></a>
|
||||
<a class="link" href="gamma_dist.html#math_toolkit.dist.dist_ref.dists.gamma_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -187,7 +187,7 @@
|
||||
refer to the accuracy data for those functions for more information.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.gamma_dist.implementation"></a><h5>
|
||||
<a name="id1101875"></a>
|
||||
<a name="id1102917"></a>
|
||||
<a class="link" href="gamma_dist.html#math_toolkit.dist.dist_ref.dists.gamma_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="math_toolkit.dist.dist_ref.dists.logistic_dist"></a><a class="link" href="logistic_dist.html" title="Logistic Distribution">
|
||||
Logistic Distribution</a>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.logistic_dist"></a><a class="link" href="logistic_dist.html" title="Logistic Distribution">Logistic
|
||||
Distribution</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/logistic_pdf.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.logistic_dist.member_functions"></a><h5>
|
||||
<a name="id1105216"></a>
|
||||
<a name="id1103665"></a>
|
||||
<a class="link" href="logistic_dist.html#math_toolkit.dist.dist_ref.dists.logistic_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -91,7 +91,7 @@
|
||||
Returns the scale of this distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.logistic_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1105381"></a>
|
||||
<a name="id1105142"></a>
|
||||
<a class="link" href="logistic_dist.html#math_toolkit.dist.dist_ref.dists.logistic_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -121,7 +121,7 @@ as special cases if RealType
|
||||
and +<a class="link" href="../../../main_overview/error_handling.html#overflow_error">overflow_error</a> respectively.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.logistic_dist.accuracy"></a><h5>
|
||||
<a name="id1105530"></a>
|
||||
<a name="id1105290"></a>
|
||||
<a class="link" href="logistic_dist.html#math_toolkit.dist.dist_ref.dists.logistic_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -133,7 +133,7 @@ as special cases if RealType
|
||||
can be guarenteed.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.logistic_dist.implementation"></a><h5>
|
||||
<a name="id1105582"></a>
|
||||
<a name="id1105342"></a>
|
||||
<a class="link" href="logistic_dist.html#math_toolkit.dist.dist_ref.dists.logistic_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="math_toolkit.dist.dist_ref.dists.lognormal_dist"></a><a class="link" href="lognormal_dist.html" title="Log Normal Distribution">
|
||||
Log Normal Distribution</a>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.lognormal_dist"></a><a class="link" href="lognormal_dist.html" title="Log Normal Distribution">Log
|
||||
Normal Distribution</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
|
||||
@ -81,7 +81,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/lognormal_pdf2.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.lognormal_dist.member_functions"></a><h5>
|
||||
<a name="id1106329"></a>
|
||||
<a name="id1106090"></a>
|
||||
<a class="link" href="lognormal_dist.html#math_toolkit.dist.dist_ref.dists.lognormal_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -114,7 +114,7 @@
|
||||
Returns the <span class="emphasis"><em>scale</em></span> parameter of this distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.lognormal_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1106490"></a>
|
||||
<a name="id1106250"></a>
|
||||
<a class="link" href="lognormal_dist.html#math_toolkit.dist.dist_ref.dists.lognormal_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -134,7 +134,7 @@
|
||||
The domain of the random variable is [0,+∞].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.lognormal_dist.accuracy"></a><h5>
|
||||
<a name="id1106590"></a>
|
||||
<a name="id1106350"></a>
|
||||
<a class="link" href="lognormal_dist.html#math_toolkit.dist.dist_ref.dists.lognormal_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -143,7 +143,7 @@
|
||||
function</a>, and as such should have very low error rates.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.lognormal_dist.implementation"></a><h5>
|
||||
<a name="id1106616"></a>
|
||||
<a name="id1106376"></a>
|
||||
<a class="link" href="lognormal_dist.html#math_toolkit.dist.dist_ref.dists.lognormal_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -89,7 +89,7 @@ is a central χ<sup>2</sup> random variable with <span class="emphasis"><em>
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/nc_beta_pdf.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_beta_dist.member_functions"></a><h5>
|
||||
<a name="id1111519"></a>
|
||||
<a name="id1111882"></a>
|
||||
<a class="link" href="nc_beta_dist.html#math_toolkit.dist.dist_ref.dists.nc_beta_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -121,7 +121,7 @@ is a central χ<sup>2</sup> random variable with <span class="emphasis"><em>
|
||||
was constructed.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_beta_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1111703"></a>
|
||||
<a name="id1112066"></a>
|
||||
<a class="link" href="nc_beta_dist.html#math_toolkit.dist.dist_ref.dists.nc_beta_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -145,7 +145,7 @@ is a central χ<sup>2</sup> random variable with <span class="emphasis"><em>
|
||||
The domain of the random variable is [0, 1].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_beta_dist.accuracy"></a><h5>
|
||||
<a name="id1111805"></a>
|
||||
<a name="id1112168"></a>
|
||||
<a class="link" href="nc_beta_dist.html#math_toolkit.dist.dist_ref.dists.nc_beta_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -161,7 +161,7 @@ is a central χ<sup>2</sup> random variable with <span class="emphasis"><em>
|
||||
zero error</a>.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1111840"></a><p class="title"><b>Table 13. Errors In CDF of the Noncentral Beta</b></p>
|
||||
<a name="id1112203"></a><p class="title"><b>Table 13. Errors In CDF of the Noncentral Beta</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Errors In CDF of the Noncentral Beta">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -288,7 +288,7 @@ is a central χ<sup>2</sup> random variable with <span class="emphasis"><em>
|
||||
functions are broadly similar.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_beta_dist.tests"></a><h5>
|
||||
<a name="id1112039"></a>
|
||||
<a name="id1112402"></a>
|
||||
<a class="link" href="nc_beta_dist.html#math_toolkit.dist.dist_ref.dists.nc_beta_dist.tests">Tests</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -300,7 +300,7 @@ is a central χ<sup>2</sup> random variable with <span class="emphasis"><em>
|
||||
tests.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_beta_dist.implementation"></a><h5>
|
||||
<a name="id1112063"></a>
|
||||
<a name="id1112426"></a>
|
||||
<a class="link" href="nc_beta_dist.html#math_toolkit.dist.dist_ref.dists.nc_beta_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist"></a><a class="link" href="nc_chi_squared_dist.html" title="Noncentral Chi-Squared Distribution">
|
||||
Noncentral Chi-Squared Distribution</a>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist"></a><a class="link" href="nc_chi_squared_dist.html" title="Noncentral Chi-Squared Distribution">Noncentral
|
||||
Chi-Squared Distribution</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
|
||||
@ -103,7 +103,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/nccs_pdf.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist.member_functions"></a><h5>
|
||||
<a name="id1113600"></a>
|
||||
<a name="id1113661"></a>
|
||||
<a class="link" href="nc_chi_squared_dist.html#math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -176,7 +176,7 @@
|
||||
<span class="special">==</span> <span class="identifier">q</span></code>.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1114499"></a>
|
||||
<a name="id1114560"></a>
|
||||
<a class="link" href="nc_chi_squared_dist.html#math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -196,7 +196,7 @@
|
||||
The domain of the random variable is [0, +∞].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist.examples"></a><h5>
|
||||
<a name="id1114598"></a>
|
||||
<a name="id1114660"></a>
|
||||
<a class="link" href="nc_chi_squared_dist.html#math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -204,7 +204,7 @@
|
||||
example</a> for the noncentral chi-squared distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist.accuracy"></a><h5>
|
||||
<a name="id1114625"></a>
|
||||
<a name="id1114686"></a>
|
||||
<a class="link" href="nc_chi_squared_dist.html#math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -216,7 +216,7 @@
|
||||
zero error</a>.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1114655"></a><p class="title"><b>Table 14. Errors In CDF of the Noncentral Chi-Squared</b></p>
|
||||
<a name="id1114716"></a><p class="title"><b>Table 14. Errors In CDF of the Noncentral Chi-Squared</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Errors In CDF of the Noncentral Chi-Squared">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -352,7 +352,7 @@
|
||||
produce an accuracy greater than the square root of the machine epsilon.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist.tests"></a><h5>
|
||||
<a name="id1116006"></a>
|
||||
<a name="id1114932"></a>
|
||||
<a class="link" href="nc_chi_squared_dist.html#math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist.tests">Tests</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -366,7 +366,7 @@
|
||||
to at least 50 decimal digits - and is the used for our accuracy tests.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist.implementation"></a><h5>
|
||||
<a name="id1116026"></a>
|
||||
<a name="id1114951"></a>
|
||||
<a class="link" href="nc_chi_squared_dist.html#math_toolkit.dist.dist_ref.dists.nc_chi_squared_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -88,7 +88,7 @@ random variable with <span class="emphasis"><em>v1</em></span>
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/nc_f_pdf.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_f_dist.member_functions"></a><h5>
|
||||
<a name="id1116879"></a>
|
||||
<a name="id1116985"></a>
|
||||
<a class="link" href="nc_f_dist.html#math_toolkit.dist.dist_ref.dists.nc_f_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -120,7 +120,7 @@ random variable with <span class="emphasis"><em>v1</em></span>
|
||||
which this object was constructed.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_f_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1117065"></a>
|
||||
<a name="id1117171"></a>
|
||||
<a class="link" href="nc_f_dist.html#math_toolkit.dist.dist_ref.dists.nc_f_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -140,7 +140,7 @@ random variable with <span class="emphasis"><em>v1</em></span>
|
||||
The domain of the random variable is [0, +∞].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_f_dist.accuracy"></a><h5>
|
||||
<a name="id1117164"></a>
|
||||
<a name="id1117271"></a>
|
||||
<a class="link" href="nc_f_dist.html#math_toolkit.dist.dist_ref.dists.nc_f_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -148,7 +148,7 @@ random variable with <span class="emphasis"><em>v1</em></span>
|
||||
beta distribution</a>: refer to that distribution for accuracy data.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_f_dist.tests"></a><h5>
|
||||
<a name="id1117187"></a>
|
||||
<a name="id1117294"></a>
|
||||
<a class="link" href="nc_f_dist.html#math_toolkit.dist.dist_ref.dists.nc_f_dist.tests">Tests</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -157,7 +157,7 @@ random variable with <span class="emphasis"><em>v1</em></span>
|
||||
Math library statistical package</a> and its pbeta and dbeta functions.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_f_dist.implementation"></a><h5>
|
||||
<a name="id1117211"></a>
|
||||
<a name="id1117318"></a>
|
||||
<a class="link" href="nc_f_dist.html#math_toolkit.dist.dist_ref.dists.nc_f_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -227,8 +227,6 @@ is the non-centrality parameter, <span class="emphasis"><em>x</em></span> is the
|
||||
<p>
|
||||
y = x * v1 / v2
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -251,8 +249,6 @@ is the non-centrality parameter, <span class="emphasis"><em>x</em></span> is the
|
||||
<p>
|
||||
y = x * v1 / v2
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -283,8 +279,6 @@ is the non-centrality parameter, <span class="emphasis"><em>x</em></span> is the
|
||||
<p>
|
||||
is the noncentral beta quantile.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -78,7 +78,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/nc_t_pdf.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_t_dist.member_functions"></a><h5>
|
||||
<a name="id1118094"></a>
|
||||
<a name="id1118190"></a>
|
||||
<a class="link" href="nc_t_dist.html#math_toolkit.dist.dist_ref.dists.nc_t_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -104,7 +104,7 @@
|
||||
which this object was constructed.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_t_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1119977"></a>
|
||||
<a name="id1118328"></a>
|
||||
<a class="link" href="nc_t_dist.html#math_toolkit.dist.dist_ref.dists.nc_t_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -124,7 +124,7 @@
|
||||
The domain of the random variable is [-∞, +∞].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_t_dist.accuracy"></a><h5>
|
||||
<a name="id1120077"></a>
|
||||
<a name="id1118428"></a>
|
||||
<a class="link" href="nc_t_dist.html#math_toolkit.dist.dist_ref.dists.nc_t_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -134,7 +134,7 @@
|
||||
one shown will have <a class="link" href="../../../backgrounders/relative_error.html#zero_error">effectively zero error</a>.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1120100"></a><p class="title"><b>Table 15. Errors In CDF of the Noncentral T Distribution</b></p>
|
||||
<a name="id1118450"></a><p class="title"><b>Table 15. Errors In CDF of the Noncentral T Distribution</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Errors In CDF of the Noncentral T Distribution">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -248,7 +248,7 @@
|
||||
epsilon.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_t_dist.tests"></a><h5>
|
||||
<a name="id1120269"></a>
|
||||
<a name="id1121283"></a>
|
||||
<a class="link" href="nc_t_dist.html#math_toolkit.dist.dist_ref.dists.nc_t_dist.tests">Tests</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -263,7 +263,7 @@
|
||||
least 50 decimal places.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.nc_t_dist.implementation"></a><h5>
|
||||
<a name="id1120288"></a>
|
||||
<a name="id1121302"></a>
|
||||
<a class="link" href="nc_t_dist.html#math_toolkit.dist.dist_ref.dists.nc_t_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="math_toolkit.dist.dist_ref.dists.negative_binomial_dist"></a><a class="link" href="negative_binomial_dist.html" title="Negative Binomial Distribution">
|
||||
Negative Binomial Distribution</a>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.negative_binomial_dist"></a><a class="link" href="negative_binomial_dist.html" title="Negative Binomial Distribution">Negative
|
||||
Binomial Distribution</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
|
||||
@ -116,7 +116,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/negative_binomial_pdf_2.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.negative_binomial_dist.related_distributions"></a><h5>
|
||||
<a name="id1107844"></a>
|
||||
<a name="id1108136"></a>
|
||||
<a class="link" href="negative_binomial_dist.html#math_toolkit.dist.dist_ref.dists.negative_binomial_dist.related_distributions">Related
|
||||
Distributions</a>
|
||||
</h5>
|
||||
@ -153,8 +153,6 @@
|
||||
<p>
|
||||
poisson(λ) = lim <sub>r → ∞</sub> negative_binomial(r, r / (λ + r)))
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="caution"><table border="0" summary="Caution">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../images/caution.png"></td>
|
||||
@ -174,31 +172,28 @@
|
||||
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.
|
||||
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
|
||||
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 Negative Binomial 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.
|
||||
docs</a> describe how to change the rounding policy for these distributions.
|
||||
</p>
|
||||
</td></tr>
|
||||
</table></div>
|
||||
<p>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.negative_binomial_dist.member_functions"></a><h5>
|
||||
<a name="id1107956"></a>
|
||||
<a name="id1108245"></a>
|
||||
<a class="link" href="negative_binomial_dist.html#math_toolkit.dist.dist_ref.dists.negative_binomial_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.negative_binomial_dist.construct"></a><h6>
|
||||
<a name="id1107971"></a>
|
||||
<a name="id1108260"></a>
|
||||
<a class="link" href="negative_binomial_dist.html#math_toolkit.dist.dist_ref.dists.negative_binomial_dist.construct">Construct</a>
|
||||
</h6>
|
||||
<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">p</span><span class="special">);</span>
|
||||
@ -214,7 +209,7 @@
|
||||
<span class="special"><=</span> <span class="number">1</span></code>.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.negative_binomial_dist.accessors"></a><h6>
|
||||
<a name="id1108079"></a>
|
||||
<a name="id1108368"></a>
|
||||
<a class="link" href="negative_binomial_dist.html#math_toolkit.dist.dist_ref.dists.negative_binomial_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 <= p <= 1)
|
||||
@ -230,7 +225,7 @@
|
||||
was constructed.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.negative_binomial_dist.lower_bound_on_parameter_p"></a><h6>
|
||||
<a name="id1108164"></a>
|
||||
<a name="id1108453"></a>
|
||||
<a class="link" href="negative_binomial_dist.html#math_toolkit.dist.dist_ref.dists.negative_binomial_dist.lower_bound_on_parameter_p">Lower
|
||||
Bound on Parameter p</a>
|
||||
</h6>
|
||||
@ -291,7 +286,7 @@
|
||||
vol. 48, no3, 605-621</a>.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.negative_binomial_dist.upper_bound_on_parameter_p"></a><h6>
|
||||
<a name="id1108430"></a>
|
||||
<a name="id1108719"></a>
|
||||
<a class="link" href="negative_binomial_dist.html#math_toolkit.dist.dist_ref.dists.negative_binomial_dist.upper_bound_on_parameter_p">Upper
|
||||
Bound on Parameter p</a>
|
||||
</h6>
|
||||
@ -351,7 +346,7 @@
|
||||
vol. 48, no3, 605-621</a>.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.negative_binomial_dist.estimating_number_of_trials_to_ensure_at_least_a_certain_number_of_failures"></a><h6>
|
||||
<a name="id1108693"></a>
|
||||
<a name="id1108982"></a>
|
||||
<a class="link" href="negative_binomial_dist.html#math_toolkit.dist.dist_ref.dists.negative_binomial_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>
|
||||
@ -402,7 +397,7 @@
|
||||
probability of observing k failures or fewer.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.negative_binomial_dist.estimating_number_of_trials_to_ensure_a_maximum_number_of_failures_or_less"></a><h6>
|
||||
<a name="id1108918"></a>
|
||||
<a name="id1109207"></a>
|
||||
<a class="link" href="negative_binomial_dist.html#math_toolkit.dist.dist_ref.dists.negative_binomial_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>
|
||||
@ -450,7 +445,7 @@
|
||||
probability of observing more than k failures.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.negative_binomial_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1109149"></a>
|
||||
<a name="id1109438"></a>
|
||||
<a class="link" href="negative_binomial_dist.html#math_toolkit.dist.dist_ref.dists.negative_binomial_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -471,7 +466,7 @@
|
||||
in the context of this distribution:
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1109243"></a><p class="title"><b>Table 12. Meaning of the non-member accessors.</b></p>
|
||||
<a name="id1109532"></a><p class="title"><b>Table 12. Meaning of the non-member accessors.</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Meaning of the non-member accessors.">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -599,7 +594,7 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><a name="math_toolkit.dist.dist_ref.dists.negative_binomial_dist.accuracy"></a><h5>
|
||||
<a name="id1110109"></a>
|
||||
<a name="id1109951"></a>
|
||||
<a class="link" href="negative_binomial_dist.html#math_toolkit.dist.dist_ref.dists.negative_binomial_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -609,7 +604,7 @@
|
||||
please refer to these functions for information on accuracy.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.negative_binomial_dist.implementation"></a><h5>
|
||||
<a name="id1110136"></a>
|
||||
<a name="id1109977"></a>
|
||||
<a class="link" href="negative_binomial_dist.html#math_toolkit.dist.dist_ref.dists.negative_binomial_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -820,8 +815,6 @@
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -72,7 +72,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/normal_pdf.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.normal_dist.member_functions"></a><h5>
|
||||
<a name="id1121001"></a>
|
||||
<a name="id1122015"></a>
|
||||
<a class="link" href="normal_dist.html#math_toolkit.dist.dist_ref.dists.normal_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -102,7 +102,7 @@
|
||||
be used generically).
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.normal_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1121198"></a>
|
||||
<a name="id1122211"></a>
|
||||
<a class="link" href="normal_dist.html#math_toolkit.dist.dist_ref.dists.normal_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -124,7 +124,7 @@
|
||||
and complement cdf -∞ = 1 and +∞ = 0, if RealType permits.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.normal_dist.accuracy"></a><h5>
|
||||
<a name="id1121295"></a>
|
||||
<a name="id1122309"></a>
|
||||
<a class="link" href="normal_dist.html#math_toolkit.dist.dist_ref.dists.normal_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -132,7 +132,7 @@
|
||||
function</a>, and as such should have very low error rates.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.normal_dist.implementation"></a><h5>
|
||||
<a name="id1121319"></a>
|
||||
<a name="id1122333"></a>
|
||||
<a class="link" href="normal_dist.html#math_toolkit.dist.dist_ref.dists.normal_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -17,8 +17,7 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="math_toolkit.dist.dist_ref.dists.pareto"></a><a class="link" href="pareto.html" title="Pareto Distribution"> Pareto
|
||||
Distribution</a>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.pareto"></a><a class="link" href="pareto.html" title="Pareto Distribution">Pareto Distribution</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
|
||||
@ -79,12 +78,12 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/pareto_pdf2.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.pareto.related_distributions"></a><h5>
|
||||
<a name="id1122568"></a>
|
||||
<a name="id1123116"></a>
|
||||
<a class="link" href="pareto.html#math_toolkit.dist.dist_ref.dists.pareto.related_distributions">Related
|
||||
distributions</a>
|
||||
</h5>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.pareto.member_functions"></a><h5>
|
||||
<a name="id1122586"></a>
|
||||
<a name="id1123134"></a>
|
||||
<a class="link" href="pareto.html#math_toolkit.dist.dist_ref.dists.pareto.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -110,7 +109,7 @@
|
||||
Returns the <span class="emphasis"><em>shape</em></span> parameter of this distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.pareto.non_member_accessors"></a><h5>
|
||||
<a name="id1122757"></a>
|
||||
<a name="id1123305"></a>
|
||||
<a class="link" href="pareto.html#math_toolkit.dist.dist_ref.dists.pareto.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -130,7 +129,7 @@
|
||||
The supported domain of the random variable is [location, ∞].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.pareto.accuracy"></a><h5>
|
||||
<a name="id1122856"></a>
|
||||
<a name="id1124142"></a>
|
||||
<a class="link" href="pareto.html#math_toolkit.dist.dist_ref.dists.pareto.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -140,7 +139,7 @@
|
||||
to unity.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.pareto.implementation"></a><h5>
|
||||
<a name="id1122885"></a>
|
||||
<a name="id1124171"></a>
|
||||
<a class="link" href="pareto.html#math_toolkit.dist.dist_ref.dists.pareto.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -308,7 +307,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.pareto.references"></a><h5>
|
||||
<a name="id1123190"></a>
|
||||
<a name="id1124476"></a>
|
||||
<a class="link" href="pareto.html#math_toolkit.dist.dist_ref.dists.pareto.references">References</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
|
@ -75,8 +75,6 @@
|
||||
<p>
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/poisson_pdf_1.png" align="middle"></span>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="caution"><table border="0" summary="Caution">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../images/caution.png"></td>
|
||||
@ -85,37 +83,33 @@
|
||||
<tr><td align="left" valign="top">
|
||||
<p>
|
||||
The Poisson 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.
|
||||
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.
|
||||
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
|
||||
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 Poisson 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.
|
||||
docs</a> describe how to change the rounding policy for these distributions.
|
||||
</p>
|
||||
</td></tr>
|
||||
</table></div>
|
||||
<p>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.poisson_dist.member_functions"></a><h5>
|
||||
<a name="id1123717"></a>
|
||||
<a name="id1124999"></a>
|
||||
<a class="link" href="poisson_dist.html#math_toolkit.dist.dist_ref.dists.poisson_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -130,7 +124,7 @@
|
||||
Returns the <span class="emphasis"><em>mean</em></span> of this distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.poisson_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1123807"></a>
|
||||
<a name="id1125089"></a>
|
||||
<a class="link" href="poisson_dist.html#math_toolkit.dist.dist_ref.dists.poisson_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -150,7 +144,7 @@
|
||||
The domain of the random variable is [0, ∞].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.poisson_dist.accuracy"></a><h5>
|
||||
<a name="id1123904"></a>
|
||||
<a name="id1125186"></a>
|
||||
<a class="link" href="poisson_dist.html#math_toolkit.dist.dist_ref.dists.poisson_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -164,7 +158,7 @@
|
||||
using an iterative method with a lower tolerance to avoid excessive computation.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.poisson_dist.implementation"></a><h5>
|
||||
<a name="id1123933"></a>
|
||||
<a name="id1125215"></a>
|
||||
<a class="link" href="poisson_dist.html#math_toolkit.dist.dist_ref.dists.poisson_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -79,7 +79,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/rayleigh_cdf.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.rayleigh.related_distributions"></a><h5>
|
||||
<a name="id1124654"></a>
|
||||
<a name="id1125937"></a>
|
||||
<a class="link" href="rayleigh.html#math_toolkit.dist.dist_ref.dists.rayleigh.related_distributions">Related
|
||||
distributions</a>
|
||||
</h5>
|
||||
@ -95,7 +95,7 @@
|
||||
distribution</a>.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.rayleigh.member_functions"></a><h5>
|
||||
<a name="id1124706"></a>
|
||||
<a name="id1125989"></a>
|
||||
<a class="link" href="rayleigh.html#math_toolkit.dist.dist_ref.dists.rayleigh.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -114,7 +114,7 @@
|
||||
Returns the <span class="emphasis"><em>sigma</em></span> parameter of this distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.rayleigh.non_member_accessors"></a><h5>
|
||||
<a name="id1127300"></a>
|
||||
<a name="id1126093"></a>
|
||||
<a class="link" href="rayleigh.html#math_toolkit.dist.dist_ref.dists.rayleigh.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -134,7 +134,7 @@
|
||||
The domain of the random variable is [0, max_value].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.rayleigh.accuracy"></a><h5>
|
||||
<a name="id1127399"></a>
|
||||
<a name="id1126193"></a>
|
||||
<a class="link" href="rayleigh.html#math_toolkit.dist.dist_ref.dists.rayleigh.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -144,7 +144,7 @@
|
||||
using NTL RR type with 150-bit accuracy, about 50 decimal digits.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.rayleigh.implementation"></a><h5>
|
||||
<a name="id1127433"></a>
|
||||
<a name="id1126226"></a>
|
||||
<a class="link" href="rayleigh.html#math_toolkit.dist.dist_ref.dists.rayleigh.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -313,7 +313,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.rayleigh.references"></a><h5>
|
||||
<a name="id1127765"></a>
|
||||
<a name="id1127741"></a>
|
||||
<a class="link" href="rayleigh.html#math_toolkit.dist.dist_ref.dists.rayleigh.references">References</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="math_toolkit.dist.dist_ref.dists.students_t_dist"></a><a class="link" href="students_t_dist.html" title="Students t Distribution">
|
||||
Students t Distribution</a>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.students_t_dist"></a><a class="link" href="students_t_dist.html" title="Students t Distribution">Students
|
||||
t Distribution</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
|
||||
@ -90,7 +90,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/students_t_pdf.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.students_t_dist.member_functions"></a><h5>
|
||||
<a name="id1128346"></a>
|
||||
<a name="id1128322"></a>
|
||||
<a class="link" href="students_t_dist.html#math_toolkit.dist.dist_ref.dists.students_t_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -167,7 +167,7 @@
|
||||
Engineering Statistics Handbook</a>.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.students_t_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1128638"></a>
|
||||
<a name="id1128613"></a>
|
||||
<a class="link" href="students_t_dist.html#math_toolkit.dist.dist_ref.dists.students_t_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -187,7 +187,7 @@
|
||||
The domain of the random variable is [-∞, +∞].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.students_t_dist.examples"></a><h5>
|
||||
<a name="id1128737"></a>
|
||||
<a name="id1128713"></a>
|
||||
<a class="link" href="students_t_dist.html#math_toolkit.dist.dist_ref.dists.students_t_dist.examples">Examples</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -195,7 +195,7 @@
|
||||
are available illustrating the use of the Student's t distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.students_t_dist.accuracy"></a><h5>
|
||||
<a name="id1128764"></a>
|
||||
<a name="id1128739"></a>
|
||||
<a class="link" href="students_t_dist.html#math_toolkit.dist.dist_ref.dists.students_t_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -204,7 +204,7 @@
|
||||
inverses</a>, refer to accuracy data on those functions for more information.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.students_t_dist.implementation"></a><h5>
|
||||
<a name="id1128795"></a>
|
||||
<a name="id1128770"></a>
|
||||
<a class="link" href="students_t_dist.html#math_toolkit.dist.dist_ref.dists.students_t_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="math_toolkit.dist.dist_ref.dists.triangular_dist"></a><a class="link" href="triangular_dist.html" title="Triangular Distribution">
|
||||
Triangular Distribution</a>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.triangular_dist"></a><a class="link" href="triangular_dist.html" title="Triangular Distribution">Triangular
|
||||
Distribution</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
|
||||
@ -121,7 +121,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/triangular_cdf.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.triangular_dist.member_functions"></a><h5>
|
||||
<a name="id1130094"></a>
|
||||
<a name="id1129934"></a>
|
||||
<a class="link" href="triangular_dist.html#math_toolkit.dist.dist_ref.dists.triangular_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -156,7 +156,7 @@
|
||||
(default+1).
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.triangular_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1130313"></a>
|
||||
<a name="id1130152"></a>
|
||||
<a class="link" href="triangular_dist.html#math_toolkit.dist.dist_ref.dists.triangular_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -177,7 +177,7 @@
|
||||
range is lower <= x <= upper.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.triangular_dist.accuracy"></a><h5>
|
||||
<a name="id1130412"></a>
|
||||
<a name="id1130252"></a>
|
||||
<a class="link" href="triangular_dist.html#math_toolkit.dist.dist_ref.dists.triangular_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -186,7 +186,7 @@
|
||||
with arguments nearing the extremes of zero and unity.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.triangular_dist.implementation"></a><h5>
|
||||
<a name="id1130434"></a>
|
||||
<a name="id1130273"></a>
|
||||
<a class="link" href="triangular_dist.html#math_toolkit.dist.dist_ref.dists.triangular_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -371,7 +371,7 @@
|
||||
Calculate and plot probability distributions</a>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.triangular_dist.references"></a><h5>
|
||||
<a name="id1130766"></a>
|
||||
<a name="id1130606"></a>
|
||||
<a class="link" href="triangular_dist.html#math_toolkit.dist.dist_ref.dists.triangular_dist.references">References</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
|
@ -110,7 +110,7 @@
|
||||
<span class="inlinemediaobject"><img src="../../../../../graphs/uniform_cdf.png" align="middle"></span>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.uniform_dist.member_functions"></a><h5>
|
||||
<a name="id1132848"></a>
|
||||
<a name="id1133156"></a>
|
||||
<a class="link" href="uniform_dist.html#math_toolkit.dist.dist_ref.dists.uniform_dist.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -137,7 +137,7 @@
|
||||
Returns the <span class="emphasis"><em>upper</em></span> parameter of this distribution.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.uniform_dist.non_member_accessors"></a><h5>
|
||||
<a name="id1133014"></a>
|
||||
<a name="id1133323"></a>
|
||||
<a class="link" href="uniform_dist.html#math_toolkit.dist.dist_ref.dists.uniform_dist.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -158,7 +158,7 @@
|
||||
range is only <span class="emphasis"><em>lower</em></span> <= x <= <span class="emphasis"><em>upper</em></span>.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.uniform_dist.accuracy"></a><h5>
|
||||
<a name="id1133119"></a>
|
||||
<a name="id1133428"></a>
|
||||
<a class="link" href="uniform_dist.html#math_toolkit.dist.dist_ref.dists.uniform_dist.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -166,7 +166,7 @@
|
||||
and so should have errors within an epsilon or two.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.uniform_dist.implementation"></a><h5>
|
||||
<a name="id1133138"></a>
|
||||
<a name="id1133447"></a>
|
||||
<a class="link" href="uniform_dist.html#math_toolkit.dist.dist_ref.dists.uniform_dist.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -330,7 +330,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.uniform_dist.references"></a><h5>
|
||||
<a name="id1133414"></a>
|
||||
<a name="id1133723"></a>
|
||||
<a class="link" href="uniform_dist.html#math_toolkit.dist.dist_ref.dists.uniform_dist.references">References</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
|
@ -93,7 +93,7 @@
|
||||
<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="id1131362"></a>
|
||||
<a name="id1131201"></a>
|
||||
<a class="link" href="weibull.html#math_toolkit.dist.dist_ref.dists.weibull.related_distributions">Related
|
||||
distributions</a>
|
||||
</h5>
|
||||
@ -107,7 +107,7 @@
|
||||
Distributions, Theory and Applications Samuel Kotz & Saralees Nadarajah</a>.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.weibull.member_functions"></a><h5>
|
||||
<a name="id1131405"></a>
|
||||
<a name="id1131244"></a>
|
||||
<a class="link" href="weibull.html#math_toolkit.dist.dist_ref.dists.weibull.member_functions">Member
|
||||
Functions</a>
|
||||
</h5>
|
||||
@ -133,7 +133,7 @@
|
||||
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="id1131564"></a>
|
||||
<a name="id1131404"></a>
|
||||
<a class="link" href="weibull.html#math_toolkit.dist.dist_ref.dists.weibull.non_member_accessors">Non-member
|
||||
Accessors</a>
|
||||
</h5>
|
||||
@ -153,7 +153,7 @@
|
||||
The domain of the random variable is [0, ∞].
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.weibull.accuracy"></a><h5>
|
||||
<a name="id1131664"></a>
|
||||
<a name="id1131503"></a>
|
||||
<a class="link" href="weibull.html#math_toolkit.dist.dist_ref.dists.weibull.accuracy">Accuracy</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -163,7 +163,7 @@
|
||||
as such should have very low error rates.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.weibull.implementation"></a><h5>
|
||||
<a name="id1131705"></a>
|
||||
<a name="id1131544"></a>
|
||||
<a class="link" href="weibull.html#math_toolkit.dist.dist_ref.dists.weibull.implementation">Implementation</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -330,7 +330,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="math_toolkit.dist.dist_ref.dists.weibull.references"></a><h5>
|
||||
<a name="id1132201"></a>
|
||||
<a name="id1131869"></a>
|
||||
<a class="link" href="weibull.html#math_toolkit.dist.dist_ref.dists.weibull.references">References</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
|
@ -29,10 +29,9 @@
|
||||
<a class="link" href="nmp.html#function_index">function index</a> to go straight to
|
||||
the function you want if you already know its name.
|
||||
</p>
|
||||
<a name="function_index"></a><a name="math_toolkit.dist.dist_ref.nmp.function_index"></a><h5>
|
||||
<a name="id1077841"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.function_index">Function
|
||||
Index</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__function_index____function_index"></a><h5>
|
||||
<a name="id1078965"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__function_index____function_index"><a name="function_index"></a> Function Index</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
@ -87,10 +86,9 @@
|
||||
<a class="link" href="nmp.html#math.dist.variance">variance</a>.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="concept_index"></a><a name="math_toolkit.dist.dist_ref.nmp.conceptual_index"></a><h5>
|
||||
<a name="id1078065"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.conceptual_index">Conceptual
|
||||
Index</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__concept_index____conceptual_index"></a><h5>
|
||||
<a name="id1079188"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__concept_index____conceptual_index"><a name="concept_index"></a> Conceptual Index</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
@ -174,10 +172,9 @@
|
||||
<a class="link" href="nmp.html#math.dist.variance">variance</a>.
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="math.dist.cdf"></a><a name="math_toolkit.dist.dist_ref.nmp.cumulative_distribution_function"></a><h5>
|
||||
<a name="id1078400"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.cumulative_distribution_function">Cumulative
|
||||
Distribution Function</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_cdf____cumulative_distribution_function"></a><h5>
|
||||
<a name="id1079519"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_cdf____cumulative_distribution_function"><a name="math.dist.cdf"></a> Cumulative Distribution Function</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</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">></span>
|
||||
<span class="identifier">RealType</span> <span class="identifier">cdf</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">RealType</span><span class="special">&</span> <span class="identifier">x</span><span class="special">);</span>
|
||||
@ -198,10 +195,9 @@
|
||||
<p>
|
||||
<span class="inlinemediaobject"><img src="../../../../graphs/cdf.png" alt="cdf"></span>
|
||||
</p>
|
||||
<a name="math.dist.ccdf"></a><a name="math_toolkit.dist.dist_ref.nmp.complement_of_the_cumulative_distribution_function"></a><h5>
|
||||
<a name="id1078570"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.complement_of_the_cumulative_distribution_function">Complement
|
||||
of the Cumulative Distribution Function</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_ccdf____complement_of_the_cumulative_distribution_function"></a><h5>
|
||||
<a name="id1079686"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_ccdf____complement_of_the_cumulative_distribution_function"><a name="math.dist.ccdf"></a> Complement of the Cumulative Distribution Function</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Distribution</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">RealType</span><span class="special">></span>
|
||||
<span class="identifier">RealType</span> <span class="identifier">cdf</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Unspecified-Complement-Type</em></span><span class="special"><</span><span class="identifier">Distribution</span><span class="special">,</span> <span class="identifier">RealType</span><span class="special">>&</span> <span class="identifier">comp</span><span class="special">);</span>
|
||||
@ -239,9 +235,9 @@
|
||||
See <a class="link" href="../stat_tut/overview.html#why_complements">why complements?</a> for why the
|
||||
complement is useful and when it should be used.
|
||||
</p>
|
||||
<a name="math.dist.hazard"></a><a name="math_toolkit.dist.dist_ref.nmp.hazard_function"></a><h5>
|
||||
<a name="id1078858"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.hazard_function">Hazard Function</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_hazard____hazard_function"></a><h5>
|
||||
<a name="id1079973"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_hazard____hazard_function"><a name="math.dist.hazard"></a> Hazard Function</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</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">></span>
|
||||
<span class="identifier">RealType</span> <span class="identifier">hazard</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">RealType</span><span class="special">&</span> <span class="identifier">x</span><span class="special">);</span>
|
||||
@ -267,10 +263,9 @@
|
||||
rather than the hazard function.
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="math.dist.chf"></a><a name="math_toolkit.dist.dist_ref.nmp.cumulative_hazard_function"></a><h5>
|
||||
<a name="id1079041"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.cumulative_hazard_function">Cumulative
|
||||
Hazard Function</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_chf____cumulative_hazard_function"></a><h5>
|
||||
<a name="id1080152"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_chf____cumulative_hazard_function"><a name="math.dist.chf"></a> Cumulative Hazard Function</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</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">></span>
|
||||
<span class="identifier">RealType</span> <span class="identifier">chf</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">RealType</span><span class="special">&</span> <span class="identifier">x</span><span class="special">);</span>
|
||||
@ -295,9 +290,9 @@
|
||||
Some authors refer to this as simply the "Hazard Function".
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="math.dist.mean"></a><a name="math_toolkit.dist.dist_ref.nmp.mean"></a><h5>
|
||||
<a name="id1079286"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.mean">mean</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_mean____mean"></a><h5>
|
||||
<a name="id1080330"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_mean____mean"><a name="math.dist.mean"></a> mean</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</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">></span>
|
||||
<span class="identifier">RealType</span> <span class="identifier">mean</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">);</span>
|
||||
@ -310,9 +305,9 @@
|
||||
if the distribution does not have a defined mean (for example the Cauchy
|
||||
distribution).
|
||||
</p>
|
||||
<a name="math.dist.median"></a><a name="math_toolkit.dist.dist_ref.nmp.median"></a><h5>
|
||||
<a name="id1079404"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.median">median</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_median____median"></a><h5>
|
||||
<a name="id1080567"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_median____median"><a name="math.dist.median"></a> median</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</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">></span>
|
||||
<span class="identifier">RealType</span> <span class="identifier">median</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">);</span>
|
||||
@ -320,9 +315,9 @@
|
||||
<p>
|
||||
Returns the median of the distribution <span class="emphasis"><em>dist</em></span>.
|
||||
</p>
|
||||
<a name="math.dist.mode"></a><a name="math_toolkit.dist.dist_ref.nmp.mode"></a><h5>
|
||||
<a name="id1079513"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.mode">mode</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_mode____mode"></a><h5>
|
||||
<a name="id1080675"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_mode____mode"><a name="math.dist.mode"></a> mode</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">></span>
|
||||
<span class="identifier">RealType</span> <span class="identifier">mode</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">);</span>
|
||||
@ -334,10 +329,9 @@
|
||||
This function may return a <a class="link" href="../../main_overview/error_handling.html#domain_error">domain_error</a>
|
||||
if the distribution does not have a defined mode.
|
||||
</p>
|
||||
<a name="math.dist.pdf"></a><a name="math_toolkit.dist.dist_ref.nmp.probability_density_function"></a><h5>
|
||||
<a name="id1079628"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.probability_density_function">Probability
|
||||
Density Function</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_pdf____probability_density_function"></a><h5>
|
||||
<a name="id1080786"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_pdf____probability_density_function"><a name="math.dist.pdf"></a> Probability Density Function</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</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">></span>
|
||||
<span class="identifier">RealType</span> <span class="identifier">pdf</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">RealType</span><span class="special">&</span> <span class="identifier">x</span><span class="special">);</span>
|
||||
@ -363,9 +357,9 @@
|
||||
<p>
|
||||
<span class="inlinemediaobject"><img src="../../../../graphs/pdf.png" alt="pdf"></span>
|
||||
</p>
|
||||
<a name="math.dist.range"></a><a name="math_toolkit.dist.dist_ref.nmp.range"></a><h5>
|
||||
<a name="id1079798"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.range">range</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_range____range"></a><h5>
|
||||
<a name="id1080952"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_range____range"><a name="math.dist.range"></a> range</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</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">></span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <span class="identifier">RealType</span><span class="special">></span> <span class="identifier">range</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">);</span>
|
||||
@ -373,9 +367,9 @@
|
||||
<p>
|
||||
Returns the valid range of the random variable over distribution <span class="emphasis"><em>dist</em></span>.
|
||||
</p>
|
||||
<a name="math.dist.quantile"></a><a name="math_toolkit.dist.dist_ref.nmp.quantile"></a><h5>
|
||||
<a name="id1079933"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.quantile">Quantile</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_quantile____quantile"></a><h5>
|
||||
<a name="id1081086"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_quantile____quantile"><a name="math.dist.quantile"></a> Quantile</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</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">></span>
|
||||
<span class="identifier">RealType</span> <span class="identifier">quantile</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">RealType</span><span class="special">&</span> <span class="identifier">p</span><span class="special">);</span>
|
||||
@ -402,10 +396,9 @@
|
||||
<p>
|
||||
<span class="inlinemediaobject"><img src="../../../../graphs/quantile.png" alt="quantile"></span>
|
||||
</p>
|
||||
<a name="math.dist.quantile_c"></a><a name="math_toolkit.dist.dist_ref.nmp.quantile_from_the_complement_of_the_probability_"></a><h5>
|
||||
<a name="id1080158"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.quantile_from_the_complement_of_the_probability_">Quantile
|
||||
from the complement of the probability.</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_quantile_c____quantile_from_the_complement_of_the_probability_"></a><h5>
|
||||
<a name="id1081309"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_quantile_c____quantile_from_the_complement_of_the_probability_"><a name="math.dist.quantile_c"></a> Quantile from the complement of the probability.</a>
|
||||
</h5>
|
||||
<p>
|
||||
<a class="link" href="../stat_tut/overview.html#complements">complements</a>
|
||||
@ -448,10 +441,9 @@
|
||||
<p>
|
||||
<span class="inlinemediaobject"><img src="../../../../graphs/survival_inv.png" alt="survival_inv"></span>
|
||||
</p>
|
||||
<a name="math.dist.sd"></a><a name="math_toolkit.dist.dist_ref.nmp.standard_deviation"></a><h5>
|
||||
<a name="id1080498"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.standard_deviation">Standard
|
||||
Deviation</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_sd____standard_deviation"></a><h5>
|
||||
<a name="id1081649"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_sd____standard_deviation"><a name="math.dist.sd"></a> Standard Deviation</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</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">></span>
|
||||
<span class="identifier">RealType</span> <span class="identifier">standard_deviation</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">);</span>
|
||||
@ -463,9 +455,9 @@
|
||||
This function may return a <a class="link" href="../../main_overview/error_handling.html#domain_error">domain_error</a>
|
||||
if the distribution does not have a defined standard deviation.
|
||||
</p>
|
||||
<a name="math.dist.support"></a><a name="math_toolkit.dist.dist_ref.nmp.support"></a><h5>
|
||||
<a name="id1080620"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.support">support</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_support____support"></a><h5>
|
||||
<a name="id1081768"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_support____support"><a name="math.dist.support"></a> support</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</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">></span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <span class="identifier">RealType</span><span class="special">></span> <span class="identifier">support</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">);</span>
|
||||
@ -480,9 +472,9 @@
|
||||
that has the cdf going from zero to unity. Outside are uninteresting zones
|
||||
where the pdf is zero, and the cdf zero or unity.
|
||||
</p>
|
||||
<a name="math.dist.variance"></a><a name="math_toolkit.dist.dist_ref.nmp.variance"></a><h5>
|
||||
<a name="id1080764"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.variance">Variance</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_variance____variance"></a><h5>
|
||||
<a name="id1081911"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_variance____variance"><a name="math.dist.variance"></a> Variance</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</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">></span>
|
||||
<span class="identifier">RealType</span> <span class="identifier">variance</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">);</span>
|
||||
@ -494,9 +486,9 @@
|
||||
This function may return a <a class="link" href="../../main_overview/error_handling.html#domain_error">domain_error</a>
|
||||
if the distribution does not have a defined variance.
|
||||
</p>
|
||||
<a name="math.dist.skewness"></a><a name="math_toolkit.dist.dist_ref.nmp.skewness"></a><h5>
|
||||
<a name="id1080882"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.skewness">Skewness</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_skewness____skewness"></a><h5>
|
||||
<a name="id1082028"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_skewness____skewness"><a name="math.dist.skewness"></a> Skewness</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</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">></span>
|
||||
<span class="identifier">RealType</span> <span class="identifier">skewness</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">);</span>
|
||||
@ -508,9 +500,9 @@
|
||||
This function may return a <a class="link" href="../../main_overview/error_handling.html#domain_error">domain_error</a>
|
||||
if the distribution does not have a defined skewness.
|
||||
</p>
|
||||
<a name="math.dist.kurtosis"></a><a name="math_toolkit.dist.dist_ref.nmp.kurtosis"></a><h5>
|
||||
<a name="id1081001"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.kurtosis">Kurtosis</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_kurtosis____kurtosis"></a><h5>
|
||||
<a name="id1082146"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_kurtosis____kurtosis"><a name="math.dist.kurtosis"></a> Kurtosis</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</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">></span>
|
||||
<span class="identifier">RealType</span> <span class="identifier">kurtosis</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">);</span>
|
||||
@ -550,10 +542,9 @@
|
||||
<p>
|
||||
'Proper' kurtosis can have a value from zero to + infinity.
|
||||
</p>
|
||||
<a name="math.dist.kurtosis_excess"></a><a name="math_toolkit.dist.dist_ref.nmp.kurtosis_excess"></a><h5>
|
||||
<a name="id1081209"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.kurtosis_excess">Kurtosis
|
||||
excess</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_kurtosis_excess____kurtosis_excess"></a><h5>
|
||||
<a name="id1082352"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__math_dist_kurtosis_excess____kurtosis_excess"><a name="math.dist.kurtosis_excess"></a> Kurtosis excess</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">></span>
|
||||
<span class="identifier">RealType</span> <span class="identifier">kurtosis_excess</span><span class="special">(</span><span class="keyword">const</span> <span class="emphasis"><em>Distribution-Type</em></span><span class="special"><</span><span class="identifier">RealType</span><span class="special">,</span> <a class="link" href="../../policy.html" title="Policies">Policy</a><span class="special">>&</span> <span class="identifier">dist</span><span class="special">);</span>
|
||||
@ -585,9 +576,9 @@
|
||||
<p>
|
||||
The kurtosis excess of a normal distribution is zero.
|
||||
</p>
|
||||
<a name="cdfPQ"></a><a name="math_toolkit.dist.dist_ref.nmp.p_and_q"></a><h5>
|
||||
<a name="id1082782"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.p_and_q">P and Q</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__cdfpq____p_and_q"></a><h5>
|
||||
<a name="id1082538"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__cdfpq____p_and_q"><a name="cdfPQ"></a> P and Q</a>
|
||||
</h5>
|
||||
<p>
|
||||
The terms P and Q are sometimes used to refer to the <a class="link" href="nmp.html#math.dist.cdf">Cumulative
|
||||
@ -595,36 +586,32 @@
|
||||
respectively. Lowercase p and q are sometimes used to refer to the values
|
||||
returned by these functions.
|
||||
</p>
|
||||
<a name="percent"></a><a name="math_toolkit.dist.dist_ref.nmp.percent_point_function"></a><h5>
|
||||
<a name="id1082812"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.percent_point_function">Percent
|
||||
Point Function</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__percent____percent_point_function"></a><h5>
|
||||
<a name="id1082569"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__percent____percent_point_function"><a name="percent"></a> Percent Point Function</a>
|
||||
</h5>
|
||||
<p>
|
||||
The percent point function, also known as the percentile, is the same as
|
||||
the <a class="link" href="nmp.html#math.dist.quantile">Quantile</a>.
|
||||
</p>
|
||||
<a name="cdf_inv"></a><a name="math_toolkit.dist.dist_ref.nmp.inverse_cdf_function_"></a><h5>
|
||||
<a name="id1082838"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.inverse_cdf_function_">Inverse
|
||||
CDF Function.</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__cdf_inv____inverse_cdf_function_"></a><h5>
|
||||
<a name="id1082593"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__cdf_inv____inverse_cdf_function_"><a name="cdf_inv"></a> Inverse CDF Function.</a>
|
||||
</h5>
|
||||
<p>
|
||||
The inverse of the cumulative distribution function, is the same as the
|
||||
<a class="link" href="nmp.html#math.dist.quantile">Quantile</a>.
|
||||
</p>
|
||||
<a name="survival_inv"></a><a name="math_toolkit.dist.dist_ref.nmp.inverse_survival_function_"></a><h5>
|
||||
<a name="id1082866"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.inverse_survival_function_">Inverse
|
||||
Survival Function.</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__survival_inv____inverse_survival_function_"></a><h5>
|
||||
<a name="id1082617"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__survival_inv____inverse_survival_function_"><a name="survival_inv"></a> Inverse Survival Function.</a>
|
||||
</h5>
|
||||
<p>
|
||||
The inverse of the survival function, is the same as computing the <a class="link" href="nmp.html#math.dist.quantile_c">quantile from the complement of the probability</a>.
|
||||
</p>
|
||||
<a name="pmf"></a><a name="math_toolkit.dist.dist_ref.nmp.probability_mass_function"></a><h5>
|
||||
<a name="id1082896"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.probability_mass_function">Probability
|
||||
Mass Function</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__pmf____probability_mass_function"></a><h5>
|
||||
<a name="id1082641"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__pmf____probability_mass_function"><a name="pmf"></a> Probability Mass Function</a>
|
||||
</h5>
|
||||
<p>
|
||||
The Probability Mass Function is the same as the <a class="link" href="nmp.html#math.dist.pdf">Probability
|
||||
@ -635,20 +622,18 @@
|
||||
the term <a class="link" href="nmp.html#math.dist.pdf">Probability Density Function</a>
|
||||
applies to continuous distributions.
|
||||
</p>
|
||||
<a name="lower_critical"></a><a name="math_toolkit.dist.dist_ref.nmp.lower_critical_value_"></a><h5>
|
||||
<a name="id1082934"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.lower_critical_value_">Lower
|
||||
Critical Value.</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__lower_critical____lower_critical_value_"></a><h5>
|
||||
<a name="id1082675"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__lower_critical____lower_critical_value_"><a name="lower_critical"></a> Lower Critical Value.</a>
|
||||
</h5>
|
||||
<p>
|
||||
The lower critical value calculates the value of the random variable given
|
||||
the area under the left tail of the distribution. It is equivalent to calculating
|
||||
the <a class="link" href="nmp.html#math.dist.quantile">Quantile</a>.
|
||||
</p>
|
||||
<a name="upper_critical"></a><a name="math_toolkit.dist.dist_ref.nmp.upper_critical_value_"></a><h5>
|
||||
<a name="id1082960"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.upper_critical_value_">Upper
|
||||
Critical Value.</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__upper_critical____upper_critical_value_"></a><h5>
|
||||
<a name="id1082699"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__upper_critical____upper_critical_value_"><a name="upper_critical"></a> Upper Critical Value.</a>
|
||||
</h5>
|
||||
<p>
|
||||
The upper critical value calculates the value of the random variable given
|
||||
@ -656,10 +641,9 @@
|
||||
calculating the <a class="link" href="nmp.html#math.dist.quantile_c">quantile from the
|
||||
complement of the probability</a>.
|
||||
</p>
|
||||
<a name="survival"></a><a name="math_toolkit.dist.dist_ref.nmp.survival_function"></a><h5>
|
||||
<a name="id1082986"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp.survival_function">Survival
|
||||
Function</a>
|
||||
<a name="math_toolkit.dist.dist_ref.nmp._anchor_id__survival____survival_function"></a><h5>
|
||||
<a name="id1082723"></a>
|
||||
<a class="link" href="nmp.html#math_toolkit.dist.dist_ref.nmp._anchor_id__survival____survival_function"><a name="survival"></a> Survival Function</a>
|
||||
</h5>
|
||||
<p>
|
||||
Refer to the <a class="link" href="nmp.html#math.dist.ccdf">Complement of the Cumulative
|
||||
|
@ -20,7 +20,7 @@
|
||||
<a name="math_toolkit.dist.future"></a><a class="link" href="future.html" title="Extras/Future Directions">Extras/Future Directions</a>
|
||||
</h3></div></div></div>
|
||||
<a name="math_toolkit.dist.future.adding_additional_location_and_scale_parameters"></a><h5>
|
||||
<a name="id1135811"></a>
|
||||
<a name="id1136052"></a>
|
||||
<a class="link" href="future.html#math_toolkit.dist.future.adding_additional_location_and_scale_parameters">Adding
|
||||
Additional Location and Scale Parameters</a>
|
||||
</h5>
|
||||
@ -48,7 +48,7 @@
|
||||
functions.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.future.an__quot_any_distribution_quot__class"></a><h5>
|
||||
<a name="id1135975"></a>
|
||||
<a name="id1136217"></a>
|
||||
<a class="link" href="future.html#math_toolkit.dist.future.an__quot_any_distribution_quot__class">An
|
||||
"any_distribution" class</a>
|
||||
</h5>
|
||||
@ -77,7 +77,7 @@
|
||||
use case: this needs more investigation.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.future.higher_level_hypothesis_tests"></a><h5>
|
||||
<a name="id1136184"></a>
|
||||
<a name="id1136426"></a>
|
||||
<a class="link" href="future.html#math_toolkit.dist.future.higher_level_hypothesis_tests">Higher
|
||||
Level Hypothesis Tests</a>
|
||||
</h5>
|
||||
@ -97,7 +97,7 @@
|
||||
<span class="emphasis"><em>expected_mean</em></span>.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.future.integration_with_statistical_accumulators"></a><h5>
|
||||
<a name="id1136345"></a>
|
||||
<a name="id1136586"></a>
|
||||
<a class="link" href="future.html#math_toolkit.dist.future.integration_with_statistical_accumulators">Integration
|
||||
With Statistical Accumulators</a>
|
||||
</h5>
|
||||
|
@ -24,81 +24,79 @@
|
||||
<dt><span class="section"><a href="stat_tut/overview.html">Overview</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg.html">Worked Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="stat_tut/weg/dist_construct_eg.html">
|
||||
Distribution Construction Example</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/st_eg.html"> Student's
|
||||
t Distribution Examples</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/dist_construct_eg.html">Distribution
|
||||
Construction Example</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/st_eg.html">Student's t
|
||||
Distribution Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="stat_tut/weg/st_eg/tut_mean_intervals.html">
|
||||
Calculating confidence intervals on the mean with the Students-t distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/st_eg/tut_mean_test.html">
|
||||
Testing a sample mean for difference from a "true" mean</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/st_eg/tut_mean_size.html">
|
||||
Estimating how large a sample size would have to become in order to give
|
||||
a significant Students-t test result with a single sample test</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/st_eg/two_sample_students_t.html">
|
||||
Comparing the means of two samples with the Students-t test</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/st_eg/paired_st.html">
|
||||
Comparing two paired samples with the Student's t distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/st_eg/tut_mean_intervals.html">Calculating
|
||||
confidence intervals on the mean with the Students-t distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/st_eg/tut_mean_test.html">Testing
|
||||
a sample mean for difference from a "true" mean</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/st_eg/tut_mean_size.html">Estimating
|
||||
how large a sample size would have to become in order to give a significant
|
||||
Students-t test result with a single sample test</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/st_eg/two_sample_students_t.html">Comparing
|
||||
the means of two samples with the Students-t test</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/st_eg/paired_st.html">Comparing
|
||||
two paired samples with the Student's t distribution</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="stat_tut/weg/cs_eg.html">Chi Squared
|
||||
Distribution Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="stat_tut/weg/cs_eg/chi_sq_intervals.html">
|
||||
Confidence Intervals on the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/cs_eg/chi_sq_test.html">
|
||||
Chi-Square Test for the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/cs_eg/chi_sq_size.html">
|
||||
Estimating the Required Sample Sizes for a Chi-Square Test for the Standard
|
||||
Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/cs_eg/chi_sq_intervals.html">Confidence
|
||||
Intervals on the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/cs_eg/chi_sq_test.html">Chi-Square
|
||||
Test for the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/cs_eg/chi_sq_size.html">Estimating
|
||||
the Required Sample Sizes for a Chi-Square Test for the Standard Deviation</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="stat_tut/weg/f_eg.html">F Distribution
|
||||
Examples</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/binom_eg.html">Binomial
|
||||
Distribution Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="stat_tut/weg/binom_eg/binomial_coinflip_example.html">
|
||||
Binomial Coin-Flipping Example</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/binom_eg/binomial_quiz_example.html">
|
||||
Binomial Quiz Example</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/binom_eg/binom_conf.html">
|
||||
Calculating Confidence Limits on the Frequency of Occurrence for a Binomial
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/binom_eg/binom_size_eg.html">
|
||||
Estimating Sample Sizes for a Binomial Distribution.</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/binom_eg/binomial_coinflip_example.html">Binomial
|
||||
Coin-Flipping Example</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/binom_eg/binomial_quiz_example.html">Binomial
|
||||
Quiz Example</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/binom_eg/binom_conf.html">Calculating
|
||||
Confidence Limits on the Frequency of Occurrence for a Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/binom_eg/binom_size_eg.html">Estimating
|
||||
Sample Sizes for a Binomial Distribution.</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="stat_tut/weg/neg_binom_eg.html">Negative
|
||||
Binomial Distribution Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="stat_tut/weg/neg_binom_eg/neg_binom_conf.html">
|
||||
Calculating Confidence Limits on the Frequency of Occurrence for the
|
||||
Negative Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/neg_binom_eg/neg_binom_size_eg.html">
|
||||
Estimating Sample Sizes for the Negative Binomial.</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/neg_binom_eg/negative_binomial_example1.html">
|
||||
Negative Binomial Sales Quota Example.</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/neg_binom_eg/negative_binomial_example2.html">
|
||||
Negative Binomial Table Printing Example.</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/neg_binom_eg/neg_binom_conf.html">Calculating
|
||||
Confidence Limits on the Frequency of Occurrence for the Negative Binomial
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/neg_binom_eg/neg_binom_size_eg.html">Estimating
|
||||
Sample Sizes for the Negative Binomial.</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/neg_binom_eg/negative_binomial_example1.html">Negative
|
||||
Binomial Sales Quota Example.</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/neg_binom_eg/negative_binomial_example2.html">Negative
|
||||
Binomial Table Printing Example.</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="stat_tut/weg/normal_example.html">Normal
|
||||
Distribution Examples</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="stat_tut/weg/normal_example/normal_misc.html">
|
||||
Some Miscellaneous Examples of the Normal (Gaussian) Distribution</a></span></dt></dl></dd>
|
||||
<dd><dl><dt><span class="section"><a href="stat_tut/weg/normal_example/normal_misc.html">Some
|
||||
Miscellaneous Examples of the Normal (Gaussian) Distribution</a></span></dt></dl></dd>
|
||||
<dt><span class="section"><a href="stat_tut/weg/nccs_eg.html">Non Central
|
||||
Chi Squared Example</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="stat_tut/weg/nccs_eg/nccs_power_eg.html">
|
||||
Tables of the power function of the χ<sup>2</sup> test.</a></span></dt></dl></dd>
|
||||
<dd><dl><dt><span class="section"><a href="stat_tut/weg/nccs_eg/nccs_power_eg.html">Tables
|
||||
of the power function of the χ<sup>2</sup> test.</a></span></dt></dl></dd>
|
||||
<dt><span class="section"><a href="stat_tut/weg/error_eg.html">Error Handling
|
||||
Example</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/find_eg.html">Find Location
|
||||
and Scale Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="stat_tut/weg/find_eg/find_location_eg.html">
|
||||
Find Location (Mean) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/find_eg/find_scale_eg.html">
|
||||
Find Scale (Standard Deviation) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/find_eg/find_mean_and_sd_eg.html">
|
||||
Find mean and standard deviation example</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/find_eg/find_location_eg.html">Find
|
||||
Location (Mean) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/find_eg/find_scale_eg.html">Find
|
||||
Scale (Standard Deviation) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="stat_tut/weg/find_eg/find_mean_and_sd_eg.html">Find
|
||||
mean and standard deviation example</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="stat_tut/weg/nag_library.html">Comparison
|
||||
with C, R, FORTRAN-style Free Functions</a></span></dt>
|
||||
|
@ -20,7 +20,7 @@
|
||||
<a name="math_toolkit.dist.stat_tut.overview"></a><a class="link" href="overview.html" title="Overview">Overview</a>
|
||||
</h4></div></div></div>
|
||||
<a name="math_toolkit.dist.stat_tut.overview.headers_and_namespaces"></a><h5>
|
||||
<a name="id995888"></a>
|
||||
<a name="id997723"></a>
|
||||
<a class="link" href="overview.html#math_toolkit.dist.stat_tut.overview.headers_and_namespaces">Headers
|
||||
and Namespaces</a>
|
||||
</h5>
|
||||
@ -37,7 +37,7 @@
|
||||
or <boost/math/distributions.hpp>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.stat_tut.overview.distributions_are_objects"></a><h5>
|
||||
<a name="id995920"></a>
|
||||
<a name="id997756"></a>
|
||||
<a class="link" href="overview.html#math_toolkit.dist.stat_tut.overview.distributions_are_objects">Distributions
|
||||
are Objects</a>
|
||||
</h5>
|
||||
@ -124,7 +124,7 @@
|
||||
and <span class="emphasis"><em>quantiles</em></span> etc for these distributions.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.stat_tut.overview.generic_operations_common_to_all_distributions_are_non_member_functions"></a><h5>
|
||||
<a name="id996280"></a>
|
||||
<a name="id998116"></a>
|
||||
<a class="link" href="overview.html#math_toolkit.dist.stat_tut.overview.generic_operations_common_to_all_distributions_are_non_member_functions">Generic
|
||||
operations common to all distributions are non-member functions</a>
|
||||
</h5>
|
||||
@ -159,8 +159,6 @@
|
||||
<th align="left">Tip</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><strong>Random numbers that approximate Quantiles of Distributions</strong></span>
|
||||
</p>
|
||||
@ -199,8 +197,6 @@
|
||||
<th align="left">Note</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><strong>Random Variates and Distribution Parameters</strong></span>
|
||||
</p>
|
||||
@ -266,8 +262,6 @@
|
||||
<th align="left">Note</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><strong>Discrete Probability Distributions</strong></span>
|
||||
</p>
|
||||
@ -316,10 +310,8 @@
|
||||
</p>
|
||||
</td></tr>
|
||||
</table></div>
|
||||
<a name="complements"></a><p>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.stat_tut.overview.complements_are_supported_too"></a><h5>
|
||||
<a name="id997456"></a>
|
||||
<a name="complements"></a><a name="math_toolkit.dist.stat_tut.overview.complements_are_supported_too"></a><h5>
|
||||
<a name="id999277"></a>
|
||||
<a class="link" href="overview.html#math_toolkit.dist.stat_tut.overview.complements_are_supported_too">Complements
|
||||
are supported too</a>
|
||||
</h5>
|
||||
@ -366,8 +358,6 @@
|
||||
<th align="left">Tip</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><strong>Critical values are just quantiles</strong></span>
|
||||
</p>
|
||||
@ -401,8 +391,6 @@
|
||||
</p>
|
||||
</td></tr>
|
||||
</table></div>
|
||||
<a name="why_complements"></a><p>
|
||||
</p>
|
||||
<div class="tip"><table border="0" summary="Tip">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../images/tip.png"></td>
|
||||
@ -410,9 +398,8 @@
|
||||
</tr>
|
||||
<tr><td align="left" valign="top">
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><strong>Why bother with complements anyway?</strong></span>
|
||||
<span class="bold"><strong><a name="why_complements"></a> Why bother with
|
||||
complements anyway?</strong></span>
|
||||
</p>
|
||||
<p>
|
||||
It's very tempting to dispense with complements, and simply subtract
|
||||
@ -454,7 +441,7 @@
|
||||
</td></tr>
|
||||
</table></div>
|
||||
<a name="math_toolkit.dist.stat_tut.overview.parameters_can_be_calculated"></a><h5>
|
||||
<a name="id998303"></a>
|
||||
<a name="id1000112"></a>
|
||||
<a class="link" href="overview.html#math_toolkit.dist.stat_tut.overview.parameters_can_be_calculated">Parameters
|
||||
can be calculated</a>
|
||||
</h5>
|
||||
@ -485,7 +472,7 @@
|
||||
sample size.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.stat_tut.overview.summary"></a><h5>
|
||||
<a name="id998395"></a>
|
||||
<a name="id1000204"></a>
|
||||
<a class="link" href="overview.html#math_toolkit.dist.stat_tut.overview.summary">Summary</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
|
@ -20,89 +20,83 @@
|
||||
<a name="math_toolkit.dist.stat_tut.weg"></a><a class="link" href="weg.html" title="Worked Examples">Worked Examples</a>
|
||||
</h4></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="weg/dist_construct_eg.html">
|
||||
Distribution Construction Example</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/st_eg.html"> Student's
|
||||
t Distribution Examples</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/dist_construct_eg.html">Distribution
|
||||
Construction Example</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/st_eg.html">Student's t
|
||||
Distribution Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="weg/st_eg/tut_mean_intervals.html">
|
||||
Calculating confidence intervals on the mean with the Students-t distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/st_eg/tut_mean_test.html">
|
||||
Testing a sample mean for difference from a "true" mean</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/st_eg/tut_mean_size.html">
|
||||
Estimating how large a sample size would have to become in order to give
|
||||
a significant Students-t test result with a single sample test</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/st_eg/two_sample_students_t.html">
|
||||
Comparing the means of two samples with the Students-t test</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/st_eg/paired_st.html">
|
||||
Comparing two paired samples with the Student's t distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/st_eg/tut_mean_intervals.html">Calculating
|
||||
confidence intervals on the mean with the Students-t distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/st_eg/tut_mean_test.html">Testing
|
||||
a sample mean for difference from a "true" mean</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/st_eg/tut_mean_size.html">Estimating
|
||||
how large a sample size would have to become in order to give a significant
|
||||
Students-t test result with a single sample test</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/st_eg/two_sample_students_t.html">Comparing
|
||||
the means of two samples with the Students-t test</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/st_eg/paired_st.html">Comparing
|
||||
two paired samples with the Student's t distribution</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="weg/cs_eg.html">Chi Squared
|
||||
Distribution Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="weg/cs_eg/chi_sq_intervals.html">
|
||||
Confidence Intervals on the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/cs_eg/chi_sq_test.html">
|
||||
Chi-Square Test for the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/cs_eg/chi_sq_size.html">
|
||||
Estimating the Required Sample Sizes for a Chi-Square Test for the Standard
|
||||
Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/cs_eg/chi_sq_intervals.html">Confidence
|
||||
Intervals on the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/cs_eg/chi_sq_test.html">Chi-Square
|
||||
Test for the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/cs_eg/chi_sq_size.html">Estimating
|
||||
the Required Sample Sizes for a Chi-Square Test for the Standard Deviation</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="weg/f_eg.html">F Distribution
|
||||
Examples</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/binom_eg.html">Binomial
|
||||
Distribution Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="weg/binom_eg/binomial_coinflip_example.html">
|
||||
Binomial Coin-Flipping Example</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/binom_eg/binomial_quiz_example.html">
|
||||
Binomial Quiz Example</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/binom_eg/binom_conf.html">
|
||||
Calculating Confidence Limits on the Frequency of Occurrence for a Binomial
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/binom_eg/binom_size_eg.html">
|
||||
Estimating Sample Sizes for a Binomial Distribution.</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/binom_eg/binomial_coinflip_example.html">Binomial
|
||||
Coin-Flipping Example</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/binom_eg/binomial_quiz_example.html">Binomial
|
||||
Quiz Example</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/binom_eg/binom_conf.html">Calculating
|
||||
Confidence Limits on the Frequency of Occurrence for a Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/binom_eg/binom_size_eg.html">Estimating
|
||||
Sample Sizes for a Binomial Distribution.</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="weg/neg_binom_eg.html">Negative
|
||||
Binomial Distribution Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="weg/neg_binom_eg/neg_binom_conf.html">
|
||||
Calculating Confidence Limits on the Frequency of Occurrence for the
|
||||
Negative Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/neg_binom_eg/neg_binom_size_eg.html">
|
||||
Estimating Sample Sizes for the Negative Binomial.</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/neg_binom_eg/negative_binomial_example1.html">
|
||||
Negative Binomial Sales Quota Example.</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/neg_binom_eg/negative_binomial_example2.html">
|
||||
Negative Binomial Table Printing Example.</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/neg_binom_eg/neg_binom_conf.html">Calculating
|
||||
Confidence Limits on the Frequency of Occurrence for the Negative Binomial
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/neg_binom_eg/neg_binom_size_eg.html">Estimating
|
||||
Sample Sizes for the Negative Binomial.</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/neg_binom_eg/negative_binomial_example1.html">Negative
|
||||
Binomial Sales Quota Example.</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/neg_binom_eg/negative_binomial_example2.html">Negative
|
||||
Binomial Table Printing Example.</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="weg/normal_example.html">Normal
|
||||
Distribution Examples</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="weg/normal_example/normal_misc.html">
|
||||
Some Miscellaneous Examples of the Normal (Gaussian) Distribution</a></span></dt></dl></dd>
|
||||
<dd><dl><dt><span class="section"><a href="weg/normal_example/normal_misc.html">Some
|
||||
Miscellaneous Examples of the Normal (Gaussian) Distribution</a></span></dt></dl></dd>
|
||||
<dt><span class="section"><a href="weg/nccs_eg.html">Non Central
|
||||
Chi Squared Example</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="weg/nccs_eg/nccs_power_eg.html">
|
||||
Tables of the power function of the χ<sup>2</sup> test.</a></span></dt></dl></dd>
|
||||
<dd><dl><dt><span class="section"><a href="weg/nccs_eg/nccs_power_eg.html">Tables
|
||||
of the power function of the χ<sup>2</sup> test.</a></span></dt></dl></dd>
|
||||
<dt><span class="section"><a href="weg/error_eg.html">Error Handling
|
||||
Example</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/find_eg.html">Find Location
|
||||
and Scale Examples</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="weg/find_eg/find_location_eg.html">
|
||||
Find Location (Mean) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/find_eg/find_scale_eg.html">
|
||||
Find Scale (Standard Deviation) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/find_eg/find_mean_and_sd_eg.html">
|
||||
Find mean and standard deviation example</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/find_eg/find_location_eg.html">Find
|
||||
Location (Mean) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/find_eg/find_scale_eg.html">Find
|
||||
Scale (Standard Deviation) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="weg/find_eg/find_mean_and_sd_eg.html">Find
|
||||
mean and standard deviation example</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="weg/nag_library.html">Comparison
|
||||
with C, R, FORTRAN-style Free Functions</a></span></dt>
|
||||
</dl></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -21,15 +21,14 @@
|
||||
Distribution Examples</a>
|
||||
</h5></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="binom_eg/binomial_coinflip_example.html">
|
||||
Binomial Coin-Flipping Example</a></span></dt>
|
||||
<dt><span class="section"><a href="binom_eg/binomial_quiz_example.html">
|
||||
Binomial Quiz Example</a></span></dt>
|
||||
<dt><span class="section"><a href="binom_eg/binom_conf.html">
|
||||
Calculating Confidence Limits on the Frequency of Occurrence for a Binomial
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="binom_eg/binom_size_eg.html">
|
||||
Estimating Sample Sizes for a Binomial Distribution.</a></span></dt>
|
||||
<dt><span class="section"><a href="binom_eg/binomial_coinflip_example.html">Binomial
|
||||
Coin-Flipping Example</a></span></dt>
|
||||
<dt><span class="section"><a href="binom_eg/binomial_quiz_example.html">Binomial
|
||||
Quiz Example</a></span></dt>
|
||||
<dt><span class="section"><a href="binom_eg/binom_conf.html">Calculating
|
||||
Confidence Limits on the Frequency of Occurrence for a Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="binom_eg/binom_size_eg.html">Estimating
|
||||
Sample Sizes for a Binomial Distribution.</a></span></dt>
|
||||
</dl></div>
|
||||
<p>
|
||||
See also the reference documentation for the <a class="link" href="../../dist_ref/dists/binomial_dist.html" title="Binomial Distribution">Binomial
|
||||
|
@ -17,9 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.binom_eg.binom_conf"></a><a class="link" href="binom_conf.html" title="Calculating Confidence Limits on the Frequency of Occurrence for a Binomial Distribution">
|
||||
Calculating Confidence Limits on the Frequency of Occurrence for a Binomial
|
||||
Distribution</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.binom_eg.binom_conf"></a><a class="link" href="binom_conf.html" title="Calculating Confidence Limits on the Frequency of Occurrence for a Binomial Distribution">Calculating
|
||||
Confidence Limits on the Frequency of Occurrence for a Binomial Distribution</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
Imagine you have a process that follows a binomial distribution: for
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.binom_eg.binom_size_eg"></a><a class="link" href="binom_size_eg.html" title="Estimating Sample Sizes for a Binomial Distribution.">
|
||||
Estimating Sample Sizes for a Binomial Distribution.</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.binom_eg.binom_size_eg"></a><a class="link" href="binom_size_eg.html" title="Estimating Sample Sizes for a Binomial Distribution.">Estimating
|
||||
Sample Sizes for a Binomial Distribution.</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
Imagine you have a critical component that you know will fail in 1
|
||||
|
@ -17,31 +17,23 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.binom_eg.binomial_coinflip_example"></a><a class="link" href="binomial_coinflip_example.html" title="Binomial Coin-Flipping Example">
|
||||
Binomial Coin-Flipping Example</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.binom_eg.binomial_coinflip_example"></a><a class="link" href="binomial_coinflip_example.html" title="Binomial Coin-Flipping Example">Binomial
|
||||
Coin-Flipping Example</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
An example of a <a href="http://en.wikipedia.org/wiki/Bernoulli_process" target="_top">Bernoulli
|
||||
process</a> is coin flipping. A variable in such a sequence may
|
||||
be called a Bernoulli variable.
|
||||
</p>
|
||||
<p>
|
||||
This example shows using the Binomial distribution to predict the probability
|
||||
of heads and tails when throwing a coin.
|
||||
</p>
|
||||
<p>
|
||||
This example shows using the Binomial distribution to predict the
|
||||
probability of heads and tails when throwing a coin.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The number of correct answers (say heads), X, is distributed as a
|
||||
binomial random variable with binomial distribution parameters number
|
||||
of trials (flips) n = 10 and probability (success_fraction) of getting
|
||||
a head p = 0.5 (a 'fair' coin).
|
||||
</p>
|
||||
<p>
|
||||
The number of correct answers (say heads), X, is distributed as a binomial
|
||||
random variable with binomial distribution parameters number of trials
|
||||
(flips) n = 10 and probability (success_fraction) of getting a head
|
||||
p = 0.5 (a 'fair' coin).
|
||||
</p>
|
||||
<p>
|
||||
(Our coin is assumed fair, but we could easily change the success_fraction
|
||||
@ -49,15 +41,11 @@
|
||||
say 0.6 for one with chewing gum on the tail, so it is more likely
|
||||
to fall tails down and heads up).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
First we need some includes and using statements to be able to use
|
||||
the binomial distribution, some std input and output, and get started:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</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">binomial</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
@ -75,21 +63,15 @@
|
||||
<span class="special">{</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
See note <a class="link" href="binomial_coinflip_example.html#coinflip_eg_catch">with the catch block</a>
|
||||
about why a try and catch block is always a good idea.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
First, construct a binomial distribution with parameters success_fraction
|
||||
1/2, and how many flips.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">success_fraction</span> <span class="special">=</span> <span class="number">0.5</span><span class="special">;</span> <span class="comment">// = 50% = 1/2 for a 'fair' coin.
|
||||
@ -97,16 +79,12 @@
|
||||
<span class="identifier">binomial</span> <span class="identifier">flip</span><span class="special">(</span><span class="identifier">flips</span><span class="special">,</span> <span class="identifier">success_fraction</span><span class="special">);</span>
|
||||
|
||||
<span class="identifier">cout</span><span class="special">.</span><span class="identifier">precision</span><span class="special">(</span><span class="number">4</span><span class="special">);</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Then some examples of using Binomial moments (and echoing the parameters).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"From "</span> <span class="special"><<</span> <span class="identifier">flips</span> <span class="special"><<</span> <span class="string">" one can expect to get on average "</span>
|
||||
@ -124,21 +102,15 @@
|
||||
<span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">skewness</span><span class="special">(</span><span class="identifier">flip</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// Expect zero for a 'fair' coin.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Now we show a variety of predictions on the probability of heads:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"For "</span> <span class="special"><<</span> <span class="identifier">flip</span><span class="special">.</span><span class="identifier">trials</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" coin flips: "</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting no heads is "</span> <span class="special"><<</span> <span class="identifier">pdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">0</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting at least one head is "</span> <span class="special"><<</span> <span class="number">1.</span> <span class="special">-</span> <span class="identifier">pdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">0</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -146,108 +118,79 @@
|
||||
can sum the PDF's:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting 0 or 1 heads is "</span>
|
||||
<span class="special"><<</span> <span class="identifier">pdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">0</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">pdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">1</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// sum of exactly == probabilities</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Or we can use the cdf.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting 0 or 1 (<= 1) heads is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">1</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting 9 or 10 heads is "</span> <span class="special"><<</span> <span class="identifier">pdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">9</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">pdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">10</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Note that using
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting 9 or 10 heads is "</span> <span class="special"><<</span> <span class="number">1.</span> <span class="special">-</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">8</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
is less accurate than using the complement
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting 9 or 10 heads is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">8</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Since the subtraction may involve <a href="http://docs.sun.com/source/806-3568/ncg_goldberg.html" target="_top">cancellation
|
||||
error</a>, where as <code class="computeroutput"><span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">8</span><span class="special">))</span></code> does not use such a subtraction
|
||||
internally, and so does not exhibit the problem.
|
||||
</p>
|
||||
<p>
|
||||
error</a>, where as <code class="computeroutput"><span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">8</span><span class="special">))</span></code>
|
||||
does not use such a subtraction internally, and so does not exhibit
|
||||
the problem.
|
||||
</p>
|
||||
<p>
|
||||
To get the probability for a range of heads, we can either add the
|
||||
pdfs for each number of heads
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of between 4 and 6 heads (4 or 5 or 6) is "</span>
|
||||
<span class="comment">// P(X == 4) + P(X == 5) + P(X == 6)
|
||||
</span> <span class="special"><<</span> <span class="identifier">pdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">4</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">pdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">pdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">6</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
But this is probably less efficient than using the cdf
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of between 4 and 6 heads (4 or 5 or 6) is "</span>
|
||||
<span class="comment">// P(X <= 6) - P(X <= 3) == P(X < 4)
|
||||
</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">6</span><span class="special">)</span> <span class="special">-</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">3</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Certainly for a bigger range like, 3 to 7
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of between 3 and 7 heads (3, 4, 5, 6 or 7) is "</span>
|
||||
<span class="comment">// P(X <= 7) - P(X <= 2) == P(X < 3)
|
||||
</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">7</span><span class="special">)</span> <span class="special">-</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">flip</span><span class="special">,</span> <span class="number">2</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -255,8 +198,6 @@
|
||||
and <span class="emphasis"><em>at least</em></span> a number of heads.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">// Print a table of probability for the exactly a number of heads.
|
||||
@ -280,16 +221,12 @@
|
||||
<span class="special"><<</span> <span class="identifier">probability</span> <span class="special"><<</span> <span class="string">" or 1 in "</span> <span class="special"><<</span> <span class="number">1.</span> <span class="special">/</span> <span class="identifier">probability</span> <span class="special"><<</span> <span class="string">", or "</span>
|
||||
<span class="special"><<</span> <span class="identifier">probability</span> <span class="special">*</span> <span class="number">100.</span> <span class="special"><<</span> <span class="string">"%"</span><span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="special">}</span> <span class="comment">// for i</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The last (0 to 10 heads) must, of course, be 100% probability.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="special">}</span>
|
||||
@ -299,14 +236,9 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<a name="coinflip_eg_catch"></a>
|
||||
</p>
|
||||
<p>
|
||||
It is always essential to include try & catch blocks because
|
||||
default policies are to throw exceptions on arguments that are out
|
||||
of domain or cause errors like numeric-overflow.
|
||||
</p>
|
||||
<p>
|
||||
<a name="coinflip_eg_catch"></a> It is always essential to include
|
||||
try & catch blocks because default policies are to throw exceptions
|
||||
on arguments that are out of domain or cause errors like numeric-overflow.
|
||||
</p>
|
||||
<p>
|
||||
Lacking try & catch blocks, the program will abort, whereas the
|
||||
@ -314,25 +246,18 @@
|
||||
as to the cause of the problem.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span>
|
||||
<span class="string">"\n"</span><span class="string">"Message from thrown exception was:\n "</span> <span class="special"><<</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">()</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
See <a href="../../../../../../../../example/binomial_coinflip_example.cpp" target="_top">binomial_coinflip_example.cpp</a>
|
||||
for full source code, the program output looks like this:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Using Binomial distribution to predict how many heads and tails.
|
||||
From 10 one can expect to get on average 5 heads (or tails).
|
||||
Mode is 5
|
||||
@ -379,8 +304,6 @@ Probability of getting upto (<</code>) heads
|
||||
9 0.999 or 1 in 1.001, or 99.9%
|
||||
10 1 or 1 in 1, or 100%
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -17,32 +17,26 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.binom_eg.binomial_quiz_example"></a><a class="link" href="binomial_quiz_example.html" title="Binomial Quiz Example">
|
||||
Binomial Quiz Example</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.binom_eg.binomial_quiz_example"></a><a class="link" href="binomial_quiz_example.html" title="Binomial Quiz Example">Binomial
|
||||
Quiz Example</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
A multiple choice test has four possible answers to each of 16 questions.
|
||||
A student guesses the answer to each question, so the probability
|
||||
of getting a correct answer on any given question is one in four,
|
||||
a quarter, 1/4, 25% or fraction 0.25. The conditions of the binomial
|
||||
experiment are assumed to be met: n = 16 questions constitute the
|
||||
trials; each question results in one of two possible outcomes (correct
|
||||
or incorrect); the probability of being correct is 0.25 and is constant
|
||||
if no knowledge about the subject is assumed; the questions are answered
|
||||
independently if the student's answer to a question in no way influences
|
||||
his/her answer to another question.
|
||||
</p>
|
||||
<p>
|
||||
A student guesses the answer to each question, so the probability of
|
||||
getting a correct answer on any given question is one in four, a quarter,
|
||||
1/4, 25% or fraction 0.25. The conditions of the binomial experiment
|
||||
are assumed to be met: n = 16 questions constitute the trials; each
|
||||
question results in one of two possible outcomes (correct or incorrect);
|
||||
the probability of being correct is 0.25 and is constant if no knowledge
|
||||
about the subject is assumed; the questions are answered independently
|
||||
if the student's answer to a question in no way influences his/her
|
||||
answer to another question.
|
||||
</p>
|
||||
<p>
|
||||
First, we need to be able to use the binomial distribution constructor
|
||||
(and some std input/output, of course).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</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">binomial</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
@ -54,17 +48,12 @@
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iomanip</span><span class="special">></span>
|
||||
<span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setw</span><span class="special">;</span> <span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The number of correct answers, X, is distributed as a binomial random
|
||||
variable with binomial distribution parameters: questions n = 16
|
||||
and success fraction probability p = 0.25. So we construct a binomial
|
||||
distribution:
|
||||
</p>
|
||||
<p>
|
||||
variable with binomial distribution parameters: questions n = 16 and
|
||||
success fraction probability p = 0.25. So we construct a binomial distribution:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -74,16 +63,12 @@
|
||||
</span><span class="keyword">double</span> <span class="identifier">success_fraction</span> <span class="special">=</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)</span><span class="identifier">answers</span> <span class="special">/</span> <span class="special">(</span><span class="keyword">double</span><span class="special">)</span><span class="identifier">questions</span><span class="special">;</span> <span class="comment">// If a random guess.
|
||||
</span><span class="comment">// Caution: = answers / questions would be zero (because they are integers)!
|
||||
</span><span class="identifier">binomial</span> <span class="identifier">quiz</span><span class="special">(</span><span class="identifier">questions</span><span class="special">,</span> <span class="identifier">success_fraction</span><span class="special">);</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
and display the distribution parameters we used thus:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"In a quiz with "</span> <span class="special"><<</span> <span class="identifier">quiz</span><span class="special">.</span><span class="identifier">trials</span><span class="special">()</span>
|
||||
@ -92,14 +77,10 @@
|
||||
<span class="special"><<</span> <span class="string">" or 1 in "</span> <span class="special"><<</span> <span class="keyword">static_cast</span><span class="special"><</span><span class="keyword">int</span><span class="special">>(</span><span class="number">1.</span> <span class="special">/</span> <span class="identifier">quiz</span><span class="special">.</span><span class="identifier">success_fraction</span><span class="special">())</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Show a few probabilities of just guessing:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting none right is "</span> <span class="special"><<</span> <span class="identifier">pdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="number">0</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// 0.010023
|
||||
@ -110,26 +91,16 @@
|
||||
<span class="special"><<</span> <span class="identifier">pdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="identifier">questions</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of getting none right is 0.0100226
|
||||
Probability of getting exactly one right is 0.0534538
|
||||
Probability of getting exactly two right is 0.133635
|
||||
Probability of getting exactly 11 answers right by chance is 2.32831e-010
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
These don't give any encouragement to guessers!
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We can tabulate the 'getting exactly right' ( == ) probabilities
|
||||
thus:
|
||||
</p>
|
||||
<p>
|
||||
We can tabulate the 'getting exactly right' ( == ) probabilities thus:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -143,9 +114,6 @@ Probability of getting exactly 11 answers right by chance is 2.32831e-010
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Guessed Probability
|
||||
0 0.0100226
|
||||
1 0.0534538
|
||||
@ -165,51 +133,33 @@ Probability of getting exactly 11 answers right by chance is 2.32831e-010
|
||||
15 1.11759e-008
|
||||
16 2.32831e-010
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Then we can add the probabilities of some 'exactly right' like this:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting none or one right is "</span> <span class="special"><<</span> <span class="identifier">pdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="number">0</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">pdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="number">1</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of getting none or one right is 0.0634764
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
But if more than a couple of scores are involved, it is more convenient
|
||||
(and may be more accurate) to use the Cumulative Distribution Function
|
||||
(cdf) instead:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting none or one right is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="number">1</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of getting none or one right is 0.0634764
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Since the cdf is inclusive, we can get the probability of getting
|
||||
up to 10 right ( <= )
|
||||
</p>
|
||||
<p>
|
||||
Since the cdf is inclusive, we can get the probability of getting up
|
||||
to 10 right ( <= )
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -217,67 +167,43 @@ Probability of getting exactly 11 answers right by chance is 2.32831e-010
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting <= 10 right (to fail) is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="number">10</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of getting <= 10 right (to fail) is 0.999715
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
To get the probability of getting 11 or more right (to pass), it
|
||||
is tempting to use
|
||||
To get the probability of getting 11 or more right (to pass), it is
|
||||
tempting to use
|
||||
</p>
|
||||
<pre class="programlisting"><span class="number">1</span> <span class="special">-</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="number">10</span><span class="special">)</span></pre>
|
||||
<p>
|
||||
to get the probability of > 10
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting > 10 right (to pass) is "</span> <span class="special"><<</span> <span class="number">1</span> <span class="special">-</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="number">10</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of getting > 10 right (to pass) is 0.000285239
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
But this should be resisted in favor of using the complement function.
|
||||
<a class="link" href="../../overview.html#why_complements">Why complements?</a>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting > 10 right (to pass) is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="number">10</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of getting > 10 right (to pass) is 0.000285239
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
And we can check that these two, <= 10 and > 10, add up to
|
||||
unity.
|
||||
</p>
|
||||
<p>
|
||||
And we can check that these two, <= 10 and > 10, add up to unity.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">BOOST_ASSERT</span><span class="special">((</span><span class="identifier">cdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="number">10</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="number">10</span><span class="special">)))</span> <span class="special">==</span> <span class="number">1.</span><span class="special">);</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -285,8 +211,6 @@ Probability of getting exactly 11 answers right by chance is 2.32831e-010
|
||||
we must subtract one from the score.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting less than "</span> <span class="special"><<</span> <span class="identifier">pass_score</span>
|
||||
@ -294,23 +218,16 @@ Probability of getting exactly 11 answers right by chance is 2.32831e-010
|
||||
<span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="identifier">pass_score</span> <span class="special">-</span><span class="number">1</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of getting less than 11 (< 11) answers right by guessing is 0.999715
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
and similarly to get a >= rather than a > test we also need
|
||||
to subtract one from the score (and can again check the sum is unity).
|
||||
and similarly to get a >= rather than a > test we also need to
|
||||
subtract one from the score (and can again check the sum is unity).
|
||||
This is because if the cdf is <span class="emphasis"><em>inclusive</em></span>, then
|
||||
its complement must be <span class="emphasis"><em>exclusive</em></span> otherwise there
|
||||
would be one possible outcome counted twice!
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting at least "</span> <span class="special"><<</span> <span class="identifier">pass_score</span>
|
||||
@ -321,19 +238,12 @@ Probability of getting exactly 11 answers right by chance is 2.32831e-010
|
||||
<span class="identifier">BOOST_ASSERT</span><span class="special">((</span><span class="identifier">cdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="identifier">pass_score</span> <span class="special">-</span><span class="number">1</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="identifier">pass_score</span><span class="special">-</span><span class="number">1</span><span class="special">)))</span> <span class="special">==</span> <span class="number">1</span><span class="special">);</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of getting at least 11 (>= 11) answers right by guessing is 0.000285239, only 1 in 3505.83
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Finally we can tabulate some probabilities:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"\n"</span> <span class="string">"At most (<=)"</span><span class="string">"\n"</span><span class="string">"Guessed OK Probability"</span> <span class="special"><<</span> <span class="identifier">right</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
@ -345,9 +255,6 @@ Probability of getting exactly 11 answers right by chance is 2.32831e-010
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">At most (<=)
|
||||
Guessed OK Probability
|
||||
0 0.01002259576
|
||||
@ -368,8 +275,6 @@ Guessed OK Probability
|
||||
15 0.9999999998
|
||||
16 1
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
@ -381,9 +286,6 @@ Guessed OK Probability
|
||||
<span class="special">}</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">At least (>)
|
||||
Guessed OK Probability
|
||||
0 0.9899774042
|
||||
@ -404,21 +306,15 @@ Guessed OK Probability
|
||||
15 2.328306437e-010
|
||||
16 0
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We now consider the probabilities of <span class="bold"><strong>ranges</strong></span>
|
||||
of correct guesses.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
First, calculate the probability of getting a range of guesses right,
|
||||
by adding the exact probabilities of each from low ... high.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">low</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span> <span class="comment">// Getting at least 3 right.
|
||||
@ -434,38 +330,24 @@ Guessed OK Probability
|
||||
<span class="special"><<</span> <span class="identifier">sum</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// 0.61323</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of getting between 3 and 5 answers right by guessing is 0.6132
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Or, usually better, we can use the difference of cdfs instead:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of getting between "</span> <span class="special"><<</span> <span class="identifier">low</span> <span class="special"><<</span> <span class="string">" and "</span> <span class="special"><<</span> <span class="identifier">high</span> <span class="special"><<</span> <span class="string">" answers right by guessing is "</span>
|
||||
<span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="identifier">high</span><span class="special">)</span> <span class="special">-</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="identifier">low</span> <span class="special">-</span> <span class="number">1</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// 0.61323</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of getting between 3 and 5 answers right by guessing is 0.6132
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
And we can also try a few more combinations of high and low choices:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">low</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span> <span class="identifier">high</span> <span class="special">=</span> <span class="number">6</span><span class="special">;</span>
|
||||
@ -479,30 +361,20 @@ Guessed OK Probability
|
||||
<span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="identifier">high</span><span class="special">)</span> <span class="special">-</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="identifier">low</span> <span class="special">-</span> <span class="number">1</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// 4 <= x 4 P = 0.22520</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of getting between 1 and 6 answers right by guessing is 0.9104
|
||||
Probability of getting between 1 and 8 answers right by guessing is 0.9825
|
||||
Probability of getting between 4 and 4 answers right by guessing is 0.2252
|
||||
</pre>
|
||||
<p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.binom_eg.binomial_quiz_example.using_binomial_distribution_moments"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id1028225"></a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.binom_eg.binomial_quiz_example.using_binomial_distribution_moments"></a><h5>
|
||||
<a name="id1030066"></a>
|
||||
<a class="link" href="binomial_quiz_example.html#math_toolkit.dist.stat_tut.weg.binom_eg.binomial_quiz_example.using_binomial_distribution_moments">Using
|
||||
Binomial distribution moments</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Using moments of the distribution, we can say more about the spread
|
||||
of results from guessing.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"By guessing, on average, one can expect to get "</span> <span class="special"><<</span> <span class="identifier">mean</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">)</span> <span class="special"><<</span> <span class="string">" correct answers."</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
@ -514,31 +386,21 @@ Probability of getting between 4 and 4 answers right by guessing is 0.2252
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Skewness is "</span> <span class="special"><<</span> <span class="identifier">skewness</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">By guessing, on average, one can expect to get 4 correct answers.
|
||||
Standard deviation is 1.732
|
||||
So about 2/3 will lie within 1 standard deviation and get between 3 and 5 correct.
|
||||
Mode (the most frequent) is 4
|
||||
Skewness is 0.2887
|
||||
</pre>
|
||||
<p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.binom_eg.binomial_quiz_example.quantiles"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id1029850"></a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.binom_eg.binomial_quiz_example.quantiles"></a><h5>
|
||||
<a name="id1031827"></a>
|
||||
<a class="link" href="binomial_quiz_example.html#math_toolkit.dist.stat_tut.weg.binom_eg.binomial_quiz_example.quantiles">Quantiles</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The quantiles (percentiles or percentage points) for a few probability
|
||||
levels:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Quartiles "</span> <span class="special"><<</span> <span class="identifier">quantile</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="number">0.25</span><span class="special">)</span> <span class="special"><<</span> <span class="string">" to "</span>
|
||||
@ -558,15 +420,10 @@ Skewness is 0.2887
|
||||
<span class="special"><<</span> <span class="string">" to "</span> <span class="special"><<</span> <span class="identifier">quantile</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="number">0.01</span><span class="special">))</span> <span class="special"><<</span> <span class="string">" right."</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Notice that these output integral values because the default policy
|
||||
is <code class="computeroutput"><span class="identifier">integer_round_outwards</span></code>.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Quartiles 2 to 5
|
||||
1 standard deviation 2 to 5
|
||||
Deciles 1 to 6
|
||||
@ -574,59 +431,34 @@ Deciles 1 to 6
|
||||
2.5 to 97.5% 0 to 8
|
||||
2 to 98% 0 to 8
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Quantiles values are controlled by the <a class="link" href="../../../../policy/pol_ref/discrete_quant_ref.html" title="Discrete Quantile Policies">discrete
|
||||
quantile policy</a> chosen. The default is <code class="computeroutput"><span class="identifier">integer_round_outwards</span></code>,
|
||||
so the lower quantile is rounded down, and the upper quantile is
|
||||
rounded up.
|
||||
so the lower quantile is rounded down, and the upper quantile is rounded
|
||||
up.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
But we might believe that the real values tell us a little more -
|
||||
see <a class="link" href="../../../../policy/pol_tutorial/understand_dis_quant.html" title="Understanding Quantiles of Discrete Distributions">Understanding
|
||||
But we might believe that the real values tell us a little more - see
|
||||
<a class="link" href="../../../../policy/pol_tutorial/understand_dis_quant.html" title="Understanding Quantiles of Discrete Distributions">Understanding
|
||||
Discrete Quantile Policy</a>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We could control the policy for <span class="bold"><strong>all</strong></span>
|
||||
distributions by
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_MATH_DISCRETE_QUANTILE_POLICY</span> <span class="identifier">real</span>
|
||||
|
||||
<span class="identifier">at</span> <span class="identifier">the</span> <span class="identifier">head</span> <span class="identifier">of</span> <span class="identifier">the</span> <span class="identifier">program</span> <span class="identifier">would</span> <span class="identifier">make</span> <span class="keyword">this</span> <span class="identifier">policy</span> <span class="identifier">apply</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
#define BOOST_MATH_DISCRETE_QUANTILE_POLICY real
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">at</span> <span class="identifier">the</span> <span class="identifier">head</span> <span class="identifier">of</span> <span class="identifier">the</span> <span class="identifier">program</span> <span class="identifier">would</span> <span class="identifier">make</span> <span class="keyword">this</span> <span class="identifier">policy</span> <span class="identifier">apply</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
at the head of the program would make this policy apply to this
|
||||
<span class="bold"><strong>one, and only</strong></span>, translation unit.
|
||||
</p>
|
||||
<p>
|
||||
to this <span class="bold"><strong>one, and only</strong></span>, translation
|
||||
unit.
|
||||
</p>
|
||||
<p>
|
||||
Or we can now create a (typedef for) policy that has discrete quantiles
|
||||
real (here avoiding any 'using namespaces ...' statements):
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</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">policies</span><span class="special">::</span><span class="identifier">policy</span><span class="special">;</span>
|
||||
@ -634,8 +466,6 @@ Deciles 1 to 6
|
||||
<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">policies</span><span class="special">::</span><span class="identifier">real</span><span class="special">;</span>
|
||||
<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">policies</span><span class="special">::</span><span class="identifier">integer_round_outwards</span><span class="special">;</span> <span class="comment">// Default.
|
||||
</span><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">policies</span><span class="special">::</span><span class="identifier">policy</span><span class="special"><</span><span class="identifier">discrete_quantile</span><span class="special"><</span><span class="identifier">real</span><span class="special">></span> <span class="special">></span> <span class="identifier">real_quantile_policy</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -646,8 +476,6 @@ Deciles 1 to 6
|
||||
that uses
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">real_quantile_policy</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -655,21 +483,15 @@ Deciles 1 to 6
|
||||
</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">binomial_distribution</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">binomial_distribution</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">real_quantile_policy</span><span class="special">></span> <span class="identifier">real_quantile_binomial</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Construct an object of this custom distribution:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">real_quantile_binomial</span> <span class="identifier">quiz_real</span><span class="special">(</span><span class="identifier">questions</span><span class="special">,</span> <span class="identifier">success_fraction</span><span class="special">);</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -677,8 +499,6 @@ Deciles 1 to 6
|
||||
integer values.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Quartiles "</span> <span class="special"><<</span> <span class="identifier">quantile</span><span class="special">(</span><span class="identifier">quiz</span><span class="special">,</span> <span class="number">0.25</span><span class="special">)</span> <span class="special"><<</span> <span class="string">" to "</span>
|
||||
@ -698,9 +518,6 @@ Deciles 1 to 6
|
||||
<span class="special"><<</span> <span class="string">" to "</span> <span class="special"><<</span> <span class="identifier">quantile</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">quiz_real</span><span class="special">,</span> <span class="number">0.01</span><span class="special">))</span> <span class="special"><<</span> <span class="string">" right."</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Real Quantiles
|
||||
Quartiles 2 to 4.621
|
||||
1 standard deviation 2.665 to 4.194
|
||||
@ -710,8 +527,6 @@ Deciles 1.349 to 5.758
|
||||
2 to 98% 0.3131 to 7.252
|
||||
If guessing then percentiles 1 to 99% will get 0 to 7.788 right.
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
See <a href="../../../../../../../../example/binomial_quiz_example.cpp" target="_top">binomial_quiz_example.cpp</a>
|
||||
for full source code and output.
|
||||
|
@ -21,13 +21,12 @@
|
||||
Distribution Examples</a>
|
||||
</h5></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="cs_eg/chi_sq_intervals.html">
|
||||
Confidence Intervals on the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="cs_eg/chi_sq_test.html">
|
||||
Chi-Square Test for the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="cs_eg/chi_sq_size.html">
|
||||
Estimating the Required Sample Sizes for a Chi-Square Test for the Standard
|
||||
Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="cs_eg/chi_sq_intervals.html">Confidence
|
||||
Intervals on the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="cs_eg/chi_sq_test.html">Chi-Square
|
||||
Test for the Standard Deviation</a></span></dt>
|
||||
<dt><span class="section"><a href="cs_eg/chi_sq_size.html">Estimating
|
||||
the Required Sample Sizes for a Chi-Square Test for the Standard Deviation</a></span></dt>
|
||||
</dl></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.cs_eg.chi_sq_intervals"></a><a class="link" href="chi_sq_intervals.html" title="Confidence Intervals on the Standard Deviation">
|
||||
Confidence Intervals on the Standard Deviation</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.cs_eg.chi_sq_intervals"></a><a class="link" href="chi_sq_intervals.html" title="Confidence Intervals on the Standard Deviation">Confidence
|
||||
Intervals on the Standard Deviation</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
Once you have calculated the standard deviation for your data, a legitimate
|
||||
@ -132,7 +132,7 @@ _____________________________________________
|
||||
is between 0.00551 and 0.00729.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.cs_eg.chi_sq_intervals.confidence_intervals_as_a_function_of_the_number_of_observations"></a><h5>
|
||||
<a name="id1012423"></a>
|
||||
<a name="id1014220"></a>
|
||||
<a class="link" href="chi_sq_intervals.html#math_toolkit.dist.stat_tut.weg.cs_eg.chi_sq_intervals.confidence_intervals_as_a_function_of_the_number_of_observations">Confidence
|
||||
intervals as a function of the number of observations</a>
|
||||
</h5>
|
||||
|
@ -17,9 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.cs_eg.chi_sq_size"></a><a class="link" href="chi_sq_size.html" title="Estimating the Required Sample Sizes for a Chi-Square Test for the Standard Deviation">
|
||||
Estimating the Required Sample Sizes for a Chi-Square Test for the Standard
|
||||
Deviation</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.cs_eg.chi_sq_size"></a><a class="link" href="chi_sq_size.html" title="Estimating the Required Sample Sizes for a Chi-Square Test for the Standard Deviation">Estimating
|
||||
the Required Sample Sizes for a Chi-Square Test for the Standard Deviation</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
Suppose we conduct a Chi Squared test for standard deviation and the
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.cs_eg.chi_sq_test"></a><a class="link" href="chi_sq_test.html" title="Chi-Square Test for the Standard Deviation">
|
||||
Chi-Square Test for the Standard Deviation</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.cs_eg.chi_sq_test"></a><a class="link" href="chi_sq_test.html" title="Chi-Square Test for the Standard Deviation">Chi-Square
|
||||
Test for the Standard Deviation</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
We use this test to determine whether the standard deviation of a sample
|
||||
|
@ -17,33 +17,27 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.dist_construct_eg"></a><a class="link" href="dist_construct_eg.html" title="Distribution Construction Example">
|
||||
Distribution Construction Example</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.dist_construct_eg"></a><a class="link" href="dist_construct_eg.html" title="Distribution Construction Example">Distribution
|
||||
Construction Example</a>
|
||||
</h5></div></div></div>
|
||||
<p>
|
||||
See <a href="../../../../../../../example/distribution_construction.cpp" target="_top">distribution_construction.cpp</a>
|
||||
for full source code.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The structure of distributions is rather different from some other
|
||||
statistical libraries, for example in less object-oriented language
|
||||
like FORTRAN and C, that provide a few arguments to each free function.
|
||||
This library provides each distribution as a template C++ class. A
|
||||
distribution is constructed with a few arguments, and then member and
|
||||
non-member functions are used to find values of the distribution, often
|
||||
a function of a random variate.
|
||||
</p>
|
||||
<p>
|
||||
The structure of distributions is rather different from some other statistical
|
||||
libraries, for example in less object-oriented language like FORTRAN
|
||||
and C, that provide a few arguments to each free function. This library
|
||||
provides each distribution as a template C++ class. A distribution is
|
||||
constructed with a few arguments, and then member and non-member functions
|
||||
are used to find values of the distribution, often a function of a random
|
||||
variate.
|
||||
</p>
|
||||
<p>
|
||||
First we need some includes to access the negative binomial distribution
|
||||
(and the binomial, beta and gamma too).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</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">negative_binomial</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> <span class="comment">// for negative_binomial_distribution
|
||||
@ -53,172 +47,121 @@
|
||||
</span><span class="preprocessor">#include</span> <span class="special"><</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">beta</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> <span class="comment">// for beta_distribution.
|
||||
</span><span class="preprocessor">#include</span> <span class="special"><</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">gamma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> <span class="comment">// for gamma_distribution.
|
||||
</span><span class="preprocessor">#include</span> <span class="special"><</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">normal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> <span class="comment">// for normal_distribution.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Several examples of constructing distributions follow:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
First, a negative binomial distribution with 8 successes and a success
|
||||
fraction 0.25, 25% or 1 in 4, is constructed like this:
|
||||
</p>
|
||||
<p>
|
||||
</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">negative_binomial_distribution</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">mydist0</span><span class="special">(</span><span class="number">8.</span><span class="special">,</span> <span class="number">0.25</span><span class="special">);</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
But this is inconveniently long, so by writing
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
or
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</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">negative_binomial_distribution</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
we can reduce typing.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Since the vast majority of applications use will be using double precision,
|
||||
the template argument to the distribution (RealType) defaults to type
|
||||
double, so we can also write:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">negative_binomial_distribution</span><span class="special"><></span> <span class="identifier">mydist9</span><span class="special">(</span><span class="number">8.</span><span class="special">,</span> <span class="number">0.25</span><span class="special">);</span> <span class="comment">// Uses default RealType = double.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
But the name "negative_binomial_distribution" is still inconveniently
|
||||
long, so for most distributions, a convenience typedef is provided,
|
||||
for example:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
long, so for most distributions, a convenience typedef is provided, for
|
||||
example:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">negative_binomial_distribution</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">negative_binomial</span><span class="special">;</span> <span class="comment">// Reserved name of type double.
|
||||
</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<div class="caution"><table border="0" summary="Caution">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../images/caution.png"></td>
|
||||
<th align="left">Caution</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
This convenience typedef is <span class="emphasis"><em>not</em></span> provided if
|
||||
a clash would occur with the name of a function: currently only "beta"
|
||||
This convenience typedef is <span class="emphasis"><em>not</em></span> provided if a
|
||||
clash would occur with the name of a function: currently only "beta"
|
||||
and "gamma" fall into this category.
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
So, after a using statement,
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</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">negative_binomial</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
we have a convenient typedef to <code class="computeroutput"><span class="identifier">negative_binomial_distribution</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span></code>:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">negative_binomial</span> <span class="identifier">mydist</span><span class="special">(</span><span class="number">8.</span><span class="special">,</span> <span class="number">0.25</span><span class="special">);</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Some more examples using the convenience typedef:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">negative_binomial</span> <span class="identifier">mydist10</span><span class="special">(</span><span class="number">5.</span><span class="special">,</span> <span class="number">0.4</span><span class="special">);</span> <span class="comment">// Both arguments double.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
And automatic conversion takes place, so you can use integers and floats:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">negative_binomial</span> <span class="identifier">mydist11</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="number">0.4</span><span class="special">);</span> <span class="comment">// Using provided typedef double, int and double arguments.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
This is probably the most common usage.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">negative_binomial</span> <span class="identifier">mydist12</span><span class="special">(</span><span class="number">5.</span><span class="special">,</span> <span class="number">0.4F</span><span class="special">);</span> <span class="comment">// Double and float arguments.
|
||||
</span><span class="identifier">negative_binomial</span> <span class="identifier">mydist13</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="number">1</span><span class="special">);</span> <span class="comment">// Both arguments integer.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Similarly for most other distributions like the binomial.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">binomial</span> <span class="identifier">mybinomial</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">0.5</span><span class="special">);</span> <span class="comment">// is more concise than
|
||||
@ -226,66 +169,44 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
For cases when the typdef distribution name would clash with a math
|
||||
special function (currently only beta and gamma) the typedef is deliberately
|
||||
not provided, and the longer version of the name must be used. For
|
||||
example do not use:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
For cases when the typdef distribution name would clash with a math special
|
||||
function (currently only beta and gamma) the typedef is deliberately
|
||||
not provided, and the longer version of the name must be used. For example
|
||||
do not use:
|
||||
</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">beta</span><span class="special">;</span>
|
||||
<span class="identifier">beta</span> <span class="identifier">mybetad0</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">0.5</span><span class="special">);</span> <span class="comment">// Error beta is a math FUNCTION!
|
||||
</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Which produces the error messages:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">error C2146: syntax error : missing ';' before identifier 'mybetad0'
|
||||
warning C4551: function call missing argument list
|
||||
error C3861: 'mybetad0': identifier not found
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Instead you should use:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</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">beta_distribution</span><span class="special">;</span>
|
||||
<span class="identifier">beta_distribution</span><span class="special"><></span> <span class="identifier">mybetad1</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">0.5</span><span class="special">);</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
or for the gamma distribution:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">gamma_distribution</span><span class="special"><></span> <span class="identifier">mygammad1</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">0.5</span><span class="special">);</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We can, of course, still provide the type explicitly thus:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">// Explicit double precision:
|
||||
@ -311,42 +232,24 @@ error C3861: 'mybetad0': identifier not found
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
And if you have your own RealType called MyFPType, for example NTL
|
||||
RR (an arbitrary precision type), then we can write:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
And if you have your own RealType called MyFPType, for example NTL RR
|
||||
(an arbitrary precision type), then we can write:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">negative_binomial_distribution</span><span class="special"><</span><span class="identifier">MyFPType</span><span class="special">></span> <span class="identifier">mydist6</span><span class="special">(</span><span class="number">8</span><span class="special">,</span> <span class="number">1</span><span class="special">);</span> <span class="comment">// Integer arguments -> MyFPType.
|
||||
</span></pre>
|
||||
<p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.dist_construct_eg.default_arguments_to_distribution_constructors_"></a>
|
||||
</p>
|
||||
<h6>
|
||||
<a name="id1002149"></a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.dist_construct_eg.default_arguments_to_distribution_constructors_"></a><h6>
|
||||
<a name="id1003481"></a>
|
||||
<a class="link" href="dist_construct_eg.html#math_toolkit.dist.stat_tut.weg.dist_construct_eg.default_arguments_to_distribution_constructors_">Default
|
||||
arguments to distribution constructors.</a>
|
||||
</h6>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Note that default constructor arguments are only provided for some
|
||||
distributions. So if you wrongly assume a default argument you will
|
||||
get an error message, for example:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
Note that default constructor arguments are only provided for some distributions.
|
||||
So if you wrongly assume a default argument you will get an error message,
|
||||
for example:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">negative_binomial_distribution</span><span class="special"><></span> <span class="identifier">mydist8</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">error C2512 no appropriate default constructor available.</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
No default constructors are provided for the negative binomial, because
|
||||
it is difficult to chose any sensible default values for this distribution.
|
||||
@ -354,19 +257,12 @@ error C3861: 'mybetad0': identifier not found
|
||||
very useful to provide 'standard' defaults for the mean and standard
|
||||
deviation thus:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">normal_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">mean</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">sd</span> <span class="special">=</span> <span class="number">1</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
So in this case we can write:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</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">normal</span><span class="special">;</span>
|
||||
@ -377,15 +273,11 @@ error C3861: 'mybetad0': identifier not found
|
||||
</span>
|
||||
<span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
|
||||
<span class="special">}</span> <span class="comment">// int main()</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
There is no useful output from this program, of course.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -36,67 +36,42 @@
|
||||
the policy.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The following example demonstrates the effect of setting the macro
|
||||
BOOST_MATH_DOMAIN_ERROR_POLICY when an invalid argument is encountered.
|
||||
For the purposes of this example, we'll pass a negative degrees of
|
||||
freedom parameter to the student's t distribution.
|
||||
</p>
|
||||
<p>
|
||||
The following example demonstrates the effect of setting the macro BOOST_MATH_DOMAIN_ERROR_POLICY
|
||||
when an invalid argument is encountered. For the purposes of this example,
|
||||
we'll pass a negative degrees of freedom parameter to the student's t
|
||||
distribution.
|
||||
</p>
|
||||
<p>
|
||||
Since we know that this is a single file program we could just add:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_MATH_DOMAIN_ERROR_POLICY</span> <span class="identifier">ignore_error</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
to the top of the source file to change the default policy to one that
|
||||
simply returns a NaN when a domain error occurs. Alternatively we could
|
||||
use:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_MATH_DOMAIN_ERROR_POLICY</span> <span class="identifier">errno_on_error</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
To ensure the <code class="computeroutput"><span class="special">::</span><span class="identifier">errno</span></code>
|
||||
is set when a domain error occurs as well as returning a NaN.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
This is safe provided the program consists of a single translation
|
||||
unit <span class="emphasis"><em>and</em></span> we place the define <span class="emphasis"><em>before</em></span>
|
||||
This is safe provided the program consists of a single translation unit
|
||||
<span class="emphasis"><em>and</em></span> we place the define <span class="emphasis"><em>before</em></span>
|
||||
any #includes. Note that should we add the define after the includes
|
||||
then it will have no effect! A warning such as:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">warning C4005: 'BOOST_MATH_OVERFLOW_ERROR_POLICY' : macro redefinition</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
is a certain sign that it will <span class="emphasis"><em>not</em></span> have the desired
|
||||
effect.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We'll begin our sample program with the needed includes:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">// Boost
|
||||
@ -112,14 +87,10 @@
|
||||
<span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">exception</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Next we'll define the program's main() to call the student's t distribution
|
||||
with an invalid degrees of freedom parameter, the program is set up
|
||||
to handle either an exception or a NaN:
|
||||
</p>
|
||||
<p>
|
||||
with an invalid degrees of freedom parameter, the program is set up to
|
||||
handle either an exception or a NaN:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -158,13 +129,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Here's what the program output looks like with a default build (one
|
||||
that does throw exceptions):
|
||||
</p>
|
||||
<p>
|
||||
|
||||
Here's what the program output looks like with a default build (one that
|
||||
does throw exceptions):
|
||||
</p>
|
||||
<pre class="programlisting">Example error handling using Student's t function.
|
||||
BOOST_MATH_DOMAIN_ERROR_POLICY is set to: throw_on_error
|
||||
@ -173,54 +139,32 @@ Message from thrown exception was:
|
||||
Error in function boost::math::students_t_distribution<double>::students_t_distribution:
|
||||
Degrees of freedom argument is -1, but must be > 0 !
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Alternatively let's build with:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_MATH_DOMAIN_ERROR_POLICY</span> <span class="identifier">ignore_error</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Now the program output is:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Example error handling using Student's t function.
|
||||
BOOST_MATH_DOMAIN_ERROR_POLICY is set to: ignore_error
|
||||
cdf returned a NaN!
|
||||
errno is set to: 0
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
And finally let's build with:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_MATH_DOMAIN_ERROR_POLICY</span> <span class="identifier">errno_on_error</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Which gives the output:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Example error handling using Student's t function.
|
||||
BOOST_MATH_DOMAIN_ERROR_POLICY is set to: errno_on_error
|
||||
cdf returned a NaN!
|
||||
errno is set to: 33
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<div class="caution"><table border="0" summary="Caution">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../images/caution.png"></td>
|
||||
|
@ -21,12 +21,12 @@
|
||||
and Scale Examples</a>
|
||||
</h5></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="find_eg/find_location_eg.html">
|
||||
Find Location (Mean) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="find_eg/find_scale_eg.html">
|
||||
Find Scale (Standard Deviation) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="find_eg/find_mean_and_sd_eg.html">
|
||||
Find mean and standard deviation example</a></span></dt>
|
||||
<dt><span class="section"><a href="find_eg/find_location_eg.html">Find
|
||||
Location (Mean) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="find_eg/find_scale_eg.html">Find
|
||||
Scale (Standard Deviation) Example</a></span></dt>
|
||||
<dt><span class="section"><a href="find_eg/find_mean_and_sd_eg.html">Find
|
||||
mean and standard deviation example</a></span></dt>
|
||||
</dl></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
|
@ -17,18 +17,14 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_location_eg"></a><a class="link" href="find_location_eg.html" title="Find Location (Mean) Example">
|
||||
Find Location (Mean) Example</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_location_eg"></a><a class="link" href="find_location_eg.html" title="Find Location (Mean) Example">Find
|
||||
Location (Mean) Example</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
First we need some includes to access the normal distribution, the
|
||||
algorithms to find location (and some std output of course).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</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">normal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> <span class="comment">// for normal_distribution
|
||||
@ -49,8 +45,6 @@
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">limits</span><span class="special">></span>
|
||||
<span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -59,22 +53,16 @@
|
||||
also the default for this implementation.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">normal</span> <span class="identifier">N01</span><span class="special">;</span> <span class="comment">// Default 'standard' normal distribution with zero mean and
|
||||
</span><span class="keyword">double</span> <span class="identifier">sd</span> <span class="special">=</span> <span class="number">1.</span><span class="special">;</span> <span class="comment">// normal default standard deviation is 1.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Suppose we want to find a different normal distribution whose mean
|
||||
is shifted so that only fraction p (here 0.001 or 0.1%) are below
|
||||
a certain chosen limit (here -2, two standard deviations).
|
||||
</p>
|
||||
<p>
|
||||
is shifted so that only fraction p (here 0.001 or 0.1%) are below a
|
||||
certain chosen limit (here -2, two standard deviations).
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -92,64 +80,42 @@
|
||||
<span class="special"><<</span> <span class="string">", p = "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">N01</span><span class="special">,</span> <span class="identifier">z</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// Note: uses complement.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Normal distribution with mean = 0, standard deviation 1, has fraction <= -2, p = 0.0227501
|
||||
Normal distribution with mean = 0, standard deviation 1, has fraction > -2, p = 0.97725
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We can now use ''find_location'' to give a new offset mean.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">l</span> <span class="special">=</span> <span class="identifier">find_location</span><span class="special"><</span><span class="identifier">normal</span><span class="special">>(</span><span class="identifier">z</span><span class="special">,</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">sd</span><span class="special">);</span>
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"offset location (mean) = "</span> <span class="special"><<</span> <span class="identifier">l</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
that outputs:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">offset location (mean) = 1.09023
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
showing that we need to shift the mean just over one standard deviation
|
||||
from its previous value of zero.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Then we can check that we have achieved our objective by constructing
|
||||
a new distribution with the offset mean (but same standard deviation):
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">normal</span> <span class="identifier">np001pc</span><span class="special">(</span><span class="identifier">l</span><span class="special">,</span> <span class="identifier">sd</span><span class="special">);</span> <span class="comment">// Same standard_deviation (scale) but with mean (location) shifted.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
And re-calculating the fraction below our chosen limit.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Normal distribution with mean = "</span> <span class="special"><<</span> <span class="identifier">l</span>
|
||||
@ -160,35 +126,23 @@ Normal distribution with mean = 0, standard deviation 1, has fraction > -2, p
|
||||
<span class="special"><<</span> <span class="string">", p = "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">np001pc</span><span class="special">,</span> <span class="identifier">z</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Normal distribution with mean = 1.09023 has fraction <= -2, p = 0.001
|
||||
Normal distribution with mean = 1.09023 has fraction > -2, p = 0.999
|
||||
</pre>
|
||||
<p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_location_eg.controlling_error_handling_from_find_location"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id1065622"></a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_location_eg.controlling_error_handling_from_find_location"></a><h5>
|
||||
<a name="id1065940"></a>
|
||||
<a class="link" href="find_location_eg.html#math_toolkit.dist.stat_tut.weg.find_eg.find_location_eg.controlling_error_handling_from_find_location">Controlling
|
||||
Error Handling from find_location</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We can also control the policy for handling various errors. For example,
|
||||
we can define a new (possibly unwise) policy to ignore domain errors
|
||||
('bad' arguments).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Unless we are using the boost::math namespace, we will need:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</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">policies</span><span class="special">::</span><span class="identifier">policy</span><span class="special">;</span>
|
||||
@ -197,12 +151,8 @@ Normal distribution with mean = 1.09023 has fraction > -2, p = 0.999
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Using a typedef is often convenient, especially if it is re-used,
|
||||
although it is not required, as the various examples below show.
|
||||
</p>
|
||||
<p>
|
||||
Using a typedef is often convenient, especially if it is re-used, although
|
||||
it is not required, as the various examples below show.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -216,8 +166,6 @@ Normal distribution with mean = 1.09023 has fraction > -2, p = 0.999
|
||||
</span><span class="identifier">l</span> <span class="special">=</span> <span class="identifier">find_location</span><span class="special"><</span><span class="identifier">normal</span><span class="special">>(</span><span class="identifier">z</span><span class="special">,</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">sd</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">policies</span><span class="special">::</span><span class="identifier">policy</span><span class="special"><>());</span>
|
||||
<span class="comment">// A new policy, ignoring domain errors, without using a typedef.
|
||||
</span><span class="identifier">l</span> <span class="special">=</span> <span class="identifier">find_location</span><span class="special"><</span><span class="identifier">normal</span><span class="special">>(</span><span class="identifier">z</span><span class="special">,</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">sd</span><span class="special">,</span> <span class="identifier">policy</span><span class="special"><</span><span class="identifier">domain_error</span><span class="special"><</span><span class="identifier">ignore_error</span><span class="special">></span> <span class="special">>());</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -227,8 +175,6 @@ Normal distribution with mean = 1.09023 has fraction > -2, p = 0.999
|
||||
use the complement version.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">z</span> <span class="special">=</span> <span class="number">2.</span><span class="special">;</span>
|
||||
@ -256,8 +202,6 @@ Normal distribution with mean = 1.09023 has fraction > -2, p = 0.999
|
||||
Normal distribution with mean = 0.355146 has fraction <= 2 = 0.95
|
||||
Normal distribution with mean = 0.355146 has fraction > 2 = 0.05
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -17,18 +17,14 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_mean_and_sd_eg"></a><a class="link" href="find_mean_and_sd_eg.html" title="Find mean and standard deviation example">
|
||||
Find mean and standard deviation example</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_mean_and_sd_eg"></a><a class="link" href="find_mean_and_sd_eg.html" title="Find mean and standard deviation example">Find
|
||||
mean and standard deviation example</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
First we need some includes to access the normal distribution, the
|
||||
algorithms to find location and scale (and some std output of course).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</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">normal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> <span class="comment">// for normal_distribution
|
||||
@ -51,37 +47,25 @@
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_mean_and_sd_eg.using_find_location_and_find_scale_to_meet_dispensing_and_measurement_specifications"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id1070813"></a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_mean_and_sd_eg.using_find_location_and_find_scale_to_meet_dispensing_and_measurement_specifications"></a><h5>
|
||||
<a name="id1071609"></a>
|
||||
<a class="link" href="find_mean_and_sd_eg.html#math_toolkit.dist.stat_tut.weg.find_eg.find_mean_and_sd_eg.using_find_location_and_find_scale_to_meet_dispensing_and_measurement_specifications">Using
|
||||
find_location and find_scale to meet dispensing and measurement specifications</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Consider an example from K Krishnamoorthy, Handbook of Statistical
|
||||
Distributions with Applications, ISBN 1-58488-635-8, (2006) p 126,
|
||||
example 10.3.7.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
"A machine is set to pack 3 kg of ground beef per pack. Over
|
||||
a long period of time it is found that the average packed was 3 kg
|
||||
with a standard deviation of 0.1 kg. Assume the packing is normally
|
||||
distributed."
|
||||
</p>
|
||||
<p>
|
||||
"A machine is set to pack 3 kg of ground beef per pack. Over a
|
||||
long period of time it is found that the average packed was 3 kg with
|
||||
a standard deviation of 0.1 kg. Assume the packing is normally distributed."
|
||||
</p>
|
||||
<p>
|
||||
We start by constructing a normal distribution with the given parameters:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">mean</span> <span class="special">=</span> <span class="number">3.</span><span class="special">;</span> <span class="comment">// kg
|
||||
@ -90,12 +74,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We can then find the fraction (or %) of packages that weigh more
|
||||
than 3.1 kg.
|
||||
</p>
|
||||
<p>
|
||||
We can then find the fraction (or %) of packages that weigh more than
|
||||
3.1 kg.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -103,8 +83,6 @@
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">max_weight</span> <span class="special">=</span> <span class="number">3.1</span><span class="special">;</span> <span class="comment">// kg
|
||||
</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Percentage of packs > "</span> <span class="special"><<</span> <span class="identifier">max_weight</span> <span class="special"><<</span> <span class="string">" is "</span>
|
||||
<span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">packs</span><span class="special">,</span> <span class="identifier">max_weight</span><span class="special">))</span> <span class="special">*</span> <span class="number">100.</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// P(X > 3.1)</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -112,15 +90,11 @@
|
||||
specification, then we want the value of the mean such that P(X <
|
||||
2.9) = 0.05.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Using the mean of 3 kg, we can estimate the fraction of packs that
|
||||
fail to meet the specification of 2.9 kg.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">minimum_weight</span> <span class="special">=</span> <span class="number">2.9</span><span class="special">;</span>
|
||||
@ -130,27 +104,19 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
This is 0.84 - more than the target fraction of 0.95. If we want
|
||||
95% to be over the minimum weight, what should we set the mean weight
|
||||
to be?
|
||||
</p>
|
||||
<p>
|
||||
This is 0.84 - more than the target fraction of 0.95. If we want 95%
|
||||
to be over the minimum weight, what should we set the mean weight to
|
||||
be?
|
||||
</p>
|
||||
<p>
|
||||
Using the KK StatCalc program supplied with the book and the method
|
||||
given on page 126 gives 3.06449.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We can confirm this by constructing a new distribution which we call
|
||||
'xpacks' with a safety margin mean of 3.06449 thus:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">over_mean</span> <span class="special">=</span> <span class="number">3.06449</span><span class="special">;</span>
|
||||
@ -159,8 +125,6 @@
|
||||
<span class="special"><<</span> <span class="string">" with a mean of "</span> <span class="special"><<</span> <span class="identifier">xpacks</span><span class="special">.</span><span class="identifier">mean</span><span class="special">()</span>
|
||||
<span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">xpacks</span><span class="special">,</span> <span class="identifier">minimum_weight</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="comment">// fraction of packs >= 2.9 with a mean of 3.06449 is 0.950005</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -168,8 +132,6 @@
|
||||
thus:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">under_fraction</span> <span class="special">=</span> <span class="number">0.05</span><span class="special">;</span> <span class="comment">// so 95% are above the minimum weight mean - sd = 2.9
|
||||
@ -183,50 +145,36 @@
|
||||
<span class="special"><<</span> <span class="string">"fraction of packs >= "</span> <span class="special"><<</span> <span class="identifier">minimum_weight</span>
|
||||
<span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">nominal_packs</span><span class="special">,</span> <span class="identifier">minimum_weight</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="comment">// Setting the packer to 3.06449 will mean that fraction of packs >= 2.9 is 0.95</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
This calculation is generalized as the free function called <a class="link" href="../../../dist_ref/dist_algorithms.html" title="Distribution Algorithms">find_location</a>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
To use this we will need to
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</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">find_location</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<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">find_location</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
and then use find_location function to find safe_mean, & construct
|
||||
a new normal distribution called 'goodpacks'.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">safe_mean</span> <span class="special">=</span> <span class="identifier">find_location</span><span class="special"><</span><span class="identifier">normal</span><span class="special">>(</span><span class="identifier">minimum_weight</span><span class="special">,</span> <span class="identifier">under_fraction</span><span class="special">,</span> <span class="identifier">standard_deviation</span><span class="special">);</span>
|
||||
<span class="identifier">normal</span> <span class="identifier">good_packs</span><span class="special">(</span><span class="identifier">safe_mean</span><span class="special">,</span> <span class="identifier">standard_deviation</span><span class="special">);</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
with the same confirmation as before:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Setting the packer to "</span> <span class="special"><<</span> <span class="identifier">nominal_mean</span> <span class="special"><<</span> <span class="string">" will mean that "</span>
|
||||
@ -235,42 +183,31 @@
|
||||
<span class="comment">// Setting the packer to 3.06449 will mean that fraction of packs >= 2.9 is 0.95</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_mean_and_sd_eg.using_cauchy_lorentz_instead_of_normal_distribution"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id1071994"></a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_mean_and_sd_eg.using_cauchy_lorentz_instead_of_normal_distribution"></a><h5>
|
||||
<a name="id1072790"></a>
|
||||
<a class="link" href="find_mean_and_sd_eg.html#math_toolkit.dist.stat_tut.weg.find_eg.find_mean_and_sd_eg.using_cauchy_lorentz_instead_of_normal_distribution">Using
|
||||
Cauchy-Lorentz instead of normal distribution</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
After examining the weight distribution of a large number of packs,
|
||||
we might decide that, after all, the assumption of a normal distribution
|
||||
is not really justified. We might find that the fit is better to
|
||||
a <a class="link" href="../../../dist_ref/dists/cauchy_dist.html" title="Cauchy-Lorentz Distribution">Cauchy
|
||||
Distribution</a>. This distribution has wider 'wings', so that
|
||||
whereas most of the values are closer to the mean than the normal,
|
||||
there are also more values than 'normal' that lie further from the
|
||||
mean than the normal.
|
||||
</p>
|
||||
<p>
|
||||
is not really justified. We might find that the fit is better to a
|
||||
<a class="link" href="../../../dist_ref/dists/cauchy_dist.html" title="Cauchy-Lorentz Distribution">Cauchy
|
||||
Distribution</a>. This distribution has wider 'wings', so that whereas
|
||||
most of the values are closer to the mean than the normal, there are
|
||||
also more values than 'normal' that lie further from the mean than
|
||||
the normal.
|
||||
</p>
|
||||
<p>
|
||||
This might happen because a larger than normal lump of meat is either
|
||||
included or excluded.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We first create a <a class="link" href="../../../dist_ref/dists/cauchy_dist.html" title="Cauchy-Lorentz Distribution">Cauchy
|
||||
Distribution</a> with the original mean and standard deviation,
|
||||
and estimate the fraction that lie below our minimum weight specification.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cauchy</span> <span class="identifier">cpacks</span><span class="special">(</span><span class="identifier">mean</span><span class="special">,</span> <span class="identifier">standard_deviation</span><span class="special">);</span>
|
||||
@ -281,13 +218,9 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Note that far fewer of the packs meet the specification, only 75%
|
||||
instead of 95%. Now we can repeat the find_location, using the cauchy
|
||||
distribution as template parameter, in place of the normal used above.
|
||||
</p>
|
||||
<p>
|
||||
Note that far fewer of the packs meet the specification, only 75% instead
|
||||
of 95%. Now we can repeat the find_location, using the cauchy distribution
|
||||
as template parameter, in place of the normal used above.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -298,19 +231,13 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Note that the safe_mean setting needs to be much higher, 3.53138
|
||||
instead of 3.06449, so we will make rather less profit.
|
||||
</p>
|
||||
<p>
|
||||
Note that the safe_mean setting needs to be much higher, 3.53138 instead
|
||||
of 3.06449, so we will make rather less profit.
|
||||
</p>
|
||||
<p>
|
||||
And again confirm that the fraction meeting specification is as expected.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cauchy</span> <span class="identifier">goodcpacks</span><span class="special">(</span><span class="identifier">lc</span><span class="special">,</span> <span class="identifier">standard_deviation</span><span class="special">);</span>
|
||||
@ -318,8 +245,6 @@
|
||||
<span class="special"><<</span> <span class="string">"fraction of packs >= "</span> <span class="special"><<</span> <span class="identifier">minimum_weight</span>
|
||||
<span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">goodcpacks</span><span class="special">,</span> <span class="identifier">minimum_weight</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="comment">// Cauchy Setting the packer to 3.53138 will mean that fraction of packs >= 2.9 is 0.95</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -327,8 +252,6 @@
|
||||
that 99% of packs met the specification.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Cauchy Setting the packer to "</span>
|
||||
@ -338,14 +261,10 @@
|
||||
<span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">goodcpacks</span><span class="special">,</span> <span class="identifier">minimum_weight</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Setting the packer to 3.13263 will mean that fraction of packs >=
|
||||
2.9 is 0.99, but will more than double the mean loss from 0.0644
|
||||
to 0.133 kg per pack.
|
||||
</p>
|
||||
<p>
|
||||
2.9 is 0.99, but will more than double the mean loss from 0.0644 to
|
||||
0.133 kg per pack.
|
||||
</p>
|
||||
<p>
|
||||
Of course, this calculation is not limited to packs of meat, it applies
|
||||
@ -353,67 +272,46 @@
|
||||
like any measurement.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The only caveat is that the calculation assumes that the standard
|
||||
deviation (scale) is known with a reasonably low uncertainty, something
|
||||
that is not so easy to ensure in practice. And that the distribution
|
||||
is well defined, <a class="link" href="../../../dist_ref/dists/normal_dist.html" title="Normal (Gaussian) Distribution">Normal
|
||||
The only caveat is that the calculation assumes that the standard deviation
|
||||
(scale) is known with a reasonably low uncertainty, something that
|
||||
is not so easy to ensure in practice. And that the distribution is
|
||||
well defined, <a class="link" href="../../../dist_ref/dists/normal_dist.html" title="Normal (Gaussian) Distribution">Normal
|
||||
Distribution</a> or <a class="link" href="../../../dist_ref/dists/cauchy_dist.html" title="Cauchy-Lorentz Distribution">Cauchy
|
||||
Distribution</a>, or some other.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
If one is simply dispensing a very large number of packs, then it
|
||||
may be feasible to measure the weight of hundreds or thousands of
|
||||
packs. With a healthy 'degrees of freedom', the confidence intervals
|
||||
for the standard deviation are not too wide, typically about + and
|
||||
- 10% for hundreds of observations.
|
||||
</p>
|
||||
<p>
|
||||
If one is simply dispensing a very large number of packs, then it may
|
||||
be feasible to measure the weight of hundreds or thousands of packs.
|
||||
With a healthy 'degrees of freedom', the confidence intervals for the
|
||||
standard deviation are not too wide, typically about + and - 10% for
|
||||
hundreds of observations.
|
||||
</p>
|
||||
<p>
|
||||
For other applications, where it is more difficult or expensive to
|
||||
make many observations, the confidence intervals are depressingly
|
||||
wide.
|
||||
</p>
|
||||
<p>
|
||||
make many observations, the confidence intervals are depressingly wide.
|
||||
</p>
|
||||
<p>
|
||||
See <a class="link" href="../cs_eg/chi_sq_intervals.html" title="Confidence Intervals on the Standard Deviation">Confidence
|
||||
Intervals on the standard deviation</a> for a worked example
|
||||
<a href="../../../../../../../../example/chi_square_std_dev_test.cpp" target="_top">chi_square_std_dev_test.cpp</a>
|
||||
Intervals on the standard deviation</a> for a worked example <a href="../../../../../../../../example/chi_square_std_dev_test.cpp" target="_top">chi_square_std_dev_test.cpp</a>
|
||||
of estimating these intervals.
|
||||
</p>
|
||||
<p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_mean_and_sd_eg.changing_the_scale_or_standard_deviation"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id1072718"></a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_mean_and_sd_eg.changing_the_scale_or_standard_deviation"></a><h5>
|
||||
<a name="id1073787"></a>
|
||||
<a class="link" href="find_mean_and_sd_eg.html#math_toolkit.dist.stat_tut.weg.find_eg.find_mean_and_sd_eg.changing_the_scale_or_standard_deviation">Changing
|
||||
the scale or standard deviation</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Alternatively, we could invest in a better (more precise) packer
|
||||
(or measuring device) with a lower standard deviation, or scale.
|
||||
</p>
|
||||
<p>
|
||||
Alternatively, we could invest in a better (more precise) packer (or
|
||||
measuring device) with a lower standard deviation, or scale.
|
||||
</p>
|
||||
<p>
|
||||
This might cost more, but would reduce the amount we have to 'give
|
||||
away' in order to meet the specification.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
To estimate how much better (how much smaller standard deviation)
|
||||
it would have to be, we need to get the 5% quantile to be located
|
||||
at the under_weight limit, 2.9
|
||||
</p>
|
||||
<p>
|
||||
To estimate how much better (how much smaller standard deviation) it
|
||||
would have to be, we need to get the 5% quantile to be located at the
|
||||
under_weight limit, 2.9
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -423,25 +321,17 @@
|
||||
<span class="special"><<</span> <span class="string">", mean = "</span> <span class="special"><<</span> <span class="identifier">packs</span><span class="special">.</span><span class="identifier">mean</span><span class="special">()</span> <span class="special"><<</span> <span class="string">", sd = "</span> <span class="special"><<</span> <span class="identifier">packs</span><span class="special">.</span><span class="identifier">standard_deviation</span><span class="special">()</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Quantile of 0.05 = 2.83551, mean = 3, sd = 0.1
|
||||
</p>
|
||||
<p>
|
||||
With the current packer (mean = 3, sd = 0.1), the 5% quantile is at
|
||||
2.8551 kg, a little below our target of 2.9 kg. So we know that the
|
||||
standard deviation is going to have to be smaller.
|
||||
</p>
|
||||
<p>
|
||||
With the current packer (mean = 3, sd = 0.1), the 5% quantile is
|
||||
at 2.8551 kg, a little below our target of 2.9 kg. So we know that
|
||||
the standard deviation is going to have to be smaller.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Let's start by guessing that it (now 0.1) needs to be halved, to
|
||||
a standard deviation of 0.05 kg.
|
||||
</p>
|
||||
<p>
|
||||
Let's start by guessing that it (now 0.1) needs to be halved, to a
|
||||
standard deviation of 0.05 kg.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -458,15 +348,10 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
So 0.05 was quite a good guess, but we are a little over the 2.9
|
||||
target, so the standard deviation could be a tiny bit more. So we
|
||||
could do some more guessing to get closer, say by increasing standard
|
||||
deviation to 0.06 kg, constructing another new distribution called
|
||||
pack06.
|
||||
</p>
|
||||
<p>
|
||||
So 0.05 was quite a good guess, but we are a little over the 2.9 target,
|
||||
so the standard deviation could be a tiny bit more. So we could do
|
||||
some more guessing to get closer, say by increasing standard deviation
|
||||
to 0.06 kg, constructing another new distribution called pack06.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -480,46 +365,34 @@
|
||||
<span class="special"><<</span> <span class="string">" and standard deviation of "</span> <span class="special"><<</span> <span class="identifier">pack06</span><span class="special">.</span><span class="identifier">standard_deviation</span><span class="special">()</span>
|
||||
<span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">pack06</span><span class="special">,</span> <span class="identifier">minimum_weight</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="comment">// Fraction of packs >= 2.9 with a mean of 3 and standard deviation of 0.06 is 0.95221</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Now we are getting really close, but to do the job properly, we might
|
||||
need to use root finding method, for example the tools provided,
|
||||
and used elsewhere, in the Math Toolkit, see <a class="link" href="../../../../toolkit/internals1/roots2.html" title="Root Finding Without Derivatives">Root
|
||||
need to use root finding method, for example the tools provided, and
|
||||
used elsewhere, in the Math Toolkit, see <a class="link" href="../../../../toolkit/internals1/roots2.html" title="Root Finding Without Derivatives">Root
|
||||
Finding Without Derivatives</a>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
But in this (normal) distribution case, we can and should be even
|
||||
smarter and make a direct calculation.
|
||||
</p>
|
||||
<p>
|
||||
But in this (normal) distribution case, we can and should be even smarter
|
||||
and make a direct calculation.
|
||||
</p>
|
||||
<p>
|
||||
Our required limit is minimum_weight = 2.9 kg, often called the random
|
||||
variate z. For a standard normal distribution, then probability p
|
||||
= N((minimum_weight - mean) / sd).
|
||||
variate z. For a standard normal distribution, then probability p =
|
||||
N((minimum_weight - mean) / sd).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We want to find the standard deviation that would be required to
|
||||
meet this limit, so that the p th quantile is located at z (minimum_weight).
|
||||
We want to find the standard deviation that would be required to meet
|
||||
this limit, so that the p th quantile is located at z (minimum_weight).
|
||||
In this case, the 0.05 (5%) quantile is at 2.9 kg pack weight, when
|
||||
the mean is 3 kg, ensuring that 0.95 (95%) of packs are above the
|
||||
minimum weight.
|
||||
</p>
|
||||
<p>
|
||||
the mean is 3 kg, ensuring that 0.95 (95%) of packs are above the minimum
|
||||
weight.
|
||||
</p>
|
||||
<p>
|
||||
Rearranging, we can directly calculate the required standard deviation:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">normal</span> <span class="identifier">N01</span><span class="special">;</span> <span class="comment">// standard normal distribution with meamn zero and unit standard deviation.
|
||||
@ -530,8 +403,6 @@
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"For the "</span><span class="special"><<</span> <span class="identifier">p</span> <span class="special"><<</span> <span class="string">"th quantile to be located at "</span>
|
||||
<span class="special"><<</span> <span class="identifier">minimum_weight</span> <span class="special"><<</span> <span class="string">", would need a standard deviation of "</span> <span class="special"><<</span> <span class="identifier">sd95</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="comment">// For the 0.05th quantile to be located at 2.9, would need a standard deviation of 0.0607957</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -539,8 +410,6 @@
|
||||
packer, and check that our distribution will meet the specification.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">normal</span> <span class="identifier">pack95</span><span class="special">(</span><span class="identifier">mean</span><span class="special">,</span> <span class="identifier">sd95</span><span class="special">);</span>
|
||||
@ -551,12 +420,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
This calculation is generalized in the free function find_scale,
|
||||
as shown below, giving the same standard deviation.
|
||||
</p>
|
||||
<p>
|
||||
This calculation is generalized in the free function find_scale, as
|
||||
shown below, giving the same standard deviation.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -567,49 +432,30 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
If we had defined an over_fraction, or percentage that must pass
|
||||
specification
|
||||
</p>
|
||||
<p>
|
||||
If we had defined an over_fraction, or percentage that must pass specification
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">over_fraction</span> <span class="special">=</span> <span class="number">0.95</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
And (wrongly) written
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">sso</span> <span class="special">=</span> <span class="identifier">find_scale</span><span class="special"><</span><span class="identifier">normal</span><span class="special">>(</span><span class="identifier">minimum_weight</span><span class="special">,</span> <span class="identifier">over_fraction</span><span class="special">,</span> <span class="identifier">packs</span><span class="special">.</span><span class="identifier">mean</span><span class="special">());</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
With the default policy, we would get a message like
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Message from thrown exception was:
|
||||
Error in function boost::math::find_scale<Dist, Policy>(double, double, double, Policy):
|
||||
Computed scale (-0.060795683191176959) is <= 0! Was the complement intended?
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
But this would return a <span class="bold"><strong>negative</strong></span>
|
||||
standard deviation - obviously impossible. The probability should
|
||||
be 1 - over_fraction, not over_fraction, thus:
|
||||
</p>
|
||||
<p>
|
||||
But this would return a <span class="bold"><strong>negative</strong></span> standard
|
||||
deviation - obviously impossible. The probability should be 1 - over_fraction,
|
||||
not over_fraction, thus:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -620,14 +466,10 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
But notice that using '1 - over_fraction' - will lead to a <a class="link" href="../../overview.html#why_complements">loss of accuracy, especially if over_fraction
|
||||
was close to unity.</a> In this (very common) case, we should
|
||||
instead use the <a class="link" href="../../overview.html#complements">complements</a>, giving
|
||||
the most accurate result.
|
||||
</p>
|
||||
<p>
|
||||
But notice that using '1 - over_fraction' - will lead to a <a class="link" href="../../overview.html#why_complements">loss
|
||||
of accuracy, especially if over_fraction was close to unity.</a>
|
||||
In this (very common) case, we should instead use the <a class="link" href="../../overview.html#complements">complements</a>,
|
||||
giving the most accurate result.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -635,21 +477,15 @@
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">ssc</span> <span class="special">=</span> <span class="identifier">find_scale</span><span class="special"><</span><span class="identifier">normal</span><span class="special">>(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">minimum_weight</span><span class="special">,</span> <span class="identifier">over_fraction</span><span class="special">,</span> <span class="identifier">packs</span><span class="special">.</span><span class="identifier">mean</span><span class="special">()));</span>
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"find_scale<normal>(complement(minimum_weight, over_fraction, packs.mean())); "</span> <span class="special"><<</span> <span class="identifier">ssc</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="comment">// find_scale<normal>(complement(minimum_weight, over_fraction, packs.mean())); 0.0607957</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Note that our guess of 0.06 was close to the accurate value of 0.060795683191176959.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We can again confirm our prediction thus:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">normal</span> <span class="identifier">pack95c</span><span class="special">(</span><span class="identifier">mean</span><span class="special">,</span> <span class="identifier">ssc</span><span class="special">);</span>
|
||||
@ -657,42 +493,28 @@
|
||||
<span class="special"><<</span> <span class="string">" and standard deviation of "</span> <span class="special"><<</span> <span class="identifier">pack95c</span><span class="special">.</span><span class="identifier">standard_deviation</span><span class="special">()</span>
|
||||
<span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">pack95c</span><span class="special">,</span> <span class="identifier">minimum_weight</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="comment">// Fraction of packs >= 2.9 with a mean of 3 and standard deviation of 0.0607957 is 0.95</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Notice that these two deceptively simple questions:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc"><li>
|
||||
Do we over-fill to make sure we meet a minimum specification
|
||||
(or under-fill to avoid an overdose)?
|
||||
Do we over-fill to make sure we meet a minimum specification (or
|
||||
under-fill to avoid an overdose)?
|
||||
</li></ul></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
and/or
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc"><li>
|
||||
Do we measure better?
|
||||
</li></ul></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
are actually extremely common.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The weight of beef might be replaced by a measurement of more or
|
||||
less anything, from drug tablet content, Apollo landing rocket firing,
|
||||
X-ray treatment doses...
|
||||
</p>
|
||||
<p>
|
||||
The weight of beef might be replaced by a measurement of more or less
|
||||
anything, from drug tablet content, Apollo landing rocket firing, X-ray
|
||||
treatment doses...
|
||||
</p>
|
||||
<p>
|
||||
The scale can be variation in dispensing or uncertainty in measurement.
|
||||
|
@ -17,19 +17,15 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_scale_eg"></a><a class="link" href="find_scale_eg.html" title="Find Scale (Standard Deviation) Example">
|
||||
Find Scale (Standard Deviation) Example</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_scale_eg"></a><a class="link" href="find_scale_eg.html" title="Find Scale (Standard Deviation) Example">Find
|
||||
Scale (Standard Deviation) Example</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
First we need some includes to access the <a class="link" href="../../../dist_ref/dists/normal_dist.html" title="Normal (Gaussian) Distribution">Normal
|
||||
Distribution</a>, the algorithms to find scale (and some std output
|
||||
of course).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</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">normal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> <span class="comment">// for normal_distribution
|
||||
@ -46,8 +42,6 @@
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">limits</span><span class="special">></span>
|
||||
<span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -57,22 +51,16 @@
|
||||
constructor.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">normal</span> <span class="identifier">N01</span><span class="special">;</span> <span class="comment">// Default 'standard' normal distribution with zero mean
|
||||
</span><span class="keyword">double</span> <span class="identifier">sd</span> <span class="special">=</span> <span class="number">1.</span><span class="special">;</span> <span class="comment">// and standard deviation is 1.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Suppose we want to find a different normal distribution with standard
|
||||
deviation so that only fraction p (here 0.001 or 0.1%) are below
|
||||
a certain chosen limit (here -2. standard deviations).
|
||||
</p>
|
||||
<p>
|
||||
deviation so that only fraction p (here 0.001 or 0.1%) are below a
|
||||
certain chosen limit (here -2. standard deviations).
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -90,68 +78,44 @@
|
||||
<span class="special"><<</span> <span class="string">", p = "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">N01</span><span class="special">,</span> <span class="identifier">z</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// Note: uses complement.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Normal distribution with mean = 0 has fraction <= -2, p = 0.0227501
|
||||
Normal distribution with mean = 0 has fraction > -2, p = 0.97725
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Noting that p = 0.02 instead of our target of 0.001, we can now use
|
||||
<code class="computeroutput"><span class="identifier">find_scale</span></code> to give
|
||||
a new standard deviation.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">l</span> <span class="special">=</span> <span class="identifier">N01</span><span class="special">.</span><span class="identifier">location</span><span class="special">();</span>
|
||||
<span class="keyword">double</span> <span class="identifier">s</span> <span class="special">=</span> <span class="identifier">find_scale</span><span class="special"><</span><span class="identifier">normal</span><span class="special">>(</span><span class="identifier">z</span><span class="special">,</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">l</span><span class="special">);</span>
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"scale (standard deviation) = "</span> <span class="special"><<</span> <span class="identifier">s</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
that outputs:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">scale (standard deviation) = 0.647201
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
showing that we need to reduce the standard deviation from 1. to
|
||||
0.65.
|
||||
</p>
|
||||
<p>
|
||||
showing that we need to reduce the standard deviation from 1. to 0.65.
|
||||
</p>
|
||||
<p>
|
||||
Then we can check that we have achieved our objective by constructing
|
||||
a new distribution with the new standard deviation (but same zero
|
||||
mean):
|
||||
</p>
|
||||
<p>
|
||||
a new distribution with the new standard deviation (but same zero mean):
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">normal</span> <span class="identifier">np001pc</span><span class="special">(</span><span class="identifier">N01</span><span class="special">.</span><span class="identifier">location</span><span class="special">(),</span> <span class="identifier">s</span><span class="special">);</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
And re-calculating the fraction below (and above) our chosen limit.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Normal distribution with mean = "</span> <span class="special"><<</span> <span class="identifier">l</span>
|
||||
@ -162,42 +126,28 @@ Normal distribution with mean = 0 has fraction > -2, p = 0.97725
|
||||
<span class="special"><<</span> <span class="string">", p = "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">np001pc</span><span class="special">,</span> <span class="identifier">z</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Normal distribution with mean = 0 has fraction <= -2, p = 0.001
|
||||
Normal distribution with mean = 0 has fraction > -2, p = 0.999
|
||||
</pre>
|
||||
<p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_scale_eg.controlling_how_errors_from_find_scale_are_handled"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id1067817"></a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.find_eg.find_scale_eg.controlling_how_errors_from_find_scale_are_handled"></a><h5>
|
||||
<a name="id1068135"></a>
|
||||
<a class="link" href="find_scale_eg.html#math_toolkit.dist.stat_tut.weg.find_eg.find_scale_eg.controlling_how_errors_from_find_scale_are_handled">Controlling
|
||||
how Errors from find_scale are handled</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We can also control the policy for handling various errors. For example,
|
||||
we can define a new (possibly unwise) policy to ignore domain errors
|
||||
('bad' arguments).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Unless we are using the boost::math namespace, we will need:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</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">policies</span><span class="special">::</span><span class="identifier">policy</span><span class="special">;</span>
|
||||
<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">policies</span><span class="special">::</span><span class="identifier">domain_error</span><span class="special">;</span>
|
||||
<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">policies</span><span class="special">::</span><span class="identifier">ignore_error</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -205,8 +155,6 @@ Normal distribution with mean = 0 has fraction > -2, p = 0.999
|
||||
it is not required, as the various examples below show.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">policy</span><span class="special"><</span><span class="identifier">domain_error</span><span class="special"><</span><span class="identifier">ignore_error</span><span class="special">></span> <span class="special">></span> <span class="identifier">ignore_domain_policy</span><span class="special">;</span>
|
||||
@ -219,8 +167,6 @@ Normal distribution with mean = 0 has fraction > -2, p = 0.999
|
||||
</span><span class="identifier">l</span> <span class="special">=</span> <span class="identifier">find_scale</span><span class="special"><</span><span class="identifier">normal</span><span class="special">>(</span><span class="identifier">z</span><span class="special">,</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">l</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">policies</span><span class="special">::</span><span class="identifier">policy</span><span class="special"><>());</span>
|
||||
<span class="comment">// New policy, without typedef.
|
||||
</span><span class="identifier">l</span> <span class="special">=</span> <span class="identifier">find_scale</span><span class="special"><</span><span class="identifier">normal</span><span class="special">>(</span><span class="identifier">z</span><span class="special">,</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">l</span><span class="special">,</span> <span class="identifier">policy</span><span class="special"><</span><span class="identifier">domain_error</span><span class="special"><</span><span class="identifier">ignore_error</span><span class="special">></span> <span class="special">>());</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -231,8 +177,6 @@ Normal distribution with mean = 0 has fraction > -2, p = 0.999
|
||||
use the <a class="link" href="../../overview.html#complements">complements</a> version.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">z</span> <span class="special">=</span> <span class="special">-</span><span class="number">2.</span><span class="special">;</span>
|
||||
@ -246,21 +190,14 @@ Normal distribution with mean = 0 has fraction > -2, p = 0.999
|
||||
<span class="special"><<</span> <span class="string">"fraction > "</span> <span class="special"><<</span> <span class="identifier">z</span> <span class="special"><<</span> <span class="string">" = "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">np95pc</span><span class="special">,</span> <span class="identifier">z</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Sadly, it is all too easy to get probabilities the wrong way round,
|
||||
when you may get a warning like this:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Message from thrown exception was:
|
||||
Error in function boost::math::find_scale<Dist, Policy>(complement(double, double, double, Policy)):
|
||||
Computed scale (-0.48043523852179076) is <= 0! Was the complement intended?
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The default error handling policy is to throw an exception with this
|
||||
message, but if you chose a policy to ignore the error, the (impossible)
|
||||
@ -279,8 +216,6 @@ Normal distribution with mean = 0 has fraction > -2, p = 0.999
|
||||
Normal distribution with mean = 0.946339 has fraction <= -2 = 0.001
|
||||
Normal distribution with mean = 0.946339 has fraction > -2 = 0.999
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -20,8 +20,8 @@
|
||||
<a name="math_toolkit.dist.stat_tut.weg.nccs_eg"></a><a class="link" href="nccs_eg.html" title="Non Central Chi Squared Example">Non Central
|
||||
Chi Squared Example</a>
|
||||
</h5></div></div></div>
|
||||
<div class="toc"><dl><dt><span class="section"><a href="nccs_eg/nccs_power_eg.html">
|
||||
Tables of the power function of the χ<sup>2</sup> test.</a></span></dt></dl></div>
|
||||
<div class="toc"><dl><dt><span class="section"><a href="nccs_eg/nccs_power_eg.html">Tables
|
||||
of the power function of the χ<sup>2</sup> test.</a></span></dt></dl></div>
|
||||
<p>
|
||||
(See also the reference documentation for the <a class="link" href="../../dist_ref/dists/nc_chi_squared_dist.html" title="Noncentral Chi-Squared Distribution">Non
|
||||
Central Chi Squared</a>.)
|
||||
|
@ -17,26 +17,20 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.nccs_eg.nccs_power_eg"></a><a class="link" href="nccs_power_eg.html" title="Tables of the power function of the χ2 test.">
|
||||
Tables of the power function of the χ<sup>2</sup> test.</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.nccs_eg.nccs_power_eg"></a><a class="link" href="nccs_power_eg.html" title="Tables of the power function of the χ2 test.">Tables
|
||||
of the power function of the χ<sup>2</sup> test.</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
This example computes a table of the power of the χ<sup>2</sup>
|
||||
test at the 5%
|
||||
significance level, for various degrees of freedom and non-centrality
|
||||
parameters. The table is deliberately the same as Table 6 from "The
|
||||
Non-Central χ<sup>2</sup> and F-Distributions and their applications.", P.
|
||||
B. Patnaik, Biometrika, Vol. 36, No. 1/2 (June 1949), 202-232.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
First we need some includes to access the non-central chi squared
|
||||
distribution (and some basic std output of course).
|
||||
test at the 5% significance
|
||||
level, for various degrees of freedom and non-centrality parameters.
|
||||
The table is deliberately the same as Table 6 from "The Non-Central
|
||||
χ<sup>2</sup> and F-Distributions and their applications.", P. B. Patnaik,
|
||||
Biometrika, Vol. 36, No. 1/2 (June 1949), 202-232.
|
||||
</p>
|
||||
<p>
|
||||
First we need some includes to access the non-central chi squared distribution
|
||||
(and some basic std output of course).
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -46,8 +40,6 @@ test at the 5%
|
||||
|
||||
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
|
||||
<span class="special">{</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -55,8 +47,6 @@ test at the 5%
|
||||
start with a table header:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"[table\n[[[nu]]"</span><span class="special">;</span>
|
||||
@ -65,22 +55,16 @@ test at the 5%
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"[[lambda]="</span> <span class="special"><<</span> <span class="identifier">lam</span> <span class="special"><<</span> <span class="string">"]"</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"]\n"</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
(Note: the enclosing [] brackets are to format as a table in Boost.Quickbook).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Enumerate the rows and columns and print the power of the test for
|
||||
each table cell:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">for</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">n</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span> <span class="identifier">n</span> <span class="special"><=</span> <span class="number">20</span><span class="special">;</span> <span class="special">++</span><span class="identifier">n</span><span class="special">)</span>
|
||||
@ -90,19 +74,13 @@ test at the 5%
|
||||
<span class="special">{</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Calculate the χ<sup>2</sup> statistic for a 5% significance:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">cs</span> <span class="special">=</span> <span class="identifier">quantile</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">chi_squared</span><span class="special">(</span><span class="identifier">n</span><span class="special">),</span> <span class="number">0.05</span><span class="special">));</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -110,21 +88,15 @@ test at the 5%
|
||||
non-central χ<sup>2</sup> distribution:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">beta</span> <span class="special">=</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">non_central_chi_squared</span><span class="special">(</span><span class="identifier">n</span><span class="special">,</span> <span class="identifier">lam</span><span class="special">),</span> <span class="identifier">cs</span><span class="special">));</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Then output the cell value:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"["</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="number">3</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">beta</span> <span class="special"><<</span> <span class="string">"]"</span><span class="special">;</span>
|
||||
@ -136,21 +108,15 @@ test at the 5%
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The output from this program is a table in Boost.Quickbook format
|
||||
as shown below.
|
||||
</p>
|
||||
<p>
|
||||
The output from this program is a table in Boost.Quickbook format as
|
||||
shown below.
|
||||
</p>
|
||||
<p>
|
||||
We can interpret this as follows - for example if ν=10 and λ=10 then
|
||||
the power of the test is 0.542 - so we have only a 54% chance of
|
||||
correctly detecting that our null hypothesis is false, and a 46%
|
||||
chance of incurring a type II error (failing to reject the null hypothesis
|
||||
when it is in fact false):
|
||||
</p>
|
||||
<p>
|
||||
the power of the test is 0.542 - so we have only a 54% chance of correctly
|
||||
detecting that our null hypothesis is false, and a 46% chance of incurring
|
||||
a type II error (failing to reject the null hypothesis when it is in
|
||||
fact false):
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
@ -1309,14 +1275,10 @@ test at the 5%
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
See <a href="../../../../../../../../example/nc_chi_sq_example.cpp" target="_top">nc_chi_sq_example.cpp</a>
|
||||
for the full C++ source code.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -21,15 +21,15 @@
|
||||
Binomial Distribution Examples</a>
|
||||
</h5></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="neg_binom_eg/neg_binom_conf.html">
|
||||
Calculating Confidence Limits on the Frequency of Occurrence for the
|
||||
Negative Binomial Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="neg_binom_eg/neg_binom_size_eg.html">
|
||||
Estimating Sample Sizes for the Negative Binomial.</a></span></dt>
|
||||
<dt><span class="section"><a href="neg_binom_eg/negative_binomial_example1.html">
|
||||
Negative Binomial Sales Quota Example.</a></span></dt>
|
||||
<dt><span class="section"><a href="neg_binom_eg/negative_binomial_example2.html">
|
||||
Negative Binomial Table Printing Example.</a></span></dt>
|
||||
<dt><span class="section"><a href="neg_binom_eg/neg_binom_conf.html">Calculating
|
||||
Confidence Limits on the Frequency of Occurrence for the Negative Binomial
|
||||
Distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="neg_binom_eg/neg_binom_size_eg.html">Estimating
|
||||
Sample Sizes for the Negative Binomial.</a></span></dt>
|
||||
<dt><span class="section"><a href="neg_binom_eg/negative_binomial_example1.html">Negative
|
||||
Binomial Sales Quota Example.</a></span></dt>
|
||||
<dt><span class="section"><a href="neg_binom_eg/negative_binomial_example2.html">Negative
|
||||
Binomial Table Printing Example.</a></span></dt>
|
||||
</dl></div>
|
||||
<p>
|
||||
(See also the reference documentation for the <a class="link" href="../../dist_ref/dists/negative_binomial_dist.html" title="Negative Binomial Distribution">Negative
|
||||
|
@ -17,9 +17,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.neg_binom_eg.neg_binom_conf"></a><a class="link" href="neg_binom_conf.html" title="Calculating Confidence Limits on the Frequency of Occurrence for the Negative Binomial Distribution">
|
||||
Calculating Confidence Limits on the Frequency of Occurrence for the
|
||||
Negative Binomial Distribution</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.neg_binom_eg.neg_binom_conf"></a><a class="link" href="neg_binom_conf.html" title="Calculating Confidence Limits on the Frequency of Occurrence for the Negative Binomial Distribution">Calculating
|
||||
Confidence Limits on the Frequency of Occurrence for the Negative Binomial
|
||||
Distribution</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
Imagine you have a process that follows a negative binomial distribution:
|
||||
@ -47,15 +47,11 @@
|
||||
The sample program <a href="../../../../../../../../example/neg_binom_confidence_limits.cpp" target="_top">neg_binom_confidence_limits.cpp</a>
|
||||
illustrates their use.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
First we need some includes to access the negative binomial distribution
|
||||
(and some basic std output of course).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</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">negative_binomial</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
@ -66,8 +62,6 @@
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iomanip</span><span class="special">></span>
|
||||
<span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">;</span>
|
||||
<span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setw</span><span class="special">;</span> <span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">left</span><span class="special">;</span> <span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">fixed</span><span class="special">;</span> <span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">right</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -75,28 +69,19 @@
|
||||
that the true occurrence frequency lies outside the calculated interval:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">alpha</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">0.5</span><span class="special">,</span> <span class="number">0.25</span><span class="special">,</span> <span class="number">0.1</span><span class="special">,</span> <span class="number">0.05</span><span class="special">,</span> <span class="number">0.01</span><span class="special">,</span> <span class="number">0.001</span><span class="special">,</span> <span class="number">0.0001</span><span class="special">,</span> <span class="number">0.00001</span> <span class="special">};</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Confidence value as % is (1 - alpha) * 100, so alpha 0.05 == 95%
|
||||
confidence that the true occurence frequency lies <span class="bold"><strong>inside</strong></span>
|
||||
Confidence value as % is (1 - alpha) * 100, so alpha 0.05 == 95% confidence
|
||||
that the true occurence frequency lies <span class="bold"><strong>inside</strong></span>
|
||||
the calculated interval.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We need a function to calculate and print confidence limits for an
|
||||
observed frequency of occurrence that follows a negative binomial
|
||||
distribution.
|
||||
</p>
|
||||
<p>
|
||||
observed frequency of occurrence that follows a negative binomial distribution.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -127,22 +112,18 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
And now for the important part - the bounds themselves. For each
|
||||
value of <span class="emphasis"><em>alpha</em></span>, we call <code class="computeroutput"><span class="identifier">find_lower_bound_on_p</span></code>
|
||||
And now for the important part - the bounds themselves. For each value
|
||||
of <span class="emphasis"><em>alpha</em></span>, we call <code class="computeroutput"><span class="identifier">find_lower_bound_on_p</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">find_upper_bound_on_p</span></code>
|
||||
to obtain lower and upper bounds respectively. Note that since we
|
||||
are calculating a two-sided interval, we must divide the value of
|
||||
alpha in two. Had we been calculating a single-sided interval, for
|
||||
example: <span class="emphasis"><em>"Calculate a lower bound so that we are P%
|
||||
sure that the true occurrence frequency is greater than some value"</em></span>
|
||||
to obtain lower and upper bounds respectively. Note that since we are
|
||||
calculating a two-sided interval, we must divide the value of alpha
|
||||
in two. Had we been calculating a single-sided interval, for example:
|
||||
<span class="emphasis"><em>"Calculate a lower bound so that we are P% sure that
|
||||
the true occurrence frequency is greater than some value"</em></span>
|
||||
then we would <span class="bold"><strong>not</strong></span> have divided by
|
||||
two.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"> <span class="comment">// Now print out the upper and lower limits for the alpha table values.
|
||||
@ -159,8 +140,6 @@
|
||||
<span class="special">}</span>
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="special">}</span> <span class="comment">// void confidence_limits_on_frequency(unsigned trials, unsigned successes)</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -168,8 +147,6 @@
|
||||
of trials, but always the same success fraction 0.1, or 1 in 10.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.neg_binom_eg.neg_binom_size_eg"></a><a class="link" href="neg_binom_size_eg.html" title="Estimating Sample Sizes for the Negative Binomial.">
|
||||
Estimating Sample Sizes for the Negative Binomial.</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.neg_binom_eg.neg_binom_size_eg"></a><a class="link" href="neg_binom_size_eg.html" title="Estimating Sample Sizes for the Negative Binomial.">Estimating
|
||||
Sample Sizes for the Negative Binomial.</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
Imagine you have an event (let's call it a "failure" - though
|
||||
@ -35,28 +35,20 @@
|
||||
The example program <a href="../../../../../../../../example/neg_binomial_sample_sizes.cpp" target="_top">neg_binomial_sample_sizes.cpp</a>
|
||||
demonstrates its usage.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
It centres around a routine that prints out a table of minimum sample
|
||||
sizes for various probability thresholds:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">find_number_of_trials</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">failures</span><span class="special">,</span> <span class="keyword">double</span> <span class="identifier">p</span><span class="special">);</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
First define a table of significance levels: these are the maximum
|
||||
acceptable probability that <span class="emphasis"><em>failure</em></span> or fewer
|
||||
events will be observed.
|
||||
</p>
|
||||
<p>
|
||||
acceptable probability that <span class="emphasis"><em>failure</em></span> or fewer events
|
||||
will be observed.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -65,32 +57,21 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Confidence value as % is (1 - alpha) * 100, so alpha 0.05 == 95% confidence
|
||||
that the desired number of failures will be observed.
|
||||
</p>
|
||||
<p>
|
||||
Confidence value as % is (1 - alpha) * 100, so alpha 0.05 == 95%
|
||||
confidence that the desired number of failures will be observed.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Much of the rest of the program is pretty-printing, the important
|
||||
part is in the calculation of minimum number of trials required for
|
||||
each value of alpha using:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
Much of the rest of the program is pretty-printing, the important part
|
||||
is in the calculation of minimum number of trials required for each
|
||||
value of alpha using:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="special">(</span><span class="keyword">int</span><span class="special">)</span><span class="identifier">ceil</span><span class="special">(</span><span class="identifier">negative_binomial</span><span class="special">::</span><span class="identifier">find_minimum_number_of_trials</span><span class="special">(</span><span class="identifier">failures</span><span class="special">,</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">alpha</span><span class="special">[</span><span class="identifier">i</span><span class="special">]);</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
find_minimum_number_of_trials returns a double, so ceil rounds this
|
||||
up to ensure we have an integral minimum number of trials.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
@ -122,8 +103,6 @@
|
||||
<span class="special">}</span>
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="special">}</span> <span class="comment">// void find_number_of_trials(double failures, double p)</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -131,8 +110,6 @@
|
||||
confidence levels:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
|
||||
@ -148,8 +125,6 @@
|
||||
<span class="special">}</span> <span class="comment">// int main()
|
||||
</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="note"><table border="0" summary="Note">
|
||||
|
@ -17,82 +17,63 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.neg_binom_eg.negative_binomial_example1"></a><a class="link" href="negative_binomial_example1.html" title="Negative Binomial Sales Quota Example.">
|
||||
Negative Binomial Sales Quota Example.</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.neg_binom_eg.negative_binomial_example1"></a><a class="link" href="negative_binomial_example1.html" title="Negative Binomial Sales Quota Example.">Negative
|
||||
Binomial Sales Quota Example.</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
This example program <a href="../../../../../../../../example/negative_binomial_example1.cpp" target="_top">negative_binomial_example1.cpp
|
||||
(full source code)</a> demonstrates a simple use to find the probability
|
||||
of meeting a sales quota.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Based on <a href="http://en.wikipedia.org/wiki/Negative_binomial_distribution" target="_top">a
|
||||
problem by Dr. Diane Evans, Professor of Mathematics at Rose-Hulman
|
||||
Institute of Technology</a>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Pat is required to sell candy bars to raise money for the 6th grade
|
||||
field trip. There are thirty houses in the neighborhood, and Pat
|
||||
is not supposed to return home until five candy bars have been sold.
|
||||
So the child goes door to door, selling candy bars. At each house,
|
||||
there is a 0.4 probability (40%) of selling one candy bar and a 0.6
|
||||
probability (60%) of selling nothing.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
What is the probability mass (density) function (pdf) for selling
|
||||
the last (fifth) candy bar at the nth house?
|
||||
field trip. There are thirty houses in the neighborhood, and Pat is
|
||||
not supposed to return home until five candy bars have been sold. So
|
||||
the child goes door to door, selling candy bars. At each house, there
|
||||
is a 0.4 probability (40%) of selling one candy bar and a 0.6 probability
|
||||
(60%) of selling nothing.
|
||||
</p>
|
||||
<p>
|
||||
What is the probability mass (density) function (pdf) for selling the
|
||||
last (fifth) candy bar at the nth house?
|
||||
</p>
|
||||
<p>
|
||||
The Negative Binomial(r, p) distribution describes the probability
|
||||
of k failures and r successes in k+r Bernoulli(p) trials with success
|
||||
on the last trial. (A <a href="http://en.wikipedia.org/wiki/Bernoulli_distribution" target="_top">Bernoulli
|
||||
trial</a> is one with only two possible outcomes, success of
|
||||
failure, and p is the probability of success). See also <a href="../../../../../" target="_top">http://en.wikipedia.org/wiki/Bernoulli_distribution
|
||||
trial</a> is one with only two possible outcomes, success of failure,
|
||||
and p is the probability of success). See also <a href="../../../../../" target="_top">http://en.wikipedia.org/wiki/Bernoulli_distribution
|
||||
Bernoulli distribution</a> and <a href="http://www.math.uah.edu/stat/bernoulli/Introduction.xhtml" target="_top">Bernoulli
|
||||
applications</a>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
In this example, we will deliberately produce a variety of calculations
|
||||
and outputs to demonstrate the ways that the negative binomial distribution
|
||||
can be implemented with this library: it is also deliberately over-commented.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
First we need to #define macros to control the error and discrete
|
||||
handling policies. For this simple example, we want to avoid throwing
|
||||
an exception (the default policy) and just return infinity. We want
|
||||
to treat the distribution as if it was continuous, so we choose a
|
||||
discrete_quantile policy of real, rather than the default policy
|
||||
integer_round_outwards.
|
||||
</p>
|
||||
<p>
|
||||
First we need to #define macros to control the error and discrete handling
|
||||
policies. For this simple example, we want to avoid throwing an exception
|
||||
(the default policy) and just return infinity. We want to treat the
|
||||
distribution as if it was continuous, so we choose a discrete_quantile
|
||||
policy of real, rather than the default policy integer_round_outwards.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_MATH_OVERFLOW_ERROR_POLICY</span> <span class="identifier">ignore_error</span>
|
||||
<span class="preprocessor">#define</span> <span class="identifier">BOOST_MATH_DISCRETE_QUANTILE_POLICY</span> <span class="identifier">real</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
After that we need some includes to provide easy access to the negative
|
||||
binomial distribution,
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="caution"><table border="0" summary="Caution">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../../images/caution.png"></td>
|
||||
@ -103,14 +84,10 @@
|
||||
the above #defines
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
and we need some std library iostream, of course.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</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">negative_binomial</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
@ -129,29 +106,21 @@
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">limits</span><span class="special">></span>
|
||||
<span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
It is always sensible to use try and catch blocks because defaults
|
||||
policies are to throw an exception if anything goes wrong.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
A simple catch block (see below) will ensure that you get a helpful
|
||||
error message instead of an abrupt program abort.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">try</span>
|
||||
<span class="special">{</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -160,13 +129,9 @@
|
||||
this takes is therefore = sucesses + failures or k + r = k + 5.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">sales_quota</span> <span class="special">=</span> <span class="number">5</span><span class="special">;</span> <span class="comment">// Pat's sales quota - successes (r).</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -174,37 +139,27 @@
|
||||
bar and a 0.6 probability (60%) of selling nothing.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">success_fraction</span> <span class="special">=</span> <span class="number">0.4</span><span class="special">;</span> <span class="comment">// success_fraction (p) - so failure_fraction is 0.6.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The Negative Binomial(r, p) distribution describes the probability
|
||||
of k failures and r successes in k+r Bernoulli(p) trials with success
|
||||
on the last trial. (A <a href="http://en.wikipedia.org/wiki/Bernoulli_distribution" target="_top">Bernoulli
|
||||
trial</a> is one with only two possible outcomes, success of
|
||||
failure, and p is the probability of success).
|
||||
</p>
|
||||
<p>
|
||||
trial</a> is one with only two possible outcomes, success of failure,
|
||||
and p is the probability of success).
|
||||
</p>
|
||||
<p>
|
||||
We therefore start by constructing a negative binomial distribution
|
||||
with parameters sales_quota (required successes) and probability
|
||||
of success.
|
||||
</p>
|
||||
<p>
|
||||
with parameters sales_quota (required successes) and probability of
|
||||
success.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">negative_binomial</span> <span class="identifier">nb</span><span class="special">(</span><span class="identifier">sales_quota</span><span class="special">,</span> <span class="identifier">success_fraction</span><span class="special">);</span> <span class="comment">// type double by default.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -212,8 +167,6 @@
|
||||
of the distribution.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Pat has a sales per house success rate of "</span> <span class="special"><<</span> <span class="identifier">success_fraction</span>
|
||||
@ -228,32 +181,23 @@
|
||||
<span class="special"><<</span> <span class="string">" houses in order to sell all "</span> <span class="special"><<</span> <span class="identifier">nb</span><span class="special">.</span><span class="identifier">successes</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" bars. "</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Pat has a sales per house success rate of 0.4.
|
||||
Therefore he would, on average, sell 40 bars after trying 100 houses.
|
||||
With a success rate of 0.4, he might expect, on average,
|
||||
to need to visit about 12 houses in order to sell all 5 bars.
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The random variable of interest is the number of houses that must
|
||||
be visited to sell five candy bars, so we substitute k = n - 5 into
|
||||
a negative_binomial(5, 0.4) and obtain the <a class="link" href="../../../dist_ref/nmp.html#math.dist.pdf">probability
|
||||
The random variable of interest is the number of houses that must be
|
||||
visited to sell five candy bars, so we substitute k = n - 5 into a
|
||||
negative_binomial(5, 0.4) and obtain the <a class="link" href="../../../dist_ref/nmp.html#math.dist.pdf">probability
|
||||
mass (density) function (pdf or pmf)</a> of the distribution of
|
||||
houses visited. Obviously, the best possible case is that Pat makes
|
||||
sales on all the first five houses.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We calculate this using the pdf function:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability that Pat finishes on the "</span> <span class="special"><<</span> <span class="identifier">sales_quota</span> <span class="special"><<</span> <span class="string">"th house is "</span>
|
||||
@ -261,22 +205,16 @@ to need to visit about 12 houses in order to sell all 5 bars.
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Of course, he could not finish on fewer than 5 houses because he must
|
||||
sell 5 candy bars. So the 5th house is the first that he could possibly
|
||||
finish on.
|
||||
</p>
|
||||
<p>
|
||||
Of course, he could not finish on fewer than 5 houses because he
|
||||
must sell 5 candy bars. So the 5th house is the first that he could
|
||||
possibly finish on.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
To finish on or before the 8th house, Pat must finish at the 5th,
|
||||
6th, 7th or 8th house. The probability that he will finish on <span class="bold"><strong>exactly</strong></span> ( == ) on any house is the Probability
|
||||
To finish on or before the 8th house, Pat must finish at the 5th, 6th,
|
||||
7th or 8th house. The probability that he will finish on <span class="bold"><strong>exactly</strong></span> ( == ) on any house is the Probability
|
||||
Density Function (pdf).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability that Pat finishes on the 6th house is "</span>
|
||||
@ -287,22 +225,15 @@ to need to visit about 12 houses in order to sell all 5 bars.
|
||||
<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">8</span> <span class="special">-</span> <span class="identifier">sales_quota</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability that Pat finishes on the 6th house is 0.03072
|
||||
Probability that Pat finishes on the 7th house is 0.055296
|
||||
Probability that Pat finishes on the 8th house is 0.077414
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The sum of the probabilities for these houses is the Cumulative Distribution
|
||||
Function (cdf). We can calculate it by adding the individual probabilities.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability that Pat finishes on or before the 8th house is sum "</span>
|
||||
@ -315,20 +246,13 @@ Probability that Pat finishes on the 8th house is 0.077414
|
||||
</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">pdf(sales_quota) + pdf(6) + pdf(7) + pdf(8) = 0.17367
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Or, usually better, by using the negative binomial <span class="bold"><strong>cumulative</strong></span>
|
||||
distribution function.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"\nProbability of selling his quota of "</span> <span class="special"><<</span> <span class="identifier">sales_quota</span>
|
||||
@ -336,13 +260,8 @@ Probability that Pat finishes on the 8th house is 0.077414
|
||||
<span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">nb</span><span class="special">,</span> <span class="number">8</span> <span class="special">-</span> <span class="identifier">sales_quota</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of selling his quota of 5 bars on or before the 8th house is 0.17367
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
@ -353,14 +272,9 @@ Probability that Pat finishes on the 8th house is 0.077414
|
||||
<span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">nb</span><span class="special">,</span> <span class="number">10</span> <span class="special">-</span> <span class="identifier">sales_quota</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability that Pat finishes exactly on the 10th house is 0.10033
|
||||
Probability of selling his quota of 5 bars on or before the 10th house is 0.3669
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
@ -371,15 +285,10 @@ Probability of selling his quota of 5 bars on or before the 10th house is 0.3669
|
||||
<span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">nb</span><span class="special">,</span> <span class="number">11</span> <span class="special">-</span> <span class="identifier">sales_quota</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability that Pat finishes on the 11th house is 0.10033
|
||||
Probability of selling his quota of 5 candy bars
|
||||
on or before the 11th house is 0.46723
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
@ -391,23 +300,15 @@ on or before the 11th house is 0.46723
|
||||
<span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">nb</span><span class="special">,</span> <span class="number">12</span> <span class="special">-</span> <span class="identifier">sales_quota</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability that Pat finishes on the 12th house is 0.094596
|
||||
Probability of selling his quota of 5 candy bars
|
||||
on or before the 12th house is 0.56182
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Finally consider the risk of Pat not selling his quota of 5 bars
|
||||
even after visiting all the houses. Calculate the probability that
|
||||
he <span class="emphasis"><em>will</em></span> sell on or before the last house: Calculate
|
||||
the probability that he would sell all his quota on the very last
|
||||
house.
|
||||
</p>
|
||||
<p>
|
||||
Finally consider the risk of Pat not selling his quota of 5 bars even
|
||||
after visiting all the houses. Calculate the probability that he <span class="emphasis"><em>will</em></span>
|
||||
sell on or before the last house: Calculate the probability that he
|
||||
would sell all his quota on the very last house.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -416,31 +317,20 @@ on or before the 12th house is 0.56182
|
||||
<span class="special"><<</span> <span class="string">" house is "</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="identifier">all_houses</span> <span class="special">-</span> <span class="identifier">sales_quota</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Probability of selling his quota of 5 bars on the 30th house is
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability that Pat finishes on the 30 house is 0.00069145
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
when he'd be very unlucky indeed!
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
What is the probability that Pat exhausts all 30 houses in the neighborhood,
|
||||
and <span class="bold"><strong>still</strong></span> doesn't sell the required
|
||||
5 candy bars?
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"\nProbability of selling his quota of "</span> <span class="special"><<</span> <span class="identifier">sales_quota</span>
|
||||
@ -448,14 +338,9 @@ on or before the 12th house is 0.56182
|
||||
<span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">nb</span><span class="special">,</span> <span class="identifier">all_houses</span> <span class="special">-</span> <span class="identifier">sales_quota</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of selling his quota of 5 bars
|
||||
on or before the 30th house is 0.99849
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
/*<code class="computeroutput"><span class="identifier">So</span> <span class="identifier">the</span>
|
||||
<span class="identifier">risk</span> <span class="identifier">of</span>
|
||||
@ -470,14 +355,12 @@ on or before the 30th house is 0.99849
|
||||
<span class="identifier">But</span> <span class="keyword">using</span>
|
||||
<span class="keyword">this</span> <span class="identifier">expression</span>
|
||||
<span class="identifier">may</span> <span class="identifier">cause</span>
|
||||
<span class="identifier">serious</span> <span class="identifier">inaccuracy</span><span class="special">,</span> <span class="identifier">so</span>
|
||||
<span class="identifier">it</span> <span class="identifier">would</span>
|
||||
<span class="identifier">serious</span> <span class="identifier">inaccuracy</span><span class="special">,</span> <span class="identifier">so</span> <span class="identifier">it</span> <span class="identifier">would</span>
|
||||
<span class="identifier">be</span> <span class="identifier">much</span>
|
||||
<span class="identifier">better</span> <span class="identifier">to</span>
|
||||
<span class="identifier">use</span> <span class="identifier">the</span>
|
||||
<span class="identifier">complement</span> <span class="identifier">of</span>
|
||||
<span class="identifier">the</span> <span class="identifier">cdf</span><span class="special">:</span> <span class="identifier">So</span>
|
||||
<span class="identifier">the</span> <span class="identifier">risk</span>
|
||||
<span class="identifier">the</span> <span class="identifier">cdf</span><span class="special">:</span> <span class="identifier">So</span> <span class="identifier">the</span> <span class="identifier">risk</span>
|
||||
<span class="identifier">of</span> <span class="identifier">failing</span>
|
||||
<span class="identifier">even</span> <span class="identifier">at</span><span class="special">,</span> <span class="keyword">or</span> <span class="identifier">after</span><span class="special">,</span>
|
||||
<span class="identifier">the</span> <span class="number">31</span><span class="identifier">th</span> <span class="special">(</span><span class="identifier">non</span><span class="special">-</span><span class="identifier">existent</span><span class="special">)</span>
|
||||
@ -490,8 +373,6 @@ on or before the 30th house is 0.99849
|
||||
of the cdf. <a class="link" href="../../overview.html#why_complements">Why complements?</a>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"\nProbability of failing to sell his quota of "</span> <span class="special"><<</span> <span class="identifier">sales_quota</span>
|
||||
@ -499,34 +380,22 @@ on or before the 30th house is 0.99849
|
||||
<span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">nb</span><span class="special">,</span> <span class="identifier">all_houses</span> <span class="special">-</span> <span class="identifier">sales_quota</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of failing to sell his quota of 5 bars
|
||||
even after visiting all 30 houses is 0.0015101
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We can also use the quantile (percentile), the inverse of the cdf,
|
||||
to predict which house Pat will finish on. So for the 8th house:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">p</span> <span class="special">=</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">nb</span><span class="special">,</span> <span class="special">(</span><span class="number">8</span> <span class="special">-</span> <span class="identifier">sales_quota</span><span class="special">));</span>
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability of meeting sales quota on or before 8th house is "</span><span class="special"><<</span> <span class="identifier">p</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Probability of meeting sales quota on or before 8th house is 0.174
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
@ -536,20 +405,13 @@ even after visiting all 30 houses is 0.0015101
|
||||
<span class="identifier">cout</span><span class="special"><<</span> <span class="string">" quantile(nb, p) = "</span> <span class="special"><<</span> <span class="identifier">quantile</span><span class="special">(</span><span class="identifier">nb</span><span class="special">,</span> <span class="identifier">p</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">If the confidence of meeting sales quota is 0.17367, then the finishing house is 8
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Demanding absolute certainty that all 5 will be sold, implies an
|
||||
infinite number of trials. (Of course, there are only 30 houses on
|
||||
the estate, so he can't ever be <span class="bold"><strong>certain</strong></span>
|
||||
of selling his quota).
|
||||
</p>
|
||||
<p>
|
||||
Demanding absolute certainty that all 5 will be sold, implies an infinite
|
||||
number of trials. (Of course, there are only 30 houses on the estate,
|
||||
so he can't ever be <span class="bold"><strong>certain</strong></span> of selling
|
||||
his quota).
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -559,19 +421,12 @@ even after visiting all 30 houses is 0.0015101
|
||||
<span class="comment">// 1.#INF == infinity.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">If the confidence of meeting sales quota is 1, then the finishing house is 1.#INF
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
And similarly for a few other probabilities:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"If the confidence of meeting sales quota is "</span> <span class="special"><<</span> <span class="number">0.</span>
|
||||
@ -584,27 +439,18 @@ even after visiting all 30 houses is 0.0015101
|
||||
</span> <span class="special"><<</span> <span class="string">", then the finishing house is "</span> <span class="special"><<</span> <span class="identifier">quantile</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="number">0.00151</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">sales_quota</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">If the confidence of meeting sales quota is 0, then the finishing house is 5
|
||||
If the confidence of meeting sales quota is 0.5, then the finishing house is 11.337
|
||||
If the confidence of meeting sales quota is 0.99849, then the finishing house is 30
|
||||
</pre>
|
||||
<p>
|
||||
Notice that because we chose a discrete quantile policy of real, the
|
||||
result can be an 'unreal' fractional house.
|
||||
</p>
|
||||
<p>
|
||||
Notice that because we chose a discrete quantile policy of real,
|
||||
the result can be an 'unreal' fractional house.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
If the opposite is true, we don't want to assume any confidence,
|
||||
then this is tantamount to assuming that all the first sales_quota
|
||||
trials will be successful sales.
|
||||
</p>
|
||||
<p>
|
||||
If the opposite is true, we don't want to assume any confidence, then
|
||||
this is tantamount to assuming that all the first sales_quota trials
|
||||
will be successful sales.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -613,20 +459,13 @@ If the confidence of meeting sales quota is 0.99849, then the finishing house is
|
||||
<span class="string">", then finishing house is "</span> <span class="special"><<</span> <span class="identifier">sales_quota</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">If confidence of meeting quota is zero (we assume all houses are successful sales), then finishing house is 5
|
||||
If confidence of meeting quota is 0, then finishing house is 5
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We can list quantiles for a few probabilities:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"> <span class="keyword">double</span> <span class="identifier">ps</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span><span class="number">0.</span><span class="special">,</span> <span class="number">0.001</span><span class="special">,</span> <span class="number">0.01</span><span class="special">,</span> <span class="number">0.05</span><span class="special">,</span> <span class="number">0.1</span><span class="special">,</span> <span class="number">0.5</span><span class="special">,</span> <span class="number">0.9</span><span class="special">,</span> <span class="number">0.95</span><span class="special">,</span> <span class="number">0.99</span><span class="special">,</span> <span class="number">0.999</span><span class="special">,</span> <span class="number">1.</span><span class="special">};</span>
|
||||
@ -640,9 +479,6 @@ If confidence of meeting quota is 0, then finishing house is 5
|
||||
<span class="special">}</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">If confidence of meeting quota is 0, then finishing house is 5
|
||||
If confidence of meeting quota is 0.001, then finishing house is 5
|
||||
If confidence of meeting quota is 0.01, then finishing house is 5
|
||||
@ -655,15 +491,11 @@ If confidence of meeting quota is 0.99, then finishing house is 24.8
|
||||
If confidence of meeting quota is 0.999, then finishing house is 31.1
|
||||
If confidence of meeting quota is 1, then finishing house is 1.#INF
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We could have applied a ceil function to obtain a 'worst case' integer
|
||||
value for house.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">ceil</span><span class="special">(</span><span class="identifier">quantile</span><span class="special">(</span><span class="identifier">nb</span><span class="special">,</span> <span class="identifier">ps</span><span class="special">[</span><span class="identifier">i</span><span class="special">]))</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -675,31 +507,20 @@ If confidence of meeting quota is 1, then finishing house is 1.#INF
|
||||
we would have achieved the same effect.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The real result gives some suggestion which house is most likely.
|
||||
For example, compare the real and integer_outside for 95% confidence.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
The real result gives some suggestion which house is most likely. For
|
||||
example, compare the real and integer_outside for 95% confidence.
|
||||
</p>
|
||||
<pre class="programlisting">If confidence of meeting quota is 0.95, then finishing house is 20.1
|
||||
If confidence of meeting quota is 0.95, then finishing house is 21
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The real value 20.1 is much closer to 20 than 21, so integer_outside
|
||||
is pessimistic. We could also use integer_round_nearest policy to
|
||||
suggest that 20 is more likely.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Finally, we can tabulate the probability for the last sale being
|
||||
exactly on each house.
|
||||
is pessimistic. We could also use integer_round_nearest policy to suggest
|
||||
that 20 is more likely.
|
||||
</p>
|
||||
<p>
|
||||
Finally, we can tabulate the probability for the last sale being exactly
|
||||
on each house.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -713,9 +534,6 @@ If confidence of meeting quota is 0.95, then finishing house is 21
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">House for 5 th (last) sale. Probability (%)
|
||||
5 0.01024
|
||||
6 0.04096
|
||||
@ -744,15 +562,11 @@ If confidence of meeting quota is 0.95, then finishing house is 21
|
||||
29 0.9978
|
||||
30 0.99849
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
As noted above, using a catch block is always a good idea, even if
|
||||
you do not expect to use it.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="special">}</span>
|
||||
@ -760,8 +574,6 @@ If confidence of meeting quota is 0.95, then finishing house is 21
|
||||
<span class="special">{</span> <span class="comment">// Since we have set an overflow policy of ignore_error,
|
||||
</span> <span class="comment">// an overflow exception should never be thrown.
|
||||
</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"\nMessage from thrown exception was:\n "</span> <span class="special"><<</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">()</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -772,15 +584,10 @@ If confidence of meeting quota is 0.95, then finishing house is 21
|
||||
<p>
|
||||
for example, we would get:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Message from thrown exception was:
|
||||
Error in function boost::math::pdf(const negative_binomial_distribution<double>&, double):
|
||||
Number of failures argument is -1, but must be >= 0 !
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -17,16 +17,14 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.neg_binom_eg.negative_binomial_example2"></a><a class="link" href="negative_binomial_example2.html" title="Negative Binomial Table Printing Example.">
|
||||
Negative Binomial Table Printing Example.</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.neg_binom_eg.negative_binomial_example2"></a><a class="link" href="negative_binomial_example2.html" title="Negative Binomial Table Printing Example.">Negative
|
||||
Binomial Table Printing Example.</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
Example program showing output of a table of values of cdf and pdf
|
||||
for various k failures.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">// Print a table of values that can be used to plot
|
||||
@ -48,8 +46,6 @@
|
||||
<span class="special">}</span>
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -121,8 +117,6 @@
|
||||
<span class="number">62</span><span class="special">,</span> <span class="number">0.00029532382517950324</span> <span class="number">0.99857863176306016</span>
|
||||
<span class="number">63</span><span class="special">,</span> <span class="number">0.00024610318764958566</span> <span class="number">0.99882473495070978</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -20,8 +20,8 @@
|
||||
<a name="math_toolkit.dist.stat_tut.weg.normal_example"></a><a class="link" href="normal_example.html" title="Normal Distribution Examples">Normal
|
||||
Distribution Examples</a>
|
||||
</h5></div></div></div>
|
||||
<div class="toc"><dl><dt><span class="section"><a href="normal_example/normal_misc.html">
|
||||
Some Miscellaneous Examples of the Normal (Gaussian) Distribution</a></span></dt></dl></div>
|
||||
<div class="toc"><dl><dt><span class="section"><a href="normal_example/normal_misc.html">Some
|
||||
Miscellaneous Examples of the Normal (Gaussian) Distribution</a></span></dt></dl></div>
|
||||
<p>
|
||||
(See also the reference documentation for the <a class="link" href="../../dist_ref/dists/normal_dist.html" title="Normal (Gaussian) Distribution">Normal
|
||||
Distribution</a>.)
|
||||
|
@ -17,27 +17,23 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.normal_example.normal_misc"></a><a class="link" href="normal_misc.html" title="Some Miscellaneous Examples of the Normal (Gaussian) Distribution">
|
||||
Some Miscellaneous Examples of the Normal (Gaussian) Distribution</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.normal_example.normal_misc"></a><a class="link" href="normal_misc.html" title="Some Miscellaneous Examples of the Normal (Gaussian) Distribution">Some
|
||||
Miscellaneous Examples of the Normal (Gaussian) Distribution</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
The sample program <a href="../../../../../../../../example/normal_misc_examples.cpp" target="_top">normal_misc_examples.cpp</a>
|
||||
illustrates their use.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.normal_example.normal_misc.traditional_tables"></a><h5>
|
||||
<a name="id1049217"></a>
|
||||
<a name="id1050101"></a>
|
||||
<a class="link" href="normal_misc.html#math_toolkit.dist.stat_tut.weg.normal_example.normal_misc.traditional_tables">Traditional
|
||||
Tables</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
First we need some includes to access the normal distribution (and
|
||||
some std output of course).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</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">normal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> <span class="comment">// for normal_distribution
|
||||
@ -59,14 +55,10 @@
|
||||
<span class="special">{</span> <span class="comment">// Traditional tables and values.</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Let's start by printing some traditional tables.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">step</span> <span class="special">=</span> <span class="number">1.</span><span class="special">;</span> <span class="comment">// in z
|
||||
@ -79,14 +71,10 @@
|
||||
<span class="special"><<</span> <span class="string">", standard deviation = "</span> <span class="special"><<</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">standard_deviation</span><span class="special">()</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
First the probability distribution function (pdf).
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Probability distribution function values"</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
@ -101,12 +89,8 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
And the area under the normal curve from -∞ up to z, the cumulative
|
||||
distribution function (cdf).
|
||||
</p>
|
||||
<p>
|
||||
And the area under the normal curve from -∞ up to z, the cumulative distribution
|
||||
function (cdf).
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -125,19 +109,15 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
And all this you can do with a nanoscopic amount of work compared
|
||||
to the team of <span class="bold"><strong>human computers</strong></span> toiling
|
||||
with Milton Abramovitz and Irene Stegen at the US National Bureau
|
||||
of Standards (now <a href="http://www.nist.gov" target="_top">NIST</a>).
|
||||
Starting in 1938, their "Handbook of Mathematical Functions
|
||||
with Formulas, Graphs and Mathematical Tables", was eventually
|
||||
published in 1964, and has been reprinted numerous times since. (A
|
||||
major replacement is planned at <a href="http://dlmf.nist.gov" target="_top">Digital
|
||||
Library of Mathematical Functions</a>).
|
||||
</p>
|
||||
<p>
|
||||
And all this you can do with a nanoscopic amount of work compared to
|
||||
the team of <span class="bold"><strong>human computers</strong></span> toiling
|
||||
with Milton Abramovitz and Irene Stegen at the US National Bureau of
|
||||
Standards (now <a href="http://www.nist.gov" target="_top">NIST</a>). Starting
|
||||
in 1938, their "Handbook of Mathematical Functions with Formulas,
|
||||
Graphs and Mathematical Tables", was eventually published in 1964,
|
||||
and has been reprinted numerous times since. (A major replacement is
|
||||
planned at <a href="http://dlmf.nist.gov" target="_top">Digital Library of Mathematical
|
||||
Functions</a>).
|
||||
</p>
|
||||
<p>
|
||||
Pretty-printing a traditional 2-dimensional table is left as an exercise
|
||||
@ -145,8 +125,6 @@
|
||||
write
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">z</span> <span class="special">=</span> <span class="number">2.</span><span class="special">;</span>
|
||||
@ -154,22 +132,16 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Correspondingly, we can obtain the traditional 'critical' values
|
||||
for significance levels. For the 95% confidence level, the significance
|
||||
Correspondingly, we can obtain the traditional 'critical' values for
|
||||
significance levels. For the 95% confidence level, the significance
|
||||
level usually called alpha, is 0.05 = 1 - 0.95 (for a one-sided test),
|
||||
so we can write
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"> <span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"95% of area has a z below "</span> <span class="special"><<</span> <span class="identifier">quantile</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="number">0.95</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="comment">// 95% of area has a z below 1.64485</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -177,15 +149,11 @@
|
||||
a one-sided test)
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"> <span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"95% of area has a z between "</span> <span class="special"><<</span> <span class="identifier">quantile</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="number">0.975</span><span class="special">)</span>
|
||||
<span class="special"><<</span> <span class="string">" and "</span> <span class="special"><<</span> <span class="special">-</span><span class="identifier">quantile</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="number">0.975</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="comment">// 95% of area has a z between 1.95996 and -1.95996</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -193,29 +161,21 @@
|
||||
that the true occurrence frequency lies outside the calculated interval.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
It is convenient to have an alpha level for the probability that
|
||||
z lies outside just one standard deviation. This will not be some
|
||||
nice neat number like 0.05, but we can easily calculate it,
|
||||
</p>
|
||||
<p>
|
||||
It is convenient to have an alpha level for the probability that z
|
||||
lies outside just one standard deviation. This will not be some nice
|
||||
neat number like 0.05, but we can easily calculate it,
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">alpha1</span> <span class="special">=</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="special">-</span><span class="number">1</span><span class="special">)</span> <span class="special">*</span> <span class="number">2</span><span class="special">;</span> <span class="comment">// 0.3173105078629142
|
||||
</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">setprecision</span><span class="special">(</span><span class="number">17</span><span class="special">)</span> <span class="special"><<</span> <span class="string">"Significance level for z == 1 is "</span> <span class="special"><<</span> <span class="identifier">alpha1</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
and place in our array of favorite alpha values.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">alpha</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span><span class="number">0.3173105078629142</span><span class="special">,</span> <span class="comment">// z for 1 standard deviation.
|
||||
@ -223,15 +183,11 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Confidence value as % is (1 - alpha) * 100 (so alpha 0.05 == 95%
|
||||
confidence) that the true occurrence frequency lies <span class="bold"><strong>inside</strong></span>
|
||||
Confidence value as % is (1 - alpha) * 100 (so alpha 0.05 == 95% confidence)
|
||||
that the true occurrence frequency lies <span class="bold"><strong>inside</strong></span>
|
||||
the calculated interval.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"level of significance (alpha)"</span> <span class="special"><<</span> <span class="identifier">setprecision</span><span class="special">(</span><span class="number">4</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
@ -245,46 +201,34 @@
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Notice the distinction between one-sided (also called one-tailed)
|
||||
where we are using a > <span class="bold"><strong>or</strong></span> <
|
||||
test (and not both) and considering the area of the tail (integral)
|
||||
from z up to +∞, and a two-sided test where we are using two >
|
||||
<span class="bold"><strong>and</strong></span> < tests, and thus considering
|
||||
two tails, from -∞ up to z low and z high up to +∞.
|
||||
</p>
|
||||
<p>
|
||||
Notice the distinction between one-sided (also called one-tailed) where
|
||||
we are using a > <span class="bold"><strong>or</strong></span> < test (and
|
||||
not both) and considering the area of the tail (integral) from z up
|
||||
to +∞, and a two-sided test where we are using two > <span class="bold"><strong>and</strong></span>
|
||||
< tests, and thus considering two tails, from -∞ up to z low and z
|
||||
high up to +∞.
|
||||
</p>
|
||||
<p>
|
||||
So the 2-sided values alpha[i] are calculated using alpha[i]/2.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
If we consider a simple example of alpha = 0.05, then for a two-sided
|
||||
test, the lower tail area from -∞ up to -1.96 is 0.025 (alpha/2) and
|
||||
the upper tail area from +z up to +1.96 is also 0.025 (alpha/2),
|
||||
and the area between -1.96 up to 12.96 is alpha = 0.95. and the sum
|
||||
of the two tails is 0.025 + 0.025 = 0.05,
|
||||
</p>
|
||||
<p>
|
||||
the upper tail area from +z up to +1.96 is also 0.025 (alpha/2), and
|
||||
the area between -1.96 up to 12.96 is alpha = 0.95. and the sum of
|
||||
the two tails is 0.025 + 0.025 = 0.05,
|
||||
</p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.normal_example.normal_misc.standard_deviations_either_side_of_the_mean"></a><h5>
|
||||
<a name="id1051542"></a>
|
||||
<a name="id1052568"></a>
|
||||
<a class="link" href="normal_misc.html#math_toolkit.dist.stat_tut.weg.normal_example.normal_misc.standard_deviations_either_side_of_the_mean">Standard
|
||||
deviations either side of the Mean</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Armed with the cumulative distribution function, we can easily calculate
|
||||
the easy to remember proportion of values that lie within 1, 2 and
|
||||
3 standard deviations from the mean.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span><span class="special">.</span><span class="identifier">precision</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
|
||||
@ -300,69 +244,49 @@
|
||||
<span class="special"><<</span> <span class="number">1</span> <span class="special">-</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span> <span class="number">3</span> <span class="special">*</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">standard_deviation</span><span class="special">()))</span> <span class="special">*</span> <span class="number">2</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
To a useful precision, the 1, 2 & 3 percentages are 68, 95 and
|
||||
99.7, and these are worth memorising as useful 'rules of thumb',
|
||||
as, for example, in <a href="http://en.wikipedia.org/wiki/Standard_deviation" target="_top">standard
|
||||
99.7, and these are worth memorising as useful 'rules of thumb', as,
|
||||
for example, in <a href="http://en.wikipedia.org/wiki/Standard_deviation" target="_top">standard
|
||||
deviation</a>:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting">Fraction 1 standard deviation within either side of mean is 0.683
|
||||
Fraction 2 standard deviations within either side of mean is 0.954
|
||||
Fraction 3 standard deviations within either side of mean is 0.997
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
We could of course get some really accurate values for these <a href="http://en.wikipedia.org/wiki/Confidence_interval" target="_top">confidence
|
||||
intervals</a> by using cout.precision(15);
|
||||
</p>
|
||||
<p>
|
||||
|
||||
We could of course get some really accurate values for these <a href="http://en.wikipedia.org/wiki/Confidence_interval" target="_top">confidence intervals</a>
|
||||
by using cout.precision(15);
|
||||
</p>
|
||||
<pre class="programlisting">Fraction 1 standard deviation within either side of mean is 0.682689492137086
|
||||
Fraction 2 standard deviations within either side of mean is 0.954499736103642
|
||||
Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
But before you get too excited about this impressive precision, don't
|
||||
forget that the <span class="bold"><strong>confidence intervals of the
|
||||
standard deviation</strong></span> are surprisingly wide, especially if
|
||||
you have estimated the standard deviation from only a few measurements.
|
||||
</p>
|
||||
<p>
|
||||
forget that the <span class="bold"><strong>confidence intervals of the standard
|
||||
deviation</strong></span> are surprisingly wide, especially if you have
|
||||
estimated the standard deviation from only a few measurements.
|
||||
</p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.normal_example.normal_misc.some_simple_examples"></a><h5>
|
||||
<a name="id1052066"></a>
|
||||
<a name="id1053089"></a>
|
||||
<a class="link" href="normal_misc.html#math_toolkit.dist.stat_tut.weg.normal_example.normal_misc.some_simple_examples">Some
|
||||
simple examples</a>
|
||||
</h5>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.normal_example.normal_misc.life_of_light_bulbs"></a><h5>
|
||||
<a name="id1052079"></a>
|
||||
<a name="id1053102"></a>
|
||||
<a class="link" href="normal_misc.html#math_toolkit.dist.stat_tut.weg.normal_example.normal_misc.life_of_light_bulbs">Life
|
||||
of light bulbs</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Examples from K. Krishnamoorthy, Handbook of Statistical Distributions
|
||||
with Applications, ISBN 1 58488 635 8, page 125... implemented using
|
||||
the Math Toolkit library.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
A few very simple examples are shown here:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">// K. Krishnamoorthy, Handbook of Statistical Distributions with Applications,
|
||||
@ -370,24 +294,18 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Mean lifespan of 100 W bulbs is 1100 h with standard deviation of
|
||||
100 h. Assuming, perhaps with little evidence and much faith, that
|
||||
the distribution is normal, we construct a normal distribution called
|
||||
Mean lifespan of 100 W bulbs is 1100 h with standard deviation of 100
|
||||
h. Assuming, perhaps with little evidence and much faith, that the
|
||||
distribution is normal, we construct a normal distribution called
|
||||
<span class="emphasis"><em>bulbs</em></span> with these values:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">mean_life</span> <span class="special">=</span> <span class="number">1100.</span><span class="special">;</span>
|
||||
<span class="keyword">double</span> <span class="identifier">life_standard_deviation</span> <span class="special">=</span> <span class="number">100.</span><span class="special">;</span>
|
||||
<span class="identifier">normal</span> <span class="identifier">bulbs</span><span class="special">(</span><span class="identifier">mean_life</span><span class="special">,</span> <span class="identifier">life_standard_deviation</span><span class="special">);</span>
|
||||
<span class="keyword">double</span> <span class="identifier">expected_life</span> <span class="special">=</span> <span class="number">1000.</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -395,8 +313,6 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
(or percentages, if * 100) that will last various lifetimes.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Fraction of bulbs that will last at best (<=) "</span> <span class="comment">// P(X <= 1000)
|
||||
@ -409,8 +325,6 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
<span class="special"><<</span> <span class="identifier">min_life</span> <span class="special"><<</span> <span class="string">" and "</span> <span class="special"><<</span> <span class="identifier">max_life</span> <span class="special"><<</span> <span class="string">" is "</span>
|
||||
<span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">bulbs</span><span class="special">,</span> <span class="identifier">max_life</span><span class="special">)</span> <span class="comment">// P(X <= 1200)
|
||||
</span> <span class="special">-</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">bulbs</span><span class="special">,</span> <span class="identifier">min_life</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// P(X <= 900)</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="note"><table border="0" summary="Note">
|
||||
@ -419,28 +333,22 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
<th align="left">Note</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
Real-life failures are often very ab-normal, with a significant
|
||||
number that 'dead-on-arrival' or suffer failure very early in their
|
||||
life: the lifetime of the survivors of 'early mortality' may be
|
||||
well described by the normal distribution.
|
||||
Real-life failures are often very ab-normal, with a significant number
|
||||
that 'dead-on-arrival' or suffer failure very early in their life:
|
||||
the lifetime of the survivors of 'early mortality' may be well described
|
||||
by the normal distribution.
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<p>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.normal_example.normal_misc.how_many_onions_"></a><h5>
|
||||
<a name="id1052590"></a>
|
||||
<a name="id1053610"></a>
|
||||
<a class="link" href="normal_misc.html#math_toolkit.dist.stat_tut.weg.normal_example.normal_misc.how_many_onions_">How
|
||||
many onions?</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Weekly demand for 5 lb sacks of onions at a store is normally distributed
|
||||
with mean 140 sacks and standard deviation 10.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">mean</span> <span class="special">=</span> <span class="number">140.</span><span class="special">;</span> <span class="comment">// sacks per week.
|
||||
@ -451,8 +359,6 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Percentage of weeks overstocked "</span>
|
||||
<span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">sacks</span><span class="special">,</span> <span class="identifier">stock</span><span class="special">)</span> <span class="special">*</span> <span class="number">100.</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// P(X <=160)
|
||||
</span><span class="comment">// Percentage of weeks overstocked 97.7</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -460,14 +366,10 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
what stock level will meet demand 95% of the weeks.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">stock_95</span> <span class="special">=</span> <span class="identifier">quantile</span><span class="special">(</span><span class="identifier">sacks</span><span class="special">,</span> <span class="number">0.95</span><span class="special">);</span>
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Store should stock "</span> <span class="special"><<</span> <span class="keyword">int</span><span class="special">(</span><span class="identifier">stock_95</span><span class="special">)</span> <span class="special"><<</span> <span class="string">" sacks to meet 95% of demands."</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -475,32 +377,24 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
less.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">stock_80</span> <span class="special">=</span> <span class="identifier">quantile</span><span class="special">(</span><span class="identifier">sacks</span><span class="special">,</span> <span class="number">0.80</span><span class="special">);</span>
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Store should stock "</span> <span class="special"><<</span> <span class="keyword">int</span><span class="special">(</span><span class="identifier">stock_80</span><span class="special">)</span> <span class="special"><<</span> <span class="string">" sacks to meet 8 out of 10 demands."</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.normal_example.normal_misc.packing_beef"></a><h5>
|
||||
<a name="id1054946"></a>
|
||||
<a name="id1054025"></a>
|
||||
<a class="link" href="normal_misc.html#math_toolkit.dist.stat_tut.weg.normal_example.normal_misc.packing_beef">Packing
|
||||
beef</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
A machine is set to pack 3 kg of ground beef per pack. Over a long
|
||||
period of time it is found that the average packed was 3 kg with
|
||||
a standard deviation of 0.1 kg. Assuming the packing is normally
|
||||
distributed, we can find the fraction (or %) of packages that weigh
|
||||
more than 3.1 kg.
|
||||
</p>
|
||||
<p>
|
||||
period of time it is found that the average packed was 3 kg with a
|
||||
standard deviation of 0.1 kg. Assuming the packing is normally distributed,
|
||||
we can find the fraction (or %) of packages that weigh more than 3.1
|
||||
kg.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -537,33 +431,23 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
<span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">nominal_packs</span><span class="special">,</span> <span class="identifier">under_weight</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Setting the packer to 3.06449 will mean that fraction of packs >=
|
||||
2.9 is 0.95.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Setting the packer to 3.13263 will mean that fraction of packs >=
|
||||
2.9 is 0.99, but will more than double the mean loss from 0.0644
|
||||
to 0.133.
|
||||
2.9 is 0.99, but will more than double the mean loss from 0.0644 to
|
||||
0.133.
|
||||
</p>
|
||||
<p>
|
||||
Alternatively, we could invest in a better (more precise) packer with
|
||||
a lower standard deviation.
|
||||
</p>
|
||||
<p>
|
||||
Alternatively, we could invest in a better (more precise) packer
|
||||
with a lower standard deviation.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
To estimate how much better (how much smaller standard deviation)
|
||||
it would have to be, we need to get the 5% quantile to be located
|
||||
at the under_weight limit, 2.9
|
||||
</p>
|
||||
<p>
|
||||
To estimate how much better (how much smaller standard deviation) it
|
||||
would have to be, we need to get the 5% quantile to be located at the
|
||||
under_weight limit, 2.9
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -573,25 +457,17 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
<span class="special"><<</span> <span class="string">", mean = "</span> <span class="special"><<</span> <span class="identifier">packs</span><span class="special">.</span><span class="identifier">mean</span><span class="special">()</span> <span class="special"><<</span> <span class="string">", sd = "</span> <span class="special"><<</span> <span class="identifier">packs</span><span class="special">.</span><span class="identifier">standard_deviation</span><span class="special">()</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">//</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Quantile of 0.05 = 2.83551, mean = 3, sd = 0.1
|
||||
</p>
|
||||
<p>
|
||||
With the current packer (mean = 3, sd = 0.1), the 5% quantile is at
|
||||
2.8551 kg, a little below our target of 2.9 kg. So we know that the
|
||||
standard deviation is going to have to be smaller.
|
||||
</p>
|
||||
<p>
|
||||
With the current packer (mean = 3, sd = 0.1), the 5% quantile is
|
||||
at 2.8551 kg, a little below our target of 2.9 kg. So we know that
|
||||
the standard deviation is going to have to be smaller.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Let's start by guessing that it (now 0.1) needs to be halved, to
|
||||
a standard deviation of 0.05
|
||||
</p>
|
||||
<p>
|
||||
Let's start by guessing that it (now 0.1) needs to be halved, to a
|
||||
standard deviation of 0.05
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -604,8 +480,6 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
<span class="special"><<</span> <span class="string">" and standard deviation of "</span> <span class="special"><<</span> <span class="identifier">pack05</span><span class="special">.</span><span class="identifier">standard_deviation</span><span class="special">()</span>
|
||||
<span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">pack05</span><span class="special">,</span> <span class="identifier">under_weight</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="comment">//</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -613,13 +487,9 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
of 0.05 is 0.9772
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
So 0.05 was quite a good guess, but we are a little over the 2.9
|
||||
target, so the standard deviation could be a tiny bit more. So we
|
||||
could do some more guessing to get closer, say by increasing to 0.06
|
||||
</p>
|
||||
<p>
|
||||
So 0.05 was quite a good guess, but we are a little over the 2.9 target,
|
||||
so the standard deviation could be a tiny bit more. So we could do
|
||||
some more guessing to get closer, say by increasing to 0.06
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -633,29 +503,21 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
<span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">pack06</span><span class="special">,</span> <span class="identifier">under_weight</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Fraction of packs >= 2.9 with a mean of 3 and standard deviation
|
||||
of 0.06 is 0.9522
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Now we are getting really close, but to do the job properly, we could
|
||||
use root finding method, for example the tools provided, and used
|
||||
elsewhere, in the Math Toolkit, see <a class="link" href="../../../../toolkit/internals1/roots2.html" title="Root Finding Without Derivatives">Root
|
||||
use root finding method, for example the tools provided, and used elsewhere,
|
||||
in the Math Toolkit, see <a class="link" href="../../../../toolkit/internals1/roots2.html" title="Root Finding Without Derivatives">Root
|
||||
Finding Without Derivatives</a>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
But in this normal distribution case, we could be even smarter and
|
||||
make a direct calculation.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">normal</span> <span class="identifier">s</span><span class="special">;</span> <span class="comment">// For standard normal distribution,
|
||||
@ -681,8 +543,6 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
<span class="special"><<</span> <span class="string">" is "</span> <span class="special"><<</span> <span class="identifier">cdf</span><span class="special">(</span><span class="identifier">complement</span><span class="special">(</span><span class="identifier">pack95</span><span class="special">,</span> <span class="identifier">under_weight</span><span class="special">))</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
|
||||
<span class="comment">// Fraction of packs >= 2.9 with a mean of 3 and standard deviation of 0.0608 is 0.95</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
@ -693,23 +553,17 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
almost always less good than we might wish, especially if based on
|
||||
a few measurements.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.normal_example.normal_misc.length_of_bolts"></a><h5>
|
||||
<a name="id1057291"></a>
|
||||
<a name="id1057478"></a>
|
||||
<a class="link" href="normal_misc.html#math_toolkit.dist.stat_tut.weg.normal_example.normal_misc.length_of_bolts">Length
|
||||
of bolts</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
A bolt is usable if between 3.9 and 4.1 long. From a large batch
|
||||
of bolts, a sample of 50 show a mean length of 3.95 with standard
|
||||
deviation 0.1. Assuming a normal distribution, what proportion is
|
||||
usable? The true sample mean is unknown, but we can use the sample
|
||||
mean and standard deviation to find approximate solutions.
|
||||
</p>
|
||||
<p>
|
||||
A bolt is usable if between 3.9 and 4.1 long. From a large batch of
|
||||
bolts, a sample of 50 show a mean length of 3.95 with standard deviation
|
||||
0.1. Assuming a normal distribution, what proportion is usable? The
|
||||
true sample mean is unknown, but we can use the sample mean and standard
|
||||
deviation to find approximate solutions.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -730,8 +584,6 @@ Fraction 3 standard deviations within either side of mean is 0.997300203936740
|
||||
<span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"95% of bolts are shorter than "</span> <span class="special"><<</span> <span class="identifier">quantile</span><span class="special">(</span><span class="identifier">bolts</span><span class="special">,</span> <span class="number">0.95</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
|
||||
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -17,21 +17,21 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h5 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.st_eg"></a><a class="link" href="st_eg.html" title="Student's t Distribution Examples"> Student's
|
||||
t Distribution Examples</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.st_eg"></a><a class="link" href="st_eg.html" title="Student's t Distribution Examples">Student's t
|
||||
Distribution Examples</a>
|
||||
</h5></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="st_eg/tut_mean_intervals.html">
|
||||
Calculating confidence intervals on the mean with the Students-t distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="st_eg/tut_mean_test.html">
|
||||
Testing a sample mean for difference from a "true" mean</a></span></dt>
|
||||
<dt><span class="section"><a href="st_eg/tut_mean_size.html">
|
||||
Estimating how large a sample size would have to become in order to give
|
||||
a significant Students-t test result with a single sample test</a></span></dt>
|
||||
<dt><span class="section"><a href="st_eg/two_sample_students_t.html">
|
||||
Comparing the means of two samples with the Students-t test</a></span></dt>
|
||||
<dt><span class="section"><a href="st_eg/paired_st.html">
|
||||
Comparing two paired samples with the Student's t distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="st_eg/tut_mean_intervals.html">Calculating
|
||||
confidence intervals on the mean with the Students-t distribution</a></span></dt>
|
||||
<dt><span class="section"><a href="st_eg/tut_mean_test.html">Testing
|
||||
a sample mean for difference from a "true" mean</a></span></dt>
|
||||
<dt><span class="section"><a href="st_eg/tut_mean_size.html">Estimating
|
||||
how large a sample size would have to become in order to give a significant
|
||||
Students-t test result with a single sample test</a></span></dt>
|
||||
<dt><span class="section"><a href="st_eg/two_sample_students_t.html">Comparing
|
||||
the means of two samples with the Students-t test</a></span></dt>
|
||||
<dt><span class="section"><a href="st_eg/paired_st.html">Comparing
|
||||
two paired samples with the Student's t distribution</a></span></dt>
|
||||
</dl></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.st_eg.paired_st"></a><a class="link" href="paired_st.html" title="Comparing two paired samples with the Student's t distribution">
|
||||
Comparing two paired samples with the Student's t distribution</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.st_eg.paired_st"></a><a class="link" href="paired_st.html" title="Comparing two paired samples with the Student's t distribution">Comparing
|
||||
two paired samples with the Student's t distribution</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
Imagine that we have a before and after reading for each item in the
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.st_eg.tut_mean_intervals"></a><a class="link" href="tut_mean_intervals.html" title="Calculating confidence intervals on the mean with the Students-t distribution">
|
||||
Calculating confidence intervals on the mean with the Students-t distribution</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.st_eg.tut_mean_intervals"></a><a class="link" href="tut_mean_intervals.html" title="Calculating confidence intervals on the mean with the Students-t distribution">Calculating
|
||||
confidence intervals on the mean with the Students-t distribution</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
Let's say you have a sample mean, you may wish to know what confidence
|
||||
|
@ -17,9 +17,9 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.st_eg.tut_mean_size"></a><a class="link" href="tut_mean_size.html" title="Estimating how large a sample size would have to become in order to give a significant Students-t test result with a single sample test">
|
||||
Estimating how large a sample size would have to become in order to give
|
||||
a significant Students-t test result with a single sample test</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.st_eg.tut_mean_size"></a><a class="link" href="tut_mean_size.html" title="Estimating how large a sample size would have to become in order to give a significant Students-t test result with a single sample test">Estimating
|
||||
how large a sample size would have to become in order to give a significant
|
||||
Students-t test result with a single sample test</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
Imagine you have conducted a Students-t test on a single sample in
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.st_eg.tut_mean_test"></a><a class="link" href="tut_mean_test.html" title='Testing a sample mean for difference from a "true" mean'>
|
||||
Testing a sample mean for difference from a "true" mean</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.st_eg.tut_mean_test"></a><a class="link" href="tut_mean_test.html" title='Testing a sample mean for difference from a "true" mean'>Testing
|
||||
a sample mean for difference from a "true" mean</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
When calibrating or comparing a scientific instrument or measurement
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h6 class="title">
|
||||
<a name="math_toolkit.dist.stat_tut.weg.st_eg.two_sample_students_t"></a><a class="link" href="two_sample_students_t.html" title="Comparing the means of two samples with the Students-t test">
|
||||
Comparing the means of two samples with the Students-t test</a>
|
||||
<a name="math_toolkit.dist.stat_tut.weg.st_eg.two_sample_students_t"></a><a class="link" href="two_sample_students_t.html" title="Comparing the means of two samples with the Students-t test">Comparing
|
||||
the means of two samples with the Students-t test</a>
|
||||
</h6></div></div></div>
|
||||
<p>
|
||||
Imagine that we have two samples, and we wish to determine whether
|
||||
|
@ -25,8 +25,8 @@
|
||||
<dt><span class="section"><a href="main_overview/directories.html">Directory and
|
||||
File Structure</a></span></dt>
|
||||
<dt><span class="section"><a href="main_overview/namespaces.html">Namespaces</a></span></dt>
|
||||
<dt><span class="section"><a href="main_overview/result_type.html"> Calculation
|
||||
of the Type of the Result</a></span></dt>
|
||||
<dt><span class="section"><a href="main_overview/result_type.html">Calculation of
|
||||
the Type of the Result</a></span></dt>
|
||||
<dt><span class="section"><a href="main_overview/error_handling.html">Error Handling</a></span></dt>
|
||||
<dt><span class="section"><a href="main_overview/compilers_overview.html">Compilers</a></span></dt>
|
||||
<dt><span class="section"><a href="main_overview/pol_overview.html">Configuration
|
||||
@ -41,10 +41,6 @@
|
||||
<dt><span class="section"><a href="main_overview/contact.html">Contact Info and
|
||||
Support</a></span></dt>
|
||||
</dl></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -21,7 +21,7 @@
|
||||
the Library and its Examples and Tests</a>
|
||||
</h3></div></div></div>
|
||||
<a name="math_toolkit.main_overview.building.building_the_library"></a><h5>
|
||||
<a name="id984428"></a>
|
||||
<a name="id986560"></a>
|
||||
<a class="link" href="building.html#math_toolkit.main_overview.building.building_the_library">Building
|
||||
the Library</a>
|
||||
</h5>
|
||||
@ -85,7 +85,7 @@
|
||||
building the sources. Boost.Build will do this automatically when appropriate.
|
||||
</p>
|
||||
<a name="math_toolkit.main_overview.building.building_the_examples"></a><h5>
|
||||
<a name="id984872"></a>
|
||||
<a name="id987004"></a>
|
||||
<a class="link" href="building.html#math_toolkit.main_overview.building.building_the_examples">Building
|
||||
the Examples</a>
|
||||
</h5>
|
||||
@ -96,7 +96,7 @@
|
||||
the Boost headers are in your compilers #include search path.
|
||||
</p>
|
||||
<a name="math_toolkit.main_overview.building.building_the_tests"></a><h5>
|
||||
<a name="id984914"></a>
|
||||
<a name="id987046"></a>
|
||||
<a class="link" href="building.html#math_toolkit.main_overview.building.building_the_tests">Building
|
||||
the Tests</a>
|
||||
</h5>
|
||||
|
@ -20,17 +20,13 @@
|
||||
<a name="math_toolkit.main_overview.compilers_overview"></a><a class="link" href="compilers_overview.html" title="Compilers">Compilers</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
This section contains some information about how various compilers work
|
||||
with this library. It is not comprehensive and updated experiences are
|
||||
always welcome. Some effort has been made to suppress unhelpful warnings
|
||||
but it is difficult to achieve this on all systems.
|
||||
</p>
|
||||
<p>
|
||||
This section contains some information about how various compilers work with
|
||||
this library. It is not comprehensive and updated experiences are always
|
||||
welcome. Some effort has been made to suppress unhelpful warnings but it
|
||||
is difficult to achieve this on all systems.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id983233"></a><p class="title"><b>Table 9. Supported/Tested Compilers</b></p>
|
||||
<a name="id985372"></a><p class="title"><b>Table 9. Supported/Tested Compilers</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Supported/Tested Compilers">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -82,8 +78,7 @@
|
||||
All tests OK.
|
||||
</p>
|
||||
<p>
|
||||
We aim to keep our headers warning free at level 4 with this
|
||||
compiler.
|
||||
We aim to keep our headers warning free at level 4 with this compiler.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -108,10 +103,9 @@
|
||||
All tests OK.
|
||||
</p>
|
||||
<p>
|
||||
We aim to keep our headers warning free at level 4 with this
|
||||
compiler. However, The tests cases tend to generate a lot of
|
||||
warnings relating to numeric underflow of the test data: these
|
||||
are harmless.
|
||||
We aim to keep our headers warning free at level 4 with this compiler.
|
||||
However, The tests cases tend to generate a lot of warnings relating
|
||||
to numeric underflow of the test data: these are harmless.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -136,8 +130,7 @@
|
||||
All tests OK.
|
||||
</p>
|
||||
<p>
|
||||
We aim to keep our headers warning free with -Wall with this
|
||||
compiler.
|
||||
We aim to keep our headers warning free with -Wall with this compiler.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -162,8 +155,7 @@
|
||||
All tests OK.
|
||||
</p>
|
||||
<p>
|
||||
We aim to keep our headers warning free with -Wall with this
|
||||
compiler.
|
||||
We aim to keep our headers warning free with -Wall with this compiler.
|
||||
</p>
|
||||
<p>
|
||||
Long double support has been disabled because there are no native
|
||||
@ -192,10 +184,10 @@
|
||||
We have only partial compatability with this compiler:
|
||||
</p>
|
||||
<p>
|
||||
Long double support has been disabled because the native long
|
||||
double C standard library functions really only forward to the
|
||||
double versions. This can result in unpredictable behaviour when
|
||||
using the long double overloads: for example <code class="computeroutput"><span class="identifier">sqrtl</span></code>
|
||||
Long double support has been disabled because the native long double
|
||||
C standard library functions really only forward to the double
|
||||
versions. This can result in unpredictable behaviour when using
|
||||
the long double overloads: for example <code class="computeroutput"><span class="identifier">sqrtl</span></code>
|
||||
applied to a finite value, can result in an infinite result.
|
||||
</p>
|
||||
<p>
|
||||
@ -225,8 +217,7 @@
|
||||
All tests OK.
|
||||
</p>
|
||||
<p>
|
||||
We aim to keep our headers warning free with -Wall with this
|
||||
compiler.
|
||||
We aim to keep our headers warning free with -Wall with this compiler.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -251,10 +242,9 @@
|
||||
All tests OK.
|
||||
</p>
|
||||
<p>
|
||||
We aim to keep our headers warning free with -Wall with this
|
||||
compiler. However, The tests cases tend to generate a lot of
|
||||
warnings relating to numeric underflow of the test data: these
|
||||
are harmless.
|
||||
We aim to keep our headers warning free with -Wall with this compiler.
|
||||
However, The tests cases tend to generate a lot of warnings relating
|
||||
to numeric underflow of the test data: these are harmless.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -281,18 +271,17 @@
|
||||
<p>
|
||||
Long double support has been disabled with these compiler releases
|
||||
because calling the standard library long double math functions
|
||||
can result in a segfault. The issue is Linux distribution and
|
||||
glibc version specific and is Intel bug report #409291. Fully
|
||||
up to date releases of Intel 9.1 (post version l_cc_c_9.1.046)
|
||||
shouldn't have this problem. If you need long double support
|
||||
with this compiler, then comment out the define of BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
can result in a segfault. The issue is Linux distribution and glibc
|
||||
version specific and is Intel bug report #409291. Fully up to date
|
||||
releases of Intel 9.1 (post version l_cc_c_9.1.046) shouldn't have
|
||||
this problem. If you need long double support with this compiler,
|
||||
then comment out the define of BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
at line 55 of <a href="../../../../../../../boost/math/tools/config.hpp" target="_top">boost/math/tools/config.hpp</a>.
|
||||
</p>
|
||||
<p>
|
||||
We aim to keep our headers warning free with -Wall with this
|
||||
compiler. However, The tests cases tend to generate a lot of
|
||||
warnings relating to numeric underflow of the test data: these
|
||||
are harmless.
|
||||
We aim to keep our headers warning free with -Wall with this compiler.
|
||||
However, The tests cases tend to generate a lot of warnings relating
|
||||
to numeric underflow of the test data: these are harmless.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -386,8 +375,7 @@
|
||||
All tests OK.
|
||||
</p>
|
||||
<p>
|
||||
We aim to keep our headers warning free with -Wall with this
|
||||
compiler.
|
||||
We aim to keep our headers warning free with -Wall with this compiler.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -504,8 +492,8 @@
|
||||
All tests OK.
|
||||
</p>
|
||||
<p>
|
||||
Long double support has been disabled on this platform due to
|
||||
the rather strange nature of Darwin's 106-bit long double implementation.
|
||||
Long double support has been disabled on this platform due to the
|
||||
rather strange nature of Darwin's 106-bit long double implementation.
|
||||
It should be possible to make this work if someone is prepared
|
||||
to offer assistance.
|
||||
</p>
|
||||
@ -529,20 +517,18 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
All tests pass except for our fpclassify tests which fail due
|
||||
to a bug in <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span></code>,
|
||||
the bug effects the test code, not fpclassify itself. The IBM
|
||||
compiler group are aware of the problem.
|
||||
All tests pass except for our fpclassify tests which fail due to
|
||||
a bug in <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span></code>, the bug effects
|
||||
the test code, not fpclassify itself. The IBM compiler group are
|
||||
aware of the problem.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p><br class="table-break">
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id983946"></a><p class="title"><b>Table 10. Unsupported Compilers</b></p>
|
||||
<br class="table-break"><div class="table">
|
||||
<a name="id986085"></a><p class="title"><b>Table 10. Unsupported Compilers</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Unsupported Compilers">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -588,30 +574,21 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p><br class="table-break">
|
||||
</p>
|
||||
<p>
|
||||
If you're compiler or platform is not listed above, please try running
|
||||
the regression tests: cd into boost-root/libs/math/test and do a:
|
||||
</p>
|
||||
<p>
|
||||
|
||||
<br class="table-break"><p>
|
||||
If you're compiler or platform is not listed above, please try running the
|
||||
regression tests: cd into boost-root/libs/math/test and do a:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">mytoolset</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
where "mytoolset" is the name of the <a href="../../../../../../../tools/build/index.html" target="_top">Boost.Build</a>
|
||||
toolset used for your compiler. The chances are that <span class="bold"><strong>many
|
||||
of the accuracy tests will fail at this stage</strong></span> - don't panic
|
||||
- the default acceptable error tolerances are quite tight, especially for
|
||||
long double types with an extended exponent range (these cause more extreme
|
||||
test cases to be executed for some functions). You will need to cast an
|
||||
eye over the output from the failing tests and make a judgement as to whether
|
||||
the error rates are acceptable or not.
|
||||
</p>
|
||||
<p>
|
||||
of the accuracy tests will fail at this stage</strong></span> - don't panic -
|
||||
the default acceptable error tolerances are quite tight, especially for long
|
||||
double types with an extended exponent range (these cause more extreme test
|
||||
cases to be executed for some functions). You will need to cast an eye over
|
||||
the output from the failing tests and make a judgement as to whether the
|
||||
error rates are acceptable or not.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
|
@ -21,7 +21,7 @@
|
||||
File Structure</a>
|
||||
</h3></div></div></div>
|
||||
<a name="math_toolkit.main_overview.directories.boost_math"></a><h5>
|
||||
<a name="id969434"></a>
|
||||
<a name="id970644"></a>
|
||||
<a class="link" href="directories.html#math_toolkit.main_overview.directories.boost_math">boost/math</a>
|
||||
</h5>
|
||||
<div class="variablelist">
|
||||
@ -66,7 +66,7 @@
|
||||
</dl>
|
||||
</div>
|
||||
<a name="math_toolkit.main_overview.directories.boost_libs"></a><h5>
|
||||
<a name="id977353"></a>
|
||||
<a name="id979541"></a>
|
||||
<a class="link" href="directories.html#math_toolkit.main_overview.directories.boost_libs">boost/libs</a>
|
||||
</h5>
|
||||
<div class="variablelist">
|
||||
|
@ -20,7 +20,7 @@
|
||||
<a name="math_toolkit.main_overview.error_handling"></a><a class="link" href="error_handling.html" title="Error Handling">Error Handling</a>
|
||||
</h3></div></div></div>
|
||||
<a name="math_toolkit.main_overview.error_handling.quick_reference"></a><h5>
|
||||
<a name="id978287"></a>
|
||||
<a name="id980471"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling.quick_reference">Quick
|
||||
Reference</a>
|
||||
</h5>
|
||||
@ -127,7 +127,7 @@
|
||||
the default action for each error shown in bold:
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id978549"></a><p class="title"><b>Table 1. Possible Actions for Domain Errors</b></p>
|
||||
<a name="id980733"></a><p class="title"><b>Table 1. Possible Actions for Domain Errors</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Possible Actions for Domain Errors">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -202,7 +202,7 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><div class="table">
|
||||
<a name="id978795"></a><p class="title"><b>Table 2. Possible Actions for Pole Errors</b></p>
|
||||
<a name="id980979"></a><p class="title"><b>Table 2. Possible Actions for Pole Errors</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Possible Actions for Pole Errors">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -277,7 +277,7 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><div class="table">
|
||||
<a name="id979041"></a><p class="title"><b>Table 3. Possible Actions for Overflow Errors</b></p>
|
||||
<a name="id981225"></a><p class="title"><b>Table 3. Possible Actions for Overflow Errors</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Possible Actions for Overflow Errors">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -352,7 +352,7 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><div class="table">
|
||||
<a name="id979287"></a><p class="title"><b>Table 4. Possible Actions for Underflow Errors</b></p>
|
||||
<a name="id981471"></a><p class="title"><b>Table 4. Possible Actions for Underflow Errors</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Possible Actions for Underflow Errors">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -427,7 +427,7 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><div class="table">
|
||||
<a name="id979468"></a><p class="title"><b>Table 5. Possible Actions for Denorm Errors</b></p>
|
||||
<a name="id981652"></a><p class="title"><b>Table 5. Possible Actions for Denorm Errors</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Possible Actions for Denorm Errors">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -502,7 +502,7 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><div class="table">
|
||||
<a name="id979650"></a><p class="title"><b>Table 6. Possible Actions for Rounding Errors</b></p>
|
||||
<a name="id981834"></a><p class="title"><b>Table 6. Possible Actions for Rounding Errors</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Possible Actions for Rounding Errors">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -577,7 +577,7 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><div class="table">
|
||||
<a name="id979838"></a><p class="title"><b>Table 7. Possible Actions for Internal Evaluation Errors</b></p>
|
||||
<a name="id982022"></a><p class="title"><b>Table 7. Possible Actions for Internal Evaluation Errors</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Possible Actions for Internal Evaluation Errors">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -652,7 +652,7 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><div class="table">
|
||||
<a name="id980025"></a><p class="title"><b>Table 8. Possible Actions for Indeterminate Result Errors</b></p>
|
||||
<a name="id982210"></a><p class="title"><b>Table 8. Possible Actions for Indeterminate Result Errors</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Possible Actions for Indeterminate Result Errors">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -728,7 +728,7 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><a name="math_toolkit.main_overview.error_handling.rationale"></a><h5>
|
||||
<a name="id980217"></a>
|
||||
<a name="id982402"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling.rationale">Rationale</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -747,7 +747,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="math_toolkit.main_overview.error_handling.finding_more_information"></a><h5>
|
||||
<a name="id980252"></a>
|
||||
<a name="id982436"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling.finding_more_information">Finding
|
||||
More Information</a>
|
||||
</h5>
|
||||
@ -768,10 +768,9 @@
|
||||
<p>
|
||||
The various kind of errors are described in more detail below.
|
||||
</p>
|
||||
<a name="domain_error"></a><a name="math_toolkit.main_overview.error_handling.domain_errors"></a><h5>
|
||||
<a name="id980305"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling.domain_errors">Domain
|
||||
Errors</a>
|
||||
<a name="math_toolkit.main_overview.error_handling._anchor_id__domain_error____domain_errors"></a><h5>
|
||||
<a name="id982486"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling._anchor_id__domain_error____domain_errors"><a name="domain_error"></a> Domain Errors</a>
|
||||
</h5>
|
||||
<p>
|
||||
When a special function is passed an argument that is outside the range of
|
||||
@ -840,10 +839,9 @@
|
||||
<a href="../../../../../../format/index.html" target="_top">Boost.Format</a> documentation
|
||||
for more details.
|
||||
</p>
|
||||
<a name="pole_error"></a><a name="math_toolkit.main_overview.error_handling.evaluation_at_a_pole"></a><h5>
|
||||
<a name="id980552"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling.evaluation_at_a_pole">Evaluation
|
||||
at a pole</a>
|
||||
<a name="math_toolkit.main_overview.error_handling._anchor_id__pole_error____evaluation_at_a_pole"></a><h5>
|
||||
<a name="id982729"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling._anchor_id__pole_error____evaluation_at_a_pole"><a name="pole_error"></a> Evaluation at a pole</a>
|
||||
</h5>
|
||||
<p>
|
||||
When a special function is passed an argument that is at a pole without a
|
||||
@ -879,10 +877,9 @@
|
||||
<a href="../../../../../../format/index.html" target="_top">Boost.Format</a> documentation
|
||||
for more details.
|
||||
</p>
|
||||
<a name="overflow_error"></a><a name="math_toolkit.main_overview.error_handling.numeric_overflow"></a><h5>
|
||||
<a name="id980761"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling.numeric_overflow">Numeric
|
||||
Overflow</a>
|
||||
<a name="math_toolkit.main_overview.error_handling._anchor_id__overflow_error____numeric_overflow"></a><h5>
|
||||
<a name="id982931"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling._anchor_id__overflow_error____numeric_overflow"><a name="overflow_error"></a> Numeric Overflow</a>
|
||||
</h5>
|
||||
<p>
|
||||
When the result of a special function is too large to fit in the argument
|
||||
@ -904,10 +901,9 @@
|
||||
In this situation if the type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
doesn't support infinities, the maximum value for the type is returned.
|
||||
</p>
|
||||
<a name="underflow_error"></a><a name="math_toolkit.main_overview.error_handling.numeric_underflow"></a><h5>
|
||||
<a name="id980948"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling.numeric_underflow">Numeric
|
||||
Underflow</a>
|
||||
<a name="math_toolkit.main_overview.error_handling._anchor_id__underflow_error____numeric_underflow"></a><h5>
|
||||
<a name="id983112"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling._anchor_id__underflow_error____numeric_underflow"><a name="underflow_error"></a> Numeric Underflow</a>
|
||||
</h5>
|
||||
<p>
|
||||
If the result of a special function is known to be non-zero, but the calculated
|
||||
@ -927,10 +923,9 @@
|
||||
like <code class="computeroutput"><span class="identifier">throw_on_error</span></code>, throws
|
||||
an <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">underflow_error</span></code> C++ exception.
|
||||
</p>
|
||||
<a name="denorm_error"></a><a name="math_toolkit.main_overview.error_handling.denormalisation_errors"></a><h5>
|
||||
<a name="id981092"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling.denormalisation_errors">Denormalisation
|
||||
Errors</a>
|
||||
<a name="math_toolkit.main_overview.error_handling._anchor_id__denorm_error____denormalisation_errors"></a><h5>
|
||||
<a name="id983252"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling._anchor_id__denorm_error____denormalisation_errors"><a name="denorm_error"></a> Denormalisation Errors</a>
|
||||
</h5>
|
||||
<p>
|
||||
If the result of a special function is a denormalised value <span class="emphasis"><em>z</em></span>
|
||||
@ -950,10 +945,9 @@
|
||||
with another policy, like <code class="computeroutput"><span class="identifier">throw_on_error</span></code>
|
||||
throws an <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">underflow_error</span></code> C++ exception.
|
||||
</p>
|
||||
<a name="evaluation_error"></a><a name="math_toolkit.main_overview.error_handling.evaluation_errors"></a><h5>
|
||||
<a name="id981253"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling.evaluation_errors">Evaluation
|
||||
Errors</a>
|
||||
<a name="math_toolkit.main_overview.error_handling._anchor_id__evaluation_error____evaluation_errors"></a><h5>
|
||||
<a name="id983408"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling._anchor_id__evaluation_error____evaluation_errors"><a name="evaluation_error"></a> Evaluation Errors</a>
|
||||
</h5>
|
||||
<p>
|
||||
When a special function calculates a result that is known to be erroneous,
|
||||
@ -987,10 +981,9 @@
|
||||
<a href="../../../../../../format/index.html" target="_top">Boost.Format</a> documentation
|
||||
for more details.
|
||||
</p>
|
||||
<a name="indeterminate_result_error"></a><a name="math_toolkit.main_overview.error_handling.indeterminate_result_errors"></a><h5>
|
||||
<a name="id981466"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling.indeterminate_result_errors">Indeterminate
|
||||
Result Errors</a>
|
||||
<a name="math_toolkit.main_overview.error_handling._anchor_id__indeterminate_result_error____indeterminate_result_errors"></a><h5>
|
||||
<a name="id983618"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling._anchor_id__indeterminate_result_error____indeterminate_result_errors"><a name="indeterminate_result_error"></a> Indeterminate Result Errors</a>
|
||||
</h5>
|
||||
<p>
|
||||
When the result of a special function is indeterminate for the value that
|
||||
@ -1014,10 +1007,9 @@
|
||||
for what the result should be: for example the C99 standard specifies that
|
||||
the result of 0<sup>0</sup> is 1, even though the result is actually mathematically indeterminate.
|
||||
</p>
|
||||
<a name="rounding_error"></a><a name="math_toolkit.main_overview.error_handling.rounding_errors"></a><h5>
|
||||
<a name="id981615"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling.rounding_errors">Rounding
|
||||
Errors</a>
|
||||
<a name="math_toolkit.main_overview.error_handling._anchor_id__rounding_error____rounding_errors"></a><h5>
|
||||
<a name="id983764"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling._anchor_id__rounding_error____rounding_errors"><a name="rounding_error"></a> Rounding Errors</a>
|
||||
</h5>
|
||||
<p>
|
||||
When one of the rounding functions <a class="link" href="../special/rounding/round.html" title="Rounding Functions">round</a>,
|
||||
@ -1053,10 +1045,9 @@
|
||||
<a href="../../../../../../format/index.html" target="_top">Boost.Format</a> documentation
|
||||
for more details.
|
||||
</p>
|
||||
<a name="checked_narrowing_cast"></a><a name="math_toolkit.main_overview.error_handling.errors_from_typecasts"></a><h5>
|
||||
<a name="id983075"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling.errors_from_typecasts">Errors
|
||||
from typecasts</a>
|
||||
<a name="math_toolkit.main_overview.error_handling._anchor_id__checked_narrowing_cast____errors_from_typecasts"></a><h5>
|
||||
<a name="id985217"></a>
|
||||
<a class="link" href="error_handling.html#math_toolkit.main_overview.error_handling._anchor_id__checked_narrowing_cast____errors_from_typecasts"><a name="checked_narrowing_cast"></a> Errors from typecasts</a>
|
||||
</h5>
|
||||
<p>
|
||||
Many special functions evaluate their results at a higher precision than
|
||||
|
@ -20,15 +20,10 @@
|
||||
<a name="math_toolkit.main_overview.history1"></a><a class="link" href="history1.html" title="History and What's New">History and What's
|
||||
New</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
<a name="math_toolkit.main_overview.history1.boost_1_38_0"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id985774"></a>
|
||||
<a name="math_toolkit.main_overview.history1.boost_1_38_0"></a><h5>
|
||||
<a name="id987714"></a>
|
||||
<a class="link" href="history1.html#math_toolkit.main_overview.history1.boost_1_38_0">Boost-1.38.0</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Added support for MPFR as a bignum type.
|
||||
@ -38,31 +33,21 @@
|
||||
times.
|
||||
</li>
|
||||
<li>
|
||||
Added logistic distribution, from Gautam Sewani's Google Summer of
|
||||
Code project.
|
||||
Added logistic distribution, from Gautam Sewani's Google Summer of Code
|
||||
project.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
<a name="math_toolkit.main_overview.history1.boost_1_37_0"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id985812"></a>
|
||||
<a name="math_toolkit.main_overview.history1.boost_1_37_0"></a><h5>
|
||||
<a name="id987752"></a>
|
||||
<a class="link" href="history1.html#math_toolkit.main_overview.history1.boost_1_37_0">Boost-1.37.0</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc"><li>
|
||||
Improved accuracy and testing of the inverse hypergeometric functions.
|
||||
</li></ul></div>
|
||||
<p>
|
||||
<a name="math_toolkit.main_overview.history1.boost_1_36_0"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id985836"></a>
|
||||
<a name="math_toolkit.main_overview.history1.boost_1_36_0"></a><h5>
|
||||
<a name="id987776"></a>
|
||||
<a class="link" href="history1.html#math_toolkit.main_overview.history1.boost_1_36_0">Boost-1.36.0</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Added Noncentral Chi Squared Distribution.
|
||||
@ -89,20 +74,15 @@
|
||||
Added Compile time powers of runtime bases.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
<a name="math_toolkit.main_overview.history1.boost_1_35_0__post_review_first_official_release"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id985910"></a>
|
||||
<a name="math_toolkit.main_overview.history1.boost_1_35_0__post_review_first_official_release"></a><h5>
|
||||
<a name="id987851"></a>
|
||||
<a class="link" href="history1.html#math_toolkit.main_overview.history1.boost_1_35_0__post_review_first_official_release">Boost-1.35.0:
|
||||
Post Review First Official Release</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Added Policy based framework that allows fine grained control over
|
||||
function behaviour.
|
||||
Added Policy based framework that allows fine grained control over function
|
||||
behaviour.
|
||||
</li>
|
||||
<li>
|
||||
<span class="bold"><strong>Breaking change:</strong></span> Changed default behaviour
|
||||
@ -110,14 +90,13 @@
|
||||
review feedback), this behaviour can be customised using <a class="link" href="../policy.html" title="Policies">Policy</a>'s.
|
||||
</li>
|
||||
<li>
|
||||
<span class="bold"><strong>Breaking change:</strong></span> Changed exception
|
||||
thrown when an internal evaluation error occurs to boost::math::evaluation_error.
|
||||
<span class="bold"><strong>Breaking change:</strong></span> Changed exception thrown
|
||||
when an internal evaluation error occurs to boost::math::evaluation_error.
|
||||
</li>
|
||||
<li>
|
||||
<span class="bold"><strong>Breaking change:</strong></span> Changed discrete
|
||||
quantiles to return an integer result: this is anything up to 20 times
|
||||
faster than finding the true root, this behaviour can be customised
|
||||
using <a class="link" href="../policy.html" title="Policies">Policy</a>'s.
|
||||
<span class="bold"><strong>Breaking change:</strong></span> Changed discrete quantiles
|
||||
to return an integer result: this is anything up to 20 times faster than
|
||||
finding the true root, this behaviour can be customised using <a class="link" href="../policy.html" title="Policies">Policy</a>'s.
|
||||
</li>
|
||||
<li>
|
||||
Polynomial/rational function evaluation is now customisable and hopefully
|
||||
@ -127,35 +106,25 @@
|
||||
Added performance test program.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
<a name="math_toolkit.main_overview.history1.milestone_4__second_review_candidate__1st_march_2007_"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id985994"></a>
|
||||
<a name="math_toolkit.main_overview.history1.milestone_4__second_review_candidate__1st_march_2007_"></a><h5>
|
||||
<a name="id987935"></a>
|
||||
<a class="link" href="history1.html#math_toolkit.main_overview.history1.milestone_4__second_review_candidate__1st_march_2007_">Milestone
|
||||
4: Second Review Candidate (1st March 2007)</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Moved Xiaogang Zhang's Bessel Functions code into the library, and
|
||||
brought them into line with the rest of the code.
|
||||
Moved Xiaogang Zhang's Bessel Functions code into the library, and brought
|
||||
them into line with the rest of the code.
|
||||
</li>
|
||||
<li>
|
||||
Added C# "Distribution Explorer" demo application.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
<a name="math_toolkit.main_overview.history1.milestone_3__first_review_candidate__31st_dec_2006_"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id986026"></a>
|
||||
<a name="math_toolkit.main_overview.history1.milestone_3__first_review_candidate__31st_dec_2006_"></a><h5>
|
||||
<a name="id987966"></a>
|
||||
<a class="link" href="history1.html#math_toolkit.main_overview.history1.milestone_3__first_review_candidate__31st_dec_2006_">Milestone
|
||||
3: First Review Candidate (31st Dec 2006)</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Implemented the main probability distribution and density functions.
|
||||
@ -167,28 +136,23 @@
|
||||
Added more factorial functions.
|
||||
</li>
|
||||
<li>
|
||||
Implemented the Hermite, Legendre and Laguerre polynomials plus the
|
||||
spherical harmonic functions from TR1.
|
||||
Implemented the Hermite, Legendre and Laguerre polynomials plus the spherical
|
||||
harmonic functions from TR1.
|
||||
</li>
|
||||
<li>
|
||||
Moved Xiaogang Zhang's elliptic integral code into the library, and
|
||||
brought them into line with the rest of the code.
|
||||
Moved Xiaogang Zhang's elliptic integral code into the library, and brought
|
||||
them into line with the rest of the code.
|
||||
</li>
|
||||
<li>
|
||||
Moved Hubert Holin's existing Boost.Math special functions into this
|
||||
library and brought them into line with the rest of the code.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
<a name="math_toolkit.main_overview.history1.milestone_2__released_september_10th_2006"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id986086"></a>
|
||||
<a name="math_toolkit.main_overview.history1.milestone_2__released_september_10th_2006"></a><h5>
|
||||
<a name="id988026"></a>
|
||||
<a class="link" href="history1.html#math_toolkit.main_overview.history1.milestone_2__released_september_10th_2006">Milestone
|
||||
2: Released September 10th 2006</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Implement preview release of the statistical distributions.
|
||||
@ -220,23 +184,18 @@
|
||||
Implemented Rational function generation (the Remez method).
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
<a name="math_toolkit.main_overview.history1.milestone_1__released_march_31st_2006"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id986167"></a>
|
||||
<a name="math_toolkit.main_overview.history1.milestone_1__released_march_31st_2006"></a><h5>
|
||||
<a name="id988107"></a>
|
||||
<a class="link" href="history1.html#math_toolkit.main_overview.history1.milestone_1__released_march_31st_2006">Milestone
|
||||
1: Released March 31st 2006</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Implement gamma/beta/erf functions along with their incomplete counterparts.
|
||||
</li>
|
||||
<li>
|
||||
Generate high quality test data, against which future improvements
|
||||
can be judged.
|
||||
Generate high quality test data, against which future improvements can
|
||||
be judged.
|
||||
</li>
|
||||
<li>
|
||||
Provide tools for the evaluation of infinite series, continued fractions,
|
||||
@ -251,18 +210,12 @@
|
||||
the library.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
SVN Revisions:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Sandbox and trunk last synchonised at revision: 48300.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -23,7 +23,7 @@
|
||||
This library is divided into three interconnected parts:
|
||||
</p>
|
||||
<a name="math_toolkit.main_overview.intro.statistical_distributions"></a><h5>
|
||||
<a name="id968997"></a>
|
||||
<a name="id970207"></a>
|
||||
<a class="link" href="intro.html#math_toolkit.main_overview.intro.statistical_distributions">Statistical
|
||||
Distributions</a>
|
||||
</h5>
|
||||
@ -49,7 +49,7 @@
|
||||
tests.
|
||||
</p>
|
||||
<a name="math_toolkit.main_overview.intro.mathematical_special_functions"></a><h5>
|
||||
<a name="id969081"></a>
|
||||
<a name="id970291"></a>
|
||||
<a class="link" href="intro.html#math_toolkit.main_overview.intro.mathematical_special_functions">Mathematical
|
||||
Special Functions</a>
|
||||
</h5>
|
||||
@ -76,7 +76,7 @@
|
||||
<span class="keyword">double</span></code>.
|
||||
</p>
|
||||
<a name="math_toolkit.main_overview.intro.implementation_toolkit"></a><h5>
|
||||
<a name="id969148"></a>
|
||||
<a name="id970358"></a>
|
||||
<a class="link" href="intro.html#math_toolkit.main_overview.intro.implementation_toolkit">Implementation
|
||||
Toolkit</a>
|
||||
</h5>
|
||||
|
@ -24,7 +24,7 @@
|
||||
as handy shortcuts for common navigation tasks.
|
||||
</p>
|
||||
<a name="math_toolkit.main_overview.navigation.shortcuts"></a><h6>
|
||||
<a name="id969249"></a>
|
||||
<a name="id970459"></a>
|
||||
<a class="link" href="navigation.html#math_toolkit.main_overview.navigation.shortcuts">Shortcuts</a>
|
||||
</h6>
|
||||
<div class="blockquote"><blockquote class="blockquote">
|
||||
|
@ -19,33 +19,25 @@
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="math_toolkit.main_overview.perf_over"></a><a class="link" href="perf_over.html" title="Performance">Performance</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
By and large the performance of this library should be acceptable for most
|
||||
needs. However, you should note that the library's primary emphasis is
|
||||
on accuracy and numerical stability, and <span class="emphasis"><em>not</em></span> speed.
|
||||
</p>
|
||||
<p>
|
||||
needs. However, you should note that the library's primary emphasis is on
|
||||
accuracy and numerical stability, and <span class="emphasis"><em>not</em></span> speed.
|
||||
</p>
|
||||
<p>
|
||||
In terms of the algorithms used, this library aims to use the same "best
|
||||
of breed" algorithms as many other libraries: the principle difference
|
||||
is that this library is implemented in C++ - taking advantage of all the
|
||||
abstraction mechanisms that C++ offers - where as most traditional numeric
|
||||
libraries are implemented in C or FORTRAN. Traditionally languages such
|
||||
as C or FORTRAN are perceived as easier to optimise than more complex languages
|
||||
libraries are implemented in C or FORTRAN. Traditionally languages such as
|
||||
C or FORTRAN are perceived as easier to optimise than more complex languages
|
||||
like C++, so in a sense this library provides a good test of current compiler
|
||||
technology, and the "abstraction penalty" - if any - of C++ compared
|
||||
to other languages.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The two most important things you can do to ensure the best performance
|
||||
from this library are:
|
||||
</p>
|
||||
<p>
|
||||
The two most important things you can do to ensure the best performance from
|
||||
this library are:
|
||||
</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
@ -59,14 +51,10 @@
|
||||
compilers for example.
|
||||
</li>
|
||||
</ol></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The <a class="link" href="../perf.html" title="Performance">performance section</a> contains
|
||||
more information on the performance of this library, what you can do to
|
||||
fine tune it, and how this library compares to some other open source alternatives.
|
||||
</p>
|
||||
<p>
|
||||
more information on the performance of this library, what you can do to fine
|
||||
tune it, and how this library compares to some other open source alternatives.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
|
@ -20,8 +20,6 @@
|
||||
<a name="math_toolkit.main_overview.pol_overview"></a><a class="link" href="pol_overview.html" title="Configuration and Policies">Configuration
|
||||
and Policies</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Policies are a powerful fine-grain mechanism that allow you to customise
|
||||
the behaviour of this library according to your needs. There is more information
|
||||
@ -29,32 +27,22 @@
|
||||
tutorial</a> and the <a class="link" href="../policy/pol_ref.html" title="Policy Reference">policy
|
||||
reference</a>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Generally speaking unless you find that the <a class="link" href="../policy/pol_tutorial/policy_tut_defaults.html" title="Policies Have Sensible Defaults">default
|
||||
policy behaviour</a> when encountering 'bad' argument values does not
|
||||
meet your needs, you should not need to worry about policies.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Policies are a compile-time mechanism that allow you to change error-handling
|
||||
or calculation precision either program wide, or at the call site.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Although the policy mechanism itself is rather complicated, in practice
|
||||
it is easy to use, and very flexible.
|
||||
</p>
|
||||
<p>
|
||||
Although the policy mechanism itself is rather complicated, in practice it
|
||||
is easy to use, and very flexible.
|
||||
</p>
|
||||
<p>
|
||||
Using policies you can control:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<a class="link" href="../policy/pol_ref/error_handling_policies.html" title="Error Handling Policies">How
|
||||
@ -71,8 +59,8 @@
|
||||
</li>
|
||||
<li>
|
||||
What to do when a <a class="link" href="../policy/pol_ref/assert_undefined.html" title="Mathematically Undefined Function Policies">mathematically
|
||||
undefined function</a> is used: Should this raise a run-time or
|
||||
compile-time error?
|
||||
undefined function</a> is used: Should this raise a run-time or compile-time
|
||||
error?
|
||||
</li>
|
||||
<li>
|
||||
Whether <a class="link" href="../policy/pol_ref/discrete_quant_ref.html" title="Discrete Quantile Policies">discrete
|
||||
@ -80,18 +68,14 @@
|
||||
values, and how they are rounded.
|
||||
</li>
|
||||
<li>
|
||||
How many iterations a special function is permitted to perform in a
|
||||
series evaluation or root finding algorithm before it gives up and
|
||||
raises an <a class="link" href="error_handling.html#evaluation_error">evaluation_error</a>.
|
||||
How many iterations a special function is permitted to perform in a series
|
||||
evaluation or root finding algorithm before it gives up and raises an
|
||||
<a class="link" href="error_handling.html#evaluation_error">evaluation_error</a>.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
You can control policies:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Using <a class="link" href="../policy/pol_ref/policy_defaults.html" title="Using macros to Change the Policy Defaults">macros</a>
|
||||
@ -109,8 +93,6 @@
|
||||
distribution</a>.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="math_toolkit.main_overview.result_type"></a><a class="link" href="result_type.html" title="Calculation of the Type of the Result"> Calculation
|
||||
of the Type of the Result</a>
|
||||
<a name="math_toolkit.main_overview.result_type"></a><a class="link" href="result_type.html" title="Calculation of the Type of the Result">Calculation of
|
||||
the Type of the Result</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
The functions in this library are all overloaded to accept mixed floating
|
||||
|
@ -20,45 +20,33 @@
|
||||
<a name="math_toolkit.main_overview.tr1"></a><a class="link" href="tr1.html" title="C99 and TR1 C Functions">C99 and TR1 C Functions</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Many of the special functions included in this library are also a part
|
||||
of the either the C99 standard or the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">Technical
|
||||
Many of the special functions included in this library are also a part of
|
||||
the either the C99 standard or the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">Technical
|
||||
Report on C++ Library Extensions</a>. Therefore this library includes
|
||||
a thin wrapper header <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">tr1</span><span class="special">.</span><span class="identifier">hpp</span></code>
|
||||
that provides compatibility with these two standards.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
There are various pros and cons to using the library in this way:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Pros:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
The header to include is lightweight (i.e. fast to compile).
|
||||
</li>
|
||||
<li>
|
||||
The functions have extern "C" linkage, and so are usable
|
||||
from other languages.
|
||||
The functions have extern "C" linkage, and so are usable from
|
||||
other languages.
|
||||
</li>
|
||||
<li>
|
||||
Standard compatibility.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Cons:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
You will need to compile and link to the external Boost.Math libraries.
|
||||
@ -72,8 +60,6 @@
|
||||
infinities: this may be less flexible than an C++ exception based approach.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
</p>
|
||||
<div class="note"><table border="0" summary="Note">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../images/note.png"></td>
|
||||
@ -86,15 +72,11 @@
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The separate libraries required in order to use tr1.hpp can be compiled
|
||||
using bjam from within the libs/math/build directory, or from the Boost
|
||||
root directory using the usual Boost-wide install procedure. Alternatively
|
||||
the source files are located in libs/math/src and each have the same name
|
||||
as the function they implement. The various libraries are named as follows:
|
||||
</p>
|
||||
<p>
|
||||
The separate libraries required in order to use tr1.hpp can be compiled using
|
||||
bjam from within the libs/math/build directory, or from the Boost root directory
|
||||
using the usual Boost-wide install procedure. Alternatively the source files
|
||||
are located in libs/math/src and each have the same name as the function
|
||||
they implement. The various libraries are named as follows:
|
||||
</p>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
@ -224,20 +206,16 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Where <code class="computeroutput"><span class="special"><</span><span class="identifier">suffix</span><span class="special">></span></code> encodes the compiler and build options
|
||||
used to build the libraries: for example "libboost_math_tr1-vc80-mt-gd.lib"
|
||||
would be the statically linked TR1 library to use with Visual C++ 8.0,
|
||||
in multithreading debug mode, with the DLL VC++ runtime, where as "boost_math_tr1-vc80-mt.lib"
|
||||
would be import library for the TR1 DLL to be used with Visual C++ 8.0
|
||||
with the release multithreaded DLL VC++ runtime. Refer to the getting started
|
||||
would be the statically linked TR1 library to use with Visual C++ 8.0, in
|
||||
multithreading debug mode, with the DLL VC++ runtime, where as "boost_math_tr1-vc80-mt.lib"
|
||||
would be import library for the TR1 DLL to be used with Visual C++ 8.0 with
|
||||
the release multithreaded DLL VC++ runtime. Refer to the getting started
|
||||
guide for a <a href="http://www.boost.org/doc/libs/1_35_0/more/getting_started/windows.html#library-naming" target="_top">full
|
||||
explanation of the <code class="computeroutput"><span class="special"><</span><span class="identifier">suffix</span><span class="special">></span></code> meanings</a>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="note"><table border="0" summary="Note">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../images/note.png"></td>
|
||||
@ -250,19 +228,17 @@
|
||||
settings.
|
||||
</p>
|
||||
<p>
|
||||
Users will need to define BOOST_MATH_TR1_DYN_LINK when building their
|
||||
code if they want to link against the DLL versions of these libraries
|
||||
rather than the static versions.
|
||||
Users will need to define BOOST_MATH_TR1_DYN_LINK when building their code
|
||||
if they want to link against the DLL versions of these libraries rather
|
||||
than the static versions.
|
||||
</p>
|
||||
<p>
|
||||
Users can disable auto-linking by defining BOOST_MATH_TR1_NO_LIB when
|
||||
building: this is typically only used when linking against a customised
|
||||
build of the libraries.
|
||||
Users can disable auto-linking by defining BOOST_MATH_TR1_NO_LIB when building:
|
||||
this is typically only used when linking against a customised build of
|
||||
the libraries.
|
||||
</p>
|
||||
</td></tr>
|
||||
</table></div>
|
||||
<p>
|
||||
</p>
|
||||
<div class="note"><table border="0" summary="Note">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../images/note.png"></td>
|
||||
@ -273,21 +249,14 @@
|
||||
installed, and can generally just link against -lboost_math_tr1 etc.
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<p>
|
||||
<a name="math_toolkit.main_overview.tr1.usage_recomendations"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id986634"></a>
|
||||
<a name="math_toolkit.main_overview.tr1.usage_recomendations"></a><h5>
|
||||
<a name="id988572"></a>
|
||||
<a class="link" href="tr1.html#math_toolkit.main_overview.tr1.usage_recomendations">Usage
|
||||
Recomendations</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
This library now presents the user with a choice:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
To include the header only versions of the functions and have an easier
|
||||
@ -297,51 +266,36 @@
|
||||
To include the TR1 headers and link against an external library.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Which option you choose depends largely on how you prefer to work and how
|
||||
your system is set up.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
For example a casual user who just needs the acosh function, would probably
|
||||
be better off including <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">special_functions</span><span class="special">/</span><span class="identifier">acosh</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||||
and using <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">acosh</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code> in
|
||||
their code.
|
||||
</p>
|
||||
<p>
|
||||
and using <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">acosh</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code> in their
|
||||
code.
|
||||
</p>
|
||||
<p>
|
||||
However, for large scale software development where compile times are significant,
|
||||
and where the Boost libraries are already built and installed on the system,
|
||||
then including <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">tr1</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> and using <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">tr1</span><span class="special">::</span><span class="identifier">acosh</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
|
||||
will speed up compile times, reduce object files sizes (since there are
|
||||
no templates being instantiated any more), and also speed up debugging
|
||||
runtimes - since the externally compiled libraries can be compiler optimised,
|
||||
rather than built using full settings - the difference in performance between
|
||||
<a class="link" href="../perf/getting_best.html" title="Getting the Best Performance from this Library">release and debug builds
|
||||
can be as much as 20 times</a>, so for complex applications this can
|
||||
be a big win.
|
||||
then including <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">tr1</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> and using <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">tr1</span><span class="special">::</span><span class="identifier">acosh</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code> will
|
||||
speed up compile times, reduce object files sizes (since there are no templates
|
||||
being instantiated any more), and also speed up debugging runtimes - since
|
||||
the externally compiled libraries can be compiler optimised, rather than
|
||||
built using full settings - the difference in performance between <a class="link" href="../perf/getting_best.html" title="Getting the Best Performance from this Library">release
|
||||
and debug builds can be as much as 20 times</a>, so for complex applications
|
||||
this can be a big win.
|
||||
</p>
|
||||
<p>
|
||||
<a name="math_toolkit.main_overview.tr1.supported_c99_functions"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id986837"></a>
|
||||
<a name="math_toolkit.main_overview.tr1.supported_c99_functions"></a><h5>
|
||||
<a name="id988775"></a>
|
||||
<a class="link" href="tr1.html#math_toolkit.main_overview.tr1.supported_c99_functions">Supported
|
||||
C99 Functions</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
See also the <a class="link" href="../special/extern_c/c99.html" title="C99 C Functions">quick reference
|
||||
guide for these functions</a>.
|
||||
</p>
|
||||
<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">namespace</span> <span class="identifier">tr1</span><span class="special">{</span> <span class="keyword">extern</span> <span class="string">"C"</span><span class="special">{</span>
|
||||
|
||||
<span class="keyword">typedef</span> <span class="identifier">unspecified</span> <span class="identifier">float_t</span><span class="special">;</span>
|
||||
@ -429,23 +383,15 @@
|
||||
|
||||
<span class="special">}}}}</span> <span class="comment">// namespaces
|
||||
</span></pre>
|
||||
<p>
|
||||
<a name="math_toolkit.main_overview.tr1.supported_tr1_functions"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id989750"></a>
|
||||
<a name="math_toolkit.main_overview.tr1.supported_tr1_functions"></a><h5>
|
||||
<a name="id991043"></a>
|
||||
<a class="link" href="tr1.html#math_toolkit.main_overview.tr1.supported_tr1_functions">Supported
|
||||
TR1 Functions</a>
|
||||
</h5>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
See also the <a class="link" href="../special/extern_c/tr1.html" title="C99 and TR1 C Functions Overview">quick reference
|
||||
guide for these functions</a>.
|
||||
</p>
|
||||
<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">namespace</span> <span class="identifier">tr1</span><span class="special">{</span> <span class="keyword">extern</span> <span class="string">"C"</span><span class="special">{</span>
|
||||
|
||||
<span class="comment">// [5.2.1.1] associated Laguerre polynomials:
|
||||
@ -557,8 +503,6 @@
|
||||
|
||||
<span class="special">}}}}</span> <span class="comment">// namespaces
|
||||
</span></pre>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
In addition sufficient additional overloads of the <code class="computeroutput"><span class="keyword">double</span></code>
|
||||
versions of the above functions are provided, so that calling the function
|
||||
@ -568,17 +512,11 @@
|
||||
arguments is supported, with the return type determined by the <a class="link" href="result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>result
|
||||
type calculation rules</em></span></a>.
|
||||
</p>
|
||||
<p>
|
||||
<a name="math_toolkit.main_overview.tr1.currently_unsupported_c99_functions"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id993716"></a>
|
||||
<a name="math_toolkit.main_overview.tr1.currently_unsupported_c99_functions"></a><h5>
|
||||
<a name="id995556"></a>
|
||||
<a class="link" href="tr1.html#math_toolkit.main_overview.tr1.currently_unsupported_c99_functions">Currently
|
||||
Unsupported C99 Functions</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">exp2</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">x</span><span class="special">);</span>
|
||||
<span class="keyword">float</span> <span class="identifier">exp2f</span><span class="special">(</span><span class="keyword">float</span> <span class="identifier">x</span><span class="special">);</span>
|
||||
<span class="keyword">long</span> <span class="keyword">double</span> <span class="identifier">exp2l</span><span class="special">(</span><span class="keyword">long</span> <span class="keyword">double</span> <span class="identifier">x</span><span class="special">);</span>
|
||||
@ -639,17 +577,11 @@
|
||||
<span class="keyword">float</span> <span class="identifier">scalbnf</span><span class="special">(</span><span class="keyword">float</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">ex</span><span class="special">);</span>
|
||||
<span class="keyword">long</span> <span class="keyword">double</span> <span class="identifier">scalbnl</span><span class="special">(</span><span class="keyword">long</span> <span class="keyword">double</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">ex</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
<a name="math_toolkit.main_overview.tr1.currently_unsupported_tr1_functions"></a>
|
||||
</p>
|
||||
<h5>
|
||||
<a name="id995383"></a>
|
||||
<a name="math_toolkit.main_overview.tr1.currently_unsupported_tr1_functions"></a><h5>
|
||||
<a name="id997223"></a>
|
||||
<a class="link" href="tr1.html#math_toolkit.main_overview.tr1.currently_unsupported_tr1_functions">Currently
|
||||
Unsupported TR1 Functions</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<pre class="programlisting"><span class="comment">// [5.2.1.7] confluent hypergeometric functions:
|
||||
</span><span class="keyword">double</span> <span class="identifier">conf_hyperg</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">a</span><span class="special">,</span> <span class="keyword">double</span> <span class="identifier">c</span><span class="special">,</span> <span class="keyword">double</span> <span class="identifier">x</span><span class="special">);</span>
|
||||
<span class="keyword">float</span> <span class="identifier">conf_hypergf</span><span class="special">(</span><span class="keyword">float</span> <span class="identifier">a</span><span class="special">,</span> <span class="keyword">float</span> <span class="identifier">c</span><span class="special">,</span> <span class="keyword">float</span> <span class="identifier">x</span><span class="special">);</span>
|
||||
@ -661,8 +593,6 @@
|
||||
<span class="keyword">long</span> <span class="keyword">double</span> <span class="identifier">hypergl</span><span class="special">(</span><span class="keyword">long</span> <span class="keyword">double</span> <span class="identifier">a</span><span class="special">,</span> <span class="keyword">long</span> <span class="keyword">double</span> <span class="identifier">b</span><span class="special">,</span> <span class="keyword">long</span> <span class="keyword">double</span> <span class="identifier">c</span><span class="special">,</span>
|
||||
<span class="keyword">long</span> <span class="keyword">double</span> <span class="identifier">x</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -26,8 +26,8 @@
|
||||
from this Library</a></span></dt>
|
||||
<dt><span class="section"><a href="perf/comp_compilers.html">Comparing Compilers</a></span></dt>
|
||||
<dt><span class="section"><a href="perf/tuning.html">Performance Tuning Macros</a></span></dt>
|
||||
<dt><span class="section"><a href="perf/comparisons.html"> Comparisons to Other
|
||||
Open Source Libraries</a></span></dt>
|
||||
<dt><span class="section"><a href="perf/comparisons.html">Comparisons to Other Open
|
||||
Source Libraries</a></span></dt>
|
||||
<dt><span class="section"><a href="perf/perf_test_app.html">The Performance Test
|
||||
Application</a></span></dt>
|
||||
</dl></div>
|
||||
|
@ -28,7 +28,7 @@
|
||||
in this respect).
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1346148"></a><p class="title"><b>Table 48. Performance Comparison of Various Windows Compilers</b></p>
|
||||
<a name="id1345899"></a><p class="title"><b>Table 48. Performance Comparison of Various Windows Compilers</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Performance Comparison of Various Windows Compilers">
|
||||
<colgroup>
|
||||
<col>
|
||||
|
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="math_toolkit.perf.comparisons"></a><a class="link" href="comparisons.html" title="Comparisons to Other Open Source Libraries"> Comparisons to Other
|
||||
Open Source Libraries</a>
|
||||
<a name="math_toolkit.perf.comparisons"></a><a class="link" href="comparisons.html" title="Comparisons to Other Open Source Libraries">Comparisons to Other Open
|
||||
Source Libraries</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
We've run our performance tests both for our own code, and against other
|
||||
@ -39,7 +39,7 @@
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="math_toolkit.perf.comparisons.comparison_to_gsl_1_9_and_cephes"></a><h5>
|
||||
<a name="id1349043"></a>
|
||||
<a name="id1348363"></a>
|
||||
<a class="link" href="comparisons.html#math_toolkit.perf.comparisons.comparison_to_gsl_1_9_and_cephes">Comparison
|
||||
to GSL-1.9 and Cephes</a>
|
||||
</h5>
|
||||
@ -205,7 +205,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
+INF <sup>[<a name="id1349367" href="#ftn.id1349367" class="footnote">1</a>]</sup>
|
||||
+INF <sup>[<a name="id1348687" href="#ftn.id1348687" class="footnote">1</a>]</sup>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -276,13 +276,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody class="footnotes"><tr><td colspan="4"><div class="footnote"><p><sup>[<a name="ftn.id1349367" href="#id1349367" class="para">1</a>] </sup>
|
||||
<tbody class="footnotes"><tr><td colspan="4"><div class="footnote"><p><sup>[<a name="ftn.id1348687" href="#id1348687" class="para">1</a>] </sup>
|
||||
Cephes gets stuck in an infinite loop while trying to execute
|
||||
our test cases.
|
||||
</p></div></td></tr></tbody>
|
||||
</table></div>
|
||||
<a name="math_toolkit.perf.comparisons.comparison_to_the_r_statistical_library_on_windows"></a><h5>
|
||||
<a name="id1349510"></a>
|
||||
<a name="id1348830"></a>
|
||||
<a class="link" href="comparisons.html#math_toolkit.perf.comparisons.comparison_to_the_r_statistical_library_on_windows">Comparison
|
||||
to the R Statistical Library on Windows</a>
|
||||
</h5>
|
||||
@ -293,7 +293,7 @@
|
||||
appears not to be buildable with Visual C++).
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1349523"></a><p class="title"><b>Table 51. A Comparison to the R Statistical Library on Windows XP</b></p>
|
||||
<a name="id1348843"></a><p class="title"><b>Table 51. A Comparison to the R Statistical Library on Windows XP</b></p>
|
||||
<div class="table-contents"><table class="table" summary="A Comparison to the R Statistical Library on Windows XP">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -363,7 +363,7 @@
|
||||
<td>
|
||||
<p>
|
||||
</p>
|
||||
<p>74.66<sup>[<a name="id1349650" href="#ftn.id1349650" class="footnote">1</a>]</sup></p>
|
||||
<p>74.66<sup>[<a name="id1348970" href="#ftn.id1348970" class="footnote">1</a>]</sup></p>
|
||||
<p> </p>
|
||||
<p>(4.905e-004s)</p>
|
||||
<p>
|
||||
@ -779,7 +779,7 @@
|
||||
<td>
|
||||
<p>
|
||||
</p>
|
||||
<p>53.59<sup>[<a name="id1350544" href="#ftn.id1350544" class="footnote">2</a>]</sup></p>
|
||||
<p>53.59<sup>[<a name="id1349727" href="#ftn.id1349727" class="footnote">2</a>]</sup></p>
|
||||
<p> </p>
|
||||
<p>(5.145e-004s)</p>
|
||||
<p>
|
||||
@ -996,12 +996,12 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody class="footnotes"><tr><td colspan="3">
|
||||
<div class="footnote"><p><sup>[<a name="ftn.id1349650" href="#id1349650" class="para">1</a>] </sup>
|
||||
<div class="footnote"><p><sup>[<a name="ftn.id1348970" href="#id1348970" class="para">1</a>] </sup>
|
||||
There are a small number of our test cases where the R library
|
||||
fails to converge on a result: these tend to dominate the performance
|
||||
result.
|
||||
</p></div>
|
||||
<div class="footnote"><p><sup>[<a name="ftn.id1350544" href="#id1350544" class="para">2</a>] </sup>
|
||||
<div class="footnote"><p><sup>[<a name="ftn.id1349727" href="#id1349727" class="para">2</a>] </sup>
|
||||
The R library appears to use a linear-search strategy, that can
|
||||
perform very badly in a small number of pathological cases, but
|
||||
may or may not be more efficient in "typical" cases
|
||||
@ -1010,7 +1010,7 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><a name="math_toolkit.perf.comparisons.comparison_to_the_r_statistical_library_on_linux"></a><h5>
|
||||
<a name="id1350940"></a>
|
||||
<a name="id1350670"></a>
|
||||
<a class="link" href="comparisons.html#math_toolkit.perf.comparisons.comparison_to_the_r_statistical_library_on_linux">Comparison
|
||||
to the R Statistical Library on Linux</a>
|
||||
</h5>
|
||||
@ -1019,7 +1019,7 @@
|
||||
Linux machine, with the test program and R-2.5.0 compiled with GNU G++ 4.2.0.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1350953"></a><p class="title"><b>Table 52. A Comparison to the R Statistical Library on Linux</b></p>
|
||||
<a name="id1350683"></a><p class="title"><b>Table 52. A Comparison to the R Statistical Library on Linux</b></p>
|
||||
<div class="table-contents"><table class="table" summary="A Comparison to the R Statistical Library on Linux">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -1089,7 +1089,7 @@
|
||||
<td>
|
||||
<p>
|
||||
</p>
|
||||
<p>44.06<sup>[<a name="id1351081" href="#ftn.id1351081" class="footnote">1</a>]</sup></p>
|
||||
<p>44.06<sup>[<a name="id1350810" href="#ftn.id1350810" class="footnote">1</a>]</sup></p>
|
||||
<p> </p>
|
||||
<p>(5.701e-004s)</p>
|
||||
<p>
|
||||
@ -1505,7 +1505,7 @@
|
||||
<td>
|
||||
<p>
|
||||
</p>
|
||||
<p>30.07<sup>[<a name="id1351835" href="#ftn.id1351835" class="footnote">2</a>]</sup></p>
|
||||
<p>30.07<sup>[<a name="id1351565" href="#ftn.id1351565" class="footnote">2</a>]</sup></p>
|
||||
<p> </p>
|
||||
<p>(5.490e-004s)</p>
|
||||
<p>
|
||||
@ -1722,12 +1722,12 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody class="footnotes"><tr><td colspan="3">
|
||||
<div class="footnote"><p><sup>[<a name="ftn.id1351081" href="#id1351081" class="para">1</a>] </sup>
|
||||
<div class="footnote"><p><sup>[<a name="ftn.id1350810" href="#id1350810" class="para">1</a>] </sup>
|
||||
There are a small number of our test cases where the R library
|
||||
fails to converge on a result: these tend to dominate the performance
|
||||
result.
|
||||
</p></div>
|
||||
<div class="footnote"><p><sup>[<a name="ftn.id1351835" href="#id1351835" class="para">2</a>] </sup>
|
||||
<div class="footnote"><p><sup>[<a name="ftn.id1351565" href="#id1351565" class="para">2</a>] </sup>
|
||||
The R library appears to use a linear-search strategy, that can
|
||||
perform very badly in a small number of pathological cases, but
|
||||
may or may not be more efficient in "typical" cases
|
||||
|
@ -26,7 +26,7 @@
|
||||
penalty for using the library in debug mode can be quite large.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1345668"></a><p class="title"><b>Table 47. Performance Comparison of Release and Debug Settings</b></p>
|
||||
<a name="id1345419"></a><p class="title"><b>Table 47. Performance Comparison of Release and Debug Settings</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Performance Comparison of Release and Debug Settings">
|
||||
<colgroup>
|
||||
<col>
|
||||
|
@ -19,33 +19,25 @@
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="math_toolkit.perf.perf_over"></a><a class="link" href="perf_over.html" title="Performance Overview">Performance Overview</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
By and large the performance of this library should be acceptable for most
|
||||
needs. However, you should note that the library's primary emphasis is
|
||||
on accuracy and numerical stability, and <span class="emphasis"><em>not</em></span> speed.
|
||||
</p>
|
||||
<p>
|
||||
needs. However, you should note that the library's primary emphasis is on
|
||||
accuracy and numerical stability, and <span class="emphasis"><em>not</em></span> speed.
|
||||
</p>
|
||||
<p>
|
||||
In terms of the algorithms used, this library aims to use the same "best
|
||||
of breed" algorithms as many other libraries: the principle difference
|
||||
is that this library is implemented in C++ - taking advantage of all the
|
||||
abstraction mechanisms that C++ offers - where as most traditional numeric
|
||||
libraries are implemented in C or FORTRAN. Traditionally languages such
|
||||
as C or FORTRAN are perceived as easier to optimise than more complex languages
|
||||
libraries are implemented in C or FORTRAN. Traditionally languages such as
|
||||
C or FORTRAN are perceived as easier to optimise than more complex languages
|
||||
like C++, so in a sense this library provides a good test of current compiler
|
||||
technology, and the "abstraction penalty" - if any - of C++ compared
|
||||
to other languages.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The two most important things you can do to ensure the best performance
|
||||
from this library are:
|
||||
</p>
|
||||
<p>
|
||||
The two most important things you can do to ensure the best performance from
|
||||
this library are:
|
||||
</p>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
@ -59,14 +51,10 @@
|
||||
compilers for example.
|
||||
</li>
|
||||
</ol></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
The <a class="link" href="../perf.html" title="Performance">performance section</a> contains
|
||||
more information on the performance of this library, what you can do to
|
||||
fine tune it, and how this library compares to some other open source alternatives.
|
||||
</p>
|
||||
<p>
|
||||
more information on the performance of this library, what you can do to fine
|
||||
tune it, and how this library compares to some other open source alternatives.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
|
@ -231,7 +231,7 @@
|
||||
highly vectorisable processors in the future.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1347061"></a><p class="title"><b>Table 49. A Comparison of Polynomial Evaluation Methods</b></p>
|
||||
<a name="id1346813"></a><p class="title"><b>Table 49. A Comparison of Polynomial Evaluation Methods</b></p>
|
||||
<div class="table-contents"><table class="table" summary="A Comparison of Polynomial Evaluation Methods">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -631,7 +631,7 @@
|
||||
tutorial</a>.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1348546"></a><p class="title"><b>Table 50. Performance Comparison with and Without Internal Promotion to long
|
||||
<a name="id1347509"></a><p class="title"><b>Table 50. Performance Comparison with and Without Internal Promotion to long
|
||||
double</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Performance Comparison with and Without Internal Promotion to long
|
||||
double">
|
||||
|
@ -23,29 +23,29 @@
|
||||
<dt><span class="section"><a href="policy/pol_overview.html">Policy Overview</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial.html">Policy Tutorial</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/what_is_a_policy.html">
|
||||
So Just What is a Policy Anyway?</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/policy_tut_defaults.html">
|
||||
Policies Have Sensible Defaults</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/policy_usage.html"> So
|
||||
How are Policies Used Anyway?</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/changing_policy_defaults.html">
|
||||
Changing the Policy Defaults</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/ad_hoc_dist_policies.html">
|
||||
Setting Policies for Distributions on an Ad Hoc Basis</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/ad_hoc_sf_policies.html">
|
||||
Changing the Policy on an Ad Hoc Basis for the Special Functions</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/namespace_policies.html">
|
||||
Setting Policies at Namespace or Translation Unit Scope</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/user_def_err_pol.html">
|
||||
Calling User Defined Error Handlers</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/understand_dis_quant.html">
|
||||
Understanding Quantiles of Discrete Distributions</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/what_is_a_policy.html">So
|
||||
Just What is a Policy Anyway?</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/policy_tut_defaults.html">Policies
|
||||
Have Sensible Defaults</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/policy_usage.html">So How
|
||||
are Policies Used Anyway?</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/changing_policy_defaults.html">Changing
|
||||
the Policy Defaults</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/ad_hoc_dist_policies.html">Setting
|
||||
Policies for Distributions on an Ad Hoc Basis</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/ad_hoc_sf_policies.html">Changing
|
||||
the Policy on an Ad Hoc Basis for the Special Functions</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/namespace_policies.html">Setting
|
||||
Policies at Namespace or Translation Unit Scope</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/user_def_err_pol.html">Calling
|
||||
User Defined Error Handlers</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_tutorial/understand_dis_quant.html">Understanding
|
||||
Quantiles of Discrete Distributions</a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="policy/pol_ref.html">Policy Reference</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt><span class="section"><a href="policy/pol_ref/error_handling_policies.html">
|
||||
Error Handling Policies</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_ref/error_handling_policies.html">Error
|
||||
Handling Policies</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_ref/internal_promotion.html">Internal
|
||||
Promotion Policies</a></span></dt>
|
||||
<dt><span class="section"><a href="policy/pol_ref/assert_undefined.html">Mathematically
|
||||
@ -64,8 +64,6 @@
|
||||
Reference</a></span></dt>
|
||||
</dl></dd>
|
||||
</dl></div>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -19,8 +19,6 @@
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="math_toolkit.policy.pol_overview"></a><a class="link" href="pol_overview.html" title="Policy Overview">Policy Overview</a>
|
||||
</h3></div></div></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Policies are a powerful fine-grain mechanism that allow you to customise
|
||||
the behaviour of this library according to your needs. There is more information
|
||||
@ -28,32 +26,22 @@
|
||||
tutorial</a> and the <a class="link" href="pol_ref.html" title="Policy Reference">policy
|
||||
reference</a>.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Generally speaking unless you find that the <a class="link" href="pol_tutorial/policy_tut_defaults.html" title="Policies Have Sensible Defaults">default
|
||||
policy behaviour</a> when encountering 'bad' argument values does not
|
||||
meet your needs, you should not need to worry about policies.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Policies are a compile-time mechanism that allow you to change error-handling
|
||||
or calculation precision either program wide, or at the call site.
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Although the policy mechanism itself is rather complicated, in practice
|
||||
it is easy to use, and very flexible.
|
||||
</p>
|
||||
<p>
|
||||
Although the policy mechanism itself is rather complicated, in practice it
|
||||
is easy to use, and very flexible.
|
||||
</p>
|
||||
<p>
|
||||
Using policies you can control:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
<a class="link" href="pol_ref/error_handling_policies.html" title="Error Handling Policies">How
|
||||
@ -70,8 +58,8 @@
|
||||
</li>
|
||||
<li>
|
||||
What to do when a <a class="link" href="pol_ref/assert_undefined.html" title="Mathematically Undefined Function Policies">mathematically
|
||||
undefined function</a> is used: Should this raise a run-time or
|
||||
compile-time error?
|
||||
undefined function</a> is used: Should this raise a run-time or compile-time
|
||||
error?
|
||||
</li>
|
||||
<li>
|
||||
Whether <a class="link" href="pol_ref/discrete_quant_ref.html" title="Discrete Quantile Policies">discrete
|
||||
@ -79,18 +67,14 @@
|
||||
values, and how they are rounded.
|
||||
</li>
|
||||
<li>
|
||||
How many iterations a special function is permitted to perform in a
|
||||
series evaluation or root finding algorithm before it gives up and
|
||||
raises an <a class="link" href="../main_overview/error_handling.html#evaluation_error">evaluation_error</a>.
|
||||
How many iterations a special function is permitted to perform in a series
|
||||
evaluation or root finding algorithm before it gives up and raises an
|
||||
<a class="link" href="../main_overview/error_handling.html#evaluation_error">evaluation_error</a>.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
You can control policies:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li>
|
||||
Using <a class="link" href="pol_ref/policy_defaults.html" title="Using macros to Change the Policy Defaults">macros</a>
|
||||
@ -108,8 +92,6 @@
|
||||
distribution</a>.
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
|
@ -20,8 +20,8 @@
|
||||
<a name="math_toolkit.policy.pol_ref"></a><a class="link" href="pol_ref.html" title="Policy Reference">Policy Reference</a>
|
||||
</h3></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="pol_ref/error_handling_policies.html">
|
||||
Error Handling Policies</a></span></dt>
|
||||
<dt><span class="section"><a href="pol_ref/error_handling_policies.html">Error
|
||||
Handling Policies</a></span></dt>
|
||||
<dt><span class="section"><a href="pol_ref/internal_promotion.html">Internal
|
||||
Promotion Policies</a></span></dt>
|
||||
<dt><span class="section"><a href="pol_ref/assert_undefined.html">Mathematically
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user