Replacing 9 by 13 changes the total by 4, the sum of squares by 88, and leaves the count unchanged.
Worked example
Correct both totals
The four recorded observations are 3,5,7,9. The final value should be 13, not 9. Find the corrected mean and descriptive variance.
n=4,T=3+5+7+9=24,Q=32+52+72+92=164.
The correction replaces one record, so the count stays 4:
Tnew=24−9+13=28,Qnew=164−92+132=252.
μnew=428=7,σnew2=4252−72=14.
Directly checking the corrected list 3,5,7,13 gives those same totals. The sum of squares increased by 132−92=88, not by (13−9)2=16.
The change in mean also gives
b−a=n(μnew−μ).
This can recover an unknown count, which must be a positive integer. If the mean change is zero, check the equation directly before dividing; a genuine one-value correction with a=b cannot leave the mean unchanged.
Section 2 of 5 · Core · about 6 min
What changes when a record is added or removed?
Adding a new observation or removing an existing one changes the number of records:
Operation
New count
New total
New sum of squares
Add a new value b
n+1
T+b
Q+b2
Remove one value a
n−1
T−a
Q−a2
Use the new count in both the mean and variance. After removal, at least one observation must remain for these summaries to exist. A one-observation dataset has variance zero; an empty dataset has no mean or variance.
Worked example
Delete one erroneous duplicate
The recorded list is 2,5,5,8,10. One of the two entries 5 is an extra copy of the same record. Remove exactly one copy, then find the corrected mean, median and descriptive variance.
n=5,T=30,Q=22+52+52+82+102=218.
nnew=4,Tnew=30−5=25,Qnew=218−52=193.
μnew=425,σnew2=4193−(425)2=16147.
The corrected ordered list is 2,5,8,10. Its two middle values are 5 and 8, so
median=25+8=213.
The valid remaining record 5 is retained.
For a new median, sort the updated raw records and locate their new central positions. For a new mode, recount the frequencies. Counts and moment totals alone generally do not determine those summaries.
Section 3 of 5 · Core · about 5 min
Can the mean stay unchanged while SD changes?
Adding a value equal to the current mean leaves that mean unchanged. The added squared deviation is zero, but there is one more record to share the existing squared deviations:
σnew2=n+1nσ2.
If the original variance is positive, it decreases; if all original observations are equal, it remains zero. Similarly, removing an existing observation equal to the mean leaves the mean unchanged and gives
σnew2=n−1nσ2,n>1.
The divisor change matters even when the centre does not move.
Worked example
Insert the mean and update the divisor
The three observations are 1,4,7. Add a fourth observation equal to their mean. Compare the original and new means and descriptive variances.
μ=31+4+7=4,σ2=3(1−4)2+(4−4)2+(7−4)2=6.
The added value is 4, so the new total is 16 and the new count is 4. The mean remains 4.
The added value has zero deviation from that mean. The squared deviations still total 18, but now
σnew2=418=29=43(6).
The mean is unchanged while the positive variance decreases. The SD changes from 6 to 23.
Section 4 of 5 · Further applications · about 7 min
How do two missing observations come from mean and variance?
First recover the full T and Q. Subtract the known records and their squares separately. If the remaining information is
p+q=S,p2+q2=R,
then
pq=2S2−R.
Each missing value is a root of
z2−Sz+2S2−R=0.
Worked example
Find both missing values from two moments
The five observations are 2,4,8,p,q. Their mean is 6, and their descriptive variance is 8. Find all labelled pairs (p,q). Then state which pair satisfies p<q.
T=5(6)=30,Q=5(8+62)=220.
p+q=30−2−4−8=16,p2+q2=220−22−42−82=136.
pq=2(p+q)2−(p2+q2)=2162−136=60.
The missing observations are the roots of
z2−16z+60=(z−6)(z−10)=0.
Thus the labelled pairs are (6,10) and (10,6). The condition p<q selects (6,10).
Either labelled assignment gives total 30 and sum of squares 220. Hence the original mean is 6 and variance is 5220−62=8, as required.
The mean alone usually determines only the missing sum. Keep every valid branch, then check the original mean, variance and any restrictions such as non-negative, integer, distinct or ordered observations.
Section 5 of 5 · Further applications · about 7 min
Which added values satisfy a variance limit?
This application uses completing the square and quadratic inequalities. If one real value t is added to n original observations, start with
V(t)=n+1Q+t2−(n+1T+t)2.
Expanding and completing the square gives a quadratic you can solve without differentiation. Equivalently, if the original mean is μ and variance is σ2,
V(t)=n+1nσ2+(n+1)2n(t−μ)2.
Its minimum occurs at t=μ, with value n+1nσ2. This minimum is positive unless all the original records are equal.
Add a real value t to 1,4,7. The count becomes 4, the total 12+t, and the sum of squares 66+t2.
The minimum variance is 29 at t=4. The endpoints are included because the required variance is at most 6.
For original observations 1,4,7, the variance is V(t)=29+163(t−4)2. The bound V(t)≤6 keeps the whole interval between 4−22 and 4+22.
Worked example
Complete the variance square
Add one real observation t to 1,4,7. Find the minimum possible descriptive variance and the value of t that gives it. Then find every real t for which the variance is at most 6.
nnew=4,T=12+t,Q=66+t2.
V(t)=466+t2−(412+t)2=163t2−24t+120.
V(t)=29+163(t−4)2.
A real square is non-negative. The minimum is 29, attained only at t=4.
V(t)≤6⟺163(t−4)2≤23⟺(t−4)2≤8.
−22≤t−4≤22,4−22≤t≤4+22.
This includes both endpoints. A target variance below 29 would be impossible.
For a non-strict upper bound V(t)≤c, subtract the minimum and isolate the square. A bound below the minimum gives no solutions; a bound equal to the minimum gives one value. For a larger bound, retain both endpoints and every value between them. For the strict condition V(t)<c, a bound equal to the minimum gives no solutions; a larger bound excludes its boundary values. An exact target above the minimum has two real solutions before any context restrictions are applied.
Show your working on paper and compare it with the worked solution and marking guidance.
Start after this lesson
Recover the count before a correction and an addition7 marks
A list of n masses, in grams, has recorded mean 12 and descriptive standard deviation 2. One recorded mass of 8 should have been 20. Correcting this entry increases the mean to 13. Find n, the corrected sum of squares and the corrected standard deviation. Then a genuinely new observation of 13 g is added to the corrected list. Find its new descriptive variance.
Hint
The replacement changes the total by 12 but keeps n fixed. Use the change in mean to recover n. Carry out the later addition only after completing the correction.
Worked solution
12n−8+20=13n⟹n=12.
Told=144,Qold=12(22+122)=1776.
Tcorrected=156,Qcorrected=1776−82+202=2112.
Vcorrected=122112−132=7g2,σcorrected=7g.
Now add the new record, increasing the count:
nnew=13,Tnew=169,Qnew=2112+132=2281.
xˉnew=13g,Vnew=132281−132=1384g2.
The mean remains 13 g. Its variance decreases from 7 because an extra observation at the mean adds zero squared deviation while increasing the divisor.
Marking guidance
1 mark: relate the replacement to the change in mean.
1 mark: recover the positive integer count.
1 mark: reconstruct the original sum of squares using the squared SD.
1 mark: update the sum of squares and obtain the corrected variance.
1 mark: take the correct square root with units.
1 mark: update the count and both totals for the later addition.
1 mark: calculate the final variance and explain the unchanged mean.
Use the whole variance condition, including restrictions9 marks
Add a real observation t to 2,5,8,11. Let V(t) be the descriptive variance of all five observations. Find the minimum possible variance and the value of t attaining it. Find every real t for which V(t)=10, and describe where V(t)≤10. In a separate version, t must be a non-negative integer: list every allowed t with V(t)≤10, then find the minimum variance under this integer restriction and every integer that attains it.
Hint
Use the new count of five and complete the square. A non-negative square identifies the real minimum; the nearest allowed integers to the centre identify the integer minimum.
Worked solution
n=5,T=26+t,Q=214+t2.
V(t)=5214+t2−(526+t)2=9+254(t−213)2.
The square is non-negative, so the real minimum is 9, attained only at t=213.
V(t)=10⟺(t−213)2=425⟺t=4ort=9.
V(t)≤10⟺t−213≤25⟺4≤t≤9.
With the separate integer restriction, the complete allowed set is {4,5,6,7,8,9}.
The integers closest to 213 are 6 and 7, both a distance 21 away. Therefore
Vinteger,min=9+254(21)2=25226,
attained at both t=6 and t=7. The unequal original observations prevent zero variance even when the extra value is optimally chosen.
Marking guidance
1 mark: update the count, total and sum of squares.
2 marks: derive the variance and complete the square correctly.
1 mark: state the real minimum and where it occurs.
1 mark: solve the equality with both branches.
1 mark: obtain the closed interval for the inequality.
1 mark: list every allowed integer.
1 mark: identify both nearest integers to the real minimiser.
1 mark: calculate the restricted minimum variance.