Choose the web application or Python
Use Phitter Web when you want to inspect a dataset immediately, share no setup instructions, or keep the workflow inside the browser. Use the Python library when the fit belongs in a notebook, script, reproducible study, or larger data pipeline.
The two routes complement one another: explore interactively first, then reproduce the selected analysis in code when necessary.
Fit a dataset in the browser
- Open Fit a dataset.
- Paste observations or import a TXT, CSV, XLSX, or remote file.
- Select a continuous or discrete fit. Continuous data can take any value in an interval; discrete data represent countable outcomes such as 0, 1, 2, and so on.
- Review the confidence level and, for continuous data, the histogram bins. Candidate selection is available in the Python API; the web tool evaluates its available catalogue.
- Run the fit and inspect the ranked results, estimated parameters, tests, and plots.
The web input requires at least 20 observations. This example uses 500 synthetic observations; meeting the minimum alone does not establish statistical reliability.
The calculation runs through Python and Pyodide in the browser. Your sample does not need to be sent to a Phitter analysis server.
Fit a dataset in Python
Phitter requires Python 3.9 or newer. Install the package from PyPI:
pip install phitter
The shortest continuous fit evaluates the available continuous distributions:
import phitter
import numpy as np
data = np.random.default_rng(42).lognormal(mean=1.2, sigma=0.55, size=500)
phi = phitter.Phitter(data=data)
phi.fit(n_workers=1)
print(phi.best_distribution)
print(phi.summarize(10))
For a more controlled analysis, specify the family, confidence level, histogram bins, and candidates:
phi = phitter.Phitter(
data=data,
fit_type="continuous",
num_bins=15,
confidence_level=0.95,
distributions_to_fit=["beta", "normal", "triangular"],
)
phi.fit(n_workers=1)
Read the result in the right order
Begin with data quality and the empirical plots. Then compare the top candidates and their estimated parameters. Check goodness-of-fit results and inspect the histogram, CDF, and Q–Q plots. Finally, ask whether the support and tail behaviour make sense for the phenomenon you are modelling.
Do not choose a distribution solely because it has the smallest error value. A fitted model should be numerically credible and substantively defensible.
Reproduce and cite the analysis
Record the Phitter version, fitting options, candidate set, and sample-preparation decisions. For academic work, cite the JOSS paper using its DOI and keep the code or input data needed to repeat the fit.