Optimization problem: find the optimal interval for a variable I have 4 random variables. 3 of them are controllable variables and 1 is a measure of performance. 
On the side, I have some "best practices" that suggest some intervals for the 3 controllable variables. Picking values, for the 3 variables, within such intervals is supposed to maximize the performance (or, more precisely, the likelihood of having high performance).
Now, I have a dataset and I want to find context-specific "best practices". Based on the context, I can easily set REASONABLE sizes for the 3 controllable variables.
For example, one of the 3 variables is "number of people" and I want to have a best practice of the form [2;4], [3;5] or [8;10] but not [3;7]. Therefore, I can fix the maximum width of the interval for that variable to 2. I can make a similar reasoning for the other two variables.
What method can I use to find optimal intervals in my context, i.e. "best practices" that maximize the performance?
 A: 1) Partition the dataset by performance, e.g.: best 25% in one set (B25) and rest in another set (W75).
2) Define an interval width W for the parameter P.
3) For every potential interval I of width W, do the following:
a) Define a function compliance_P, such that, for a record R, compliance_P(R)=1 if the value of the parameter P is in I, otherwise compliance_P(R)=0.
b) Compute the probability P1 for a record r of: belonging to B25 AND compliance_P(r) = 1.
c) Compute the probability P2 for a record r of: belonging to W75 AND compliance_P(r) = 0.
d) Compute the harmonic mean of P1 and P2
4) The best practice is the interval I for which the harmonic mean of P1 and P2 is the highest.
Rationale
Intervals maximizing P1 and P2 may have no intersection. Therefore, I cannot optimize them independently and then take their intersection. For this reason I need a single value: the harmonic mean.
Why the harmonic Mean?
I want that, when I comply with the recommendation, the probability of being in the best 25% be high. At the same time, I want that, when I am not complying, the probability of being in the worst 75% be high as well. The harmonic mean is "more sensitive" to extreme values of the two probabilities than, e.g., the arithmetic mean.
What do you think about this solution?
