One project, two ways to use it
Phitter is an open-source project for fitting probability distributions to observed data. It has two closely related parts:
- The Python library provides the fitting engine, probability-distribution implementations, goodness-of-fit tests, summaries, and plots.
- The web application runs that work directly in a modern browser through Pyodide, so a first analysis does not require a local Python installation.
Both are built around the same practical question: given a sample, which theoretical distributions are credible representations of it, and what evidence supports that conclusion?
Why it exists
Distribution fitting is easy to describe and often tedious to perform. Parameters must be estimated, candidate models compared, and results checked with more than a single score. Definitions also vary between references and software libraries—especially when a distribution can be expressed through different location, scale, shape, minimum, or maximum parameters.
Phitter was created to make that process repeatable. Its distribution implementations use standardized interfaces, parameter-estimation methods, and validation resources. Where a system of parametric equations can be solved efficiently, Phitter uses it; other cases can fall back to numerical estimation.
What an analysis produces
A Phitter fit does more than draw a curve over a histogram. Depending on the selected model family, it can provide:
- estimated distribution parameters;
- a ranking of candidate distributions;
- sum-of-squared-errors values;
- Chi-square, Kolmogorov–Smirnov, and Anderson–Darling results where applicable;
- histogram, density or mass, cumulative-distribution, and Q–Q visualizations;
- direct access to distribution functions and descriptive measurements.
The project covers both continuous and discrete distributions. The current catalogue contains more than 80 models, while the documentation also includes formulas, implementation notes, and spreadsheet resources for individual distributions.
What “best fit” means
The first-ranked model is a candidate, not a universal truth. A useful decision also considers the support of the distribution, parameter plausibility, goodness-of-fit tests, visual diagnostics, sample size, and the purpose of the model. Two distributions with similar numerical scores may imply very different behaviour in their tails.
Phitter organizes the evidence; the analyst still supplies context and judgment.
Where to continue
Start with the practical guide, run a dataset in Phitter Web, or consult the complete Python documentation.