| Class | Frequency | Mid-point (xi) | fixi |
| 0−6 | a | 20+6=3 | 3a |
| 6−12 | b | 26+12=9 | 9b |
| 12−18 | 12 | 212+18=15 | 180 |
| 18−24 | 9 | 218+24=21 | 189 |
| 24−30 | 5 | 224+30=27 | 135 |
| N=(26+a+b) | | (504+3a+9b) |
We know that, mean
=∑fi∑fixi
Given, mean=22309
⇒a+b+263a+9b+180+189+135=22309
⇒a+b+26504+3a+9b=22309
⇒66a+198b+11088=309a+309b+8034
⇒243a+111b=3054
⇒81a+37b=1018...(1)
Now, median=14, which lies in the interval 12−18, thus 12−18 is the median class and we have =l+f(2N−c)×h,
Where, l is the lower limit of the median class i.e. l=12,c is the cumulative frequency of the class above the median class i.e. c=a+b,f is the frequency of the median class i.e. f=12 and h is the length of the interval i.e. h=6.
Thus, we have 12+(12(2a+b+26)−(a+b))×6=14
⇒2(2a+b+26−2a−2b)=14−12
⇒426−a−b=2
⇒26−a−b=8
⇒a+b=18...(2)
On solving the equations (1) and (2), we get a=8,b=10.
∴(a−b)2=(8−10)2=4.