How to Calculate width of the middle 98% mass of the gray level histogram of a image
Let the total mass of the histogram be M.
Accumulate the mass in the bins, starting from index zero, until you pass 0.01 M. You get an index Q01.
Decumulate the mass in the bins, starting from the maximum index, until you pass 0.99 M. You get an index Q99.
These indexes are the so-called first and last percentiles. The contrast is estimated as Q99-Q01.
I need to calculate the contrast of an color image, so the steps that was given to me are,

computed the histogram for RGB channel separately and combined it together as Histogram = histOfRedC + histOfBlueC + histOfgreenC.
normalize it to unit length, as each image is of different size.
The contrast quality,  is equal to the width of the middle 98% mass of the histogram.

I have done the first 2 steps but unable to understand what to compute in 3rd step. Can somebody please explain me what it means?