Let the 3n numbers be x1,x2,…,x3n with mean of the first 2n numbers equal to 6 and mean of the remaining n numbers equal to 3. The overall mean is xˉ=3n2n⋅6+n⋅3=3n15n=5.
The variance is given as 4, so 3n1∑i=13nxi2−xˉ2=4, giving 3n1∑xi2=29, hence ∑xi2=87n.
Now the new set is formed by adding 1 to each of the first 2n numbers and subtracting 1 from each of the remaining n numbers. The new values are yi=xi+1 for i=1,…,2n and yi=xi−1 for i=2n+1,…,3n.
The new sum is ∑yi=∑i=12n(xi+1)+∑i=2n+13n(xi−1)=∑xi+2n−n=15n+n=16n. The new mean is yˉ=3n16n=316.
The new sum of squares is ∑yi2=∑i=12n(xi+1)2+∑i=2n+13n(xi−1)2=∑i=12n(xi2+2xi+1)+∑i=2n+13n(xi2−2xi+1).
This equals ∑xi2+2∑i=12nxi−2∑i=2n+13nxi+2n+n=87n+2(12n)−2(3n)+3n=87n+24n−6n+3n=108n.
The new variance is k=3n∑yi2−yˉ2=3n108n−9256=36−9256=9324−256=968.
Therefore 9k=9⋅968=68.