Data and Math

vprob

Normal, binomial, Poisson, exponential and uniform distributions, with pdf, cdf and pmf.

Released v1.0.0 · 2026-09-28
Import
use "stdlib/prob.ven"
vprob.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.3989422804014327

normal_cdf(x, mean, stdev)

Gives back the normal distribution's cumulative probability up to x.

normal_cdf(1.96, 0.0, 1.0)
:: 0.9750021048517796

binomial_pmf(k, n, p)

Gives back the probability of exactly k successes in n Bernoulli trials.

binomial_pmf(2, 10, 0.5)
:: 0.0439453125

poisson_pmf(k, lambda_)

Gives back the probability of exactly k events under a Poisson distribution.

poisson_pmf(3, 2.0)
:: 0.1804470443154836

exponential_pdf(x, rate)

Gives back the exponential distribution's probability density at x.

exponential_pdf(1.0, 1.5)
:: 0.33469524022264474

uniform_pdf(x, low, high)

Gives back the uniform distribution's probability density at x.

uniform_pdf(5.0, 0.0, 10.0)
:: 0.1

expected_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.3

bayes_update(prior, likelihood, evidence)

Gives back the posterior probability under Bayes' rule.

bayes_update(0.01, 0.9, 0.05)
:: 0.18000000000000002

Get notified when vprob changes

Get notified about

New versions and security advisories.

New and updated packages, once a day.

News on the math model built in Venutian.