# Machine Learning Models for predicting probability

I have a dataset where the dependent variable is a success probability ranging from 0 to 1. I cannot use the regular linear regression to model because linear regression does not restrict the output range. One idea I come up with is using logit function to map it into real number sets, but I do not know whether it is accurate. Does anyone have any idea about this? Thank you!

• To be clear, are your measurements probabilities? How do you get those probabilities?
– Dave
Commented Nov 7, 2022 at 16:50
• It is a success probability, and it is already given in the data Commented Nov 7, 2022 at 16:52
• Beta regression predicts on [0, 1]. Commented Nov 7, 2022 at 16:54
• That’s a shame. I would much prefer to have the original events. Is there a way to recover those? For instance, do you have the counts of attempts by which you can multiply the success probability and obtain the raw counts?
– Dave
Commented Nov 7, 2022 at 16:56
• I did not find any counts information. Commented Nov 7, 2022 at 17:05

When you are faced with a problem like this, an early step is to try to access the original counts that generated the probabilities. An easy solution arises if you have the number of attempts by which you can multiply the probability. For instance, if your given data set says there was a $$40\%$$ success rate in $$50$$ attempts, you can model this with $$20$$ successes (typically coded as $$1$$) and $$30$$ failures (typically coded as $$0$$). You then have $$50$$ observed outcomes plus their feature values, rather than having one observed outcome (the probability) with associated features.
A further advantage of this is that it might uncover that the $$40\%$$ success rate was calculated using attempts taken under slightly different conditions that you might be able to access in a different data source (perhaps as simple as joining another SQL table), and then you can account for these different conditions instead of pooling all of the observations and pretending they are the same. For instance, you might learn that the $$50$$ attempts were taken by $$25$$ subjects, each of whom takes two attempts, and decide that it is worth modeling the subject (such as with a subject indicator variable or a subject random effect).