A discrete frequency table states each observed value x and how often it occurs, f. It keeps the original values and their repetitions, so their summaries can be calculated exactly. Let T be their total.
N=∑f,T=∑fx,xˉ=N∑fx.
First order the values. Cumulative frequencies tell you which row contains each observation. For odd N, use position 2N+1; for even N, average the values at positions 2N and 2N+1.
Value
Frequency
Cumulative count
Positions
0
2
2
1–2
1
3
5
3–5
2
4
9
6–9
4
1
10
10
The fifth observation is 1 and the sixth is 2. The most frequent value is 2.
Median=21+2=23,xˉ=102(0)+3(1)+4(2)+1(4)=23.
The fifth and sixth observations contain 1 and 2. Their average is the exact median 23.
Worked example
A median between two rows
A school records the number x of late arrivals in each of ten weeks. Find the exact mean, median and mode from this table.
Late arrivals x
Weeks f
0
2
1
3
2
4
4
1
Count every week, including weeks with no late arrivals:
N=2+3+4+1=10.
∑fx=2(0)+3(1)+4(2)+1(4)=15,xˉ=1015=23.
The cumulative counts are 2,5,9,10. The fifth observation is 1, and the sixth is 2, so
median=21+2=23.
The greatest frequency is 4, attached to the observed value 2. The mode is 2, not 4.
Section 2 of 5 · Core · about 7 min
What does grouping let me estimate?
A grouped table gives counts in intervals, not the individual measurements. To estimate moments, replace each observation in a class by its midpoint m=2L+U. Keep the class frequency as its weight:
Here variance means the descriptive average squared distance from the mean, using divisor N. Variance has squared units; standard deviation has the original units. With actual discrete values x instead of midpoints m, the same calculation gives exact descriptive moments.
Worked example
Build two midpoint columns
The grouped table gives heights h, in centimetres, of twenty young plants. Use class midpoints to estimate the mean, descriptive variance and standard deviation.
Height h
Frequency f
10≤h<20
6
20≤h<30
10
30≤h<50
4
The intervals already give continuous boundaries. Their midpoints are 15,25,40; the final class is wider than the others.
m
f
fm
fm2
15
6
90
1350
25
10
250
6250
40
4
160
6400
Total
20
500
14000
hˉest=20500=25cm.
σest2=2014000−252=75cm2,σest=53cm.
These results treat all six plants in the first class as height 15cm, and similarly for the other classes. They do not recover the original twenty heights.
The repeated-midpoint list gives exact model moments, which estimate the raw data. A uniform-within-class model instead spreads values across each class; it supports median interpolation later in this lesson. These are different models. The midpoint variance above is not the variance of that full uniform model.
In the interactive, one possible raw dataset has mean 21cm and median 22cm; another has mean 29cm and median 28cm. Both produce the same grouped table. Grouping alone does not tell you whether a midpoint estimate is above or below the true value.
If asked for a grouped modal class, this course uses the greatest frequency density wf, where w is class width. A question that explicitly defines it by greatest frequency must be followed as stated. Equal-width classes give the same result under either rule; a modal class does not identify an exact raw mode.
Section 3 of 5 · Core · about 5 min
How do I find a missing frequency?
Write the total count and weighted total with the unknown included, then use
∑fx=Nxˉ.
For a grouped midpoint estimate, replace x by m and use the stated estimated mean. Solve the equation, then check every frequency is a non-negative integer, the total is positive, and any extra condition such as a positive frequency is satisfied.
Worked example
Put the unknown frequency in both sums
A discrete table has values 1,3,6 with respective frequencies 2,k,4. The exact mean is 4. Find the non-negative integer frequency k, then find the median.
N=2+k+4=6+k,∑fx=2(1)+3k+4(6)=26+3k.
6+k26+3k=4⟹26+3k=24+4k⟹k=2.
The frequency is an allowed integer. Recheck the original mean:
N=8,∑fx=32,832=4.
Cumulative frequencies are 2,4,8. Observations 4 and 5 are 3 and 6, so
median=23+6=29.
Section 4 of 5 · Core · about 7 min
How do I interpolate a grouped median?
Use the underlying continuous boundaries. For measurements rounded to the nearest unit, each recorded value represents an interval extending half a unit on either side; use the stated rule at exact ties. Different recording precision changes that half-unit adjustment. Leave already continuous boundaries unchanged, and do not close a genuine empty interval just because it is a gap.
For straight cumulative segments, assume a uniform spread within each class. Locate the median level 2N. In a class with lower boundary L, previous cumulative count C, positive frequency f and width w, the required fraction of the class is f2N−C, so
M=L+f2N−Cw.
Height (cm)
Frequency
Midpoint (cm)
Cumulative count
10≤h<20
6
15
6
20≤h<30
10
25
16
30≤h<50
4
40
20
The median is at cumulative count 20÷2=10 in the second class. Assume a uniform distribution inside that class.
The grouped frequencies do not give the two exact middle observations. The moments use midpoints and the median uses within-class interpolation.
For heights in [10,20),[20,30),[30,50) with frequencies 6,10,4, the target is 10 and M=20+1010−6(10)=24cm.
Worked example
Restore the boundaries before interpolating
Lengths were rounded to the nearest centimetre, with half-way values rounded up. The recorded groups and frequencies are shown below. Use a uniform spread within each underlying class to estimate the median length.
Recorded length in centimetres
Frequency
20–29
6
30–39
10
40–59
4
The true class boundaries are 19.5,29.5,39.5,59.5. For example, values from 29.5 up to but not including 39.5 round into the middle recorded group.
N=20,2N=10.
Cumulative frequencies 6,16,20 place the target level in the middle class.
L=29.5,C=6,f=10,w=10.
M=29.5+1010−6(10)=33.5cm.
The estimate is four centimetres into the middle class. Its midpoint is 34.5cm, which is a different quantity.
If the target is an ordinary boundary between increasing segments, read that boundary directly. A zero-frequency class produces a flat segment. If its height equals 2N, every cutoff on that segment satisfies C(x)=2N; a unique crossing needs an additional convention. Never divide by a zero class frequency. If the question instead supplies a smooth freehand curve, read an estimate from that curve rather than assuming straight-line interpolation.
Section 5 of 5 · Further applications · about 6 min
How do I recover two unknown frequencies?
Two unknown frequencies generally need two independent conditions. A total count, exact mean or cumulative count can supply an equation. Translate words such as “below” carefully: observations equal to the cutoff do not belong in a strict-below count.
Solve the equations together and verify every original condition. If a condition involves an interpolated median, first write N using all frequencies. After solving, check that the median target really lies in the class you used, with positive frequency. Dependent equations may leave several tables possible; inconsistent equations give none.
Worked example
Recover two frequencies from two conditions
A discrete table has values 1,3,5,8 with frequencies 2,p,q,1. Exactly six observations are below 5, and the exact mean is 4. Find p, q and the median.
The cumulative condition uses only the first two values:
2+p=6⟹p=4.
N=2+4+q+1=7+q,∑fx=2(1)+4(3)+5q+1(8)=22+5q.
22+5q=4(7+q)⟹q=6.
Both frequencies are valid integers. The total count is 13, the weighted total is 52, and
1352=4,2+4=6.
Both original conditions are satisfied.
The median is observation 7. Cumulative frequencies 2,6,12,13 place it at x=5, so the median is 5.
Show your working on paper and compare it with the worked solution and marking guidance.
Start after this lesson
Recover two frequencies before locating the median6 marks
A discrete frequency table is incomplete.
Value
Frequency
1
3
4
p
7
q
9
2
There are 16 observations and their mean is 1683. Find p and q, then the median and every mode.
Hint
One equation comes from the count and another from the weighted total. Rebuild the cumulative frequencies after solving them.
Worked solution
3+p+q+2=16⟹p+q=11.
3+4p+7q+18=83⟹4p+7q=62.
Subtract 4(p+q)=44 to obtain 3q=18. Thus q=6 and p=5, both valid integer frequencies.
Cumulative frequencies are 3,8,14,16. The eighth observation is 4, and the ninth is 7, giving
M=24+7=211.
The greatest frequency is 6, attached to value 7, so 7 is the only mode. The completed table restores count 16 and weighted total 83.
Marking guidance
1 mark: form the total-frequency equation.
1 mark: form the weighted-total equation.
1 mark: solve for both frequencies and check their validity.
1 mark: locate the two central observations.
1 mark: obtain the median.
1 mark: identify every modal value.
A grouped median determines a missing frequency8 marks
A grouped length table, in centimetres, is
Length
Frequency
0≤x<4
4
4≤x<10
k
10≤x<18
6
The piecewise uniform model has median exactly 8 cm. Find the positive integer k, the total count, the midpoint estimate of the mean and the model estimate of the fraction of lengths at least 12 cm. Give exact fractions.
Hint
The count is k+10, so the target cumulative level depends on the unknown frequency. The median lies in the middle class.
Worked solution
8=4+k2k+10−4(6)=7+k6.
k=6,N=16.
The median target is now 8, strictly between the cumulative counts 4 and 10, confirming the selected class and positive denominator.
xˉ≈164(2)+6(7)+6(14)=16134=867cm.
Only the last class contributes to the requested tail. Under the uniform model, the fraction of that class at least 12 cm is 18−1018−12=43, so
estimated overall fraction=166⋅43=329.
The midpoint mean and within-class tail fraction estimate properties of the original data; they do not reveal the exact original values or tail count.
Marking guidance
2 marks: form the median equation with the unknown count and class frequency.
1 mark: solve for the valid integer frequency.
1 mark: recover the count and verify the median class.
1 mark: calculate the weighted midpoint total.
1 mark: obtain the estimated mean.
1 mark: find the within-class tail proportion.
1 mark: weight that proportion by the class fraction of the full dataset.