How it works
The true-positive share among positive labels follows Bayes’ relation using a class base rate and two conditional classification rates. This form solves for positive-class base rate; enter the known quantities in Positive-label precision, True-positive rate, True-negative rate.
Inputs and units
| Input | Example value | What to enter |
|---|---|---|
| Positive-label precision | 50 % | Formula symbol: precision. Enter the percentage as a number: for 15%, enter 15. Must be greater than zero. Allowed range: 0.000001–99.999999. |
| True-positive rate | 80 % | Formula symbol: sensitivity. Enter the percentage as a number: for 15%, enter 15. Must be greater than zero. Allowed range: 0.000001–99.999999. |
| True-negative rate | 80 % | Formula symbol: specificity. Enter the percentage as a number: for 15%, enter 15. Must be greater than zero. Allowed range: 0.000001–99.999999. |
Worked example
Show example inputs and results
This example is generated by the same calculation engine using the starting values in the form. Your own inputs produce your own result.
- Positive-label precision
- 50 %
- True-positive rate
- 80 %
- True-negative rate
- 80 %
Complete example results
- Positive-class base rate
- 20 %
Reading the result
The result solves for positive-class base rate from the entered quantities. Check the result unit and the formula conditions before using it.
Questions and answers
Can I use the example values for my own calculation?
The example values illustrate the calculation. Replace every input with your own information, especially dates, rates and the selected operation.
When can I use the positive-class base rate result?
Keep positive and negative class definitions fixed. The tool does not test data shift or validity on new observations. Inverse solutions exclude singular probability boundaries.
Why are some results rounded?
Results display up to 8 decimal places. Calculations use the unrounded values; very small values use scientific notation. JavaScript floating-point arithmetic can introduce tiny rounding differences.
Are my inputs sent to a server?
The calculator processes inputs in your browser. Its code does not send your values to a server.
Method sources: ocw.mit.edu