[StaMojo] A statistics library for Mojo — v0.1 is out, looking for collaborators!

Hey fellow statisticians :waving_hand:

StaMojo just hit v0.1 — a statistics library for Mojo inspired by scipy.stats and statsmodels. A library like this can only be truly useful with community input, so I’m putting it out there hoping to find statisticians and Mojo enthusiasts who want to build this together.

Version Mojo pixi Rrepo Discord

Why a separate library?

scipy is a monolith. In Mojo, the ecosystem should be deliberately modular, and it makes more sense to have a dedicated library for statistics rather than bundling everything together. StaMojo targets the scipy.stats + statsmodels niche.

Two-part roadmap:

  • Part I — Statistical computing foundation (available now, zero external dependencies)

    • Special functions: gammainc, betainc, erfinv, ndtri, and more
    • Distributions: Normal, StudentT, ChiSquared, FDist — each with PDF, CDF, SF, PPF, rvs
    • Descriptive stats: mean, std, median, quantile, skewness, kurtosis, …
    • Correlation: pearsonr, spearmanr, kendalltau (with p-values)
    • Hypothesis tests: one/two-sample t-tests, chi-squared GoF & independence, KS test, one-way ANOVA
    • All 30 functions are validated against SciPy reference values
  • Part II — Statistical modeling (planned: OLS, GLM, logistic regression)

    • Depends on NuMojo and MatMojo for matrix operations. Will resume once the NDArray ecosystem stabilizes.

Install:

pixi add stamojo

Links:

PRs are by invite only for now (Mojo pre-v1.0 means frequent breaking changes) — join the Discord to get involved as a collaborator. For everyone else, issues and discussions are always welcome!

6 Likes