<title>Noncentral T Distribution</title>
<link rel="stylesheet" href="../../../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
-<link rel="home" href="../../../index.html" title="Math Toolkit 2.10.0">
+<link rel="home" href="../../../index.html" title="Math Toolkit 2.11.0">
<link rel="up" href="../dists.html" title="Distributions">
<link rel="prev" href="nc_f_dist.html" title="Noncentral F Distribution">
<link rel="next" href="normal_dist.html" title="Normal (Gaussian) Distribution">
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">math</span><span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">RealType</span> <span class="special">=</span> <span class="keyword">double</span><span class="special">,</span>
- <span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Chapter 19. 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<></a> <span class="special">></span>
+ <span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Chapter 20. 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<></a> <span class="special">></span>
<span class="keyword">class</span> <span class="identifier">non_central_t_distribution</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">non_central_t_distribution</span><span class="special"><></span> <span class="identifier">non_central_t</span><span class="special">;</span>
-<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="Chapter 19. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">></span>
+<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="Chapter 20. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">></span>
<span class="keyword">class</span> <span class="identifier">non_central_t_distribution</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<p>
The noncentral T distribution is a generalization of the <a class="link" href="students_t_dist.html" title="Students t Distribution">Students
t Distribution</a>. Let X have a normal distribution with mean δ and variance
- 1, and let ν S<sup>2</sup> have a chi-squared distribution with degrees of freedom ν.
- Assume that X and S<sup>2</sup> are independent. The distribution of t<sub>ν</sub>(δ)=X/S is called
- a noncentral t distribution with degrees of freedom ν and noncentrality parameter
- δ.
+ 1, and let <span class="emphasis"><em>ν S<sup>2</sup></em></span> have a chi-squared distribution with
+ degrees of freedom ν. Assume that X and S<sup>2</sup> are independent. The distribution
+ of <span class="serif_italic">t<sub>ν</sub>(δ)=X/S</span> is called a noncentral
+ t distribution with degrees of freedom ν and noncentrality parameter δ.
</p>
<p>
This gives the following PDF:
</p>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="inlinemediaobject"><img src="../../../../equations/nc_t_ref1.svg"></span>
+
+ </p></blockquote></div>
<p>
- <span class="inlinemediaobject"><img src="../../../../equations/nc_t_ref1.svg"></span>
- </p>
-<p>
- where <sub>1</sub>F<sub>1</sub>(a;b;x) is a confluent hypergeometric function.
+ where <span class="serif_italic"><sub>1</sub>F<sub>1</sub>(a;b;x)</span> is a confluent hypergeometric
+ function.
</p>
<p>
The following graph illustrates how the distribution changes for different
values of ν and δ:
</p>
-<p>
- <span class="inlinemediaobject"><img src="../../../../graphs/nc_t_pdf.svg" align="middle"></span>
- <span class="inlinemediaobject"><img src="../../../../graphs/nc_t_cdf.svg" align="middle"></span>
- </p>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="inlinemediaobject"><img src="../../../../graphs/nc_t_pdf.svg" align="middle"></span>
+
+ </p></blockquote></div>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="inlinemediaobject"><img src="../../../../graphs/nc_t_cdf.svg" align="middle"></span>
+
+ </p></blockquote></div>
<h5>
<a name="math_toolkit.dist_ref.dists.nc_t_dist.h0"></a>
<span class="phrase"><a name="math_toolkit.dist_ref.dists.nc_t_dist.member_functions"></a></span><a class="link" href="nc_t_dist.html#math_toolkit.dist_ref.dists.nc_t_dist.member_functions">Member
<p>
This uses the following formula for the CDF:
</p>
-<p>
- <span class="inlinemediaobject"><img src="../../../../equations/nc_t_ref2.svg"></span>
- </p>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="inlinemediaobject"><img src="../../../../equations/nc_t_ref2.svg"></span>
+
+ </p></blockquote></div>
<p>
Where I<sub>x</sub>(a,b) is the incomplete beta function, and Φ(x) is the normal CDF
at x.
Alternatively, by considering what happens when t = ∞, we have x = 1, and
therefore I<sub>x</sub>(a,b) = 1 and:
</p>
-<p>
- <span class="inlinemediaobject"><img src="../../../../equations/nc_t_ref3.svg"></span>
- </p>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="inlinemediaobject"><img src="../../../../equations/nc_t_ref3.svg"></span>
+
+ </p></blockquote></div>
<p>
From this we can easily show that:
</p>
-<p>
- <span class="inlinemediaobject"><img src="../../../../equations/nc_t_ref4.svg"></span>
- </p>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="inlinemediaobject"><img src="../../../../equations/nc_t_ref4.svg"></span>
+
+ </p></blockquote></div>
<p>
and therefore we have a means to compute either the probability or its
complement directly without the risk of cancellation error. The crossover
<p>
The PDF can be computed by a very similar method using:
</p>
-<p>
- <span class="inlinemediaobject"><img src="../../../../equations/nc_t_ref5.svg"></span>
- </p>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="inlinemediaobject"><img src="../../../../equations/nc_t_ref5.svg"></span>
+
+ </p></blockquote></div>
<p>
Where I<sub>x</sub><sup>'</sup>(a,b) is the derivative of the incomplete beta function.
</p>