Loading…

Empirical Probability Estimator

Math Probability • Basic Probability and Events

View all topics

Empirical Probability Estimator – Relative Frequency & Confidence Interval (Free)

Estimate probability from data using relative frequency: \(\hat p = k/n\). Optionally compute a confidence interval and visualize how \(\hat p\) stabilizes as trials grow.

Tip: Press Play to animate trials accumulating (unfavorable → favorable) and watch the running estimate \(\hat p(t)\).

Data input
Presets

Inputs accept 1e-3, pi, e, sqrt(2), sin(), cos(), tan(), ln(), log(), abs(). Use * for multiplication.

Counts
Example: “12 heads in 20 flips” means \(k=12\), \(n=20\), so \(\hat p = 12/20 = 0.6\).
Confidence interval

This assumes independent Bernoulli trials (favorable/unfavorable). For very small samples, intervals can be wide.

Output & visualization
Drag on the lower chart to pan. Use mouse wheel / trackpad to zoom. Tick labels stay inside the frame.
Experiment simulation

Simulation illustrates the law of large numbers: as \(n\) increases, \(\hat p\) tends to stabilize near \(p\).

Ready
Interactive data view — grid + running estimate

Top panel: trials grid (favorable highlighted). Bottom panel: running estimate \\(\hat p(t)=k_t/t\\) with pan/zoom.

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

What is empirical probability?

It is the relative frequency of an event in observed data: p-hat = k/n, where k is the number of favorable outcomes in n trials.

Why does p-hat stabilize as n grows?

By the law of large numbers (under typical independence assumptions), the relative frequency tends to approach the true probability p as the number of trials increases.

Why use the Wilson interval instead of the normal interval?

Wilson score intervals often behave better for small samples or probabilities near 0 or 1, while normal approximation intervals can be inaccurate in those cases.

Does this work for non-independent data?

The interpretation of the confidence interval assumes independent Bernoulli trials. If trials are dependent or the probability changes over time, results may not reflect a single fixed p.