# Student's t-distribution

I have two functions that provide an implementation of the t-distribution.

A webpage with a Javascript algorithm. The algorithm takes two input x-value and degrees_of_freedom.

Excel's TInv function. The function also takes two inputs: probability and degrees_of_freedom.

Can you give me the relation between probability and x-value? I have doubts that the two methods calculates the same thing.

The first takes a value on the x-value and degrees of freedom and reports the amount of probability to the left of the x-value. If you're familiar with calculus, this is the equivalent of taking the integral of the Student's t probability density function over the interval $(-\infty,x]$. If you're familiar with statistics, this is the Student's t cumulative density function evaluated at $x$ for some degrees of freedom.

The second does the inverse, taking some probability and returning the corresponding x-value. In statistics, this is called the quantile function.

So the mathematical relationship between the two is the same as for any function and its inverse, with the substantive knowledge that they also have probability-based interpretations and statistical applications.