← Back to the lesson

Probability & Statistics 1 (9709) · Measures of central tendency · Quick revision

Corrected records, missing observations and reverse problems

Track the count and both moment totals. Make the change before recalculating the summaries.

Recover the information behind the summaries

Let nn be the count, T=∑xT=\sum x the total and Q=∑x2Q=\sum x^2 the sum of squares.

T=nxˉ,Q=n(V+xˉ 2),V=Qn−xˉ 2.T=n\bar{x},\qquad Q=n(V+\bar{x}^{\,2}),\qquad V=\frac{Q}{n}-\bar{x}^{\,2}.

Use descriptive variance VV with divisor n>0n>0. SD is V\sqrt{V}; a supplied SD must be squared when restoring QQ.

Update exactly the records that changed

Replace aa by bb: keep nn, use T−a+bT-a+b and Q−a2+b2Q-a^2+b^2. The sum of squares change is b2−a2b^2-a^2, not (b−a)2(b-a)^2.

Add tt: use n+1, T+t, Q+t2n+1,\ T+t,\ Q+t^2. Remove aa: use n−1, T−a, Q−a2n-1,\ T-a,\ Q-a^2, leaving at least one record. A duplicate means one extra copy: remove only that copy. Reorder the actual list to check a median.

Recover two missing observations

Subtract known records from the required totals to find s=p+qs=p+q and r=p2+q2r=p^2+q^2. Then pq=s2−r2pq=\frac{s^2-r}{2}, and the two missing values solve

z2−sz+s2−r2=0.z^2-sz+\frac{s^2-r}{2}=0.

Real values require (p−q)2=2r−s2≥0(p-q)^2=2r-s^2\ge0. Keep every valid assignment, apply any order or context restriction, and restore both original moments. A mean alone usually leaves the pair undetermined.

Choose an additional real observation

Adding tt to nn records with mean xˉ\bar{x} and variance VV gives

Vnew=nVn+1+n(n+1)2(t−xˉ)2.V_{\mathrm{new}}=\frac{nV}{n+1}+\frac{n}{(n+1)^2}(t-\bar{x})^2.

The real minimum is nVn+1\frac{nV}{n+1}, at t=xˉt=\bar{x}. Adding the old mean keeps the mean, reduces positive variance and leaves zero variance unchanged. Solve a target condition completely, then apply integer or range restrictions; they can change the minimum.