1
$\begingroup$

I have continuous outcome variable and continuous independent variable. I am trying to bin the independent variable that maximizes homogeneity within bins based on the outcome and maximize separation. Is there any technique that would help this ?

$\endgroup$
  • 1
    $\begingroup$ Could you tell us why you are trying to do this? If it's for regressing the outcome against the variable, there are better procedures requiring no binning at all. $\endgroup$ – whuber Aug 17 '16 at 17:21
  • $\begingroup$ For example, we have past customer purchase count(1,2,3,4..etc) as independent variable and revenue from the customer in the next 365 days as dependent variable. We are trying to find meaningful way binning purchase count that accounts for outcome variable variance. $\endgroup$ – Naveenan Aug 17 '16 at 17:36
  • $\begingroup$ Could you clarify then what it means to "maximize homogeneity within bins based on the outcome" and "maximize separation"? And what constraints are there (such as limits on the numbers or widths of bins)? $\endgroup$ – whuber Aug 17 '16 at 17:42
  • $\begingroup$ As example relation between past purchase count and future revenue have a positive correlation. Let's assume we have two bins - [1,2] and [3,4] with mean revenue of the bins as $50 and $54. Even though average/mean is different between bins the distribution of the data/variance is high in these two bins(overlapping confidence interval/inter quartiles) so that it make sense to have these grouped as a single bin. Trying to achieve this. There is no limit on the numbers or width of the bins. $\endgroup$ – Naveenan Aug 17 '16 at 18:03
  • $\begingroup$ Then the answer is to bin every one of the values of the independent variable individually. $\endgroup$ – whuber Aug 17 '16 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.