Logistic distribution with shift parameter a and scale parameter b > 0 is described with probability density function:
To model random values, the function uses inverse transform method, which enables (if the sample generator is available) to draw required sample from standard continuous uniform distribution using inverse function of logistic distribution:
Thus, the following operations are executed to generate a pseudo-random value X distributed according to logistic distribution:
Generate a sample u1, …, un of pseudo-random values based on a standard continuous uniform distribution at the interval (0, 1).
Based on the inverse function calculate a sample of the specified logistic distribution by the formula:
See also: