# Distribution Lab — Randomly

> Poisson, Pareto, Zipf, Beta, Cauchy — sampled and plotted. One of 63 generators at [Randomly](https://randomly.cluxnei.dev), a library of random generators seeded from verifiable real-world entropy. Free HTTP API, no key, no signup.

## `numbers.distribution` — Distribution Lab

Poisson, Pareto, Zipf, Beta, Cauchy — sampled and plotted.

| | |
|---|---|
| **Key** | `numbers.distribution` |
| **Module** | `numbers` |
| **Version** | `1` — a permalink carries this, and a replay against a different version returns `409` rather than something else |
| **Formats** | `application/json`, `text/plain` |
| **Studio** | https://randomly.cluxnei.dev/g/numbers/distribution |
| **API** | `GET https://randomly.cluxnei.dev/api/v1/g/numbers.distribution` |

`value` is the sampled data the studio plots; `meta` carries the summary statistics measured from that very sample.

| Parameter | Type | Default | Accepts | What it does |
|---|---|---|---|---|
| `distribution` | enum | `poisson` | `poisson`, `binomial`, `zipf`, `exponential`, `gamma`, `beta`, `pareto`, `cauchy` | Distribution |
| `count` | int | `1000` | `10` – `5000` | How many — Sampling noise falls as 1/√n. At a hundred draws the bars wobble visibly around the curve; at five thousand they sit on it. |
| `lambda` | float | `4` | `0.01` – `500` | Rate λ — Poisson: the mean number of events. Exponential: the arrival rate, so the mean wait is 1/λ. |
| `alpha` | float | `2` | `0.05` – `50` | Shape α — Pareto tail index, Gamma shape k, Beta’s first shape, and Zipf’s exponent s. Smaller is heavier-tailed. |
| `beta` | float | `5` | `0.05` – `50` | Shape β — Beta’s second shape. α = β = 1 is the uniform distribution. |
| `scale` | float | `1` | `0.01` – `100` | Scale — Gamma’s θ, Cauchy’s half-width γ, and Pareto’s minimum x_m — the point its tail starts from. |
| `trials` | int | `40` | `1` – `500` | Trials n — Binomial only. Capped at 500 because the sampler inverts the CDF, which costs about n·p steps a draw. |
| `p` | float | `0.3` | `0.001` – `0.999` | Probability p — Binomial only: the chance each try succeeds. |
| `support` | int | `100` | `2` – `2000` | Ranks N — Zipf only: how many ranks there are. Word frequency lists behave like this with s ≈ 1. |
| `bins` | int | `30` | `4` – `60` | Histogram bars |
| `decimals` | int | `3` | `0` – `6` | Decimal places |

Out-of-range numbers are **clamped, not rejected**, so a request never fails for being
ambitious — but it may not do what you meant. Unknown keys are dropped and missing ones
fall back to the defaults above.

```bash
curl -s 'https://randomly.cluxnei.dev/api/v1/g/numbers.distribution?distribution=poisson&count=1000&lambda=4' -H 'Accept: text/plain'
```

## The receipt

Every result carries one, naming the physical source of the randomness and linking to the
third party's own record of it:

```json
"receipt": {
  "source": "seismic",
  "source_label": "USGS Seismic Feed",
  "class": "C",
  "caveat": "Carries only tens of bits of genuine surprise. Always mixed with the OS CSPRNG.",
  "narrative": "A magnitude 3.6 earthquake, 67 km N of Culebra, Puerto Rico, 39.6 km down — 52 minutes ago.",
  "proof_url": "https://earthquake.usgs.gov/earthquakes/eventpage/us7000th33",
  "mixed_with_csprng": true,
  "degraded": false
}
```

Pick the source with `?source=`, or leave it at the default `auto`:

- **Class A** (Cryptographic) — `csprng`, `anu-qrng`, `random-org`
- **Class B** (Public beacon) — `nist-beacon`, `drand`, `bitcoin`. Published openly — anyone can look this value up after the fact.
- **Class C** (Observational) — `seismic`, `space-weather`, `atmosphere`, `iss`. Carries only tens of bits of genuine surprise. Always mixed with the OS CSPRNG.

## More

- [The full API contract](https://randomly.cluxnei.dev/api.md)
- [Everything in one file](https://randomly.cluxnei.dev/llms-full.txt)
- [The catalogue as JSON](https://randomly.cluxnei.dev/api/v1/generators)
- [This generator in the browser](https://randomly.cluxnei.dev/g/numbers/distribution)
