Module:DrivingRiskEquivalent/doc
Appearance
This is the documentation page for Module:DrivingRiskEquivalent
Description
Module:DrivingRiskEquivalent converts a probability (0–1) into the equivalent **miles driven** that would give the same risk of being in a **police-reported car crash**.
By default the result is **rounded to one significant digit** and **formatted with commas**.
An optional exact flag returns the **full-precision number**.
Syntax
{{#invoke:DrivingRiskEquivalent|miles_equivalent|0.probability|exact=1}}
Parameters
| Parameter | Position | Type | Description |
|---|---|---|---|
| probability | 1 (or probability=0... / p=0...) |
number | Probability between 0 and 1 |
| exact | exact=1 |
string | true or 1 to return unrounded value
|
Returns
- string (default) – Miles rounded to one significant digit, with commas (e.g.
50,000) - number (when
exact=1) – Exact miles (e.g.52910.052910053)
Usage in RiskiPedia
Perfect for giving intuitive context to tiny probabilities:
That's about the same risk as getting into a serious accident if you drive {{#invoke:DrivingRiskEquivalent|miles_equivalent|...probability...}} miles.