<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Lists and Tables</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../index.html" title="Document To Test Formatting">
<link rel="up" href="../index.html" title="Document To Test Formatting">
<link rel="prev" href="blurbs.html" title="Blurbs">
<link rel="next" href="images.html" title="Images">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="blurbs.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="images.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="document_to_test_formatting.lists_and_tables"></a><a class="link" href="lists_and_tables.html" title="Lists and Tables">Lists and
    Tables</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="lists_and_tables.html#document_to_test_formatting.lists_and_tables.lists">Lists</a></span></dt>
<dt><span class="section"><a href="lists_and_tables.html#document_to_test_formatting.lists_and_tables.variable_lists">Variable
      Lists</a></span></dt>
<dt><span class="section"><a href="lists_and_tables.html#document_to_test_formatting.lists_and_tables.tables">Tables</a></span></dt>
</dl></div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="document_to_test_formatting.lists_and_tables.lists"></a><a class="link" href="lists_and_tables.html#document_to_test_formatting.lists_and_tables.lists" title="Lists">Lists</a>
</h3></div></div></div>
<p>
        A numbered list:
      </p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
            One
          </li>
<li class="listitem">
            Two
          </li>
<li class="listitem">
            Three
            <div class="orderedlist"><ol class="orderedlist" type="a">
<li class="listitem">
                  Three.a
                </li>
<li class="listitem">
                  Three.b
                </li>
<li class="listitem">
                  Three.c
                </li>
</ol></div>
          </li>
<li class="listitem">
            Four
            <div class="orderedlist"><ol class="orderedlist" type="a"><li class="listitem">
                  Four.a
                  <div class="orderedlist"><ol class="orderedlist" type="i">
<li class="listitem">
                        Four.a.i
                      </li>
<li class="listitem">
                        Four.a.ii
                      </li>
</ol></div>
                </li></ol></div>
          </li>
<li class="listitem">
            Five
          </li>
</ol></div>
<p>
        An unordered list:
      </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
            First
          </li>
<li class="listitem">
            Second
          </li>
<li class="listitem">
            Third
          </li>
</ul></div>
<p>
        A mixture of the two:
      </p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
            1
            <div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
                  1.a
                  <div class="orderedlist"><ol class="orderedlist" type="a">
<li class="listitem">
                        1.a.1
                      </li>
<li class="listitem">
                        1.a.2
                      </li>
</ol></div>
                </li>
<li class="listitem">
                  1.b
                </li>
</ul></div>
          </li>
<li class="listitem">
            2
            <div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
                  2.a
                </li>
<li class="listitem">
                  2.b
                  <div class="orderedlist"><ol class="orderedlist" type="a">
<li class="listitem">
                        2.b.1
                      </li>
<li class="listitem">
                        2.b.2
                        <div class="itemizedlist"><ul class="itemizedlist" type="circle">
<li class="listitem">
                              2.b.2.a
                            </li>
<li class="listitem">
                              2.b.2.b
                            </li>
</ul></div>
                      </li>
</ol></div>
                </li>
</ul></div>
          </li>
</ol></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="document_to_test_formatting.lists_and_tables.variable_lists"></a><a class="link" href="lists_and_tables.html#document_to_test_formatting.lists_and_tables.variable_lists" title="Variable Lists">Variable
      Lists</a>
</h3></div></div></div>
<div class="variablelist">
<p class="title"><b>A Variable List</b></p>
<dl>
<dt><span class="term">term 1</span></dt>
<dd><p>
              The definition of term 1
            </p></dd>
<dt><span class="term">term 2</span></dt>
<dd><p>
              The definition of term 2
            </p></dd>
<dt><span class="term">term 3</span></dt>
<dd><p>
              The definition of term 3
            </p></dd>
</dl>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="document_to_test_formatting.lists_and_tables.tables"></a><a class="link" href="lists_and_tables.html#document_to_test_formatting.lists_and_tables.tables" title="Tables">Tables</a>
</h3></div></div></div>
<p>
        Here's a big table with code and other tricky things:
      </p>
<div class="table">
<a name="id769721"></a><p class="title"><b>Table&#160;1.&#160;Notes on the Implementation of the Beta Distribution</b></p>
<div class="table-contents"><table class="table" summary="Notes on the Implementation of the Beta Distribution">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Function
                </p>
              </th>
<th>
                <p>
                  Implementation Notes
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  pdf
                </p>
              </td>
<td>
                <p>
                  f(x;&#945;,&#946;) = x<sup>&#945; - 1</sup> (1 - x)<sup>&#946; -1</sup> / B(&#945;, &#946;)
                </p>
                <p>
                  Implemented using ibeta_derivative(a, b, x).
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  cdf
                </p>
              </td>
<td>
                <p>
                  Using the incomplete beta function ibeta(a, b, x)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  cdf complement
                </p>
              </td>
<td>
                <p>
                  ibetac(a, b, x)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  quantile
                </p>
              </td>
<td>
                <p>
                  Using the inverse incomplete beta function ibeta_inv(a, b, p)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  quantile from the complement
                </p>
              </td>
<td>
                <p>
                  ibetac_inv(a, b, q)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mean
                </p>
              </td>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">a</span><span class="special">/(</span><span class="identifier">a</span><span class="special">+</span><span class="identifier">b</span><span class="special">)</span></code>
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  variance
                </p>
              </td>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">a</span> <span class="special">*</span>
                  <span class="identifier">b</span> <span class="special">/</span>
                  <span class="special">(</span><span class="identifier">a</span><span class="special">+</span><span class="identifier">b</span><span class="special">)^</span><span class="number">2</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">a</span> <span class="special">+</span>
                  <span class="identifier">b</span> <span class="special">+</span>
                  <span class="number">1</span><span class="special">)</span></code>
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  mode
                </p>
              </td>
<td>
                <p>
                  <code class="computeroutput"><span class="special">(</span><span class="identifier">a</span><span class="special">-</span><span class="number">1</span><span class="special">)</span> <span class="special">/</span> <span class="special">(</span><span class="identifier">a</span>
                  <span class="special">+</span> <span class="identifier">b</span>
                  <span class="special">+</span> <span class="number">2</span><span class="special">)</span></code>
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  skewness
                </p>
              </td>
<td>
                <p>
                  <code class="computeroutput"><span class="number">2</span> <span class="special">(</span><span class="identifier">b</span><span class="special">-</span><span class="identifier">a</span><span class="special">)</span>
                  <span class="identifier">sqrt</span><span class="special">(</span><span class="identifier">a</span><span class="special">+</span><span class="identifier">b</span><span class="special">+</span><span class="number">1</span><span class="special">)/(</span><span class="identifier">a</span><span class="special">+</span><span class="identifier">b</span><span class="special">+</span><span class="number">2</span><span class="special">)</span> <span class="special">*</span> <span class="identifier">sqrt</span><span class="special">(</span><span class="identifier">a</span>
                  <span class="special">*</span> <span class="identifier">b</span><span class="special">)</span></code>
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  kurtosis excess
                </p>
              </td>
<td>
                <p>
                  <span class="inlinemediaobject"><img src="../images/beta_dist_kurtosis.png" alt="beta_dist_kurtosis"></span>
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  kurtosis
                </p>
              </td>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">kurtosis</span> <span class="special">+</span>
                  <span class="number">3</span></code>
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  parameter estimation
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  alpha
                </p>
                <p>
                  from mean and variance
                </p>
              </td>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">mean</span> <span class="special">*</span>
                  <span class="special">((</span> <span class="special">(</span><span class="identifier">mean</span> <span class="special">*</span>
                  <span class="special">(</span><span class="number">1</span>
                  <span class="special">-</span> <span class="identifier">mean</span><span class="special">))</span> <span class="special">/</span> <span class="identifier">variance</span><span class="special">)-</span>
                  <span class="number">1</span><span class="special">)</span></code>
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  beta
                </p>
                <p>
                  from mean and variance
                </p>
              </td>
<td>
                <p>
                  <code class="computeroutput"><span class="special">(</span><span class="number">1</span>
                  <span class="special">-</span> <span class="identifier">mean</span><span class="special">)</span> <span class="special">*</span> <span class="special">(((</span><span class="identifier">mean</span>
                  <span class="special">*</span> <span class="special">(</span><span class="number">1</span> <span class="special">-</span> <span class="identifier">mean</span><span class="special">))</span>
                  <span class="special">/</span><span class="identifier">variance</span><span class="special">)-</span><span class="number">1</span><span class="special">)</span></code>
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  The member functions <code class="computeroutput"><span class="identifier">estimate_alpha</span></code>
                  and <code class="computeroutput"><span class="identifier">estimate_beta</span></code>
                </p>
                <p>
                  from cdf and probability x
                </p>
                <p>
                  and <span class="bold"><strong>either</strong></span> <code class="computeroutput"><span class="identifier">alpha</span></code>
                  or <code class="computeroutput"><span class="identifier">beta</span></code>
                </p>
              </td>
<td>
                <p>
                  Implemented in terms of the inverse incomplete beta functions
                </p>
                <p>
                  ibeta_inva, and ibeta_invb respectively.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">estimate_alpha</span></code>
                </p>
              </td>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">ibeta_inva</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="identifier">probability</span><span class="special">)</span></code>
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">estimate_beta</span></code>
                </p>
              </td>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">ibeta_invb</span><span class="special">(</span><span class="identifier">alpha</span><span class="special">,</span>
                  <span class="identifier">x</span><span class="special">,</span>
                  <span class="identifier">probability</span><span class="special">)</span></code>
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break">
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2007 John Maddock, Joel de Guzman, Eric Niebler and Matias
      Capeletto<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="blurbs.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="images.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
