bayesian-statistics-ai999x — offline, verified bayesian statistics solver with step-by-step answers

Install · Capability guide · Evaluation · AI999X on Hugging Face · Website · Support: Buy Me a Coffee

License: Apache-2.0 · Author: Ibnul Jaif Farabi (creator and engineer) · Organization: AI999X · Version 1.0.0

Field: Mathematics & Statistics · Tasks: Question Answering, Sentence Similarity, Feature Extraction

bayesian-statistics-ai999x is an offline, deterministic Python solver that answers bayesian statistics questions with verified results from 78 certified capabilities, gives 378 documented answers identically on Windows and Linux, and refuses rather than guesses when an answer cannot be verified.

bayesian-statistics-ai999x is a compact, deterministic bayesian statistics engine for Python. It reads a question in plain English (or a typed call), picks a certified bayesian statistics capability, computes the answer exactly, checks it, and returns the result with its steps, units, LaTeX and assumptions — or an honest refusal that says what is missing. It runs fully offline on any CPU, needs no GPU, no API key and no internet, and is built to give zero wrong answers: when it is not sure, it refuses instead of guessing.

Buy me a coffee License Python Offline

Highlights

  • Verified, not generated. Every answer is computed by a certified bayesian statistics capability and checked (substituted back, dimension-checked or compared with an independent computation) before it is returned.
  • Zero wrong answers by design. Seven explicit outcomes — SOLVED, NEEDS_INPUT, AMBIGUOUS, INVALID_INPUT, OUT_OF_SCOPE, UNRECOGNIZED_FORMAT, INTERNAL_ERROR — never a silent guess. Every one of its 378 documented answers is reproduced exactly on every tested platform.
  • Plain-English questions and a guaranteed typed interface. ask() reads documented question forms; solve(capability_id, **inputs) always solves a supported task with valid inputs.
  • Explains itself. Steps, formulas in LaTeX, units, assumptions and the model used, ready for notebooks, tutoring apps and homework checkers.
  • Small and portable. Pure Python (sympy, mpmath); identical answers on Windows and Linux (Python 3.10, 3.11, 3.12, 3.13, 3.14).
  • Coverage: Bayes' theorem, conjugate posteriors, credible intervals, Bayes factors, decision analysis, uncertainty propagation, Monte Carlo and sensitivity analysis.

Model overview

Property Value
Package bayesian-statistics-ai999x 1.0.0 (import bayesian_statistics_ai999x)
Type Deterministic neuro-symbolic bayesian statistics engine (rule-based reading + certified symbolic capabilities)
Capabilities 78 certified procedures
Knowledge pack version 1.0.1
Golden answers 378 documented answers, identical on every tested platform
Platforms tested Windows (Python 3.13), Linux x86-64 (Python 3.10, 3.11, 3.12, 3.13, 3.14)
Runtime CPU only, offline; no GPU, no network, no API key
License Apache-2.0
Creator / engineer Ibnul Jaif Farabi
Organization AI999X

Quickstart

pip install bayesian-statistics-ai999x
# or straight from this repository:
pip install https://huggingface.co/AI999X/bayesian-statistics-ai999x/resolve/main/dist/bayesian_statistics_ai999x-1.0.0-py3-none-any.whl
import bayesian_statistics_ai999x as bayesian_statistics

bayesian_statistics.ask("A test has sensitivity 0.9 and specificity 0.95; the prevalence is 0.01. What is the positive predictive value?").show()
# -> SOLVED — ppv = 0.153846, npv = 0.998938, p_positive = 0.0585, false_discovery_rate = 0.846154  (diagnostic_test_predictive_values)
bayesian_statistics.ask("Beta-binomial posterior: prior Beta(2, 2), 7 successes in 10 trials. Find the posterior mean.").show()
# -> SOLVED — post_alpha = 9, post_beta = 5, posterior_mean = 0.642857, posterior_variance = 0.0153061  (beta_binomial_posterior)
bayesian_statistics.ask("95% highest-density interval of a Beta(3, 9) posterior.").show()
# -> SOLVED — lower = 0.0405552, upper = 0.483724, width = 0.443168  (beta_hdi)
bayesian_statistics.ask("Expected value of perfect information: payoffs = [[100, -20], [40, 30]], probabilities = [0.4, 0.6].").show()
# -> SOLVED — evpi = 24, ev_with_perfect_information = 58, best_expected_value = 34  (expected_value_of_perfect_information)
bayesian_statistics.solve("uncertainty_product_quotient", a=12.0, ua=0.3, b=4.0, ub=0.2).show()
# -> SOLVED — product = 48, u_product = 2.68328, quotient = 3, u_quotient = 0.167705  (uncertainty_product_quotient)
bayesian_statistics.ask("Who created you?").message
# -> bayesian-statistics-ai999x was created and engineered by Ibnul Jaif Farabi at AI999X.

Command line: bayesian-statistics-ai999x "<question>", bayesian-statistics-ai999x --capabilities. The outputs above were produced by running this exact code on bayesian-statistics-ai999x 1.0.0.

How every answer is verified

  1. Reading — the question is turned into typed quantities (value, unit, kind, role) and one asked quantity; every stated number must be used or the question is refused.
  2. Planning — only certified capabilities may answer; a capability applies only under the conditions the wording states (for example a pendulum, a liquid at rest, boiling).
  3. Computing — exact symbolic or high-precision numeric evaluation.
  4. Checking — dimensions, substitution back into the defining equation, and agreement between independent readings; any disagreement becomes a refusal, never a number.

Capabilities are certified before they ship: each must reproduce hand-worked reference cases, reject a deliberately wrong variant (a control), and leave every benchmark answer unchanged.

Capabilities

78 certified procedures. A few of them:

  • Procedures: Bayes action: minimum posterior expected loss; Bayes factor for a normal mean (known variance); Bayes factor for a point null on a proportion (beta prior under H1); Bayes factor for two simple binomial hypotheses; Bayes' theorem for an event and its complement; Bayesian A/B test: probability that A beats B; Best action by expected monetary value; Beta prior from a mean and standard deviation; Beta-binomial conjugate posterior; Break-even (indifference) probability of two actions; Certainty equivalent with logarithmic utility; Control-variate Monte Carlo estimate; Covariance propagation through a linear map y = A x; Credible interval for a Poisson rate; Credible interval for a proportion (beta-binomial); Decision threshold probability (treat / do not treat); Decision under uncertainty: maximin, maximax, Laplace, minimax regret, Hurwicz; Dirichlet-multinomial conjugate posterior; Dirichlet-multinomial probability of a count vector (evidence); Effective degrees of freedom and expanded uncertainty (Welch-Satterthwaite); Equal-tailed credible interval of a beta distribution; Equal-tailed credible interval of a gamma distribution; Exact mean and standard deviation of a product of independent normals; Exact mean and variance of a polynomial of a normal variable …

bayesian_statistics_ai999x.templates() lists every question form ask() reads; the capability guide (PDF, every example executed) is included in this repository.

All 78 formulas

Show every formula, by topic

Bayes factors and model comparison

Bayes factor for a normal mean (known variance)

BF01=p(μ0∣xˉ,H1)p(μ0∣H1) BF_{01} = \frac{p(\mu_0\mid \bar x, H_1)}{p(\mu_0\mid H_1)}

Bayes factor for a point null on a proportion (beta prior under H1)

BF10=B(α+k, β+n−k)/B(α,β)p0k(1−p0)n−k BF_{10} = \frac{B(\alpha + k,\ \beta + n - k)/B(\alpha,\beta)}{p_0^{k}(1-p_0)^{n-k}}

Bayes factor for two simple binomial hypotheses

BF10=(p1p0)k(1−p11−p0)n−k BF_{10} = \left(\frac{p_1}{p_0}\right)^{k}\left(\frac{1-p_1}{1-p_0}\right)^{n-k}

Marginal likelihood (evidence) of binomial data under a beta prior

p(k)=(nk)B(α+k, β+n−k)B(α,β) p(k) = \binom{n}{k}\frac{B(\alpha + k,\ \beta + n - k)}{B(\alpha,\beta)}

Posterior model probabilities from log evidences

P(Mi∣D)=P(D∣Mi)P(Mi)∑jP(D∣Mj)P(Mj) P(M_i\mid D) = \frac{P(D\mid M_i)P(M_i)}{\sum_j P(D\mid M_j)P(M_j)}

Posterior probability of a hypothesis from a Bayes factor

P(H1∣D)P(H0∣D)=BF10 P(H1)P(H0) \frac{P(H_1\mid D)}{P(H_0\mid D)} = BF_{10}\,\frac{P(H_1)}{P(H_0)}

Bayes' theorem and conditional probability

Bayes' theorem for an event and its complement

P(A∣B)=P(B∣A) P(A)P(B∣A) P(A)+P(B∣¬A) (1−P(A)) P(A\mid B) = \frac{P(B\mid A)\,P(A)}{P(B\mid A)\,P(A) + P(B\mid \neg A)\,(1 - P(A))}

Law of total probability

P(B)=∑iP(B∣Ai) P(Ai) P(B) = \sum_i P(B\mid A_i)\,P(A_i)

Positive and negative predictive values of a test

PPV=Se πSe π+(1−Sp)(1−π),NPV=Sp (1−π)Sp (1−π)+(1−Se) π \mathrm{PPV} = \frac{\mathrm{Se}\,\pi}{\mathrm{Se}\,\pi + (1-\mathrm{Sp})(1-\pi)},\quad \mathrm{NPV} = \frac{\mathrm{Sp}\,(1-\pi)}{\mathrm{Sp}\,(1-\pi) + (1-\mathrm{Se})\,\pi}

Posterior after repeated independent tests

oddspost=π1−π (LR+)k (LR−)m \text{odds}_{post} = \frac{\pi}{1-\pi}\,(LR^{+})^{k}\,(LR^{-})^{m}

Posterior over several discrete hypotheses

P(Hi∣D)=P(D∣Hi) P(Hi)∑jP(D∣Hj) P(Hj) P(H_i\mid D) = \frac{P(D\mid H_i)\,P(H_i)}{\sum_j P(D\mid H_j)\,P(H_j)}

Monte Carlo estimation

Control-variate Monte Carlo estimate

μ^cv=yˉ−b^ (cˉ−μc),b^=∑(yi−yˉ)(ci−cˉ)∑(ci−cˉ)2 \hat\mu_{cv} = \bar y - \hat b\,(\bar c - \mu_c),\quad \hat b = \frac{\sum (y_i-\bar y)(c_i-\bar c)}{\sum (c_i-\bar c)^2}

Importance sampling estimate and effective sample size

μ^=∑iwif(xi)∑iwi, wi=p(xi)q(xi),ESS=(∑wi)2∑wi2 \hat\mu = \frac{\sum_i w_i f(x_i)}{\sum_i w_i},\ w_i = \frac{p(x_i)}{q(x_i)},\quad ESS = \frac{(\sum w_i)^2}{\sum w_i^2}

Monte Carlo estimate of an integral from uniform samples

I^=b−an∑if(xi),SE=(b−a)sfn \hat I = \frac{b-a}{n}\sum_i f(x_i),\quad SE = (b-a)\frac{s_f}{\sqrt n}

Number of Monte Carlo draws for a target accuracy

n=⌈(z(1+c)/2 σE)2⌉ n = \left\lceil\left(\frac{z_{(1+c)/2}\,\sigma}{E}\right)^2\right\rceil

Point of the Halton low-discrepancy sequence

ϕb(i)=∑kdk b−k−1  for i=∑kdkbk \phi_b(i) = \sum_k d_k\,b^{-k-1}\ \text{ for } i = \sum_k d_k b^k

Stratified sampling estimate and standard error

μ^=∑hWhyˉh,SE=∑hWh2sh2/nh \hat\mu = \sum_h W_h\bar y_h,\quad SE = \sqrt{\sum_h W_h^2 s_h^2/n_h}

Conjugate priors: Dirichlet-multinomial

Dirichlet-multinomial conjugate posterior

θ∣n∼Dir(α1+n1,…,αk+nk),E[θj]=αj+njα0+n \theta\mid n \sim \mathrm{Dir}(\alpha_1 + n_1, \ldots, \alpha_k + n_k),\quad E[\theta_j] = \frac{\alpha_j + n_j}{\alpha_0 + n}

Dirichlet-multinomial probability of a count vector (evidence)

P(n∣α)=n! Γ(α0)Γ(n+α0)∏jΓ(nj+αj)nj! Γ(αj) P(n\mid\alpha) = \frac{n!\,\Gamma(\alpha_0)}{\Gamma(n + \alpha_0)}\prod_j\frac{\Gamma(n_j + \alpha_j)}{n_j!\,\Gamma(\alpha_j)}

Conjugate priors: beta-binomial

Bayesian A/B test: probability that A beats B

P(pB>pA)=∑i=0αB−1B(αA+i, βA+βB)(βB+i) B(1+i, βB) B(αA,βA) P(p_B > p_A) = \sum_{i=0}^{\alpha_B - 1}\frac{B(\alpha_A + i,\ \beta_A + \beta_B)}{(\beta_B + i)\,B(1 + i,\ \beta_B)\,B(\alpha_A, \beta_A)}

Beta-binomial conjugate posterior

p∣k∼Beta(α+k, β+n−k),E[p∣k]=α+kα+β+n p\mid k \sim \mathrm{Beta}(\alpha + k,\ \beta + n - k),\quad E[p\mid k] = \frac{\alpha + k}{\alpha + \beta + n}

Laplace's rule of succession

P(next success)=k+1n+2 P(\text{next success}) = \frac{k+1}{n+2}

MAP estimate of a proportion (beta-binomial)

p^MAP=α+k−1α+β+n−2 \hat p_{MAP} = \frac{\alpha + k - 1}{\alpha + \beta + n - 2}

Posterior predictive probability (beta-binomial)

P(J=j)=(mj)B(α+j, β+m−j)B(α,β) P(J = j) = \binom{m}{j}\frac{B(\alpha + j,\ \beta + m - j)}{B(\alpha, \beta)}

Posterior probability that p exceeds a value

P(p>c∣k)=1−Ic(α+k, β+n−k) P(p > c \mid k) = 1 - I_c(\alpha + k,\ \beta + n - k)

Conjugate priors: gamma-Poisson and gamma-exponential

Gamma-Poisson conjugate posterior of a rate

λ∣x∼Gamma ⁣(α+∑xi, β+n) \lambda\mid x \sim \mathrm{Gamma}\!\left(\alpha + \textstyle\sum x_i,\ \beta + n\right)

Gamma-exponential conjugate posterior of a rate

λ∣t∼Gamma ⁣(α+n, β+∑ti) \lambda\mid t \sim \mathrm{Gamma}\!\left(\alpha + n,\ \beta + \textstyle\sum t_i\right)

MAP estimate of a Poisson rate (gamma prior)

λ^MAP=α+∑xi−1β+n \hat\lambda_{MAP} = \frac{\alpha + \sum x_i - 1}{\beta + n}

Posterior predictive count (negative binomial)

P(X=k)=Γ(α+k)Γ(α) k!(ββ+1)α(1β+1)k P(X = k) = \frac{\Gamma(\alpha + k)}{\Gamma(\alpha)\,k!}\left(\frac{\beta}{\beta+1}\right)^{\alpha}\left(\frac{1}{\beta+1}\right)^{k}

Probability that one Poisson rate exceeds another (gamma posteriors)

P(λ1>λ2)=1−Ib1/(b1+b2)(a1,a2) P(\lambda_1 > \lambda_2) = 1 - I_{b_1/(b_1+b_2)}(a_1, a_2)

Conjugate priors: normal models

Normal mean with known variance: posterior and credible interval from a sample mean

μn=Bμ0+(1−B)xˉ, B=σ2/nσ2/n+τ02,μn±z(1+c)/2 τn \mu_n = B\mu_0 + (1-B)\bar x,\ B = \frac{\sigma^2/n}{\sigma^2/n + \tau_0^2},\quad \mu_n \pm z_{(1+c)/2}\,\tau_n

Normal mean with known variance: posterior from data

1τn2=1τ02+nσ2,μn=τn2(μ0τ02+nxˉσ2) \frac{1}{\tau_n^2} = \frac{1}{\tau_0^2} + \frac{n}{\sigma^2},\quad \mu_n = \tau_n^2\left(\frac{\mu_0}{\tau_0^2} + \frac{n\bar x}{\sigma^2}\right)

Normal model with unknown mean and variance (normal-inverse-gamma)

βn=β0+12∑(xi−xˉ)2+κ0n(xˉ−μ0)22(κ0+n),μ∣x∼t2αn ⁣(μn, βnαnκn) \beta_n = \beta_0 + \tfrac12\sum(x_i-\bar x)^2 + \frac{\kappa_0 n(\bar x-\mu_0)^2}{2(\kappa_0+n)},\quad \mu\mid x \sim t_{2\alpha_n}\!\left(\mu_n,\ \frac{\beta_n}{\alpha_n\kappa_n}\right)

Posterior predictive distribution of a new observation

Ynew∣xˉ∼N ⁣(μn, τn2+σ2) Y_{new}\mid \bar x \sim N\!\left(\mu_n,\ \tau_n^2 + \sigma^2\right)

Credible intervals

Credible interval for a Poisson rate

[Gα′−1 ⁣(1−c2)β′, Gα′−1 ⁣(1+c2)β′] \left[\frac{G^{-1}_{\alpha'}\!\left(\frac{1-c}{2}\right)}{\beta'},\ \frac{G^{-1}_{\alpha'}\!\left(\frac{1+c}{2}\right)}{\beta'}\right]

Credible interval for a proportion (beta-binomial)

p∣k∼Beta(α+k,β+n−k),[q(1−c)/2, q(1+c)/2] p\mid k \sim \mathrm{Beta}(\alpha+k,\beta+n-k),\quad [q_{(1-c)/2},\ q_{(1+c)/2}]

Equal-tailed credible interval of a beta distribution

[FBeta(α,β)−1 ⁣(1−c2), FBeta(α,β)−1 ⁣(1+c2)] \left[F^{-1}_{\mathrm{Beta}(\alpha,\beta)}\!\left(\tfrac{1-c}{2}\right),\ F^{-1}_{\mathrm{Beta}(\alpha,\beta)}\!\left(\tfrac{1+c}{2}\right)\right]

Equal-tailed credible interval of a gamma distribution

[G−1 ⁣(1−c2), G−1 ⁣(1+c2)] \left[G^{-1}\!\left(\tfrac{1-c}{2}\right),\ G^{-1}\!\left(\tfrac{1+c}{2}\right)\right]

Highest-density interval of a beta posterior

F(u)−F(l)=c,f(l)=f(u) F(u) - F(l) = c,\quad f(l) = f(u)

Highest-density interval of a gamma posterior

G(u)−G(l)=c,g(l)=g(u) G(u) - G(l) = c,\quad g(l) = g(u)

Jeffreys interval for a binomial proportion

[B−1 ⁣(1−c2; k+12, n−k+12), B−1 ⁣(1+c2; k+12, n−k+12)] \left[B^{-1}\!\left(\tfrac{1-c}{2};\,k+\tfrac12,\,n-k+\tfrac12\right),\ B^{-1}\!\left(\tfrac{1+c}{2};\,k+\tfrac12,\,n-k+\tfrac12\right)\right]

Decision analysis

Bayes action: minimum posterior expected loss

ρ(a)=∑sP(s∣x) L(a,s),a∗=arg⁡min⁡aρ(a) \rho(a) = \sum_s P(s\mid x)\,L(a,s),\quad a^* = \arg\min_a \rho(a)

Best action by expected monetary value

EV(a)=∑sP(s) u(a,s),a∗=arg⁡max⁡aEV(a) EV(a) = \sum_s P(s)\,u(a, s),\quad a^* = \arg\max_a EV(a)

Break-even (indifference) probability of two actions

p∗=u22−u12(u11−u12)−(u21−u22) p^* = \frac{u_{22} - u_{12}}{(u_{11} - u_{12}) - (u_{21} - u_{22})}

Certainty equivalent with logarithmic utility

CE=exp⁡ ⁣(∑ipiln⁡xi)=∏ixipi CE = \exp\!\left(\sum_i p_i \ln x_i\right) = \prod_i x_i^{p_i}

Decision threshold probability (treat / do not treat)

p∗=LFPLFP+LFN p^* = \frac{L_{FP}}{L_{FP} + L_{FN}}

Decision under uncertainty: maximin, maximax, Laplace, minimax regret, Hurwicz

maximin: max⁡amin⁡su,regret r(a,s)=max⁡a′u(a′,s)−u(a,s) \text{maximin: }\max_a\min_s u,\quad \text{regret } r(a,s) = \max_{a'}u(a',s) - u(a,s)

Expected utility and certainty equivalent (exponential utility)

CE=−Rln⁡∑ipie−xi/R CE = -R\ln\sum_i p_i e^{-x_i/R}

Expected value of perfect information (EVPI)

EVPI=∑sP(s)max⁡au(a,s)−max⁡a∑sP(s) u(a,s) EVPI = \sum_s P(s)\max_a u(a,s) - \max_a\sum_s P(s)\,u(a,s)

Expected value of sample information (EVSI)

EVSI=∑zP(z)max⁡a∑sP(s∣z) u(a,s)−max⁡a∑sP(s) u(a,s) EVSI = \sum_z P(z)\max_a\sum_s P(s\mid z)\,u(a,s) - \max_a\sum_s P(s)\,u(a,s)

Information and quadrature for Bayesian computation

Gauss-Hermite rule for expectations under a normal distribution

E[f(Z)]≈∑i=1nwif(xi),Hen(xi)=0,wi=n!n2 Hen−1(xi)2 E[f(Z)] \approx \sum_{i=1}^{n} w_i f(x_i),\quad He_n(x_i) = 0,\quad w_i = \frac{n!}{n^2\,He_{n-1}(x_i)^2}

Kullback-Leibler divergence between two beta distributions

KL=ln⁡B(α2,β2)B(α1,β1)+(α1−α2)ψ(α1)+(β1−β2)ψ(β1)+(α2−α1+β2−β1)ψ(α1+β1) KL = \ln\frac{B(\alpha_2,\beta_2)}{B(\alpha_1,\beta_1)} + (\alpha_1-\alpha_2)\psi(\alpha_1) + (\beta_1-\beta_2)\psi(\beta_1) + (\alpha_2-\alpha_1+\beta_2-\beta_1)\psi(\alpha_1+\beta_1)

Kullback-Leibler divergence between two normal distributions

KL(N1∥N2)=ln⁡σ2σ1+σ12+(μ1−μ2)22σ22−12 KL(N_1\Vert N_2) = \ln\frac{\sigma_2}{\sigma_1} + \frac{\sigma_1^2 + (\mu_1-\mu_2)^2}{2\sigma_2^2} - \frac12

Odds and likelihood ratios

Likelihood ratios of a diagnostic test

LR+=Se1−Sp,LR−=1−SeSp LR^{+} = \frac{\mathrm{Se}}{1-\mathrm{Sp}},\quad LR^{-} = \frac{1-\mathrm{Se}}{\mathrm{Sp}}

Odds and log-odds of a probability

odds=p1−p,logit⁡p=ln⁡p1−p \text{odds} = \frac{p}{1-p},\quad \operatorname{logit} p = \ln\frac{p}{1-p}

Post-test probability from a likelihood ratio

P(H∣E)1−P(H∣E)=P(H)1−P(H)×LR \frac{P(H\mid E)}{1-P(H\mid E)} = \frac{P(H)}{1-P(H)}\times LR

Probability from odds

p=o1+o p = \frac{o}{1+o}

Posterior approximation

Laplace (normal) approximation of a beta posterior

p^=α−1α+β−2,σ2=[α−1p^2+β−1(1−p^)2]−1 \hat p = \frac{\alpha-1}{\alpha+\beta-2},\quad \sigma^2 = \left[\frac{\alpha-1}{\hat p^2} + \frac{\beta-1}{(1-\hat p)^2}\right]^{-1}

Prior elicitation

Beta prior from a mean and standard deviation

ν=m(1−m)s2−1,α=mν,β=(1−m)ν \nu = \frac{m(1-m)}{s^2} - 1,\quad \alpha = m\nu,\quad \beta = (1-m)\nu

Sensitivity analysis

Morris elementary-effects screening

EEj=f(x+Δej)−f(x)Δ,μj∗=1r∑t∣EEj(t)∣ EE_j = \frac{f(x + \Delta e_j) - f(x)}{\Delta},\quad \mu_j^* = \frac1r\sum_t \vert EE_j^{(t)}\vert

Sobol indices of Sobol's G-function

Vi=13(1+ai)2, V=∏i(1+Vi)−1, Si=ViV, STi=Vi∏j≠i(1+Vj)V V_i = \frac{1}{3(1+a_i)^2},\ V = \prod_i(1+V_i) - 1,\ S_i = \frac{V_i}{V},\ S_{Ti} = \frac{V_i\prod_{j\ne i}(1+V_j)}{V}

Sobol indices of a linear (additive) model

Si=ai2σi2∑jaj2σj2 S_i = \frac{a_i^2\sigma_i^2}{\sum_j a_j^2\sigma_j^2}

Sobol indices of a model with an interaction term

V1=(a1+a12μ2)2σ12, V2=(a2+a12μ1)2σ22, V12=a122σ12σ22 V_1 = (a_1 + a_{12}\mu_2)^2\sigma_1^2,\ V_2 = (a_2 + a_{12}\mu_1)^2\sigma_2^2,\ V_{12} = a_{12}^2\sigma_1^2\sigma_2^2

Sobol sensitivity indices of the Ishigami function

V=a28+bπ45+b2π818+12, V1=12(1+bπ45)2, V2=a28, V13=8b2π8225 V = \frac{a^2}{8} + \frac{b\pi^4}{5} + \frac{b^2\pi^8}{18} + \frac12,\ V_1 = \frac12\left(1 + \frac{b\pi^4}{5}\right)^2,\ V_2 = \frac{a^2}{8},\ V_{13} = \frac{8b^2\pi^8}{225}

Uncertainty propagation

Covariance propagation through a linear map y = A x

Σy=A Σx AT \Sigma_y = A\,\Sigma_x\,A^{\mathsf T}

Effective degrees of freedom and expanded uncertainty (Welch-Satterthwaite)

νeff=uc4∑iui4/νi,U=t(1+p)/2, νeff uc \nu_{eff} = \frac{u_c^4}{\sum_i u_i^4/\nu_i},\quad U = t_{(1+p)/2,\,\nu_{eff}}\,u_c

Exact mean and standard deviation of a product of independent normals

Var(XY)=μx2σy2+μy2σx2+σx2σy2 \mathrm{Var}(XY) = \mu_x^2\sigma_y^2 + \mu_y^2\sigma_x^2 + \sigma_x^2\sigma_y^2

Exact mean and variance of a polynomial of a normal variable

E[Z2m]=(2m−1)!!,X=μ+σZ E[Z^{2m}] = (2m-1)!!,\quad X = \mu + \sigma Z

Exact versus first-order propagation through exp(X)

E[eX]=eμ+σ2/2,SD[eX]=eμ+σ2/2eσ2−1 E[e^X] = e^{\mu + \sigma^2/2},\quad \mathrm{SD}[e^X] = e^{\mu + \sigma^2/2}\sqrt{e^{\sigma^2} - 1}

Inverse-variance weighted mean of measurements

xˉw=∑xi/ui2∑1/ui2,u(xˉw)=(∑1/ui2)−1/2 \bar x_w = \frac{\sum x_i/u_i^2}{\sum 1/u_i^2},\quad u(\bar x_w) = \Big(\sum 1/u_i^2\Big)^{-1/2}

Type B standard uncertainty from a stated half-width

u=a3 (rect.), a6 (tri.), a2 (arcsine) u = \frac{a}{\sqrt 3}\ (\text{rect.}),\ \frac{a}{\sqrt 6}\ (\text{tri.}),\ \frac{a}{\sqrt 2}\ (\text{arcsine})

Uncertainty of a function of one variable

uf=∣f′(x)∣ux u_f = \left\vert f'(x)\right\vert u_x

Uncertainty of a linear combination of correlated inputs

uy2=∑i∑jcicjuiujrij u_y^2 = \sum_i\sum_j c_i c_j u_i u_j r_{ij}

Uncertainty of a power x^n

uy∣y∣=∣n∣ ux∣x∣ \frac{u_y}{\vert y\vert } = \vert n\vert \,\frac{u_x}{\vert x\vert }

Uncertainty of a power-law product y = k x1^p1 x2^p2 ...

uy∣y∣=∑i(pi uixi)2 \frac{u_y}{\vert y\vert } = \sqrt{\sum_i \left(p_i\,\frac{u_i}{x_i}\right)^2}

Uncertainty of a product and a quotient

uab∣ab∣=ua/b∣a/b∣=(uaa)2+(ubb)2 \frac{u_{ab}}{\vert ab\vert } = \frac{u_{a/b}}{\vert a/b\vert } = \sqrt{\left(\frac{u_a}{a}\right)^2 + \left(\frac{u_b}{b}\right)^2}

Uncertainty of a product and quotient with correlation

uab2=b2ua2+a2ub2+2ab ρ uaub u_{ab}^2 = b^2u_a^2 + a^2u_b^2 + 2ab\,\rho\,u_au_b

Uncertainty of a sum or linear combination (independent inputs)

uy=∑ici2ui2 u_y = \sqrt{\sum_i c_i^2 u_i^2}

Out of scope

  • Open-ended explanation, essay writing or tutoring dialogue: it is a solver, not a chatbot.
  • Questions outside its certified bayesian statistics capabilities, and any question whose stated numbers it cannot all use — it refuses with the reason instead.
  • High-stakes engineering, medical or legal decisions without independent review.

Limitations

  • It answers what its certified capabilities cover (Bayes' theorem, conjugate posteriors, credible intervals, Bayes factors, decision analysis, uncertainty propagation, Monte Carlo and sensitivity analysis); anything else is refused with a reason.
  • ask() reads documented question forms and common phrasings; unusual wording may be refused — use solve() for guaranteed results.
  • Results are as correct as the certified relations and their stated conditions; a certified relation is a checked model, not a claim about every physical situation.

Citation

@software{bayesian_statistics_ai999x_1_0_0,
  title  = {bayesian-statistics-ai999x: an offline, verified bayesian statistics solver},
  author = {Farabi, Ibnul Jaif}, organization = {AI999X},
  year   = {2026}, version = {1.0.0},
  url    = {https://huggingface.co/AI999X/bayesian-statistics-ai999x}
}

Contact

Questions, bug reports and requests: open a discussion on https://huggingface.co/AI999X/bayesian-statistics-ai999x/discussions or visit https://ai999x.com.

Support the project

bayesian-statistics-ai999x is free and open source. If it helps you, you can support further development on Buy Me a Coffee.

Created and engineered by Ibnul Jaif Farabi · AI999X · ai999x.com

Downloads last month
17
Safetensors
Model size
4.72M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collections including AI999X/bayesian-statistics-ai999x

Evaluation results

  • identical on every platform on Golden answers (378 documented questions, Windows + Linux Python 3.10-3.14)
    self-reported
    1.000