Relative Frequency Calculator & Cohort Histogram
Use shared measurement intervals to compare two differently sized groups. Enter raw observations or existing counts per interval. Read counts and percentages, compare width-normalized histograms and check how much of each cohort falls strictly below an entered cutoff. If only grouped counts are available, see the exact bounds determined by those counts.
Compare relative frequencies across two cohorts
Measure counts and shares on common intervals, then see what each cohort tells you about a cutoff.
The grouped counts leave the ranking unresolved.
B minus A below cutoff -25 to +25 percentage points.
Bar area gives the interval share. Height measures share per ms, so unequal widths stay comparable.
Open frequency and cumulative ledger
Every interval includes its lower boundary. Only the final interval includes its upper boundary.
| Interval (ms) | Cohort | Count | Interval share | Density (share per ms) | Cumulative count | Cumulative share |
|---|---|---|---|---|---|---|
| [0, 10) | Cohort A | 3 | 15% | 0.015 | 3 | 15% |
| [0, 10) | Cohort B | 10 | 10% | 0.01 | 10 | 10% |
| [10, 20) | Cohort A | 6 | 30% | 0.03 | 9 | 45% |
| [10, 20) | Cohort B | 20 | 20% | 0.02 | 30 | 30% |
| [20, 40) | Cohort A | 5 | 25% | 0.0125 | 14 | 70% |
| [20, 40) | Cohort B | 50 | 50% | 0.025 | 80 | 80% |
| [40, 80] | Cohort A | 6 | 30% | 0.0075 | 20 | 100% |
| [40, 80] | Cohort B | 20 | 20% | 0.005 | 100 | 100% |
Show selectable CSV
How to use this calculator
- Enter a common unit and at least two increasing interval boundaries. Use the same measurement scale for both cohorts.
- Choose raw observations or grouped counts separately. Paste measurements or one whole count per interval in ascending boundary order.
- Enter the cutoff. Read the exact share below it when known, or the possible range when the cutoff divides a populated grouped interval.
- Compare physical-width density bars or cumulative shares through the bins, then open the ledger or download the CSV.
The Formula
The mathematical logic powering this calculation is:
For cohort size n and interval count c, relative frequency is c/n. Cumulative share at the upper boundary of an interval is the sum of shares through that interval. Every interval includes its lower edge. It excludes its upper edge except for the final interval, which includes both endpoints. All entered observations must be inside the shared full range.
Histogram density is c/(n × width) on the measurement scale. The area of each rectangle is the frequency share c/n, and their areas sum to 1 for each cohort. A narrow interval can have a taller bar than a wider interval with more observations. The cumulative chart shows shares through entered intervals at their boundaries. It does not interpolate shares inside intervals.
The cutoff uses strict inequality. Raw inputs count only measurements lower than the cutoff. When counts are grouped, include intervals entirely below the cutoff, exclude intervals starting at or above it and count zero through all of any interval crossing it. When the cutoff equals an internal edge, the interval below it is fully known. At the final edge, grouped counts cannot say which observations equal that edge. An empty crossing interval yields an exact fraction. The group difference is Cohort B minus Cohort A, from B’s minimum minus A’s maximum through B’s maximum minus A’s minimum. This range describes the supplied data, rather than a confidence interval.
Use one unit and 2–17 strictly increasing boundaries with up to six decimals. Measurements and cutoff lie within −1,000,000 to 1,000,000. Each cohort supports 1–300 raw values or one count per interval from 0 to 1,000,000, with positive total. The unit selector labels numbers without conversion. Comparisons use exact fixed-decimal endpoints and exact count cross-products before formatting.Worked Example
If you input:
- Shared interval boundaries: 0, 10, 20, 40, and 80 ms
- Below-cutoff comparison: 25 ms, excluding observations equal to 25
- Cohort A raw sample: 20 values yielding counts 3, 6, 5, and 6
- Cohort B grouped counts: 10, 20, 50, and 20
Result:
Eleven of 20 Cohort A readings are below 25 ms, or 55%. Cohort B can range from 30% to 80% because 25 falls inside its populated 20–40 ms interval. B minus A can range from −25 to +25 percentage points, so the available values leave the ranking unresolved.
Frequently Asked Questions
How do relative frequencies compare groups of different sizes?
For each group, divide the interval count by that group’s total. Compare the resulting shares to separate concentration from sample size.
Why is a histogram bar shorter even if it contains more observations?
This histogram uses density on the vertical axis. Bar area gives the relative frequency. A wider interval can spread a larger count across more measurement units.
Where does a measurement exactly on a boundary go?
It belongs to the interval starting at that boundary. The final boundary is also included in the last interval. Measurements equal to the cutoff do not count as strictly below it.
Why can a grouped result be a range?
A grouped count reveals how many observations are in an interval, while hiding their positions within it. If an interval crosses the cutoff, any count from zero to the full interval count is possible there.
Does a grouped range quantify sampling error?
It quantifies what the entered counts can tell you about the cutoff. It does not estimate uncertainty about future results or a larger population.
Similar Calculators
Coefficient of Variation & Repeatability Calculator
Calculate sample coefficient of variation from readings or summary statistics. Compare relative spread, normalize measurements and check a CV limit.
Standard Deviation Calculator
Calculate sample or population standard deviation, variance, mean and extrema from complete decimal data. Preserve small differences and identify invalid entries.
Process Capability & Cpk Calculator
Compare Cp, Cpk and Cpm for two processes. Enter sample readings or summaries, set specification limits and see which change would meet your index goal.
Bayes’ Theorem Calculator & Evidence Tree
Calculate the probability of an event after one or two observed checks. Compare expected counts, see the effect of base rates and solve for a posterior target.
