Student’s distribution

### 20.4.8 Student’s distribution

##### The probability density function for Student’s distribution.

Student’s distribution (also called Student’s t-distribution or the t-distribution) with n degrees of freedom has density function given by

student(n,x)= |
Γ((n+1)/2)
Γ(n/2) | √ |
nπ
| ⎛ ⎜ ⎜ ⎝ | 1+ |
x2
n
| ⎞ ⎟ ⎟ ⎠ |
−n−1/2
| (5)

where recall the Gamma function (see Section 7.3.13) is defined for x>0 by

Γ(x)= | ∫ |
+∞
0
| e−ttx−1 dx.

The student or studentd command finds the density function for Student’s distribution.

- student takes two arguments:
  - n, an integer (the degrees of freedom).
  - x, a real number.
  student(n,x) returns the value of the density function for Student’s distribution with n degrees of freedom at x, given in (5).

#### Example

student(2,3)

2 | √ |
π
√
11
2
| −1
2 | √ |
2 π
| · 11

which can be numerically approximated by:

evalf(student(2,3))

0.0274101222343 |  |  |  |  |  |  |  |  |  |

##### The cumulative distribution function for Student’s distribution.

The student_cdf command computes the cumulative distribution function for Student’s distribution.

- student_cdf takes two mandatory arguments and one optional argument.
  - n, an integer (the degrees of freedom).
  - x, a real number.
  - Optionally, y, a real number.
- student_cdf(n,x) returns Prob(X ≤ x) for Student’s distribution with n degrees of freedom.
- student_cdf(n,x,y) returns Prob(x ≤ X ≤ y).

#### Examples

student_cdf(5,2)

0.949030260585 |  |  |  |  |  |  |  |  |  |

student_cdf(5,-2,2)

0.89806052117 |  |  |  |  |  |  |  |  |  |

##### The inverse distribution function for Student’s distribution.

The student_icdf command computes the inverse distribution for Student’s distribution.

- student_icdf takes two arguments:
  - n, an integer (the degrees of freedom).
  - h, a real number between 0 and 1.
- student_icdf(n, h) returns the inverse distribution for Student’s distribution with n degrees of freedom; namely, the value of x for which Prob(X ≤ x)=h.

#### Example

student_icdf(5,0.95)

2.01504837333 |  |  |  |  |  |  |  |  |  |

##### The upper tail cumulative function for Student’s distribution.

The UTPT (the Upper Tail Probability-T distribution) computes Prob(X > x) for Student’s distribution.

- UTPT takes two arguments:
  - n, an integer (the degrees of freedom).
  - x, a real number.
- UTPT(n,x) returns Prob(X > x) for Student’s distribution with n degrees of freedom.

#### Example

UTPT(5,2)

0.0509697394149 |  |  |  |  |  |  |  |  |  |