• https://me.yahoo.com
COST (GBP)
0.50
3.00
0

# PDF

Student's T distribution PDF.
Controller: CodeCogs
Contents

C++

## PDF

 doublePDF( double t double k )
Computes the probability density function of the Student T distribution with integer k > 0 degrees of freedom:

$\frac{&space;\Gamma((k&space;+&space;1)/2&space;}&space;&space;&space;&space;&space; &space;{&space;\sqrt{k\pi}&space;\Gamma(k/2)&space;(1&space;+&space;x^2&space;/&space;k)&space;^&space;{(k+1)&space;/&space;2}}$

The T distribution has PDF and as shown below, denoted $\inline&space;&space;P(x)$:

There is an error with your graph parameters for PDF with options t=-2.5:2.5 k=1:5:1

Error Message:Function PDF failed. Ensure that: Invalid C++

## Example:

#include <stdio.h>
#include <codecogs/statistics/distributions/continuous/t/pdf.h>
using namespace Stats::Dists::Continuous::T;

int main()
{
for( double t=-2.5; t<2.5; t+=0.5 )
printf(  "PDF( %1.1f ) = %f \n", t, PDF(t, 20)  );
return getchar();
}

## Output:

PDF( -2.5 ) = 0.022669
PDF( -2.0 ) = 0.058087
PDF( -1.5 ) = 0.128627
PDF( -1.0 ) = 0.236046
PDF( -0.5 ) = 0.345809
PDF( 0.0 ) = 0.393989
PDF( 0.5 ) = 0.345809
PDF( 1.0 ) = 0.236046
PDF( 1.5 ) = 0.128627
PDF( 2.0 ) = 0.058087

### Parameters

 t the point at which to evaluate the PDF k the number of degrees of freedom of the T distribution

### Authors

Will Bateman
##### Source Code

Source code is available when you agree to a GP Licence or buy a Commercial Licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.