calqulio.
◎ English · Global

Positive-class base rate — Classifier Precision from Base Rate Calculator

Classifier Precision from Base Rate: Calculate positive-class base rate from Positive-label precision, True-positive rate, True-negative rate. Check the formula, input units and worked result on this page.

Enter your values

%
Formula symbol: precision. Enter the percentage as a number: for 15%, enter 15. Must be greater than zero. Allowed range: 0.000001–99.999999.
%
Formula symbol: sensitivity. Enter the percentage as a number: for 15%, enter 15. Must be greater than zero. Allowed range: 0.000001–99.999999.
%
Formula symbol: specificity. Enter the percentage as a number: for 15%, enter 15. Must be greater than zero. Allowed range: 0.000001–99.999999.

Use a decimal point, without thousands separators.

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.
Example result
Positive-class base rate
20 %

The initial result uses the example values. Enter your own values and calculate again.

Edit inputs

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
Positive-class base rate — Classifier Precision from Base Rate Calculator · Inputs and units
InputExample valueWhat to enter
Positive-label precision50 %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 rate80 %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 rate80 %Formula symbol: specificity. Enter the percentage as a number: for 15%, enter 15. Must be greater than zero. Allowed range: 0.000001–99.999999.
prior = ((100 * precision * (100 - specificity)) / ((sensitivity * (100 - precision)) + (precision * (100 - specificity))))

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

Methods & accuracy

What would you like to calculate?

Browse all calculators

Graphing calculator ↗