# What's a good model for predicting the binomial distribution of a target variable that represents the number of successes?

Let's say one of my students is taking a test with 50 questions, and I want to predict the distribution of how many questions they will get correct. I have some information about the student and the test itself I can use as features. Is there a way I can predict the parameter of the binomial distribution (instead of just the target variable value) for this target variable (the number of correct answers) given the features? My guess is that this would be called the posterior predictive binomial distribution...

Ideally, if there is a ML / PGM model I can use or replicate in python with sklearn or pymc, that would be best.

## 1 Answer

Doubt this will be the best answer, but it may be easier to use Bernoulli likelihood for the answers themselves in pymc and estimate the student's probability of answering correctly. Then you could draw from the posterior distribution of this parameter to simulate test results for a given N of the binomial distribution. Having a binomial associated with a student means you must also estimate that student's N--which is kind of nebulous to me.

• $N$ is easy - there are 50 questions. – jbowman Oct 28 '15 at 19:37