Skip to main content

Student's t-distribution

Name

UxHwDoubleStudentsTDist, UxHwFloatStudentsTDist — Create an Student's t-distribution.

Synopsis

#include <uxhw.h>

double UxHwDoubleStudentsTDist(double nu);
float UxHwFloatStudentsTDist(float nu);

Description

The UxHwDoubleStudentsTDist() function, on architectures that associate distributional information with floating-point values, creates an Student's t-distribution with parameter nu and associates it with its return value. The particle return value is the mean value of an Student's t-distribution with parameter nu. The probability density function of the Student's t-distribution is

where Γ\Gamma is the Gamma function.

Parameters

  • nu — The parameter (ν\nu) of the Student's t-distribution.

Return Values

The UxHwDoubleStudentsTDist() function returns the mean of samples of a Student's t-distribution with parameter nu. If nu <= 1, the function returns NaN.

✏️   Examples

#include <stdio.h>
#include <uxhw.h>

int
main(void)
{
double value = UxHwDoubleStudentsTDist(1.5);
printf("value = %lf\n", value);

return 0;
}