(distribution-stats values)Compute summary statistics from a sequence of numeric values. Returns map with :count, :total, :min, :max, :mean, and percentiles (:p50, :p90, :p95, :p99).
Compute summary statistics from a sequence of numeric values. Returns map with :count, :total, :min, :max, :mean, and percentiles (:p50, :p90, :p95, :p99).
(draw-lognormal random mu sigma)Draw a log-normal random variable using the underlying normal distribution
parameters mu (mean) and sigma (standard deviation).
Draw a log-normal random variable using the underlying normal distribution parameters `mu` (mean) and `sigma` (standard deviation).
(draw-lognormal-poisson random mean median)(draw-lognormal-poisson random mean median scale)Draw a Poisson count whose rate λ is sampled from a log-normal distribution with the given mean and median.
For a log-normal distribution, median = exp(mu) and mean = exp(mu + σ²/2). Rearranging gives us the standard deviation σ = sqrt(2 * log(mean / median)).
Takes an optional scale parameter to fit desired distribution
Draw a Poisson count whose rate λ is sampled from a log-normal distribution with the given mean and median. For a log-normal distribution, median = exp(mu) and mean = exp(mu + σ²/2). Rearranging gives us the standard deviation σ = sqrt(2 * log(mean / median)). Takes an optional scale parameter to fit desired distribution
(draw-poisson random lambda)Knuth's algorithm for small λ; Normal approximation for large λ. Returns a non-negative long.
Knuth's algorithm for small λ; Normal approximation for large λ. Returns a non-negative long.
(percentile sorted-vals p)Calculate percentile from sorted values. Uses the lower order statistic at index floor(p * (n - 1)).
Calculate percentile from sorted values. Uses the lower order statistic at index floor(p * (n - 1)).
(timing-stats timings-ns)Calculate statistics from a collection of timing values (in nanoseconds). Returns map with count, total-ms, min-ms, max-ms, mean-ms, and percentiles.
Calculate statistics from a collection of timing values (in nanoseconds). Returns map with count, total-ms, min-ms, max-ms, mean-ms, and percentiles.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |