Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following problem:

I have an ordered list of $n$ data points jiggling around $0$ with no apparent order. The order this list is in should not be affected by the following procedure. I want to divide this list into 5 classes under the following conditions:

  • Average of class no. 2 should be max. positive with variance the lower the better
  • Average of class no. 4 should be max. negative with variance the lower the better

The average/variance of the other three classes doesn't matter at the moment.

How can I proceed optimizing the width/cutoff points of the 5 classes (some very crude tests support the belief that this should be possible in general)? Are the perhaps even implementations/tools for such tasks?

Is this problem known under some other name?

share|cite|improve this question
A version of this question was also posted at…. It appears to be an instance of a changepoint problem, but it's not yet posed well enough to admit a definite solution, because it does not describe a single objective function to be optimized. To achieve this, somehow a balance has to be made among two variances, five bin widths, and two vague determinations of "max positive" and "max negative." – whuber Oct 6 '11 at 22:54
@whuber: Do you think that the missing objective function is the problem? So let's take the "signal-to-noise ratio" as the function to optimize, i.e. the ratio of mean to standard deviation ( – vonjd Oct 7 '11 at 6:14
S/N ratio appears to have little to do with the original question. How would you propose using that to partition the domain into five intervals? Changepoint procedures will optimize some measure of deviation between the data and the fit (such as the residual variance), adding a penalty for the freedom to change the fitted parameters at four flexibly chosen intermediate cutpoints. If that's what you're looking for, many solutions are described on the stats.SE site. If it's not, it would be helpful to know how your objective differs from this standard one. – whuber Oct 7 '11 at 14:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.