Results
How good is the tool?
- Recall (defects caught)
- --
- Specificity (good passed)
- --
- Precision in the test set
- --
- Accuracy
- --
- Kappa
- --
- Defect share in the test set
- --
Calculator Library / AI Operations
Enter the counts from a validation test to get recall, specificity, precision, and kappa with exact intervals, see what they mean at your real defect rate, and compare the tool with a baseline such as your inspectors.
Tool
Recall = TP ÷ (TP + FN)
Run the AI on items whose true status is known and enter the four counts. The calculator gives recall, specificity, precision, accuracy, and kappa with exact 95% intervals, shows what the results mean at your real defect rate, and compares the tool with a baseline such as your human inspectors. Load the example to see an AI inspection assist tested on 400 parts.
Everything runs in your browser. Nothing is sent to a server, and entries are not saved between visits. The example is made-up data. The intervals are exact (Clopper-Pearson) 95% intervals and assume the test items were chosen independently.
Results
Picture
Instructions
Any AI tool that sorts items into good and bad, such as an inspection assist, a document checker, or a complaint classifier, is a measurement system. This calculator takes the four counts from a validation test and gives recall (the share of defects it catches), specificity (the share of good items it passes), precision, accuracy, and kappa, with exact 95% intervals, so that you see how uncertain the results are.
It then shows what the results mean at your real defect rate. Because precision falls as defects become rarer, a tool that looks good on a test set rich in defects may raise mostly false alarms on the line. It also works out the monthly cost of escapes and false alarms, compares the tool with a baseline such as your inspectors, and tells you how many defects a validation needs to prove a target recall. It matches the worked example in the AI for Quality and Inspection guide.
| Output | Calculation | Note |
|---|---|---|
| Recall (sensitivity) | TP ÷ (TP + FN) | Share of defects caught; one minus recall is the escape rate |
| Specificity | TN ÷ (TN + FP) | Share of good items passed; one minus specificity is the false alarm rate |
| Precision | TP ÷ (TP + FP) | In the test set. Depends on how common defects are |
| Precision at your defect rate | recall × p ÷ (recall × p + (1 − specificity) × (1 − p)) | p is the real defect rate |
| Kappa | (observed agreement − chance agreement) ÷ (1 − chance agreement) | Agreement with the standard beyond chance |
| 95% interval | Exact (Clopper-Pearson) binomial interval | Wide when there are few defects or few good items |
| Defects needed | ln(0.05) ÷ ln(target recall) | With no misses, to show recall is at least the target at 95% confidence |
| Monthly error cost | defects × (1 − recall) × cost of an escape + good items × (1 − specificity) × cost of a false alarm | Uses your volume and defect rate |
The pre-loaded example is an AI visual inspection assist tested on 400 parts: 54 true positives, 6 false negatives, 17 false positives, and 323 true negatives. Recall is 90% (95% interval 79.5% to 96.2%), specificity 95%, and kappa 0.79. At 1.5% defective, only 22% of the tool’s flags would be real. Against the human inspectors the AI saves about $2,131 a month, but raises about 493 false alarms.
Recall is the share of real defects the tool catches. Precision is the share of its flags that are real defects. A tool can catch most defects and still raise many false alarms, which matters most when defects are rare.
Because precision depends on how common defects are. A validation set usually contains many more defects than production does, so the precision measured in the test overstates the precision you will see on the line. The real defect rate lets the calculator work out how many flags would be false.
How well the tool agrees with the standard beyond what chance would produce. Values near 1 mean strong agreement; values near 0 mean agreement no better than chance. It is useful alongside recall and specificity, especially for comparing a tool with human inspectors.
To show that recall is at least a target at 95% confidence when the tool misses none, you need ln(0.05) divided by ln(target) defects: 29 for 90%, 59 for 95%, 149 for 98%, and 299 for 99%. If you expect some misses, you need more, or use the exact interval on what you observe.
No. The calculator runs entirely in your browser, nothing is sent to a server, and your entries are not saved when you leave the page.