Distribution Fitting App

July 10, 2026 · View on GitHub

The Distribution Fitting app takes a set of data values and finds the probability distribution that best describes them. You load data, the app fits many candidate distributions, scores them, and recommends the best one — ready to use as an input model in a simulation.

You will need: Java 21 and some numeric data (a column of values). This guide uses a generated sample so you need nothing extra. New here? Read Common UI & concepts.

What you'll be able to do

  • Load a dataset (from a file, a database, or pasted values).
  • Explore it (statistics, histogram, plots).
  • Fit and rank candidate distributions, and read the recommended fit.
  • Read goodness-of-fit results and overlay plots.

1. At a glance

Distribution app — Fitting tab

You move through the tabs Data → Analysis → Fitting → Reports (with Bootstrap for resampling). Load data, click Fit, and read the ranked results.

Use this app when…Use a sibling app when…
You have data and need an input distribution for a model.You have a model and want to run it → Single / Scenario
You want to know "which distribution fits this?"You want to analyze simulation outputResults app

2. Before you begin

You need data. The Data tab adds datasets from four sources: a delimited file (CSV / whitespace), a SQLite database table, pasted/inline values, or generated samples. This guide uses 200 generated samples named Service Times. Each dataset is marked Continuous or Discrete, which determines the candidate distributions.


3. A guided tour of the window

Guided tour of the Distribution window

  1. Menu barFile, Appearance, Help, plus an Analysis name field that titles the reports.
  2. TabsData, Analysis, Fitting, Reports, Bootstrap.
  3. Status bar — a validation indicator ("✓ configuration valid"), the file name, and the working directory.

4. Tutorial — fit a distribution to service times

Step 1 — Load the data (Data tab)

On the Data tab, pick a source from the Add datasets from: dropdown. For this guide choose Generated (sample) to create the 200 Service Times points, then click Generate dataset. Confirm its name and that it's marked Continuous.

Step 2 — Explore it (Analysis tab)

Pick the dataset and view its Statistics, Histogram, observation plot, and ACF. This is your sanity check before fitting — is the data shaped like something a standard distribution could match?

Step 3 — Fit candidate distributions (Fitting tab)

The Fitting tab (shown in §1) lists each dataset with its kind, an auto-shift flag, and how many estimators (9 here) and scoring models (4) will be used. Use Edit estimators… / Edit scoring… to customize, then click ▶ Fit. A progress bar runs and the row's status becomes Done.

Reading the results

The app ranks every fitted distribution by a multi-criteria score (BIC, Anderson–Darling, Cramér–von Mises, and a Q-Q correlation). Below is the genuine ranking for our data — the same output the Reports tab produces:

Distribution (best first)BICADCVMQQAvg Rank
Weibull (shape 1.28, scale 11.82)11111.00
Gamma (shape 1.35, scale 8.19)23322.50
GeneralizedBeta42232.75
Exponential (mean 11.04)35544.25
Normal64465.00

The recommended distribution is a shifted Weibull(shape ≈ 1.28, scale ≈ 11.82) (overall score 0.97). The density overlay shows the fitted curve against the data histogram — a close match:

Fitted density vs. data histogram

How to read it. Weibull ranks first on all four criteria, so it's the clear recommendation here. (The data was in fact generated from a Gamma distribution, which ranks a close second — with only 200 points, Weibull and Gamma are nearly indistinguishable, a useful reminder that "best fit" is a statistical judgment, not a certainty.) The app also produces Q-Q, P-P, and ECDF plots and formal goodness-of-fit tests to confirm the choice.


5. Reference — every tab explained

TabWhat it's for
DataImport datasets (file / database / inline); set each as Continuous or Discrete.
AnalysisExploratory analysis of one dataset: statistics, histogram, observation/ACF plots, shift analysis, and a one-click full analysis report.
FittingConfigure estimators, scoring, and per-parameter bootstrap per dataset; run the fit; see per-dataset status.
ReportsOpen the recommended distribution or all fitted distributions report (HTML).
BootstrapResample to assess how stable the recommended-family choice is.

6. Common tasks

TaskHow
Fit several datasets at onceAdd them all on Data; tick incl; Fit runs the batch
Restrict the candidate distributionsEdit estimators… on the Fitting tab
Force/disable an automatic shiftThe shift checkbox / Auto-shift: all / none
See how confident the family choice isRun the Bootstrap tab
Open the recommended-fit reportReports tab → Recommended distributionOpen in browser

7. Troubleshooting & gotchas

SymptomCauseFix
A discrete-only distribution won't fitThe dataset is marked Continuous (or vice-versa).Set the correct kind on the Data/Fitting tab.
The recommended fit looks poorThe data may need a shift, or no standard family fits well.Enable auto-shift; inspect the Q-Q/P-P plots; consider an empirical distribution.
Fit produces no resultsNo datasets included, or none selected.Tick incl for at least one dataset.
Top two distributions are nearly tiedSmall sample; similar families.Collect more data, or use the Bootstrap tab to judge stability.

8. See also