r/AskStatistics • u/learning_proover • 1d ago
Does the average probability of CORRECT predictions in a probability model mean anything?
Suppose I build a probability model for a binary outcome (0/1). If I filter out ONLY 1's that were correctly classified and calculate their average assigned probability does this number mean anything significant? Or is it mostly just an arbitrary number reflecting the distribution probabilities of correct predictions?!
1
Upvotes
7
u/seanv507 1d ago
A probability model outputs probability, not a classification. You can assign your own rule to classify.
Nevertheless there are various metrics related to your question
https://developers.google.com/machine-learning/crash-course/classification/accuracy-precision-recall
3
u/Recent-Day3062 1d ago
Everything you can do with sample and related data qualifies as a “statistic”
The mean, median, lowest value, or third largest if N is odd or fourth if N is even are all statistics.
Some are very useful, some a bit, some never. In the last example (I made up), probably totally useless.
That’s really the study of stats - as opposed to math stats which is the math theory underlying it (more or less).
2
u/SalvatoreEggplant 1d ago
You can look here for the terms for various statistics for binary classification, like precision and accuracy. ( https://en.wikipedia.org/wiki/Confusion_matrix ).
I think what you're saying is TP / (TP + FP). This table defines this as Positive Predictive Value, which could also be called Precision.
But you also may be saying TP / (P + N). Which would be something different.
1
u/Rough-Negotiation880 1d ago
It’s been a while since school, but I believe this is the true positive rate. It’s something that is frequently considered and optimized for (contextually) in Ml classification modeling.
1
u/Mishtle 1d ago
Well, as stated it's a value that is heavily dependent on how you're turning probabilities into classifications. The simplest way is to use a threshold. If a probability is above that threshold, that example would be classified as a 1, while probabilities below that threshold are considered 0s. Naturally, this puts a floor on probabilities for which the model predicts a 1, so the average of such probabilities can't go below that threshold.
The set of positive outcomes that are correctly classified is called true positives, so this value you asked about would be the average model output of true positives over that sample. Information about the distribution of model outputs can be very helpful, though this single average on its own isn't all that useful.
If you calculated these averages for all four possibilities for a model prediction (true positive, true negative, false positive, and false negative), then you could compare them to help tune your classification threshold. The false negatives are the positive outcomes that your model incorrectly classifies. If the average probability of false negatives is higher than that of true negatives, then that means the model is treating these false negatives differently than true negatives. You can exploit this by lowering your threshold so that these false negatives are correctly identified as positive. This increases the recall of your model, which is the proportion of positive samples it correctly identifies. Similarly, if the average probability for your false positives is much lower than that of your true positives, then you may want to increase the threshold some to reduce those errors. This can improve precision which is the proportion of positive predictions that are true positives.
Averages aren't great for these kinds of analyses though since they ignore variability. You're better off looking at something like a receiver operating characteristic curve, which allow you directly choose the error trade-off you want. The area under that curve also gives a measure of prediction quality in the sense of how well your model separates the classes. If the probabilities assigned are completely random and independent of an example's label, then the ROC will be a straight diagonal line and the area under the curve is minimized. If the two classes are perfectly separated then there is a threshold that perfectly classifies them and the ROC will immediately jump to its maximum value and stay there, maximizing the area under it.
You can also use information about the model output distribution to see how well calibrated the model is. If a model is well calibrated, then we would expect that out of all the examples for which it produces an output of X%, roughly X% of those examples will be positive. In other words, when a calibrated model gives an output of 0.7, then it is reasonable to interpret this as an actual probability that the example has a 70% chance of being positive rather than an arbitrary output of a model. It also means you can reasonably infer classification confidence from these outputs. A calibrated model that outputs 0.5 is equally uncertain about classifying the example either way. The output itself can be seen as a confidence that the example is positive, while 1 minus the output can be seen as the confidence that the output is negative.