# How to deal with data having huge disparity in number in each class

I have data in which the number of negative cases in response is approximately 98% of the total sample size (total # records are approximately 1 million, Response is binary). The positive cases are roughly 2%. What are the limitations of applying 'glm' and 'cart' on such data? What option do I have in such cases?

On test data I did get a very good AUC ~0.92. How much faith should I have in this model considering such a disparity in the number of cases in the positive and negative categories?

• what was the sample size of positive cases? Oct 29, 2013 at 22:22
• Are you and learner the same person?
– user88
Oct 30, 2013 at 10:16
– chl
Oct 30, 2013 at 10:28
• Actually I posted my comment when I was in my office where i use my office email. Right now i used my personal computer at home which by default used my personal mail. But thanks for suggestion. I would consider merging these accounts Oct 30, 2013 at 10:31

One limitation of models with very small (or large) rates is the amount of data needed to get accurate and stable estimates of variance and sample errors. As a rule of thumb you would want both Np = 5 and N(1-p) = 5 (or higher), so with an estimated p of 0.02 you need N of 250. So in order to get accurate sample errors etc you want a minimum 250 observations.