@@ -182,7 +182,8 @@ std(d::UnivariateDistribution) = sqrt(var(d))
182
182
"""
183
183
median(d::UnivariateDistribution)
184
184
185
- Return the median value of distribution `d`. The median is the smallest `x` such that `cdf(d, x) ≥ 1/2`.
185
+ Return the median value of distribution `d`. The median is the smallest `x` in the support
186
+ of `d` for which `cdf(d, x) ≥ 1/2`.
186
187
Corresponding to this definition as 1/2-quantile, a fallback is provided calling the `quantile` function.
187
188
"""
188
189
median (d:: UnivariateDistribution ) = quantile (d, 1 // 2 )
@@ -381,7 +382,10 @@ logccdf(d::UnivariateDistribution, x::Real) = log(ccdf(d, x))
381
382
"""
382
383
quantile(d::UnivariateDistribution, q::Real)
383
384
384
- Evaluate the inverse cumulative distribution function at `q`.
385
+ Evaluate the (generalized) inverse cumulative distribution function at `q`.
386
+
387
+ For a given `0 ≤ q ≤ 1`, `quantile(d, q)` is the smallest value `x` in the support of `d`
388
+ for which `cdf(d, x) ≥ q`.
385
389
386
390
See also: [`cquantile`](@ref), [`invlogcdf`](@ref), and [`invlogccdf`](@ref).
387
391
"""
@@ -397,14 +401,20 @@ cquantile(d::UnivariateDistribution, p::Real) = quantile(d, 1.0 - p)
397
401
"""
398
402
invlogcdf(d::UnivariateDistribution, lp::Real)
399
403
400
- The inverse function of logcdf.
404
+ The (generalized) inverse function of [`logcdf`](@ref).
405
+
406
+ For a given `lp ≤ 0`, `invlogcdf(d, lp)` is the smallest value `x` in the support of `d` for
407
+ which `logcdf(d, x) ≥ lp`.
401
408
"""
402
409
invlogcdf (d:: UnivariateDistribution , lp:: Real ) = quantile (d, exp (lp))
403
410
404
411
"""
405
412
invlogccdf(d::UnivariateDistribution, lp::Real)
406
413
407
- The inverse function of logccdf.
414
+ The (generalized) inverse function of [`logccdf`](@ref).
415
+
416
+ For a given `lp ≤ 0`, `invlogccdf(d, lp)` is the smallest value `x` in the support of `d`
417
+ for which `logccdf(d, x) ≤ lp`.
408
418
"""
409
419
invlogccdf (d:: UnivariateDistribution , lp:: Real ) = quantile (d, - expm1 (lp))
410
420
0 commit comments