Evaluates the noncentral Student's t probability density function.
#include <imsls.h>
float imsls_f_non_central_t_pdf (float t, float df, float delta)
The type double function is imsls_d_non_central_t_pdf.
float t
(Input)
Argument for which the noncentral Student's t
probability density function is to be evaluated.
float df
(Input)
Number of degrees of freedom of the noncentral Student's
t distribution.
df must be greater
than 0.
float delta
(Input)
Noncentrality parameter.
The probability density associated with a noncentral Student's t random variable with value t.
If w is a normally distributed random variable with unit variance and mean δ and u is a chi-square random variable with n degrees of freedom that is statistically independent of w, then
is a noncentral t-distributed random variable with n degrees of freedom and noncentrality parameter δ, that is,with v = df, and d = delta . The probability density function for the noncentral t-distribution is:
`
where
and t = t.
For δ = 0, the PDF reduces to the (central) Student's t PDF:
and, for t = 0, the PDF becomes:
This example calculates the noncentral Student's t PDF for a distribution with 2 degrees of freedom and noncentrality parameter δ = 10.
#include <imsls.h>
#include <stdio.h>
int main()
{
int i;
float t[] = {-.5, 1.5, 3.5, 7.5, 51.5, 99.5};
float df = 2.;
float delta =10.;
float pdfv;
printf ("\n\n df: %4.0f; delta: %4.0f\n\n",
df, delta);
printf (" t pdf(t)\n");
for (i=0; i<6; i++) {
pdfv = imsls_f_non_central_t_pdf(t[i], df, delta);
printf (" %5.1f %12.4e\n",t[i], pdfv);
}
}
df: 2; delta: 10
t pdf(t)
-0.5 1.6399e-024
1.5 7.4417e-010
3.5 2.8972e-003
7.5 7.8853e-002
51.5 1.4215e-003
99.5 2.0290e-004
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |