Statistics (statistics-ai999x)
Statistics covers descriptive statistics, probability distributions, confidence intervals, hypothesis tests, regression and correlation, experimental design, quality control and reliability: 112 calculations in 16 topics, each with its formula, its steps and its units, and a plain reason instead of a number when an input is missing or out of range. One compiled engine, four ways to use it: the desktop app, the command line, the browser and Python. Everything runs on your own computer, offline.
Four ways to use it
| Desktop app (Windows, Linux) | Windows · Linux |
Command line statistics (Windows, Linux) | Windows · Linux |
| Browser (any device) | Try it on the model page |
| Python 3.10+ | pip install statistics-ai999x: on Windows and Linux (x86-64) pip installs the same compiled engine; on other systems (macOS, ARM) it installs a pure-Python build that gives the same answers |
See it
From the Statistics desktop app: every scene and chart is drawn from the computed answer.
Charts:
One-sample t-test | Normal probability below a value | Confidence interval for a mean from data (t-interval) | One-way ANOVA |
Ask in words: 15 examples
Each question below was asked on this release; the comment under it is the line it printed.
import statistics_ai999x as statistics
a = statistics.ask(
"Fisher's exact test for the table [[8, 2], [1, 5]], two-sided."
)
print(a.outcome, a.values)
# SOLVED {'p_value': 0.03496503496503497, 'odds_ratio': 20.0}
a = statistics.ask("Find the mean of [2, 4, 9].")
print(a.outcome, a.values)
# SOLVED {'mean': 5.0, 'n': 3, 'sum': 15.0}
a = statistics.ask(
"Find the effects of the 2^2 factorial design with responses in "
"standard order [28, 36, 18, 31]."
)
print(a.outcome, a.values)
# SOLVED {'grand_mean': 28.25, 'A': 10.5, 'B': -7.5, 'AB': 2.5}
a = statistics.ask(
"Find the power of a one-sample z-test with effect size d = 0.5, n "
"= 30 and alpha = 0.05, two-sided."
)
print(a.outcome, a.values)
# SOLVED {'power': 0.7819079987319799}
a = statistics.ask(
"Find the binomial probability of at least k = 3 successes in n = "
"10 trials with p = 0.4."
)
print(a.outcome, a.values)
# SOLVED {'probability': 0.8327102464000001}
a = statistics.ask(
"Find the c chart limits for defect counts [3, 5, 2, 6, 4, 7, 3, "
"4]."
)
print(a.outcome, a.values)
# SOLVED {'center': 4.25, 'ucl': 10.43465843842649, 'lcl': 0.0}
a = statistics.ask(
"Find the F critical value with df1 = 3, df2 = 20 and alpha = "
"0.05."
)
print(a.outcome, a.values)
# SOLVED {'critical_value': 3.0983912121407844}
a = statistics.ask(
"Perform a Kruskal-Wallis test on [27, 2, 4, 18, 7, 9], [20, 8, "
"14, 36, 21, 22] and [34, 31, 3, 23, 30, 6]."
)
print(a.outcome, a.values)
# SOLVED {'h': 2.853801169590639, 'df': 2, 'p_value': 0.24005179059000692}
a = statistics.ask(
"Find the power of a two-sample z-test with effect size d = 0.5, n "
"= 30 and alpha = 0.05, two-sided."
)
print(a.outcome, a.values)
# SOLVED {'power': 0.49068556766996907}
a = statistics.ask(
"What is the probability of at least one success in n = 5 "
"independent trials with probability = 0.2?"
)
print(a.outcome, a.values)
# SOLVED {'probability': 0.67232, 'none': 0.3276800000000001}
a = statistics.ask(
"Find the binomial probability of at most k = 3 successes in n = "
"10 trials with p = 0.4."
)
print(a.outcome, a.values)
# SOLVED {'probability': 0.3822806015999999}
a = statistics.ask(
"Find the reliability of a k-out-of-n system with k = 2, n = 3 and "
"component reliability = 0.9."
)
print(a.outcome, a.values)
# SOLVED {'reliability': 0.9720000000000001}
a = statistics.ask(
"Find the critical t value for a 95% confidence interval with df = "
"10."
)
print(a.outcome, a.values)
# SOLVED {'critical_value': 2.228138851986274}
a = statistics.ask(
"Find Cronbach's alpha for [[4, 5, 4], [3, 3, 4], [5, 5, 5], [2, "
"3, 2], [4, 4, 3]]."
)
print(a.outcome, a.values)
# SOLVED {'alpha': 0.9130434782608696, 'items': 3, 'respondents': 5}
a = statistics.ask(
"Perform a exact Mann-Whitney U test on [3.1, 5.2, 4.3, 6.4, 7.5] "
"and [1.5, 2.6, 2.2, 3.9], two-sided."
)
print(a.outcome, a.values)
# SOLVED {'u': 19.0, 'p_value': 0.031746031746031744}
Command line: 15 examples
Each command below was run with statistics of this release; the lines under it are the answer it printed (the full answer goes on with the method, every input in SI units and the conditions it assumes).
$ statistics solve 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
$ statistics solve fisher_exact_test "table=[[8, 2], [1, 5]]" alternative=two-sided
p_value = 0.03496503497
odds_ratio = 20
$ statistics solve ci_mean_known_sigma xbar=52 sigma=8 n=36 confidence=0.95
lower = 49.38671469
upper = 54.61328531
margin_of_error = 2.613285313
critical_value = 1.959963985
$ statistics solve chi_square_critical_value df=4 alpha=0.05
critical_value = 9.487729037
left_critical_value = 0.7107230214
$ statistics solve mean "x=[2, 4, 9]"
mean = 5
n = 3
sum = 15
$ statistics solve cohens_d "x=[12, 15, 11, 18, 14]" "y=[10, 9, 13, 11, 8]"
d = 1.605793084
hedges_g = 1.450393753
pooled_sd = 2.366431913
$ statistics solve factorial_2x2_effects "y=[28, 36, 18, 31]"
grand_mean = 28.25
A = 10.5
B = -7.5
AB = 2.5
$ statistics solve bartlett_test "g1=[21, 24, 19, 26, 23]" "g2=[22, 23, 22, 24, 23]" "g3=[18, 28, 20, 30, 24]"
statistic = 8.618215556
df = 2
p_value = 0.01344554065
$ statistics solve friedman_test "data=[[7, 9, 8], [6, 5, 7], [9, 7, 6], [8, 5, 6], [7, 8, 9]]"
chi_square = 0.4
df = 2
p_value = 0.8187307531
$ statistics solve power_one_sample_z d=0.5 n=30 alpha=0.05 alternative=two-sided
power = 0.7819079987
$ statistics solve two_way_table_probabilities "table=[[30, 20], [10, 40]]" row=1 column=2
total = 100
joint = [[0.3,0.2],[0.1,0.4]]
row_marginals = [0.5,0.5]
column_marginals = [0.4,0.6]
row_given_column = [[0.75,0.3333333333333333],[0.25,0.6666666666666666]]
column_given_row = [[0.6,0.4],[0.2,0.8]]
$ statistics solve binomial_at_least n=10 k=3 p=0.4
probability = 0.8327102464
$ statistics solve c_chart "counts=[3, 5, 2, 6, 4, 7, 3, 4]"
center = 4.25
ucl = 10.43465844
lcl = 0
$ statistics solve correlation_confidence_interval "x=[1, 2, 3, 4, 5, 6]" "y=[2, 3, 5, 4, 6, 7]" confidence=0.95
r = 0.9428571429
lower = 0.5591491951
upper = 0.9938998356
$ statistics solve exponential_reliability t=1000 rate=0.0002
reliability = 0.8187307531
unreliability = 0.1812692469
mttf = 5000
failure_rate = 0.0002
Guides
- Desktop app guide: the window, every calculation, scenes and charts: PDF · HTML · Markdown
- Python guide: every calculation with a Python example: PDF · HTML · Markdown
- Command-line guide: every calculation with the command and what it printed: PDF · HTML · Markdown
Every calculation, with its formula, a worked example and its figures: Statistics on ai999x.com. Install guides for the app and the command line: https://www.ai999x.com/desktop-cli/.
Version 1.6.7 · License: Apache-2.0 · Author: Ibnul Jaif Farabi · Organization: AI999X · Contact: support@ai999x.com · Support the project
The Future Is Self-Improving.













