Categories &

Functions List

Function Reference: tlscdf

statistics: p = tlscdf (x, mu, sigma, nu)
statistics: p = tlscdf (x, mu, sigma, nu, 'upper')

Location-scale Student’s T cumulative distribution function (CDF).

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

p = tlscdf (x, mu, sigma, nu, "upper") computes the upper tail probability of the location-scale Student’s T distribution with parameters mu, sigma, and nu, at the values in x.

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: tlsinv, tlspdf, tlsrnd, tlsfit, tlslike, tlsstat

Source Code: tlscdf

Example: 1

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

 x = -8:0.01:8;
 p1 = tlscdf (x, 0, 1, 1);
 p2 = tlscdf (x, 0, 2, 2);
 p3 = tlscdf (x, 3, 2, 5);
 p4 = tlscdf (x, -1, 3, Inf);
 plot (x, p1, '-b', x, p2, '-g', x, p3, '-r', x, p4, '-m')
 grid on
 xlim ([-8, 8])
 ylim ([0, 1])
 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', 'northwest')
 title ('Location-scale Student''s T CDF')
 xlabel ('values in x')
 ylabel ('probability')
plotted figure