Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

tpdf

Student's t probability density function

Syntax

y = tpdf(x,nu)

Description

y = tpdf(x,nu) returns the probability density function (pdf) of the Student's t distribution at each of the values in x using the corresponding degrees of freedom in nu. x and nu can be vectors, matrices, or multidimensional arrays that have the same size. A scalar input is expanded to a constant array with the same dimensions as the other inputs.

Examples

collapse all

The mode of the Student's t distribution is at x = 0. This example shows that the value of the function at the mode is an increasing function of the degrees of freedom.

tpdf(0,1:6)
ans =

    0.3183    0.3536    0.3676    0.3750    0.3796    0.3827

The t distribution converges to the standard normal distribution as the degrees of freedom approaches infinity. How good is the approximation for $\nu$ equal to 30?

difference = tpdf(-2.5:2.5,30)-normpdf(-2.5:2.5)
difference =

    0.0035   -0.0006   -0.0042   -0.0042   -0.0006    0.0035

More About

collapse all

Student's t pdf

The probability density function (pdf) of the Student's t distribution is

y=f(x|ν)=Γ(ν+12)Γ(ν2)1νπ1(1+x2ν)ν+12

where ν is the degrees of freedom and Γ( · ) is the Gamma function. The result y is the probability of observing a particular value of x from a Student's t distribution with ν degrees of freedom.

See Also

| | | |

Introduced before R2006a

Was this topic helpful?