Input Analyzer
Fit a distribution to sample data or an arrival rate to arrival times, check the fit and whether the inputs depend on one another or on time, and read off what to type into a simulation model
© 2026 Theodore P. Pavlic
· MIT License

This tab fits a probability distribution to a sample of independent values, such as service times, and ranks the candidates against one another. For arrivals whose rate may change over the day, use tab ②. To model one value given another, such as a checkout time given the number of items, use tab ③, and to check whether readings taken over time are independent, use tab ④.

1 · Data paste a column of numbers, drop a .csv or .txt file, or load a sample
Drop the file to load it
Sample size n
—
Mean
—
Std. dev.
—
Minimum
—
Median
—
Maximum
—
Load some data to begin. The samples are synthetic, generated from known distributions, so that you can check whether the fit recovers what went in.
Or generate
What generating your own data is for

Fitting is easier to trust once you have watched it work on data whose answer you already know. Generate 200 values from a gamma with shape 2, and see whether the ranking table picks the gamma out, and how close the runner-up gets. Add a location shift and see whether the fitted γ recovers it, and what turning the shift box off does to the ranking.

Then change n and leave everything else alone. At n = 30, no goodness-of-fit test on this page can tell your gamma from a lognormal or a Weibull; every p-value is comfortable and every candidate survives. At n = 5000, the same tests separate them easily. Push further and something less comfortable happens, which the note beside the tests in section 4 takes up.

The recorded to setting rounds the values on the way out, which is what a stopwatch or a spreadsheet does to a real measurement. Generate at full precision and at one decimal place and compare the K–S statistic: rounding creates ties, and ties inflate both K–S and Anderson–Darling. The bootstrap p-values beside them hold up anyway because each resample is rounded to the same step as the data before it is refitted. Rounding small positive values to whole numbers also creates zeros, which a gamma, lognormal, or Weibull can fit only with the location shift.

The two Johnson entries sit under their own heading in the menu because they are fitted only on request (the box in section 2), never by default. That is what they are for here. Every other choice here rewards the ranking table for recovering a distribution that is genuinely on its menu, which is a flattering test; real data are never on anybody's menu. A Johnson sample gives the table nothing to recover; what you see is how well the best available approximation does, which is the situation you are actually in every time you fit a distribution to something you measured.

The Johnson system reaches almost any combination of skewness and kurtosis by putting a standard normal Z through a monotone transformation. The two entries here are different distributions, not one distribution with different starting numbers: they use different transformations, and no choice of parameters turns either into the other.

  • Sᵇ is bounded: a logistic transformation, X = ξ + λ / (1 + exp(−(Z−γ)/δ)), which lives on the finite interval from ξ to ξ + λ and cannot leave it whatever γ and δ are. Reach for it when the quantity has real limits (a proportion, a fill level, a task with a floor and a ceiling).
  • Sᵘ is unbounded: a hyperbolic-sine transformation, X = ξ + λ sinh((Z−γ)/δ), whose support is the whole real line. It is the member with genuinely heavy tails, which is why a large enough sample from it contains a negative value or two, and why the positive-only candidates then refuse unless the shift is on.

Johnson's system has two more members, and between them the four cover the plane: the lognormal is Sᴱ, and the normal itself is Sₙ. Which one a dataset needs is settled by where its skewness and kurtosis fall, with the lognormal line acting as the border between the Sᵇ and Sᵘ regions. That is why fitting a Johnson distribution is a different kind of job from fitting anything else on this page, and part of why it is off by default: tick the box in section 2 and both members join the ranking, where a note under each says what four free parameters mean.

With new seed each time ticked, pressing Generate again draws a different sample from the same distribution. That is the quickest way to see how much of what the ranking table tells you is the distribution and how much is the luck of one sample: at n = 50, press it five times and watch the winner change.

2 · Candidates every distribution fitted by maximum likelihood and then ranked
Load data to rank the candidates.
Why the criteria disagree, and which one to believe

Log-likelihood asks how probable your data are under each fitted model. It always improves when a distribution has more parameters: each one adds modeling flexibility. On its own it would therefore pick the most flexible candidate every time, whether or not that flexibility described anything real.

AIC and BIC are the log-likelihood with a penalty term added for each parameter: AIC = 2k − 2 lnL and BIC = k ln n − 2 lnL, both smaller-is-better. Because ln n is larger than 2 for any sample past seven observations, BIC adds more per parameter than AIC and so leans toward simpler models, and it leans harder the more data you have. When they disagree, the disagreement is telling you the extra parameter is doing something worth about one or two log-likelihood units – real, but marginal.

The Johnson system, when the box above adds it, is the extreme case. Four parameters reach almost any skewness and kurtosis, and so its log-likelihood is usually the highest in the table; AIC adds only 2 for each extra parameter, and a family that flexible gains more than that on most samples by tracking the sample's own tails. Its rows always carry a note under the name saying so. The other rows carry one only when the fit is close to a simpler family, such as a gamma whose shape is near a whole number.

Square error is the criterion Arena's Input Analyzer ranks by. It lays the fitted density over the histogram and adds up the squared gaps between the observed relative frequency in each bin and the probability the fitted model puts in that bin. Two things are wrong with using it to choose:

  • It depends on the binning. The same data and the same two candidates can change places when you drag the bin slider because the criterion is computed on the histogram rather than on the data. Try it: sort by square error and then move the slider in section 4.
  • It ignores how many parameters were estimated. A three-parameter distribution can always track a histogram at least as closely as a one-parameter one can, and so square error rewards flexibility for its own sake. That is the same flaw as raw log-likelihood, without the compensating property of being a likelihood.

So use AIC or BIC to choose, use the Q–Q plot to check that the choice is sensible, and read square error only to understand what Arena would have told you.

3 · Fitted model
No fit yet.
What maximum likelihood is doing, and what a location shift changes

Maximum likelihood picks the parameter values under which the data you actually collected would have been the most probable. For a few distributions, that works out to a formula you can do by hand: the exponential's fitted mean is just the sample mean, and the normal's are the sample mean and standard deviation. For the rest, there is no such formula, and the estimate is found by numerical search: the gamma, beta, and log-logistic fits solve their likelihood equations by Newton's method, the Weibull's shape by bisection, the Pearson type VI by a search over its scale with a beta fit at each step, and the triangular and the PERT by Nelder–Mead, a search that needs no derivatives at all. The Pearson type V needs no search of its own: its fit is the gamma fit to the reciprocals of the data.

A location shift γ slides a distribution sideways so it starts somewhere other than zero. It applies only to the candidates that begin at zero (the exponential, gamma, Erlang, Weibull, lognormal, log-logistic, and Pearson type V) because the others already carry a location parameter of their own and a second one would be redundant. The Pearson type VI also begins at zero but takes no shift: with one, it would have four parameters, more than a sample of a few hundred can pin down. The shift is on by default because most service and processing times have an unavoidable minimum: a fixed setup time, a mandatory inspection, a walk down a corridor that cannot be done in zero seconds. Turn it off when the process truly starts at zero, as interarrival times usually do. Otherwise, each of these candidates still gets a γ estimated from the smallest value you happened to see (for the exponential, exactly that value), a small floor that means nothing, and one more parameter.

The mirror image flips the same candidates the other way. Each one is fitted as c − X: the shape turned around to end at a right end c, with its long tail on the left, which suits data that pile up near a ceiling and trail off below it. c is estimated from the largest values the way γ is from the smallest, and it counts as one more parameter. A flip leaves every likelihood unchanged, and so the mirrored rows are ranked against the normal, beta, and the rest on equal terms.

4 · Goodness of fit what the data look like, and whether the fitted model matches them
10
Histogram with the fitted density
No fit yet.
Empirical vs. fitted CDF
No fit yet.
Two views of the same fit, each next to the test built on it: the histogram is what the chi-square test compares bin by bin, and the largest gap between the two curves on the right is exactly the Kolmogorov–Smirnov statistic. The buttons above each plot save it as an SVG or a PNG, copy it as an image (COPY), or save a MATLAB, R, or Python script that redraws it from its data, and the pointer over a plot (or a finger on it) reads values off both axes.
Choose the test before you look at the results. The Kolmogorov–Smirnov test gives a valid answer even at small sample sizes, and it is most sensitive to differences in the middle of the distribution. The Anderson–Darling test is similar but shifts its focus to the tails. When there are enough observations to meet its assumptions, the chi-square test can be used; it is less sensitive, meaning it may tolerate larger deviations than the other two. However, with a large enough sample, all three tests tend to reject (see "Why a large sample rejects every distribution you try" below). To avoid inflated error rates, choose the test before looking at the results, and commit to its result (regardless of what the other tests say).

Rounded measurements are a special case. Times recorded to the nearest second are still a continuous quantity, and so they still call for a continuous distribution, but the recording leaves many values tied. Ties make the table p-values of K–S and A–D wrong. The bootstrap p-values stay valid because each resample is rounded the same way as your data before it is refitted. Where the step is coarse against the spread, every continuous candidate is also fitted to the range of true values each recorded value stands for (set under Values were in section 2), and so is every resample.

Chi-square, on exactly those bins
No fit yet.
Kolmogorov–Smirnov and Anderson–Darling
No fit yet.
Why the bin slider moves the chi-square p-value

The chi-square test compares the count that landed in each histogram bin with the count the fitted distribution predicts for that same bin: χ² = Σ (O − E)² / E, referred to a chi-square distribution with (bins − 1 − parameters estimated) degrees of freedom. Every ingredient depends on where you put the bin edges, and so the statistic and its p-value are properties of your binning as much as of your data. Drag the slider and watch: the same data and the same fitted model will hand you a comfortable p-value at one bin count and an uncomfortable one a few notches away.

That is not a bug in the test, and it is not license to shop for the bin count that gives the answer you want. It is the reason chi-square is the weakest of the three tests here, and the reason the other two do not bin at all. Too few bins and the test cannot see a misfit inside a wide bin; too many and the expected counts get so small that the chi-square approximation stops holding.

That second failure is handled rather than merely flagged. Before the statistic is computed, adjacent bins are pooled left to right until every group expects at least 5 observations, which is the long-standing rule of thumb for the approximation to be trustworthy. The degrees of freedom then count the pooled groups, not the bins you see, and the table below shows which bins ended up together. On a right-skewed fit this almost always merges the thin far-right bins into one group, which is exactly the region a histogram cannot support on its own. No continuity correction is applied; Yates' correction belongs to 2×2 tables and would be out of place here.

So the slider moves the p-value for two reasons at once: it changes which observations share a bin, and it changes how many groups survive pooling. Push the bin count high enough and the group count stops rising because there are only so many observations to spread.

Chi-square does correct for having fitted the distribution to the same data, in the only place it can: it subtracts one degree of freedom per estimated parameter. The readout refines that subtraction in two ways.

Not every estimated quantity costs a degree of freedom. A uniform's endpoints are the sample minimum and maximum; a beta's interval is read off the same two numbers; a shifted exponential's threshold is the sample minimum. An extreme order statistic converges to what it is estimating at rate 1/n instead of the usual 1/√n, and so asymptotically it behaves like a constant that was known all along and absorbs none of the discrepancy the correction exists to account for. Subtracting for it would throw away power for nothing; the degrees of freedom therefore count only the regular parameters. An estimated location shift is left out too, wherever it lands: it marks the edge of the distribution, and when the test is run on correct shifted fits, subtracting it makes the test reject as much as three times as often as it should. AIC and BIC keep the full count because their penalty measures complexity rather than correcting a distribution, and a number read off the data was still estimated from the data however fast it converged.

And the correction is exact only when the parameters were estimated from the binned counts, which is not what happens here: every fit on this page uses the ungrouped data. Chernoff and Lehmann showed in 1954 that the true distribution then sits somewhere between the two chi-squares you would get by subtracting nothing and by subtracting everything; the conventional df is an approximation whichever way you count. That is why the chi-square statistic is bootstrapped here too. The bootstrap re-bins and re-fits each resample exactly as your own sample was handled, and so its p-value needs no convention at all, and comparing it with the table column tells you how far the convention moved the answer on your data.

What a bootstrap is and what this one is doing

A bootstrap answers a question about a statistic when nobody can write down its distribution: it manufactures that distribution by simulation instead of deriving it on paper.

The question here is: if the fitted distribution really were the truth, and someone fitted it to a fresh sample exactly the way you fitted yours, how large would D usually come out? There is no formula because the answer depends on which distribution was fitted and on how many parameters were estimated. So the page simulates it:

  • draw n fresh values from the fitted distribution, with n the same as your sample size;
  • refit the parameters to those new values, by the same method;
  • compute D for the new sample against its own new fit;
  • repeat a couple of thousand times.

Those couple of thousand values of D are the null distribution: the range D lands in when the model is right. Your D is then read against them, and the p-value is just the fraction that came out at least as large. The refitting step is what makes it work: a version that reused your fitted parameters instead of estimating fresh ones would reproduce the table's error exactly.

It is not subsampling: your sample is never split, thinned, or reduced, and n is the same in every replication as in your data. Nor is it a fix for the tests being too powerful at large n. It does not touch your data or your statistic at all, only the yardstick the statistic is measured against. The word parametric in "parametric bootstrap" marks the difference from the more familiar kind, which resamples your own observations with replacement. Here the resamples come from the fitted distribution, which is what makes them samples from the null hypothesis rather than from your data.

Why the table p-value and the bootstrap p-value differ, and which is too big

The published Kolmogorov–Smirnov table (the one you can use by hand, and the one most software reports) answers a different question from the one you are asking. It gives the distribution of D when the distribution being tested against was fully specified before you saw the data: the family named, the parameters written down, everything. That distribution of D has the convenient property of not depending on which distribution you named, which is why one short table can serve every test.

You did not do that. You estimated the parameters from the very sample you are now testing, which tilts the fitted curve toward your data. The curve passes closer to the empirical CDF than a curve chosen in advance would have, and so D comes out smaller than the table expects. The consequence runs in the direction people usually guess wrong: using the table anyway makes the test too forgiving, not too strict. It accepts fits it should reject. The table p-value shown beside the bootstrap one is almost always the larger of the two, and the gap between them is the size of the error.

There are published tables for a few special cases (Lilliefors' for a fitted normal and a fitted exponential, and Stephens' for several more), but each is specific to one distribution and one way of estimating it. There is no such table for a fitted Erlang, or a fitted triangular, or a fitted gamma with a location shift. The bootstrap builds the right one for whatever you actually did.

Anderson–Darling is the same idea as K–S with the differences weighted to count more heavily in the tails, and it carries exactly the same caveat. For a queueing model, the tails are usually what matter because the long service times are what build the queue; prefer A–D to K–S when the two disagree.

Why a large sample rejects every distribution you try

A goodness-of-fit test asks whether your data could plausibly have come from the fitted distribution. Once you have enough data, the honest answer is almost always no. Real service times are not exactly gamma: they are rounded to the nearest tenth of a minute, they drift between the morning and afternoon operator, they have a hard floor at the setup time, and one customer in fifty asks a question. None of that is visible at n = 30. All of it is visible at n = 5000, and every candidate gets rejected.

That is the test working, not failing, but it does mean a p-value stops being the useful question once n is large. What matters then is whether the departure is big enough to change the decision the simulation is for, and a p-value cannot tell you that. The Q–Q plot can: a fit that misses the upper tail by 10% will build the wrong queue, and a fit that is "wrong" only in the third decimal of the body will not.

The opposite trap sits at the other end. At n = 30, nothing gets rejected, and that is not evidence that your distribution is right; it is evidence that 30 observations cannot tell a gamma from a lognormal. "Not rejected" never means "correct"; at small n it usually means "not enough data to say".

Generate a sample from a known distribution in section 1 and step n from 30 to 5000, changing nothing else. You will watch both halves of this happen to a fit that was right the whole time.

5 · Q–Q and P–P plots where a misfit is, not just how big
Q–Q plot
Load data to draw the Q–Q plot.
P–P plot
No fit yet.
Both compare your data against the fitted model point by point; a perfect fit puts every point on the diagonal. The buttons above each save it as an image or as a script that redraws it in MATLAB, R, or Python, and the pointer over it reads values off both axes.
How to read the Q–Q plot

Sort your n observations. The i-th smallest is an estimate of the quantile at probability (i − 0.5)/n; the plot puts it on the vertical axis against the fitted distribution's quantile at that same probability on the horizontal axis. A perfect fit puts every point on the 45° line.

The shape of the departure tells you what is wrong. Points bending above the line at the right-hand end mean your data have a heavier upper tail than the fitted distribution: the big values are bigger than the model expects, which for a queueing model is usually the departure that matters. An S-shape means the fitted distribution has the wrong skewness. A few stray points at the very ends, with everything else on the line, is normal because the extreme order statistics are the noisiest. Do not reject a fit over the last point alone.

This is the plot to fall back on when a p-value stops being useful, which at a large n it will.

What the P–P plot sees that the Q–Q plot does not

The P–P plot compares probabilities where the Q–Q plot compares values: it puts the fitted F(x₀₋ₖ₋) against (i − 0.5)/n. Because probabilities are squeezed into [0,1], the tails get compressed and the middle gets stretched. That is exactly the opposite of the Q–Q plot's emphasis, where a handful of extreme values occupy most of the axis.

So use the P–P plot to judge the body of the distribution, where most of your observations are and where most of the probability lives, and the Q–Q plot to judge the tails. A fit that looks perfect on one and poor on the other is telling you where its problem is, which is more useful than either plot alone.

6 · Export paste straight into your model or your analysis script
No fit yet.
Reading the expressions, and the traps in each tool's parameterization

Every tool below describes the same fitted distribution, but they do not agree on what to call its parameters, and the disagreements are the kind that produce a model that runs fine and is quietly wrong:

  • Exponential. Arena's EXPO and Simio's Random.Exponential take the mean. AnyLogic's exponential() and R's rexp() take the rate, which is one over the mean. Handing a rate to a function that wants a mean is the single most common input-modeling error, and nothing will warn you.
  • Lognormal. Arena's LOGN takes the mean and standard deviation of the lognormal variable itself. R, MATLAB, and scipy take μ and σ of the underlying normal, that is, of the logarithm. The conversion is shown with the parameters in section 3, and the expressions below already have it applied.
  • Weibull and gamma. Arena writes the scale first and the shape second, WEIB(scale, shape); R and scipy take the shape first. Both orders appear below, each correct for its own tool.
  • The location shift. Arena has no shift built into its distributions, and so a shifted fit is written as an added constant, as in 0.5 + EXPO(2.3). Simio and scipy take it as an explicit offset argument.

The R and Python lines reproduce the fit and the goodness-of-fit test from your raw data rather than hard-coding the fitted numbers, and so running them is a genuine independent check of what this page told you, not a restatement of it.

This tab models arrivals as a Poisson process: customers arrive one at a time and independently of one another, at a rate λ(t) that may change over the day. It estimates that rate interval by interval and tests whether it is constant. If it is, the gaps between arrivals are exponential, and the button in section 4 sends them to tab ① to be fitted. If it is not, the model is a nonhomogeneous Poisson process, and the rate table in section 3 is what goes into a simulation. The tab does not check the Poisson assumption itself. Arrivals in batches, or on a schedule, break it, and the notes under the summary cards warn when the data look that way.

1 · Arrival times or interarrival durations
Drop the file to load it
Sample data:
Arrivals
—
Observed from
—
Observed to
—
Overall rate
—
Mean gap
—
Gap cv
—
Load some arrival times to begin. Paste the moment each customer arrived, and the gaps between them (the interarrival times, one duration per pair of consecutive arrivals) are worked out for you. If what you have is those durations already, set the dropdown above to say so and they will be added up into arrival times.
Or generate
What generating an arrival process is for

The dispersion test in section 3 can only tell you that a rate looks constant or does not. What it cannot tell you is how big a departure has to be before it notices, and that is the thing worth knowing because it decides whether "no evidence the rate changes" is reassurance or just a small sample. Generating a process whose rate you set answers it directly.

Start with the homogeneous process. The rate really is constant, and so the test should leave it alone, and pressing Generate a few times with a new seed shows how often it wrongly cries foul (about 1 time in 20, which is what a 5% test means). Then switch to one peak and shrink the extra rate at the peak until the test stops catching it. That value is the size of the change your data can and cannot see, and it moves with the length of the window and the width of the rate intervals in section 3, both of which you can change here too.

Every process is generated by thinning: candidate arrivals are drawn at the maximum rate, and each one at time t is then kept with probability λ(t)/λmax. That is the same method the note in section 3 recommends for driving a simulation from a rate table; what you are watching here is the technique you would use, running.

When the arrivals came from the generator, the rate plot in section 3 draws the true λ(t) over the estimated steps. Comparing them is the fastest way to see what a piecewise-constant approximation does to a smooth peak: too wide an interval flattens it, too narrow and the steps are mostly noise.

Why fitting a distribution to the gaps can hide a changing rate

Tab ① fits a distribution to a set of numbers it assumes are independent draws from one unchanging distribution. Interarrival gaps from a real arrival process often are not: arrivals come faster at lunchtime than at 3 p.m., and so the gaps early in the data and the gaps in the middle are drawn from different distributions. Fitting a single exponential to all of them gives you the right average rate and the wrong process: a constant-rate Poisson process where the real one changes rate. A simulation built on it will never produce the lunch queue that the real system produces every day.

The gaps are not missing the information; tab ① is throwing it away. Timestamps and gaps hold the same thing: add the gaps up and you have the arrival times back, give or take where you put the zero. Losing the origin leaves you unable to say the peak was at noon, and changes nothing at all when the question is whether there was a peak: the spacing between arrivals is untouched by sliding the whole record sideways.

What does the damage is fitting a distribution to them. A distribution is a statement about a bag of numbers with no order, and so the moment the gaps go into tab ① their sequence is discarded, and with it every trace of the rate having changed. A morning of long gaps followed by a lunchtime of short ones and the same gaps shuffled at random give an identical fit, an identical histogram, and identical p-values. This tab keeps them in order instead: it divides the window into intervals, estimates a separate rate in each, and tests whether the rate is really constant. If it is, send the gaps to tab ① with the button in section 4 and fit an exponential with a clear conscience. If it is not, the rate table below is what belongs in your model.

Data of either kind are welcome here. If what you collected is gaps rather than timestamps, say so beside the box above and they will be added up for you.

The two tabs read 12:30 differently, and deliberately. Here it is a moment: the readings are HH:MM and HH:MM:SS, and the result is minutes past midnight. On tab ① it is a duration off a stopwatch, where the default reading is MM:SS and a control lets you switch. That is not an inconsistency between the tabs but the two conventions the world already uses: nobody writes a time of day as minutes and seconds, and nobody times a task in hours and minutes.

2 · Do these arrivals have a constant rate? a straight cumulative count means a constant rate
Load arrival times to plot them.
The cumulative count rises by one at each arrival. Under a constant arrival rate, it follows the straight dashed line; a stretch that climbs more steeply than the line is a stretch with a higher rate than the average.
The strip along the bottom is a rug: one tick for every arrival, at the moment it happened. It is the only view here that shows the raw events rather than a summary of them, and it is worth looking at before anything else: a burst appears as a dark clot of overlapping ticks, and a lull as a visible gap, both directly under the stretch of curve they produced. The buttons above each plot save it as an image or as a script that redraws it in MATLAB, R, or Python, and the pointer over a plot (or a finger on it) reads values off both axes.
3 · How might the arrival rate change over time? estimating λ(t) one interval at a time for a nonhomogeneous Poisson process, and testing whether it changes at all
Estimated rate in each interval
Load arrival times.
Rate table
Is the rate constant? The Poisson dispersion test
How the rate is estimated, and how to use it in a model

Chop the observation window into intervals of equal width w, count the arrivals in each, and divide: λ̂₁ = N₁/w. That is the maximum-likelihood estimate of a rate that is constant within each interval, and it is how Arena's arrival schedules, Simio's rate tables, and AnyLogic's rate schedules all want to be fed. The estimate's own standard error is √N₁/w, and so an interval holding 4 arrivals knows its rate to about ±50% and an interval holding 100 knows it to about ±10%, which is the whole tension in choosing the width. Narrow intervals can follow a sharp lunchtime peak but estimate each piece from almost nothing; wide intervals estimate precisely but average the peak away. The readout tells you how many arrivals the typical interval is resting on.

To simulate arrivals from a piecewise-constant rate, the standard method is thinning: generate a homogeneous Poisson process at the maximum rate λmax, and then keep each candidate arrival at time t with probability λ(t)/λmax. Most tools do this for you once you hand them the table.

4 · What is the best choice for a single arrival rate? what to use when the rate does not change, and how to tell whether you may
Load arrival times.
Diagnostic checks: exponential interarrivals and Poisson counts
The gaps, against the fitted exponential
To collect this you needed a clock and the moment of every arrival, and the gaps came out of subtracting consecutive times. Under a constant rate, they are independent draws from an exponential, and the histogram below bins durations.
Load arrival times.
Load arrival times.
The counts, against the fitted Poisson
To collect this you needed only a tally sheet and a fixed interval: how many arrived between 9:00 and 9:10, between 9:10 and 9:20, and so on. No arrival time is ever written down. Under a constant rate those counts are independent draws from a Poisson, and the histogram below bins counts rather than durations.
Load arrival times.
There the Poisson gets the full ranking, goodness-of-fit, and export treatment, on the counts rather than on the gaps.
Counting is easier than timing, and it survives a changing rate

From the gaps. If the rate is constant, the interarrival times are independent draws from an exponential, and the maximum-likelihood estimate of an exponential mean is just the sample mean. So λ̂ = 1/x̄: one division, no search, no iteration. Send the gaps to tab ① and fit an exponential and you will get exactly this, to the last digit because it is the same estimator wearing a different hat. That is worth doing once: it is a rare chance to check a numerical fitting routine against a formula you can do by hand.

From the counts. Chop the window into blocks. The number of arrivals in a block of width τ is Poisson with mean λτ, and the maximum-likelihood estimate of a Poisson mean is the sample mean of the counts. For a single block, then, λ̂ = N/τ, and pooled over every block it is the total count over the total width. Which is the same arithmetic, reached from the other end. The rate table in section 3 is exactly this calculation, done one block at a time with blocks of width w.

The two estimation methods count the same arrivals, and so they give the same rate. A window read off the data runs from the first arrival to the last, and the first arrival opens it rather than arriving during it. Of N recorded arrivals, then, the window holds the N − 1 after the first, one at the end of each gap. Counting all N would put in the window an arrival it did not contain. If you know the window you actually watched (say you started at 08:00 and stopped at 16:00), count every arrival inside it over its whole length.

The counts are also far easier to collect. Recording the exact moment of every arrival takes a stopwatch and steady attention; counting how many arrived in each ten-minute block takes a tally sheet. If the counts are Poisson, the rate falls out of them directly and no timestamp is ever needed. That shortcut rests on an assumption, that the rate held constant over the stretch, or at least that the counts across your chosen subintervals are independent and identically distributed, and that is exactly what the histogram and the variance-to-mean ratio below let you check.

So why bother with the counts otherwise? Because they survive the rate not being constant. Each block can carry its own λ; a single exponential fitted to all the gaps cannot and will hand you an average that describes no particular moment of the day. When the dispersion test in section 3 finds no change, take the one-line gap estimate. When it says otherwise, the block counts are the whole answer, and the single number above is worth nothing but a sanity check.

Formula reference
Rate function λ(t) = arrivals per unit time, at time t For a homogeneous Poisson process, this is a constant. For the nonhomogeneous one, it is whatever the step function in section 3 estimates.
Cumulative intensity Λ(t) = ∫₀ᵗ λ(s) ds The expected number of arrivals by time t. For a piecewise-constant rate, it is just the running sum of λ₋ × w.
Counts N(a, b] ~ Poisson( Λ(b) − Λ(a) ) Counts in non-overlapping intervals are independent. This is the fact the block-count estimate rests on, and the one the dispersion test in section 3 checks.
Gaps, constant rate f(x) = λ exp(−λx),  mean 1/λ Only when λ does not change. This is the density tab ① fits.
Gaps, changing rate f(x | arrival at s) = λ(s+x) · exp(−[Λ(s+x) − Λ(s)]) Read this one carefully: it depends on s. When the rate changes, the distribution of a gap depends on when the previous arrival happened, and so the gaps are neither identically distributed nor exponential, which is exactly why they cannot be taken to tab ①, and why this tab exists.
Block estimate λ̂₋ = N₋ / w,  s.e. = √N₋ / w The Poisson maximum-likelihood estimate for block j. An interval holding 4 arrivals knows its rate to about ±50%; one holding 100 knows it to about ±10%.
Thinning keep a candidate at time t with probability λ(t)/λmax How to simulate from a rate function once you have one: draw a homogeneous process at λmax and reject the surplus. It is also how the generator above made these arrivals.

Tab ① treats a column of numbers as independent draws from one distribution, and so it never asks whether another column carries information about it. This tab does. It plots one column against another, measures how strongly the two move together, and builds a model of one given the other, such as a checkout time given the number of items bought. The noise left over goes to tab ① to be fitted.

1 · Data paste two or more columns, drop a .csv or .txt file, or load a sample
Drop the file to load it
Sample data:
Load some data to begin.
2 · The two columns together the pairs in the middle, each column's own histogram on the margins
Pair the values
Y against X, with each column's histogram
Load paired data to plot them.
What re-pairing the values shows

A histogram of X and a histogram of Y say nothing about which X goes with which Y. The four settings above keep both sets of values exactly as they are and change only which X is matched with which Y, and so the two histograms never move. As observed, the points are the data. Shuffled, each Y is matched with a randomly chosen X, which breaks any link between them, and r falls to about 0. Sorted together, the smallest X is matched with the smallest Y, the next with the next, and so on, which gives the largest r these two sets of values can have. Sorted opposite, the smallest X is matched with the largest Y, which gives the most negative r.

When the two histograms have different shapes (one skewed and one symmetric, say), even the sorted pairing falls short of r = 1 because no pairing can put the points on a straight line. Two input models with these marginal distributions therefore cannot be given any correlation you like: the range in the card beside the plot is all that is reachable. A simulation that builds correlated inputs from separately fitted marginals (the NORTA method is the standard one) runs into exactly this limit. Spearman's ρ and Kendall's τ work on ranks, and so the sorted pairings take them all the way to +1 and −1 whenever there are no ties.

3 · How strongly they move together three correlation coefficients, each with a test of no association
Load paired data.
What each coefficient measures, and what all three miss

Pearson's r measures how close the points lie to a straight line. It is the one to use for a linear model of Y given X, and it is the one a few large values can move most. Its interval comes from Fisher's z transformation.

Spearman's ρ is Pearson's r computed on the ranks of the values instead of the values. It measures how close the relation is to always rising (or always falling), whether or not it is straight, and a single extreme value moves it only as far as one rank.

Kendall's τ compares every pair of points: a pair is concordant when the point with the larger X also has the larger Y. τ is the excess of concordant over discordant pairs, scaled to lie between −1 and 1 (the τb form corrects that scale for ties). Its p-value is exact for fewer than 50 pairs with no ties.

All three measure a relation that rises or falls. A relation that rises and then falls can have all three near 0 even though Y depends strongly on X. The line-speed sample shows this: rework is least at a speed of 5 and grows on both sides of it. Always look at the plot before trusting a coefficient.

4 · Approach 1: Y given X (regression) a straight line, what it leaves over, and where to fit that
The straight line fitted here is the deterministic part of the relationship: it gives the typical Y for each X, but the points scatter around it. Subtracting the line from each Y leaves that scatter, the residuals, which hold the randomness that remains. Fit a distribution to the residuals on tab ①, add a draw from it to the line, and the model reproduces both parts of the relationship; the export in section 6 writes exactly that. When the scatter grows with X, the note beside the cards suggests modeling Y per unit of X instead.
Residuals against X
Load paired data.
Each button loads those numbers on tab ① and opens it. A fit made there to the residuals, or to Y per unit of X, becomes the noise term in the export below.
Reading the residual plot, and when Y per unit of X is the better model

A residual is what the line leaves over: the observed Y minus the line's value at that X. The model Y = a + bX + noise assumes the noise has one distribution for every X. On the residual plot, that looks like a band of even width around the zero line.

A band that fans out, narrow at small X and wide at large X, says the noise grows with X. Checkout times behave this way: each item adds its own variable time, and so a long order varies more than a short one. The Breusch–Pagan test checks for this by asking whether the squared residuals rise or fall with X. When they do, a model in which X multiplies the noise usually fits better: fit Y/X, the time per item, on tab ①, and draw Y = X · (a draw of Y/X).

That model has no fixed part, and so it fits best when the line passes near the origin. A checkout also has a payment step that takes about the same time whatever the order size. When the intercept is clearly above zero, Y/X carries that fixed time spread over the items, and so small orders show a larger Y/X than large ones and no single distribution fits Y/X exactly. The note beside the cards says when that is the case.

A curve in the residual plot (a U, or an arch) says a straight line is the wrong shape. The line-speed sample shows one.

5 · Approach 2: X and Y together (NORTA) each column keeps its own distribution, and the pairs keep the data's correlation
The model in section 4 draws Y for an X that the simulation already has. When the simulation has to draw both, as with an order's size and the time to pack it, it needs pairs in which each value has its own distribution and the two move together as much as the data do. NORTA (normal to anything) makes such pairs. It draws two standard normals that are correlated, turns each into a uniform with the normal cdf, Φ, and turns each uniform into a value with the inverse cdf of that column's distribution. Every value then has exactly its own distribution, and the pairs inherit the normals' correlation, slightly changed. The page therefore solves for the normals' correlation that puts the pairs' correlation at the target.
To use a named distribution, send the column to tab ① with a button in section 4 and pick a fit there; that fit then joins the list.
Match
The data
Load paired data.
Drawn by NORTA
Load paired data.
Why the normals' correlation is not the pairs', and which correlation to match

Two values made from correlated normals rise and fall with them because Φ and every inverse cdf only ever increase. Their ranks therefore move exactly as the normals' ranks do, and so Spearman's ρ of the pairs does not depend on the two distributions at all: for continuous ones it is (6/π) arcsin(ρZ/2), where ρZ is the normals' correlation, and the normals' correlation that gives a target ρ is 2 sin(πρ/6). Pearson's r is different. It depends on how each inverse cdf bends the normal's scale: a skewed distribution stretches one tail, and the straight-line correlation of the pairs falls below the normals'. The normals' correlation that gives a target r has to be found numerically, which this page does exactly.

The range of correlations NORTA can reach is the range the two distributions allow, the same limit the sorted pairings in section 2 show. When the target lies outside it, the page uses the nearest reachable value and says so. Ranks reach ±1 for two continuous distributions, and so matching Spearman's ρ always succeeds for them; with a discrete distribution, ties keep both coefficients short of ±1, and the page solves for those exactly too.

Matching Spearman's ρ reproduces how consistently the two rise and fall together, which is what a scatter plot shows and what a few extreme values cannot move. Matching Pearson's r reproduces the covariance, which is what a sum or an average of the two values depends on. When the distributions are far from normal, the two choices give different pairs, and only one of the two coefficients can match the data.

6 · Export paste straight into your model or your analysis script
Export
No model yet.
Reading the expressions

Each line draws one value of Y for an entity whose X is already known, held in the attribute named above. Change the name to match your model. The noise term is a single draw written exactly as tab ① writes that distribution for each tool, and so the same parameterization notes apply: Arena and Simio take a normal's mean and then its standard deviation, and AnyLogic takes the standard deviation first.

A residual has mean 0, but most fitted distributions do not, and so a fit to the residuals is centered by subtracting its own mean. "Never below zero" wraps the line in a maximum with 0, which suits a duration; it changes the distribution slightly wherever the line plus the noise can go negative, which the residual plot shows.

With X and Y drawn together, each tool gets a short block of assignments to run in order once per pair: it draws two correlated standard normals, Z1 and Z2, turns each into a uniform, and turns the uniforms into the two values, stored in the attributes named above. R, MATLAB, and Python have the normal cdf and every inverse cdf, and so they draw any pair exactly. Arena, Simio, and AnyLogic have neither. They get a block only when both distributions have an inverse cdf that is a formula (the exponential, Weibull, log-logistic, uniform, triangular, normal, lognormal, both Johnson members, the geometric, Poisson, negative binomial, and binomial, and the data's own empirical distributions), and their uniform comes from a standard approximation of the normal cdf that is within 7.5 × 10−8 of the exact value. For a gamma, beta, Erlang, or Pearson fit, those three tools get a note instead.

The scripts recompute every number on this tab from your data and print each beside the value shown here, and so running one checks this page rather than repeating it.

Tab ① ignores the order of a sample: shuffle the numbers and nothing it reports changes. This tab checks whether the order carried information. Readings taken one after another can depend on the ones before them (autocorrelation), as a tank's temperature does, or follow the clock, as hourly orders do. When they do, the tab builds a model that keeps that pattern: a mean over time that follows the clock, with a trend or a cycle if the readings have one, and variation around it that can depend on the value before, through an AR(1) or a model that also keeps the readings' distribution, NORTA's AR(1) or EAR(1). Arrivals whose rate changes over the day belong on tab ② instead.

Readingsin time order4 · Mean over timeConstantthe readings’ level, mStraight-line trendoptional+Cyclesoptional, one or two periods+what’s left5 · Variation around the meanIndependent drawsno memoryAR(1)fed by the value beforeorNORTA AR(1)keeps the distribution tooorEAR(1)exponential, constant mean onlyor6 · Exportmean + variationthe mean over time is added back Readingsin time order4 · Mean over timeConstantthe readings’ level, mStraight-line trendoptional+Cyclesoptional, one or two periods+what’s left5 · Variation around the meanIndependent drawsno memoryAR(1)fed by the value beforeorNORTA AR(1)keeps the distribution tooorEAR(1)exponential, constant mean onlyor6 · Exportmean + variationthe mean over time is added back
Each value a model draws is the mean over time plus variation around it. The mean over time follows the clock alone: a constant, plus a trend or cycles when section 4 adds them. The variation either has no memory or is fed by the value before it, with fresh noise added at every step. The export adds the two together. With a constant mean, NORTA's AR(1) and EAR(1) draw the readings themselves, mean included, and EAR(1) is offered only then. Each numbered group links to its section.
1 · Data paste readings in time order, with or without a time column
Drop the file to load it
Sample data:
Load some data to begin.
2 · The readings in order each value at its time, with section 4's mean over time
Readings over time
Load readings to plot them.
3 · Are successive readings independent? each reading against the one k steps earlier, and the correlation at every k
Show
Each reading against the one k steps earlier
Load readings.
Correlogram
Load readings.
Reading a correlogram

The bar at lag k is the correlation between each reading and the reading k steps earlier. The lag plot beside it shows the pairs that correlation is computed from. For independent readings, every bar is near 0, and the dashed band (±1.96/√n) is where 95% of them should fall. About one bar in twenty crosses it by chance alone, which is why the Ljung–Box test below combines the first several bars into one test rather than judging them one at a time.

A tank that warms and cools slowly gives bars that start high and die away: a reading is like the one before it, a little less like the one before that, and so on. A daily cycle gives bars that rise and fall as a slow wave: readings a day apart sit at the same point of the cycle, and so the bars are positive at a lag of a whole day and negative at half a day.

The lag counts readings, not time. With equally spaced readings, the two agree; with irregular gaps, a lag of 1 is the previous reading however long ago it was.

4 · Mean over time the part that follows the clock: a constant, plus a straight-line trend and up to two cycles of known period
The mean is a constant
Show
The readings and the mean over time
Load readings to plot them.
Find a period you do not know

The periodogram breaks the readings into waves of every frequency the record can show and measures how much each one contributes. A cycle shows up as a peak at its frequency. The raw periodogram is noisy, and so it is averaged over a few neighboring frequencies (the span below). A wider span gives a smoother curve but can shift a peak to a neighboring frequency. In practice, the period is usually known from the calendar, and this is a check that it is there.

Periodogram
Load equally spaced readings.
How the trend and the cycles are fitted

The mean over time is the constant m, plus g t for a trend, plus c₁ cos(2πt/P) + s₁ sin(2πt/P) for a cycle, with the same pair at twice and three times the frequency for a second and third harmonic, plus the same terms again in a second period for a second cycle, all fitted together by least squares. With neither a trend nor a cycle, m is the readings' mean. A cosine and a sine of one frequency together make a wave of any height and any timing, and the cards report each one as its amplitude (half the distance from trough to peak) and the time of its peak. One harmonic gives one smooth peak per period; a second lets the shape have two humps, such as a lunch and a dinner rush.

Harmonics all repeat on the cycle's own period, and so they only shape one cycle. A pattern on a second time scale, such as a weekly one on top of a daily one, needs a second cycle with its own period. Its harmonics must differ from the first cycle's: a second period of 12 hours beside a daily cycle with two harmonics repeats the second harmonic, and the two cannot be told apart.

The F test compares the fit with a flat line at the readings' mean. Afterward, section 3's correlogram can be switched to what section 4 leaves: if those bars sit inside the band, the mean over time plus independent variation is a complete model, and the variation can go to tab ① to be fitted.

5 · Variation around the mean how each value depends on the one before it: not at all, or through an autoregressive model
Model
A series drawn from the model
Load readings.
Correlation at each lag: the data and the series drawn
Load readings.
A model that follows the clock, or one that remembers the last value

An AR(1) writes each value, measured from its mean, as Z = φ · (previous Z) + e, where e is the noise term: a new, independent draw at each step, also called the innovation. With φ near 1, the series wanders slowly; with φ near 0, it is close to independent. If Z really is an AR(1), its correlation at lag k is φk, which is the teal curve on the plot, and the noise terms are uncorrelated. The AR(1) residuals, each value minus φ times the one before it, are the estimates of those noise terms, which is why their orange bars should sit inside the band.

Section 4's mean over time reads the clock, and so it needs no memory: a model can draw a value at any time from the time alone. An AR(1) remembers the previous draw, and so a model needs a variable that it updates every time it draws. Its lag then means one draw ago, which matches the data only if the model draws at the data's own spacing (once a minute for a reading taken once a minute). None of the three simulation tools below has a built-in AR(1), and so the export writes the update as its own line. When a time-based pattern explains the data, it is the simpler model to build.

Why an AR(1) of normals, and when EAR(1) is enough

The AR(1) keeps the autocorrelation, but every value it draws is a weighted sum of noise terms, and such a sum drifts toward a normal shape whatever distribution the noise has. Service times in order, which are skewed and never negative, come out of it nearly symmetric and sometimes negative. NORTA instead runs the AR(1) on a normal scale, where Zt = φZ Zt−1 + √(1 − φZ²) et with standard normal et keeps every Zt standard normal, and turns each Zt into a value with Φ and the inverse cdf of the chosen distribution. Every value then has exactly that distribution, and successive values are correlated through the Zs. The inverse cdf changes the correlation slightly, and so the page solves for the φZ that makes the correlation between successive values the data's lag-one correlation. At longer lags, the model's correlations follow from that one, as the teal curve shows.

EAR(1) is a series whose values are exponential and need no transformation: Xt = φ Xt−1, plus a fresh exponential draw with probability 1 − φ. Its correlation at lag k is φk, as for the AR(1). It suits readings that look exponential and are positively autocorrelated; it cannot produce a negative correlation, and with neither a trend nor a cycle to subtract, it models the readings themselves. Its draws show its character: long stretches in which each value is a fixed fraction of the one before, broken by jumps up.

6 · Export paste straight into your model or your analysis script
Each value is the mean over time, a constant with variation around it from
No model yet.
Reading the expressions, and the clock in each tool

Each line draws one value at the moment it is evaluated. The mean over time reads the simulation clock in the data's time unit whatever unit the model itself runs in: Arena's TNOW is in the model's base time unit, and the line divides it by HoursToBaseTime(1) (or the minutes, seconds, or days form) to get hours; Simio's Run.TimeNow is always in hours and is scaled from there; AnyLogic's time(HOUR) returns hours directly. With the time unit set to "other", the bare clock is used, and the model's own time unit must then match the data's.

If the data's time 0 is not the moment the simulation starts, set the box above: a model that starts at 6 a.m. against data timed from midnight in hours needs a 6 there.

With an AR(1), the variation is a variable Z that its own line updates each time a value is drawn, and the value is the mean over time plus Z. Give Z a starting value of 0. NORTA's AR(1) and EAR(1) update their variable the same way, and for NORTA the lines after it turn Z into a uniform and the value line turns that into a value of the chosen distribution. Arena, Simio, and AnyLogic have no normal cdf, and so their uniform comes from a standard approximation within 7.5 × 10−8 of the exact value. For those three, the page also writes no line for a distribution whose inverse cdf is not a formula, such as a gamma or a beta. R, MATLAB, and Python write every distribution exactly.