Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / math / doc / html / math_toolkit / dist_ref / dists / nc_beta_dist.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Noncentral Beta Distribution</title>
5 <link rel="stylesheet" href="../../../math.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../../../index.html" title="Math Toolkit 2.11.0">
8 <link rel="up" href="../dists.html" title="Distributions">
9 <link rel="prev" href="negative_binomial_dist.html" title="Negative Binomial Distribution">
10 <link rel="next" href="nc_chi_squared_dist.html" title="Noncentral Chi-Squared Distribution">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="negative_binomial_dist.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nc_chi_squared_dist.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h4 class="title">
27 <a name="math_toolkit.dist_ref.dists.nc_beta_dist"></a><a class="link" href="nc_beta_dist.html" title="Noncentral Beta Distribution">Noncentral
28         Beta Distribution</a>
29 </h4></div></div></div>
30 <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">distributions</span><span class="special">/</span><span class="identifier">non_central_beta</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></pre>
31 <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>
32
33 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RealType</span> <span class="special">=</span> <span class="keyword">double</span><span class="special">,</span>
34           <span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Chapter&#160;20.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a>   <span class="special">=</span> <a class="link" href="../../pol_ref/pol_ref_ref.html" title="Policy Class Reference">policies::policy&lt;&gt;</a> <span class="special">&gt;</span>
35 <span class="keyword">class</span> <span class="identifier">non_central_beta_distribution</span><span class="special">;</span>
36
37 <span class="keyword">typedef</span> <span class="identifier">non_central_beta_distribution</span><span class="special">&lt;&gt;</span> <span class="identifier">non_central_beta</span><span class="special">;</span>
38
39 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RealType</span><span class="special">,</span> <span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Chapter&#160;20.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</span>
40 <span class="keyword">class</span> <span class="identifier">non_central_beta_distribution</span>
41 <span class="special">{</span>
42 <span class="keyword">public</span><span class="special">:</span>
43    <span class="keyword">typedef</span> <span class="identifier">RealType</span>  <span class="identifier">value_type</span><span class="special">;</span>
44    <span class="keyword">typedef</span> <span class="identifier">Policy</span>    <span class="identifier">policy_type</span><span class="special">;</span>
45
46    <span class="comment">// Constructor:</span>
47    <span class="identifier">non_central_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> <span class="identifier">RealType</span> <span class="identifier">lambda</span><span class="special">);</span>
48
49    <span class="comment">// Accessor to shape parameters:</span>
50    <span class="identifier">RealType</span> <span class="identifier">alpha</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
51    <span class="identifier">RealType</span> <span class="identifier">beta</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
52
53    <span class="comment">// Accessor to non-centrality parameter lambda:</span>
54    <span class="identifier">RealType</span> <span class="identifier">non_centrality</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
55 <span class="special">};</span>
56
57 <span class="special">}}</span> <span class="comment">// namespaces</span>
58 </pre>
59 <p>
60           The noncentral beta distribution is a generalization of the <a class="link" href="beta_dist.html" title="Beta Distribution">Beta
61           Distribution</a>.
62         </p>
63 <p>
64           It is defined as the ratio
65         </p>
66 <div class="blockquote"><blockquote class="blockquote"><p>
67             <span class="serif_italic">X = &#967;<sub>m</sub><sup>2</sup>(&#955;) / (&#967;<sub>m</sub><sup>2</sup>(&#955;) + &#967;<sub>n</sub><sup>2</sup>)</span>
68           </p></blockquote></div>
69 <p>
70           where <span class="serif_italic">&#967;<sub>m</sub><sup>2</sup>(&#955;)</span> is a noncentral <span class="serif_italic">&#967;<sup>2</sup></span> random variable with <span class="emphasis"><em>m</em></span>
71           degrees of freedom, and &#967;<sub>n</sub><sup>2</sup>
72 is a central <span class="serif_italic">&#967;<sup>2</sup> </span>
73           random variable with <span class="emphasis"><em>n</em></span> degrees of freedom.
74         </p>
75 <p>
76           This gives a PDF that can be expressed as a Poisson mixture of beta distribution
77           PDFs:
78         </p>
79 <div class="blockquote"><blockquote class="blockquote"><p>
80             <span class="inlinemediaobject"><img src="../../../../equations/nc_beta_ref1.svg"></span>
81
82           </p></blockquote></div>
83 <p>
84           where P(i;&#955;/2) is the discrete Poisson probablity at <span class="emphasis"><em>i</em></span>,
85           with mean &#955;/2, and I<sub>x</sub><sup>'</sup>(&#945;, &#946;) is the derivative of the incomplete beta function.
86           This leads to the usual form of the CDF as:
87         </p>
88 <div class="blockquote"><blockquote class="blockquote"><p>
89             <span class="inlinemediaobject"><img src="../../../../equations/nc_beta_ref2.svg"></span>
90
91           </p></blockquote></div>
92 <p>
93           The following graph illustrates how the distribution changes for different
94           values of &#955;:
95         </p>
96 <div class="blockquote"><blockquote class="blockquote"><p>
97             <span class="inlinemediaobject"><img src="../../../../graphs/nc_beta_pdf.svg" align="middle"></span>
98
99           </p></blockquote></div>
100 <h5>
101 <a name="math_toolkit.dist_ref.dists.nc_beta_dist.h0"></a>
102           <span class="phrase"><a name="math_toolkit.dist_ref.dists.nc_beta_dist.member_functions"></a></span><a class="link" href="nc_beta_dist.html#math_toolkit.dist_ref.dists.nc_beta_dist.member_functions">Member
103           Functions</a>
104         </h5>
105 <pre class="programlisting"><span class="identifier">non_central_beta_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">lambda</span><span class="special">);</span>
106 </pre>
107 <p>
108           Constructs a noncentral beta distribution with shape parameters <span class="emphasis"><em>a</em></span>
109           and <span class="emphasis"><em>b</em></span> and non-centrality parameter <span class="emphasis"><em>lambda</em></span>.
110         </p>
111 <p>
112           Requires a &gt; 0, b &gt; 0 and lambda &gt;= 0, otherwise calls <a class="link" href="../../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a>.
113         </p>
114 <pre class="programlisting"><span class="identifier">RealType</span> <span class="identifier">alpha</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
115 </pre>
116 <p>
117           Returns the parameter <span class="emphasis"><em>a</em></span> from which this object was
118           constructed.
119         </p>
120 <pre class="programlisting"><span class="identifier">RealType</span> <span class="identifier">beta</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
121 </pre>
122 <p>
123           Returns the parameter <span class="emphasis"><em>b</em></span> from which this object was
124           constructed.
125         </p>
126 <pre class="programlisting"><span class="identifier">RealType</span> <span class="identifier">non_centrality</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
127 </pre>
128 <p>
129           Returns the parameter <span class="emphasis"><em>lambda</em></span> from which this object
130           was constructed.
131         </p>
132 <h5>
133 <a name="math_toolkit.dist_ref.dists.nc_beta_dist.h1"></a>
134           <span class="phrase"><a name="math_toolkit.dist_ref.dists.nc_beta_dist.non_member_accessors"></a></span><a class="link" href="nc_beta_dist.html#math_toolkit.dist_ref.dists.nc_beta_dist.non_member_accessors">Non-member
135           Accessors</a>
136         </h5>
137 <p>
138           Most of the <a class="link" href="../nmp.html" title="Non-Member Properties">usual non-member
139           accessor functions</a> are supported: <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.cdf">Cumulative
140           Distribution Function</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.pdf">Probability
141           Density Function</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.quantile">Quantile</a>,
142           <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.mean">mean</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.variance">variance</a>,
143           <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.sd">standard deviation</a>,
144           <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.median">median</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.mode">mode</a>,
145           <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.hazard">Hazard Function</a>,
146           <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.chf">Cumulative Hazard Function</a>,
147           <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.range">range</a> and <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.support">support</a>.
148         </p>
149 <p>
150           Mean and variance are implemented using hypergeometric pfq functions and
151           relations given in <a href="http://reference.wolfram.com/mathematica/ref/NoncentralBetaDistribution.html" target="_top">Wolfram
152           Noncentral Beta Distribution</a>.
153         </p>
154 <p>
155           However, the following are not currently implemented: <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.skewness">skewness</a>,
156           <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis">kurtosis</a> and
157           <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis_excess">kurtosis_excess</a>.
158         </p>
159 <p>
160           The domain of the random variable is [0, 1].
161         </p>
162 <h5>
163 <a name="math_toolkit.dist_ref.dists.nc_beta_dist.h2"></a>
164           <span class="phrase"><a name="math_toolkit.dist_ref.dists.nc_beta_dist.accuracy"></a></span><a class="link" href="nc_beta_dist.html#math_toolkit.dist_ref.dists.nc_beta_dist.accuracy">Accuracy</a>
165         </h5>
166 <p>
167           The following table shows the peak errors (in units of <a href="http://en.wikipedia.org/wiki/Machine_epsilon" target="_top">epsilon</a>)
168           found on various platforms with various floating point types. The failures
169           in the comparison to the <a href="http://www.r-project.org/" target="_top">R Math
170           library</a>, seem to be mostly in the corner cases when the probablity
171           would be very small. Unless otherwise specified any floating-point type
172           that is narrower than the one shown will have <a class="link" href="../../relative_error.html#math_toolkit.relative_error.zero_error">effectively
173           zero error</a>.
174         </p>
175 <div class="table">
176 <a name="math_toolkit.dist_ref.dists.nc_beta_dist.table_non_central_beta_CDF"></a><p class="title"><b>Table&#160;5.4.&#160;Error rates for non central beta CDF</b></p>
177 <div class="table-contents"><table class="table" summary="Error rates for non central beta CDF">
178 <colgroup>
179 <col>
180 <col>
181 <col>
182 <col>
183 <col>
184 </colgroup>
185 <thead><tr>
186 <th>
187                 </th>
188 <th>
189                   <p>
190                     GNU C++ version 7.1.0<br> linux<br> double
191                   </p>
192                 </th>
193 <th>
194                   <p>
195                     GNU C++ version 7.1.0<br> linux<br> long double
196                   </p>
197                 </th>
198 <th>
199                   <p>
200                     Sun compiler version 0x5150<br> Sun Solaris<br> long double
201                   </p>
202                 </th>
203 <th>
204                   <p>
205                     Microsoft Visual C++ version 14.1<br> Win32<br> double
206                   </p>
207                 </th>
208 </tr></thead>
209 <tbody>
210 <tr>
211 <td>
212                   <p>
213                     Non Central Beta, medium parameters
214                   </p>
215                 </td>
216 <td>
217                   <p>
218                     <span class="blue">Max = 0.998&#949; (Mean = 0.0649&#949;)</span><br>
219                     <br> (<span class="emphasis"><em>Rmath 3.2.3:</em></span> <span class="red">Max
220                     = 1.46e+26&#949; (Mean = 3.5e+24&#949;) <a class="link" href="../../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_non_central_beta_CDF_Rmath_3_2_3_Non_Central_Beta_medium_parameters">And
221                     other failures.</a>)</span>
222                   </p>
223                 </td>
224 <td>
225                   <p>
226                     <span class="blue">Max = 824&#949; (Mean = 27.4&#949;)</span>
227                   </p>
228                 </td>
229 <td>
230                   <p>
231                     <span class="blue">Max = 832&#949; (Mean = 38.1&#949;)</span>
232                   </p>
233                 </td>
234 <td>
235                   <p>
236                     <span class="blue">Max = 242&#949; (Mean = 31&#949;)</span>
237                   </p>
238                 </td>
239 </tr>
240 <tr>
241 <td>
242                   <p>
243                     Non Central Beta, large parameters
244                   </p>
245                 </td>
246 <td>
247                   <p>
248                     <span class="blue">Max = 1.18&#949; (Mean = 0.175&#949;)</span><br>
249                     <br> (<span class="emphasis"><em>Rmath 3.2.3:</em></span> <span class="red">Max
250                     = 1.01e+36&#949; (Mean = 1.19e+35&#949;) <a class="link" href="../../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_non_central_beta_CDF_Rmath_3_2_3_Non_Central_Beta_large_parameters">And
251                     other failures.</a>)</span>
252                   </p>
253                 </td>
254 <td>
255                   <p>
256                     <span class="blue">Max = 2.5e+04&#949; (Mean = 3.78e+03&#949;)</span>
257                   </p>
258                 </td>
259 <td>
260                   <p>
261                     <span class="blue">Max = 2.57e+04&#949; (Mean = 4.45e+03&#949;)</span>
262                   </p>
263                 </td>
264 <td>
265                   <p>
266                     <span class="blue">Max = 3.66e+03&#949; (Mean = 500&#949;)</span>
267                   </p>
268                 </td>
269 </tr>
270 </tbody>
271 </table></div>
272 </div>
273 <br class="table-break"><div class="table">
274 <a name="math_toolkit.dist_ref.dists.nc_beta_dist.table_non_central_beta_CDF_complement"></a><p class="title"><b>Table&#160;5.5.&#160;Error rates for non central beta CDF complement</b></p>
275 <div class="table-contents"><table class="table" summary="Error rates for non central beta CDF complement">
276 <colgroup>
277 <col>
278 <col>
279 <col>
280 <col>
281 <col>
282 </colgroup>
283 <thead><tr>
284 <th>
285                 </th>
286 <th>
287                   <p>
288                     GNU C++ version 7.1.0<br> linux<br> double
289                   </p>
290                 </th>
291 <th>
292                   <p>
293                     GNU C++ version 7.1.0<br> linux<br> long double
294                   </p>
295                 </th>
296 <th>
297                   <p>
298                     Sun compiler version 0x5150<br> Sun Solaris<br> long double
299                   </p>
300                 </th>
301 <th>
302                   <p>
303                     Microsoft Visual C++ version 14.1<br> Win32<br> double
304                   </p>
305                 </th>
306 </tr></thead>
307 <tbody>
308 <tr>
309 <td>
310                   <p>
311                     Non Central Beta, medium parameters
312                   </p>
313                 </td>
314 <td>
315                   <p>
316                     <span class="blue">Max = 0.998&#949; (Mean = 0.0936&#949;)</span><br>
317                     <br> (<span class="emphasis"><em>Rmath 3.2.3:</em></span> <span class="red">Max
318                     = 7.5e+97&#949; (Mean = 1.37e+96&#949;) <a class="link" href="../../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_non_central_beta_CDF_complement_Rmath_3_2_3_Non_Central_Beta_medium_parameters">And
319                     other failures.</a>)</span>
320                   </p>
321                 </td>
322 <td>
323                   <p>
324                     <span class="blue">Max = 396&#949; (Mean = 50.7&#949;)</span>
325                   </p>
326                 </td>
327 <td>
328                   <p>
329                     <span class="blue">Max = 554&#949; (Mean = 57.2&#949;)</span>
330                   </p>
331                 </td>
332 <td>
333                   <p>
334                     <span class="blue">Max = 624&#949; (Mean = 62.7&#949;)</span>
335                   </p>
336                 </td>
337 </tr>
338 <tr>
339 <td>
340                   <p>
341                     Non Central Beta, large parameters
342                   </p>
343                 </td>
344 <td>
345                   <p>
346                     <span class="blue">Max = 0.986&#949; (Mean = 0.188&#949;)</span><br>
347                     <br> (<span class="emphasis"><em>Rmath 3.2.3:</em></span> <span class="red">Max
348                     = +INF&#949; (Mean = +INF&#949;) <a class="link" href="../../logs_and_tables/logs.html#errors_GNU_C_version_7_1_0_linux_double_non_central_beta_CDF_complement_Rmath_3_2_3_Non_Central_Beta_large_parameters">And
349                     other failures.</a>)</span>
350                   </p>
351                 </td>
352 <td>
353                   <p>
354                     <span class="blue">Max = 6.83e+03&#949; (Mean = 993&#949;)</span>
355                   </p>
356                 </td>
357 <td>
358                   <p>
359                     <span class="blue">Max = 3.56e+03&#949; (Mean = 707&#949;)</span>
360                   </p>
361                 </td>
362 <td>
363                   <p>
364                     <span class="blue">Max = 1.25e+04&#949; (Mean = 1.49e+03&#949;)</span>
365                   </p>
366                 </td>
367 </tr>
368 </tbody>
369 </table></div>
370 </div>
371 <br class="table-break"><p>
372           Error rates for the PDF, the complement of the CDF and for the quantile
373           functions are broadly similar.
374         </p>
375 <h5>
376 <a name="math_toolkit.dist_ref.dists.nc_beta_dist.h3"></a>
377           <span class="phrase"><a name="math_toolkit.dist_ref.dists.nc_beta_dist.tests"></a></span><a class="link" href="nc_beta_dist.html#math_toolkit.dist_ref.dists.nc_beta_dist.tests">Tests</a>
378         </h5>
379 <p>
380           There are two sets of test data used to verify this implementation: firstly
381           we can compare with a few sample values generated by the <a href="http://www.r-project.org/" target="_top">R
382           library</a>. Secondly, we have tables of test data, computed with this
383           implementation and using interval arithmetic - this data should be accurate
384           to at least 50 decimal digits - and is the used for our accuracy tests.
385         </p>
386 <h5>
387 <a name="math_toolkit.dist_ref.dists.nc_beta_dist.h4"></a>
388           <span class="phrase"><a name="math_toolkit.dist_ref.dists.nc_beta_dist.implementation"></a></span><a class="link" href="nc_beta_dist.html#math_toolkit.dist_ref.dists.nc_beta_dist.implementation">Implementation</a>
389         </h5>
390 <p>
391           The CDF and its complement are evaluated as follows:
392         </p>
393 <p>
394           First we determine which of the two values (the CDF or its complement)
395           is likely to be the smaller, the crossover point is taken to be the mean
396           of the distribution: for this we use the approximation due to: R. Chattamvelli
397           and R. Shanmugam, "Algorithm AS 310: Computing the Non-Central Beta
398           Distribution Function", Applied Statistics, Vol. 46, No. 1. (1997),
399           pp. 146-156.
400         </p>
401 <div class="blockquote"><blockquote class="blockquote"><p>
402             <span class="inlinemediaobject"><img src="../../../../equations/nc_beta_ref3.svg"></span>
403
404           </p></blockquote></div>
405 <p>
406           Then either the CDF or its complement is computed using the relations:
407         </p>
408 <div class="blockquote"><blockquote class="blockquote"><p>
409             <span class="inlinemediaobject"><img src="../../../../equations/nc_beta_ref4.svg"></span>
410
411           </p></blockquote></div>
412 <p>
413           The summation is performed by starting at i = &#955;/2, and then recursing in
414           both directions, using the usual recurrence relations for the Poisson PDF
415           and incomplete beta functions. This is the "Method 2" described
416           by:
417         </p>
418 <p>
419           Denise Benton and K. Krishnamoorthy, "Computing discrete mixtures
420           of continuous distributions: noncentral chisquare, noncentral t and the
421           distribution of the square of the sample multiple correlation coefficient",
422           Computational Statistics &amp; Data Analysis 43 (2003) 249-267.
423         </p>
424 <p>
425           Specific applications of the above formulae to the noncentral beta distribution
426           can be found in:
427         </p>
428 <p>
429           Russell V. Lenth, "Algorithm AS 226: Computing Noncentral Beta Probabilities",
430           Applied Statistics, Vol. 36, No. 2. (1987), pp. 241-244.
431         </p>
432 <p>
433           H. Frick, "Algorithm AS R84: A Remark on Algorithm AS 226: Computing
434           Non-Central Beta Probabilities", Applied Statistics, Vol. 39, No.
435           2. (1990), pp. 311-312.
436         </p>
437 <p>
438           Ming Long Lam, "Remark AS R95: A Remark on Algorithm AS 226: Computing
439           Non-Central Beta Probabilities", Applied Statistics, Vol. 44, No.
440           4. (1995), pp. 551-552.
441         </p>
442 <p>
443           Harry O. Posten, "An Effective Algorithm for the Noncentral Beta Distribution
444           Function", The American Statistician, Vol. 47, No. 2. (May, 1993),
445           pp. 129-131.
446         </p>
447 <p>
448           R. Chattamvelli, "A Note on the Noncentral Beta Distribution Function",
449           The American Statistician, Vol. 49, No. 2. (May, 1995), pp. 231-234.
450         </p>
451 <p>
452           Of these, the Posten reference provides the most complete overview, and
453           includes the modification starting iteration at &#955;/2.
454         </p>
455 <p>
456           The main difference between this implementation and the above references
457           is the direct computation of the complement when most efficient to do so,
458           and the accumulation of the sum to -1 rather than subtracting the result
459           from 1 at the end: this can substantially reduce the number of iterations
460           required when the result is near 1.
461         </p>
462 <p>
463           The PDF is computed using the methodology of Benton and Krishnamoorthy
464           and the relation:
465         </p>
466 <div class="blockquote"><blockquote class="blockquote"><p>
467             <span class="inlinemediaobject"><img src="../../../../equations/nc_beta_ref1.svg"></span>
468
469           </p></blockquote></div>
470 <p>
471           Quantiles are computed using a specially modified version of <a class="link" href="../../roots_noderiv/bracket_solve.html" title="Bracket and Solve Root">bracket
472           and solve</a>, starting the search for the root at the mean of the distribution.
473           (A Cornish-Fisher type expansion was also tried, but while this gets quite
474           close to the root in many cases, when it is wrong it tends to introduce
475           quite pathological behaviour: more investigation in this area is probably
476           warranted).
477         </p>
478 </div>
479 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
480 <td align="left"></td>
481 <td align="right"><div class="copyright-footer">Copyright &#169; 2006-2019 Nikhar
482       Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos,
483       Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan
484       R&#229;de, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg,
485       Daryle Walker and Xiaogang Zhang<p>
486         Distributed under the Boost Software License, Version 1.0. (See accompanying
487         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>)
488       </p>
489 </div></td>
490 </tr></table>
491 <hr>
492 <div class="spirit-nav">
493 <a accesskey="p" href="negative_binomial_dist.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nc_chi_squared_dist.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
494 </div>
495 </body>
496 </html>