Categories &

Functions List

Function Reference: tlsinv

statistics: x = tlsinv (p, mu, sigma, nu)

Inverse of the location-scale Student’s T cumulative distribution function (iCDF).

For each element of p, compute the quantile (the inverse of the CDF) of the location-scale Student’s T distribution with location parameter mu, scale parameter sigma, and nu degrees of freedom. The size of x is the common size of p, mu, sigma, and nu. A scalar input functions as a constant matrix of the same size as the other inputs.

Further information about the location-scale Student’s T distribution can be found at https://en.wikipedia.org/wiki/Student%27s_t-distribution#Location-scale_t_distribution

See also: tlscdf, tlspdf, tlsrnd, tlsfit, tlslike, tlsstat

Source Code: tlsinv

Example: 1

Plot various iCDFs from the location-scale Student's T distribution

 p = 0.001:0.001:0.999;
 x1 = tlsinv (p, 0, 1, 1);
 x2 = tlsinv (p, 0, 2, 2);
 x3 = tlsinv (p, 3, 2, 5);
 x4 = tlsinv (p, -1, 3, Inf);
 plot (p, x1, '-b', p, x2, '-g', p, x3, '-r', p, x4, '-m')
 grid on
 xlim ([0, 1])
 ylim ([-8, 8])
 legend ({'mu = 0, sigma = 1, nu = 1', 'mu = 0, sigma = 2, nu = 2', ...
          'mu = 3, sigma = 2, nu = 5', 'mu = -1, sigma = 3, nu = \infty'}, ...
         'location', 'southeast')
 title ('Location-scale Student''s T iCDF')
 xlabel ('probability')
 ylabel ('values in x')
plotted figure