Data and Math
vprob
Normal, binomial, Poisson, exponential and uniform distributions, with pdf, cdf and pmf.
Released v1.0.0 · 2026-09-28use "stdlib/prob.ven"
print normal_pdf(0.0, 0.0, 1.0)
:: 0.3989422804014327
Reference (8 functions)
API reference
normal_pdf(x, mean, stdev)
Gives back the normal (Gaussian) distribution's probability density at x.
normal_pdf(0.0, 0.0, 1.0)
:: 0.3989422804014327normal_cdf(x, mean, stdev)
Gives back the normal distribution's cumulative probability up to x.
normal_cdf(1.96, 0.0, 1.0)
:: 0.9750021048517796binomial_pmf(k, n, p)
Gives back the probability of exactly k successes in n Bernoulli trials.
binomial_pmf(2, 10, 0.5)
:: 0.0439453125poisson_pmf(k, lambda_)
Gives back the probability of exactly k events under a Poisson distribution.
poisson_pmf(3, 2.0)
:: 0.1804470443154836exponential_pdf(x, rate)
Gives back the exponential distribution's probability density at x.
exponential_pdf(1.0, 1.5)
:: 0.33469524022264474uniform_pdf(x, low, high)
Gives back the uniform distribution's probability density at x.
uniform_pdf(5.0, 0.0, 10.0)
:: 0.1expected_value(outcomes, probabilities)
Gives back the weighted average of outcomes under probabilities.
expected_value([1.0, 2.0, 3.0], [0.2, 0.3, 0.5])
:: 2.3bayes_update(prior, likelihood, evidence)
Gives back the posterior probability under Bayes' rule.
bayes_update(0.01, 0.9, 0.05)
:: 0.18000000000000002