. If the selected `method` is not available, a ``NotImplementedError`` will be raised. Returns ------- out : array The log-CDF evaluated at the provided argument(s). See Also -------- cdf logccdf Notes ----- Suppose a continuous probability distribution has support :math:`[l, r]`. The log-CDF evaluates to its minimum value of :math:`\log(0) = -\infty` for :math:`x ≤ l` and its maximum value of :math:`\log(1) = 0` for :math:`x ≥ r`. For distributions with infinite support, it is common for `cdf` to return a value of ``0`` when the argument is theoretically within the support; this can occur because the true value of the CDF is too small to be represented by the chosen dtype. `logcdf`, however, will often return a finite (not ``-inf``) result over a much larger domain. Similarly, `logcdf` may provided a strictly negative result with arguments for which `cdf` would return ``1.0``. Consequently, it may be preferred to work with the logarithms of probabilities to avoid underflow and related limitations of floating point numbers. The "logarithmic complement" of a number :math:`z` is mathematically equivalent to :math:`\log(1-\exp(z))`, but it is computed to avoid loss of precision when :math:`\exp(z)` is nearly :math:`0` or :math:`1`. Similarly, the term "logarithmic difference" of :math:`w` and :math:`z` is used here to mean :math:`\log(\exp(w)-\exp(z))`. If ``y < x``, the CDF is negative, and therefore the log-CCDF is complex with imaginary part :math:`\pi`. For consistency, the result of this function always has complex dtype when `y` is provided, regardless of the value of the imaginary part. References ---------- .. [1] Cumulative distribution function, *Wikipedia*, https://en.wikipedia.org/wiki/Cumulative_distribution_function Examples -------- Instantiate a distribution with the desired parameters: >>> import numpy as np >>> from scipy import stats >>> X = stats.Uniform(a=-0.5, b=0.5) Evaluate the log-CDF at the desired argument: >>> X.logcdf(0.25) -0.287682072451781 >>> np.allclose(X.logcdf(0.), np.log(X.cdf(0.))) True r