Calculation of missing frequencies by Median