# How to compute categorical probability given a continuous distribution?

I have a continuous target column that consists of IQ scores for kids of age 10. My main purpose is to forecast the probability that a kid is genius given 3 covariates. If a kid has IQ over 160 she/he will be labelled 1(genius) if not 0.I am told rather than using logistic regression and converting my continuous target column to a categorical one, I can also use a continuous distribution to fit the data and then compute probability from the distribution.

So I fit a Glm Gamma model to the data and now I have a model that I can get forecasts on IQ score given a test data. From this point on how can I compute the probability that a kid is genius? I have the parameters from the summary of the model. I thought I could use R's dgamma(). But how will I set threshold as 160 and given my test data how will I compute probabilities from independent variables?

• I think it might be a little misleading to provide a probability that the kid is a genius based on the IQ prediction as it goes against the frequentist definition of probability you are working with (you would want to work in a Bayesian setting for this). What you can do is use the predict function to derive a confidence/prediction interval around your IQ estimate. – Forrest May 31 at 4:13
• @ForrestKoch How does it go against frequentist probability? – Dave May 31 at 4:18
• @Dave correct me if I'm wrong, but my understanding is that in a frequentist setting you regard the parameter of interest as fixed. In this setting, you construct α-level intervals which when used, will contain the true parameter 100*α% of the time, but you can't make probability statements about the parameter of interest. In a Bayesian setting, the parameter of interest is allowed to be a random variable, therefore can have probabilities associated with it. – Forrest May 31 at 4:25
• Your model outputs a conditional distribution over iq, right? So you can use this to compute the probability that iq > 160. Evaluate the CDF at 160 (which gives the probability that iq $\le$ 160), then subtract this value from 1. – user20160 May 31 at 16:52
• @moli I think it's largely an issue of semantics, and perhaps I'm over-complicating things by nitpicking the wording. Ultimately what I think you are after is equivalent to deriving a prediction interval, however, instead of reporting the bounds for a given α, you want to find the α resulting in the PI including 160. I also think it is important that I amend my previous statement about using the predict function. It turns out that prediction intervals are quite difficult to generate for the GLM and this can't be done using predict. – Forrest Jun 1 at 2:23