statistics-ai999x — offline, verified 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.3

Field: Mathematics & Statistics · Tasks: Question Answering, Token Classification, Text Classification, Tabular Regression, Sentence Similarity, Feature Extraction

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

statistics-ai999x is a compact, deterministic statistics engine for Python. It reads a question in plain English (or a typed call), picks a certified 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 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 609 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: descriptive statistics, probability distributions, confidence intervals, hypothesis tests, regression and correlation, experimental design, quality control and reliability.

Model overview

Property Value
Package statistics-ai999x 1.0.3 (import statistics_ai999x)
Type Deterministic neuro-symbolic statistics engine (rule-based reading + certified symbolic capabilities)
Capabilities 110 certified procedures
Knowledge pack version 1.0.1
Golden answers 609 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 statistics-ai999x
# or straight from this repository:
pip install https://huggingface.co/AI999X/statistics-ai999x/resolve/main/dist/statistics_ai999x-1.0.3-py3-none-any.whl
import statistics_ai999x as statistics

statistics.ask("Perform a one-sample t-test of [5.1, 4.9, 5.3, 5.5, 5.0, 5.2] against mu0 = 5, two-sided.").show()
# -> SOLVED — t = 1.88982, df = 5, p_value = 0.117387, mean = 5.16667  (t_test_one_sample)
statistics.ask("For a normal distribution with mean = 100 and standard deviation = 15, find P(X < 120).").show()
# -> SOLVED — probability = 0.908789, z = 1.33333  (normal_probability_below)
statistics.ask("Find the 95% confidence interval for the mean of [12, 15, 11, 18, 14, 16].").show()
# -> SOLVED — lower = 11.6237, upper = 17.043, margin_of_error = 2.70963, critical_value = 2.57058  (ci_mean_t)
statistics.ask("Chi-square test of independence for the table [[20, 30], [25, 25]].").show()
# -> SOLVED — chi_square = 1.0101, df = 1, p_value = 0.314879, expected = [[22.5, 27.5], [22.5, 27.5]]  (chi_square_independence)
statistics.solve("weibull_reliability", beta=2, eta=1000, t=500).show()
# -> SOLVED — reliability = 0.778801, unreliability = 0.221199, hazard_rate = 0.001, mttf = 886.227  (weibull_reliability)
statistics.ask("Who created you?").message
# -> statistics-ai999x was created and engineered by Ibnul Jaif Farabi at AI999X.

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

Find the right capability, and draw it

statistics.search() finds which certified capability a question is about — across every AI999X model, so a question for another model points you to it. It runs ai999x-encoder, AI999X's own capability encoder (4.7M parameters, a 4.9 MB ONNX model, offline; the root model.safetensors of this repository): pip install "statistics-ai999x[search]". ask(question, suggest=True) adds the same pointers to a question it does not answer; an answer itself never changes.

import statistics_ai999x as statistics

statistics.search("Solve x^2 - 5x + 6 = 0", k=2)
# -> Roots of a quadratic equation (math-foundations-ai999x, 0.63); Roots of a cubic equation (math-foundations-ai999x, 0.59)

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.

Worked examples

Each question was put to statistics-ai999x; the answer is the one it returned, with the steps it took.

One-sample t-test · Hypothesis tests

Perform a one-sample t-test of [5.1, 4.9, 5.3, 5.5, 5.0, 5.2] against mu0 = 5, two-sided.

→ t = 1.889822365, df = 5, p_value = 0.1173867951, mean = 5.166666667, standard_deviation = 0.2160246899

Steps
  • One-sample t-test: x = [5.1, 4.9, 5.3, 5.5, 5, 5.2], mu0 = 5, alternative = two-sided → t = 1.889822365, df = 5, p_value = 0.1173867951, mean = 5.166666667, standard_deviation = 0.2160246899

Normal probability below a value · Probability distributions

For a normal distribution with mean = 100 and standard deviation = 15, find P(X < 120).

→ probability = 0.9087887803, z = 1.333333333

Steps
  • Normal probability below a value: mu = 100, sigma = 15, x = 120 → probability = 0.9087887803, z = 1.333333333

Confidence interval for a mean from data (t-interval) · Confidence intervals

Find the 95% confidence interval for the mean of [12, 15, 11, 18, 14, 16].

→ lower = 11.62370216, upper = 17.0429645, margin_of_error = 2.709631171, critical_value = 2.570581836, df = 5, mean = 14.33333333

Steps
  • Confidence interval for a mean from data (t-interval): x = [12, 15, 11, 18, 14, 16], confidence = 0.95 → lower = 11.62370216, upper = 17.0429645, margin_of_error = 2.709631171, critical_value = 2.570581836, df = 5, mean = 14.33333333

Chi-square test of independence · Hypothesis tests

Chi-square test of independence for the table [[20, 30], [25, 25]].

→ chi_square = 1.01010101, df = 1, p_value = 0.3148786413, expected = [[22.5, 27.5], [22.5, 27.5]]

Steps
  • Chi-square test of independence: table = [20 30; 25 25] → chi_square = 1.01010101, df = 1, p_value = 0.3148786413, expected = [[22.5, 27.5], [22.5, 27.5]]

Weibull reliability, hazard rate and MTTF · Reliability and survival

m.solve("weibull_reliability", beta=2, eta=1000, t=500)

→ reliability = 0.7788007831, unreliability = 0.2211992169, hazard_rate = 0.001, mttf = 886.2269255

Steps
  • Weibull reliability, hazard rate and MTTF: beta = 2, eta = 1000, t = 500 → reliability = 0.7788007831, unreliability = 0.2211992169, hazard_rate = 0.001, mttf = 886.2269255

One-way ANOVA · Analysis of variance

Perform a one-way ANOVA on groups [23, 25, 21, 22], [30, 28, 31, 29] and [26, 27, 24, 25].

→ f = 22.12, p_value = 0.0003357531392, df_between = 2, df_within = 9, ss_between = 92.16666667, ss_within = 18.75, ms_between = 46.08333333, ms_within = 2.083333333, eta_squared = 0.8309541698

Steps
  • One-way ANOVA: g1 = [23, 25, 21, 22], g2 = [30, 28, 31, 29], g3 = [26, 27, 24, 25] → f = 22.12, p_value = 0.0003357531392, df_between = 2, df_within = 9, ss_between = 92.16666667, ss_within = 18.75, ms_between = 46.08333333, ms_within = 2.083333333, eta_squared = 0.8309541698

Figures

Every point was computed by statistics-ai999x.

One-sample t test: statistic against the rejection region

One-sample t test: statistic against the rejection region — computed by statistics-ai999x

The one-sample t test of x = 5.1, 4.9, 5.3, 5.5, 5.0, 5.2 against μ₀ = 5: the t density with 5 degrees of freedom (from the package's quantiles at 121 cumulative probabilities, differenced), the two-tailed rejection region beyond ±2.57058 for α = 0.05 shaded; marked: t = 1.88982, p-value = 0.117387.

Poisson distribution and an at-least probability

Poisson distribution and an at-least probability — computed by statistics-ai999x

The Poisson distribution with mean λ = 4: P(X = k) for k = 0 … 14, each from the package; the stems with k ≥ 2 carry P(X ≥ 2) = 0.908422; marked: the most probable count k = 4, P = 0.195367.

Three groups as box plots, with their ANOVA

Three groups as box plots, with their ANOVA — computed by statistics-ai999x

Box plots of 3 groups (g1 = 23, 25, 21, 22; g2 = 30, 28, 31, 29; g3 = 26, 27, 24, 25): each box spans the quartiles and the bar is the median, all from the package's percentiles (g1 median 22.5, quartiles 21.75–23.5; g2 median 29.5, quartiles 28.75–30.25; g3 median 25.5, quartiles 24.75–26.25). One-way ANOVA: F = 22.12 with 2 and 9 degrees of freedom, p-value 0.000335753, η² = 0.830954.

Simple linear regression: data and fitted line

Simple linear regression: data and fitted line — computed by statistics-ai999x

The least-squares line through x = 1, 2, 3, 4, 5, y = 2.2, 4.1, 6.1, 7.9, 10.2: intercept 0.16 (standard error 0.143295), slope 1.98 (standard error 0.0432049), r = 0.999287, R² = 0.998574, p-value of the slope 2.2873e-05, as returned by the package.

Kaplan–Meier survival curve

Kaplan–Meier survival curve — computed by statistics-ai999x

The Kaplan–Meier survival curve returned by the package for times 6, 6, 6, 7, 10, 13, 16, 22, 23 with event indicators 1, 1, 1, 0, 1, 1, 1, 1, 1 (0 = censored): it steps down at each event time 6, 10, 13, 16, 22, 23; marked: t = 12, S = 0.533333.

Confidence intervals for a mean at five levels

Confidence intervals for a mean at five levels — computed by statistics-ai999x

t confidence intervals for the mean of x = 12, 15, 11, 18, 14, 16 at 5 confidence levels, each from the package: 50 % [13.5673, 15.0993]; 80 % [12.7776, 15.8891]; 90 % [12.2093, 16.4574]; 95 % [11.6237, 17.043]; 99 % [10.0831, 18.5836] (sample mean 14.3333, 5 degrees of freedom); higher confidence, wider interval.

Capabilities

110 certified procedures. A few of them:

  • Procedures: 2^2 factorial design: main effects and interaction; 2^3 factorial design: main effects and interactions; Arithmetic mean; Bartlett's test for equal variances; Binomial probability: at least k successes; Binomial probability: at most k successes; Binomial probability: exactly k successes; Chi-square goodness-of-fit test; Chi-square test for a variance; Chi-square test of independence; Coefficient of variation; Cohen's d and Hedges' g; Confidence interval for a correlation (Fisher z); Confidence interval for a mean (sigma known, z-interval); Confidence interval for a mean from data (t-interval); Confidence interval for a mean from summary statistics (t-interval); Confidence interval for a proportion (Wald); Confidence interval for a variance and standard deviation; Confidence interval for the difference of two means; Covariance; Critical value of F; Critical value of Student's t; Critical value of chi-square; Critical value of z …

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

All 110 formulas

Show every formula, by topic

Analysis of variance

One-way ANOVA

F=SSB/(k−1)SSW/(N−k) F = \frac{SS_B/(k-1)}{SS_W/(N-k)}

Categorical data

Fisher's exact test (2 x 2)

P(a)=(a+ba)(c+dc)(na+c) P(a) = \frac{\binom{a+b}{a}\binom{c+d}{c}}{\binom{n}{a+c}}

McNemar's test for paired proportions

χ2=(∣b−c∣−1)2b+c \chi^2 = \frac{(\vert b - c\vert - 1)^2}{b + c}

Confidence intervals

Confidence interval for a mean (sigma known, z-interval)

xˉ±zα/2σn \bar{x} \pm z_{\alpha/2}\frac{\sigma}{\sqrt{n}}

Confidence interval for a mean from data (t-interval)

xˉ±tα/2, n−1sn \bar{x} \pm t_{\alpha/2,\,n-1}\frac{s}{\sqrt{n}}

Confidence interval for a mean from summary statistics (t-interval)

xˉ±tα/2, n−1sn \bar{x} \pm t_{\alpha/2,\,n-1}\frac{s}{\sqrt{n}}

Confidence interval for a proportion (Wald)

p^±zα/2p^(1−p^)n \hat{p} \pm z_{\alpha/2}\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}

Confidence interval for a variance and standard deviation

[(n−1)s2χ1−α/2, n−12, (n−1)s2χα/2, n−12] \left[\frac{(n-1)s^2}{\chi^2_{1-\alpha/2,\,n-1}},\ \frac{(n-1)s^2}{\chi^2_{\alpha/2,\,n-1}}\right]

Confidence interval for the difference of two means

(xˉ1−xˉ2)±tα/2, νs12n1+s22n2 (\bar{x}_1 - \bar{x}_2) \pm t_{\alpha/2,\,\nu}\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}

Wilson score interval for a proportion

p^+z22n±zp^(1−p^)n+z24n21+z2n \frac{\hat{p} + \frac{z^2}{2n} \pm z\sqrt{\frac{\hat{p}(1-\hat{p})}{n} + \frac{z^2}{4n^2}}}{1 + \frac{z^2}{n}}

Confidence intervals and tests

Critical value of F

Fα; ν1,ν2: P(Fν1,ν2>c)=α F_{\alpha;\,\nu_1,\nu_2}:\ P(F_{\nu_1,\nu_2} > c) = \alpha

Critical value of Student's t

tα/2, ν: P(Tν>t)=α/2 t_{\alpha/2,\,\nu}:\ P(T_\nu > t) = \alpha/2

Critical value of chi-square

χα,ν2: P(χν2>c)=α \chi^2_{\alpha,\nu}:\ P(\chi^2_\nu > c) = \alpha

Critical value of z

zα/2=Φ−1(1−α/2) z_{\alpha/2} = \Phi^{-1}(1 - \alpha/2)

Descriptive statistics

Arithmetic mean

xˉ=1n∑i=1nxi \bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i

Coefficient of variation

CV=sxˉ CV = \frac{s}{\bar{x}}

Five-number summary and interquartile range

Qp=x(⌊h⌋)+(h−⌊h⌋) (x(⌊h⌋+1)−x(⌊h⌋)), h=1+(n−1)p Q_p = x_{(\lfloor h \rfloor)} + (h - \lfloor h \rfloor)\,(x_{(\lfloor h \rfloor + 1)} - x_{(\lfloor h \rfloor)}),\ h = 1 + (n-1)p

Geometric mean

G=(∏xi)1/n G = \left(\prod x_i\right)^{1/n}

Harmonic mean

H=n∑1/xi H = \frac{n}{\sum 1/x_i}

Mean absolute deviation

MAD=1n∑∣xi−xˉ∣ MAD = \frac{1}{n}\sum \vert x_i - \bar{x}\vert

Mean and standard deviation of a frequency table

xˉ=∑fixi∑fi,s=∑fi(xi−xˉ)2n−1 \bar{x} = \frac{\sum f_i x_i}{\sum f_i},\quad s = \sqrt{\frac{\sum f_i (x_i - \bar{x})^2}{n - 1}}

Median

x~=x((n+1)/2) or 12(x(n/2)+x(n/2+1)) \tilde{x} = x_{((n+1)/2)} \ \text{or}\ \tfrac12\left(x_{(n/2)} + x_{(n/2+1)}\right)

Median absolute deviation

MAD=median⁡(∣xi−x~∣) MAD = \operatorname{median}\left(\vert x_i - \tilde{x}\vert \right)

Mode

mode⁡=arg⁡max⁡v#{i:xi=v} \operatorname{mode} = \arg\max_v \#\{i : x_i = v\}

Outliers by the 1.5 IQR rule

[Q1−1.5 IQR, Q3+1.5 IQR] [Q_1 - 1.5\,IQR,\ Q_3 + 1.5\,IQR]

Percentile of a data set

Pp=x(⌊h⌋)+(h−⌊h⌋)(x(⌊h⌋+1)−x(⌊h⌋)) P_p = x_{(\lfloor h \rfloor)} + (h - \lfloor h \rfloor)(x_{(\lfloor h \rfloor+1)} - x_{(\lfloor h \rfloor)})

Population standard deviation

σ=1n∑(xi−μ)2 \sigma = \sqrt{\frac{1}{n}\sum (x_i - \mu)^2}

Population variance

σ2=1n∑(xi−μ)2 \sigma^2 = \frac{1}{n}\sum (x_i - \mu)^2

Range

R=xmax⁡−xmin⁡ R = x_{\max} - x_{\min}

Sample standard deviation

s=1n−1∑(xi−xˉ)2 s = \sqrt{\frac{1}{n-1}\sum (x_i - \bar{x})^2}

Sample variance

s2=1n−1∑(xi−xˉ)2 s^2 = \frac{1}{n-1}\sum (x_i - \bar{x})^2

Skewness and kurtosis

G1=n(n−1)n−2 m3m23/2,G2=(n−1)((n+1)g2+6)(n−2)(n−3) G_1 = \frac{\sqrt{n(n-1)}}{n-2}\,\frac{m_3}{m_2^{3/2}},\quad G_2 = \frac{(n-1)\left((n+1)g_2 + 6\right)}{(n-2)(n-3)}

Standard error of the mean

SExˉ=sn SE_{\bar{x}} = \frac{s}{\sqrt{n}}

Trimmed mean

xˉα=1n−2k∑i=k+1n−kx(i), k=⌊αn⌋ \bar{x}_{\alpha} = \frac{1}{n - 2k}\sum_{i=k+1}^{n-k} x_{(i)},\ k = \lfloor \alpha n \rfloor

Weighted mean

xˉw=∑wixi∑wi \bar{x}_w = \frac{\sum w_i x_i}{\sum w_i}

z-score of a value

z=x−μσ z = \frac{x - \mu}{\sigma}

Effect sizes

Cohen's d and Hedges' g

d=xˉ1−xˉ2sp, sp=(n1−1)s12+(n2−1)s22n1+n2−2 d = \frac{\bar{x}_1 - \bar{x}_2}{s_p},\ s_p = \sqrt{\frac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1+n_2-2}}

Experimental design

2^2 factorial design: main effects and interaction

Effect=contrast2k−1 \text{Effect} = \frac{\text{contrast}}{2^{k-1}}

2^3 factorial design: main effects and interactions

Effect=contrast2k−1 \text{Effect} = \frac{\text{contrast}}{2^{k-1}}

Cronbach's alpha (internal consistency)

α=kk−1(1−∑si2sT2) \alpha = \frac{k}{k-1}\left(1 - \frac{\sum s_i^2}{s_T^2}\right)

Randomized complete block design (two-way ANOVA without replication)

Ftrt=SStrt/(t−1)SSE/((t−1)(b−1)) F_{\text{trt}} = \frac{SS_{\text{trt}}/(t-1)}{SS_E/((t-1)(b-1))}

Hypothesis tests

Bartlett's test for equal variances

T=(N−k)ln⁡sp2−∑(ni−1)ln⁡si21+13(k−1)(∑1ni−1−1N−k) T = \frac{(N-k)\ln s_p^2 - \sum (n_i - 1)\ln s_i^2}{1 + \frac{1}{3(k-1)}\left(\sum \frac{1}{n_i - 1} - \frac{1}{N-k}\right)}

Chi-square goodness-of-fit test

χ2=∑(Oi−Ei)2Ei, ν=k−1 \chi^2 = \sum \frac{(O_i - E_i)^2}{E_i},\ \nu = k - 1

Chi-square test for a variance

χ2=(n−1)s2σ02 \chi^2 = \frac{(n-1)s^2}{\sigma_0^2}

Chi-square test of independence

χ2=∑i,j(Oij−Eij)2Eij, Eij=RiCjn \chi^2 = \sum_{i,j}\frac{(O_{ij} - E_{ij})^2}{E_{ij}},\ E_{ij} = \frac{R_i C_j}{n}

F-test for equality of two variances

F=s12s22 F = \frac{s_1^2}{s_2^2}

Levene's test for equal variances

W=(N−k)∑ni(zˉi⋅−zˉ)2(k−1)∑∑(zij−zˉi⋅)2, zij=∣xij−x~i∣ W = \frac{(N-k)\sum n_i(\bar{z}_{i\cdot} - \bar{z})^2}{(k-1)\sum\sum (z_{ij} - \bar{z}_{i\cdot})^2},\ z_{ij} = \vert x_{ij} - \tilde{x}_i\vert

One-proportion z-test

z=p^−p0p0(1−p0)/n z = \frac{\hat{p} - p_0}{\sqrt{p_0(1-p_0)/n}}

One-sample t-test

t=xˉ−μ0s/n, ν=n−1 t = \frac{\bar{x} - \mu_0}{s/\sqrt{n}},\ \nu = n - 1

One-sample z-test for a mean (sigma known)

z=xˉ−μ0σ/n z = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}

Paired t-test

t=dˉsd/n, ν=n−1 t = \frac{\bar{d}}{s_d/\sqrt{n}},\ \nu = n - 1

Two-proportion z-test

z=p^1−p^2p^(1−p^)(1n1+1n2) z = \frac{\hat{p}_1 - \hat{p}_2}{\sqrt{\hat{p}(1-\hat{p})\left(\frac{1}{n_1} + \frac{1}{n_2}\right)}}

Two-sample t-test (pooled variances)

t=xˉ1−xˉ2sp1/n1+1/n2, ν=n1+n2−2 t = \frac{\bar{x}_1 - \bar{x}_2}{s_p\sqrt{1/n_1 + 1/n_2}},\ \nu = n_1 + n_2 - 2

Two-sample t-test from summary statistics

t=xˉ1−xˉ2s12/n1+s22/n2 t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{s_1^2/n_1 + s_2^2/n_2}}

Welch's two-sample t-test (unequal variances)

t=xˉ1−xˉ2s12/n1+s22/n2 t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{s_1^2/n_1 + s_2^2/n_2}}

Nonparametric tests

Friedman test

Q=12nk(k+1)∑jRj2−3n(k+1) Q = \frac{12}{nk(k+1)}\sum_j R_j^2 - 3n(k+1)

Kruskal-Wallis H test

H=12N(N+1)∑Ri2ni−3(N+1) H = \frac{12}{N(N+1)}\sum \frac{R_i^2}{n_i} - 3(N+1)

Mann-Whitney U test (exact)

U1=R1−n1(n1+1)2 U_1 = R_1 - \frac{n_1(n_1+1)}{2}

Mann-Whitney U test (large-sample)

U1=R1−n1(n1+1)2 U_1 = R_1 - \frac{n_1(n_1+1)}{2}

Sign test

P=2min⁡(P(K≤k),P(K≥k)), K∼Bin(n,12) P = 2\min\left(P(K \le k), P(K \ge k)\right),\ K \sim \mathrm{Bin}(n, \tfrac12)

Wilcoxon signed-rank test (exact)

R+=∑di>0rank⁡(∣di∣) R^+ = \sum_{d_i > 0} \operatorname{rank}(\vert d_i\vert )

Wilcoxon signed-rank test (large-sample)

R+=∑di>0rank⁡(∣di∣) R^+ = \sum_{d_i > 0} \operatorname{rank}(\vert d_i\vert )

Power and sample size

Power of a one-sample z-test

1−β=Φ(dneff−z1−α/2)+Φ(−dneff−z1−α/2) 1 - \beta = \Phi\left(d\sqrt{n_{\text{eff}}} - z_{1-\alpha/2}\right) + \Phi\left(-d\sqrt{n_{\text{eff}}} - z_{1-\alpha/2}\right)

Power of a two-sample z-test

1−β=Φ(dneff−z1−α/2)+Φ(−dneff−z1−α/2) 1 - \beta = \Phi\left(d\sqrt{n_{\text{eff}}} - z_{1-\alpha/2}\right) + \Phi\left(-d\sqrt{n_{\text{eff}}} - z_{1-\alpha/2}\right)

Sample size per group to compare two means (z-test power)

n≈2(z1−α/2+z1−βd)2 n \approx 2\left(\frac{z_{1-\alpha/2} + z_{1-\beta}}{d}\right)^2

Sample size to estimate a mean

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

Sample size to estimate a proportion

n=⌈zα/22 p(1−p)E2⌉ n = \left\lceil \frac{z_{\alpha/2}^2\,p(1-p)}{E^2} \right\rceil

Probability

Probability of at least one occurrence

P(at least one)=1−(1−p)n P(\text{at least one}) = 1 - (1 - p)^n

Probability distributions

Binomial probability: at least k successes

P(X≥k)=∑j=kn(nj)pj(1−p)n−j P(X \ge k) = \sum_{j=k}^{n} \binom{n}{j} p^j (1-p)^{n-j}

Binomial probability: at most k successes

P(X≤k)=∑j=0k(nj)pj(1−p)n−j P(X \le k) = \sum_{j=0}^{k} \binom{n}{j} p^j (1-p)^{n-j}

Binomial probability: exactly k successes

P(X=k)=(nk)pk(1−p)n−k P(X = k) = \binom{n}{k} p^k (1-p)^{n-k}

Expected value and variance of a discrete random variable

E[X]=∑xipi,Var⁡(X)=∑(xi−μ)2pi E[X] = \sum x_i p_i,\quad \operatorname{Var}(X) = \sum (x_i - \mu)^2 p_i

Exponential probability above a value

P(X>x)=e−λx P(X > x) = e^{-\lambda x}

Exponential probability below a value

P(X<x)=1−e−λx P(X < x) = 1 - e^{-\lambda x}

Geometric distribution: first success on trial k

P(X=k)=(1−p)k−1p,P(X≤k)=1−(1−p)k P(X = k) = (1-p)^{k-1}p,\quad P(X \le k) = 1 - (1-p)^k

Hypergeometric probability (sampling without replacement)

P(X=k)=(Kk)(N−Kn−k)(Nn) P(X = k) = \frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}

Inverse normal (normal percentile)

x=μ+σ Φ−1(p) x = \mu + \sigma\,\Phi^{-1}(p)

Mean and standard deviation of a binomial distribution

μ=np,σ=np(1−p) \mu = np,\quad \sigma = \sqrt{np(1-p)}

Negative binomial: r-th success on trial n

P(N=n)=(n−1r−1)pr(1−p)n−r P(N = n) = \binom{n-1}{r-1} p^r (1-p)^{n-r}

Normal probability above a value

P(X>x)=1−Φ(x−μσ) P(X > x) = 1 - \Phi\left(\frac{x - \mu}{\sigma}\right)

Normal probability below a value

P(X<x)=Φ(x−μσ) P(X < x) = \Phi\left(\frac{x - \mu}{\sigma}\right)

Normal probability between two values

P(a<X<b)=Φ(b−μσ)−Φ(a−μσ) P(a < X < b) = \Phi\left(\frac{b-\mu}{\sigma}\right) - \Phi\left(\frac{a-\mu}{\sigma}\right)

Poisson probability: at least k events

P(X≥k)=1−∑j=0k−1e−λλjj! P(X \ge k) = 1 - \sum_{j=0}^{k-1} \frac{e^{-\lambda}\lambda^j}{j!}

Poisson probability: at most k events

P(X≤k)=∑j=0ke−λλjj! P(X \le k) = \sum_{j=0}^{k} \frac{e^{-\lambda}\lambda^j}{j!}

Poisson probability: exactly k events

P(X=k)=e−λλkk! P(X = k) = \frac{e^{-\lambda}\lambda^k}{k!}

Quality control

Individuals and moving range (I-MR) chart limits

UCLx=xˉ+2.66 MR‾ UCL_x = \bar{x} + 2.66\,\overline{MR}

Process capability (Cp, Cpk) and expected nonconforming

Cp=USL−LSL6σ,Cpk=min⁡(USL−μ3σ,μ−LSL3σ) C_p = \frac{USL - LSL}{6\sigma},\quad C_{pk} = \min\left(\frac{USL - \mu}{3\sigma}, \frac{\mu - LSL}{3\sigma}\right)

X-bar and R control chart limits

UCLxˉ=xˉˉ+A2Rˉ,UCLR=D4Rˉ UCL_{\bar{x}} = \bar{\bar{x}} + A_2\bar{R},\quad UCL_R = D_4\bar{R}

X-bar and S control chart limits

UCLxˉ=xˉˉ+A3sˉ,UCLs=B4sˉ UCL_{\bar{x}} = \bar{\bar{x}} + A_3\bar{s},\quad UCL_s = B_4\bar{s}

c chart limits (defects per unit)

cˉ±3cˉ \bar{c} \pm 3\sqrt{\bar{c}}

p chart limits (fraction defective)

pˉ±3pˉ(1−pˉ)n \bar{p} \pm 3\sqrt{\frac{\bar{p}(1-\bar{p})}{n}}

Regression and correlation

Confidence interval for a correlation (Fisher z)

tanh⁡(atanh⁡(r)±zα/2n−3) \tanh\left(\operatorname{atanh}(r) \pm \frac{z_{\alpha/2}}{\sqrt{n-3}}\right)

Covariance

sxy=1n−1∑(xi−xˉ)(yi−yˉ) s_{xy} = \frac{1}{n-1}\sum (x_i - \bar{x})(y_i - \bar{y})

Durbin-Watson statistic

d=∑t=2n(et−et−1)2∑t=1net2 d = \frac{\sum_{t=2}^{n} (e_t - e_{t-1})^2}{\sum_{t=1}^{n} e_t^2}

Kendall's tau-b rank correlation

τb=C−D(n0−n1)(n0−n2) \tau_b = \frac{C - D}{\sqrt{(n_0 - n_1)(n_0 - n_2)}}

Multiple linear regression

β^=(X⊤X)−1X⊤y,R2=1−SSESST \hat{\beta} = (X^\top X)^{-1}X^\top y,\quad R^2 = 1 - \frac{SSE}{SST}

Pearson correlation coefficient

r=∑(xi−xˉ)(yi−yˉ)∑(xi−xˉ)2∑(yi−yˉ)2 r = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum (x_i - \bar{x})^2 \sum (y_i - \bar{y})^2}}

Prediction from a least squares line

y^0=b0+b1x0 \hat{y}_0 = b_0 + b_1 x_0

Significance test for a correlation coefficient

t=rn−21−r2 t = r\sqrt{\frac{n-2}{1-r^2}}

Simple linear regression (least squares line)

y^=b0+b1x,b1=SxySxx,b0=yˉ−b1xˉ \hat{y} = b_0 + b_1 x,\quad b_1 = \frac{S_{xy}}{S_{xx}},\quad b_0 = \bar{y} - b_1\bar{x}

Spearman rank correlation

ρs=r(rank⁡(x),rank⁡(y)) \rho_s = r\left(\operatorname{rank}(x), \operatorname{rank}(y)\right)

Reliability and survival

Exponential reliability (constant failure rate)

R(t)=e−λt,MTTF=1/λ R(t) = e^{-\lambda t},\quad MTTF = 1/\lambda

Kaplan-Meier survival estimate

S^(t)=∏ti≤t(1−dini) \hat{S}(t) = \prod_{t_i \le t}\left(1 - \frac{d_i}{n_i}\right)

Log-rank test comparing two survival curves

χ2=(∑(d1i−e1i))2∑vi \chi^2 = \frac{\left(\sum (d_{1i} - e_{1i})\right)^2}{\sum v_i}

Reliability of a parallel system

Rp=1−∏(1−Ri) R_p = 1 - \prod (1 - R_i)

Reliability of a series system

Rs=∏Ri R_s = \prod R_i

Weibull reliability, hazard rate and MTTF

R(t)=e−(t/η)β,h(t)=βη(tη)β−1 R(t) = e^{-(t/\eta)^\beta},\quad h(t) = \frac{\beta}{\eta}\left(\frac{t}{\eta}\right)^{\beta-1}

k-out-of-n system reliability

R=∑j=kn(nj)rj(1−r)n−j R = \sum_{j=k}^{n}\binom{n}{j} r^j (1-r)^{n-j}

Sampling distributions

Probability that a sample mean is above a value

P(Xˉ<x)=Φ(x−μσ/n) P(\bar{X} < x) = \Phi\left(\frac{x - \mu}{\sigma/\sqrt{n}}\right)

Probability that a sample mean is below a value

P(Xˉ<x)=Φ(x−μσ/n) P(\bar{X} < x) = \Phi\left(\frac{x - \mu}{\sigma/\sqrt{n}}\right)

Out of scope

  • Open-ended explanation, essay writing or tutoring dialogue: it is a solver, not a chatbot.
  • Questions outside its certified 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 (descriptive statistics, probability distributions, confidence intervals, hypothesis tests, regression and correlation, experimental design, quality control and reliability); 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{statistics_ai999x_1_0_3,
  title  = {statistics-ai999x: an offline, verified statistics solver},
  author = {Farabi, Ibnul Jaif}, organization = {AI999X},
  year   = {2026}, version = {1.0.3},
  url    = {https://huggingface.co/AI999X/statistics-ai999x}
}

Contact

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

Support the project

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
53
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/statistics-ai999x

Evaluation results

  • identical on every platform on Golden answers (609 documented questions, Windows + Linux Python 3.10-3.14)
    self-reported
    1.000
  • right capability first on Capability search, 12998 held-out verified questions across all AI999X models
    self-reported
    0.918
  • in the top five on Capability search, 12998 held-out verified questions across all AI999X models
    self-reported
    0.988