poisson_logpmf
std.stats.poisson_logpmf · Level L5The log-probability of k events under a Poisson distribution with mean λ: k·log λ − λ − log k!, with log k! as log Γ(k + 1).
log P(k) = k·log λ − λ − log Γ(k + 1)
Signature
poisson_logpmf(k: i64[n], lam: f64[n]) → f64[n]
Structure
The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.
- input
- operation
- constant
- call
- output
Verification
- Signature proven by NOVA’s shape solver, for every size.
- Agrees with the reference
k·log λ − λ − log(k!), with the exact factorialto 80 digits (100-digit arithmetic), on all 40 test cases. - All 175 float64 results inside the running error bound; the closest uses 9% of it.
- Interpreter and NumPy backend return bit-identical results.
Accuracy in detail
- correctly rounded (the float64 nearest the exact value)
- 59%
- bit-equal to the NumPy formula in float64
- 100%
- largest error, in units in the last place
- 7.07
Identity
Calls
—
Called by
—
sha256:1b0f34db14a5492cdebb076fd18aa237866bd7e61ab6a9341dcff14b2f01fe01The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.