Categories &

Functions List

Function Reference: logicdf

statistics: p = logicdf (x, mu, sigma)
statistics: p = logicdf (x, mu, sigma, "upper")

Logistic cumulative distribution function (CDF).

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

Both parameters must be reals and sigma > 0. For sigma <= 0, NaN is returned.

p = logicdf (x, mu, sigma, "upper") computes the upper tail probability of the logistic distribution with parameters mu and sigma, at the values in x.

Further information about the logistic distribution can be found at https://en.wikipedia.org/wiki/Logistic_distribution

See also: logiinv, logipdf, logirnd, logifit, logilike, logistat

Source Code: logicdf

Example: 1

 

 ## Plot various CDFs from the logistic distribution
 x = -5:0.01:20;
 p1 = logicdf (x, 5, 2);
 p2 = logicdf (x, 9, 3);
 p3 = logicdf (x, 9, 4);
 p4 = logicdf (x, 6, 2);
 p5 = logicdf (x, 2, 1);
 plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m")
 grid on
 legend ({"μ = 5, σ = 2", "μ = 9, σ = 3", "μ = 9, σ = 4", ...
          "μ = 6, σ = 2", "μ = 2, σ = 1"}, "location", "southeast")
 title ("Logistic CDF")
 xlabel ("values in x")
 ylabel ("probability")

                    
plotted figure