# Grading a range of data

I am new to data mining and I am exploring ways to divide a range of data into bins. It would be much easier to search for the algorithms if I knew the scientific term for this job (ranking maybe?). Here is what I desire:

I have a data within a defined range, i.e. [min, max]. I know the first order statistics of the data like mean, variance, median, etc. I also plotted a histogram of it.

My situation is somehow similar to assigning letter grades to students after an exam by examining the distribution of the overall exam grades. I want to have grades for the data from 1 to 5, with the first bin containing the smallest data values and 5 containing the highest values.

I could do it uniformly by dividing my data range into 5 equal pieces but that won't be satisfactory. I would like to do this by inspecting my data distribution. I will appreciate if you could suggest me some known algorithms to do that.

• What criterion are you using? In other words, what are your bins supposed to do? What would a "good" choice of bins give you? Do you want roughly equal numbers of observations in each? If so, use the 20, 40, 60 , 80th quantiles. Or is it something else? Commented Oct 16, 2012 at 11:27
• My bins will be used to represent certain ranges in my data. Assuming my data is grades in a classroom, 1st bin will contain the lowest grades and 5th bin the highest. I would like to decide on the bin capacity by looking at the distribution of data. However, I don't know what to look at.
– Erol
Commented Oct 16, 2012 at 14:50

    risk^2 = bias+variance