Invert an Alert Probability Without Losing the Population Base Rate — Free
“Ninety percent sensitive” is not “ninety percent of alerts are right.” Build the two populations behind an alert and see how their sizes change the conditional probability.
The proof surface
Observed error-cost matrices do not invert conditional probabilities from supplied sensitivity/specificity and a changing population base rate.
Rare deviceObserved error-cost matrices do not invert conditional probabilities from supplied sensitivity/specificity and a changing population base rate.
Output artifactLargest modeled positive predictive value plus complete labeled working
Cost$0 local core · no account, card, paid key or subscription · filing proposal has no checkout
Sample, not your facts: Invented records: Cedar classroom detector | 90 | 95; Willow classroom detector | 95 | 90. Assumed positive-class prevalence (%) = 2; expected Largest modeled positive predictive value: 26.865672 % positive predictive value. These are not quotations, verified observations or personal evidence.
Before using the base-rate counterfactual dial
This is a classroom probability exercise using fictional detector codes, not a health, hiring, policing, credit or real-person screening tool. Sensitivity means probability of an alert given the positive class; specificity means probability of no alert given the negative class. Prevalence describes the assumed positive-class share of the modeled population. These quantities must refer to one compatible population and definition. The dial computes expected counts for a reference 10,000 cases only to make denominators visible. It neither observes individuals nor validates prevalence, operating conditions or a model’s calibration. A probability result should not be repurposed as advice about any actual person.
Why the flat version breaks
The conditional is reversed by verbal shortcut
P(alert given class) and P(class given alert) are different fractions. Using the sensitivity as the answer ignores false-positive alerts from the usually much larger negative-class population. The reference counts make this reversal visible instead of correcting it with a vague caution. The model does not hide the denominator or round a rare event into apparent certainty.
Percentages from incompatible populations are mixed
A detector’s operating characteristics may vary with conditions, labels and selection. A prevalence guess from another setting can make the formula numerically valid but substantively inappropriate. The app reports assumed inputs and refuses no unsupported “verified” status. It is a mathematical exercise, not external validation of a source dataset or a permission to act on a person.
No modeled alerts are interpreted as a trustworthy alert
If sensitivity and false-positive rate create no alert mass, there is nothing to condition on. Positive predictive value is undefined, not zero and not 100. The explicit error retains your fields and previous reading. If the no-alert denominator for negative predictive value is zero instead, that companion metric is labeled unavailable while the valid positive-alert calculation remains complete.
How to work the base-rate counterfactual dial
Label the two conditional inputs correctly
Enter a detector code, sensitivity and specificity as percentages between zero and 100. Do not substitute precision for sensitivity: precision is the quantity being calculated here. A specificity figure from a different population may not be transferable. The tool cannot discover a mismatch from two numbers, so your instructor or source notes must state which definition and population they describe. Use non-sensitive fictional examples rather than uploading a screening dataset.
Set the population base rate separately
Enter assumed prevalence in the shared setting. The same value is applied to every detector row so differences come from the operating characteristics, not silently changed populations. Prevalence is not inferred from the number of alerts. At the zero or 100 percent boundaries some conditional questions lose their denominator; the calculator names that case rather than using it as a reassuring certainty. The setting is an assumption for this exercise, not a rate measured by the app.
Construct and invert the alert denominator
For prevalence p, sensitivity s and specificity c as fractions, expected true positives per 10,000 are 10,000ps and expected false positives are 10,000(1−p)(1−c). Divide true positives by their sum for positive predictive value. Also show false negatives, true negatives and negative predictive value where its denominator exists. The headline is the maximum defined positive predictive value across rows; the individual modeled cells remain next to each row, with no hidden premium explanation.
Explain the inverse in words before comparing
Say which condition is given and which is being asked: given an alert, what fraction belongs to the positive class under these assumptions? A change in prevalence can change that answer without changing sensitivity or specificity. Check the worked counts with a teacher or appropriate statistical source. The copyable reading preserves the population assumption and boundary so a polished percentage cannot be mistaken for a verified claim about a real detector.
What the base-rate counterfactual dial keeps distinct
Question
Before
Check this working
The conditional is reversed by verbal shortcut
P(alert given class) and P(class given alert) are different fractions. Using the sensitivity as the answer ignores false-positive alerts from the usually much larger negative-class population. The reference counts make this reversal visible instead of correcting it with a vague caution. The model does not hide the denominator or round a rare event into apparent certainty.
Set the population base rate separately
Percentages from incompatible populations are mixed
A detector’s operating characteristics may vary with conditions, labels and selection. A prevalence guess from another setting can make the formula numerically valid but substantively inappropriate. The app reports assumed inputs and refuses no unsupported “verified” status. It is a mathematical exercise, not external validation of a source dataset or a permission to act on a person.
Construct and invert the alert denominator
No modeled alerts are interpreted as a trustworthy alert
If sensitivity and false-positive rate create no alert mass, there is nothing to condition on. Positive predictive value is undefined, not zero and not 100. The explicit error retains your fields and previous reading. If the no-alert denominator for negative predictive value is zero instead, that companion metric is labeled unavailable while the valid positive-alert calculation remains complete.
Explain the inverse in words before comparing
The base-rate counterfactual dial replaces this named manual reconciliation, not source verification or the responsible human's decision.
Run it on the samples, right here
FIRST-LOAD
HYPOTHESIS / PROTOTYPE — checkout unavailable. Calculation is local. A draft is saved automatically in this browser profile when storage is available; Reset to sample clears it. Optional Pro history stores only five summaries and has its own deletion control. State links encode your inputs and can remain in browser history, clipboard or recipients’ records; share only non-sensitive rows. Optional external AI formatting leaves this device. The required site analytics beacon reports page activity; shared URLs contain encoded inputs. Do not treat an encoded URL as private. The calculator has no input-collection endpoint.
Classroom conditional-probability model only; no medical, hiring, legal or real-person screening decision. Verify definitions and assumptions with a qualified teacher or statistician before using the method beyond the invented exercise.
Data note: This base-rate counterfactual dial calculates in the tab from Detector code | sensitivity percent | specificity percent. No input-collection endpoint, AI request or file upload is built into it. Drafts may be saved locally; explicit input-state links and optional external formatting can disclose the records. Use non-sensitive codes and clear the draft when finished.
Go deeper: the companion app files the same reading as a meter band gauge
The article demo above runs without limits. The companion app keeps a local history, exports the rows as CSV, prints the base-rate counterfactual dial reading, and holds your drafts on this device — one complete free app run; the proposed $4 one-time filing layer is not for sale.
Keep the complete base-rate counterfactual dial answer free; optional filing proposes its boundary-preserving print, row-and-summary CSV and five local reading summaries. The $4 one-time prototype is not for sale; another calculation remains free in the article demo.
Classroom conditional-probability model only; no medical, hiring, legal or real-person screening decision. Verify definitions and assumptions with a qualified teacher or statistician before using the method beyond the invented exercise.
What this is built on
Declared local method: For prevalence p, sensitivity s and specificity c as fractions, expected true positives per 10,000 are 10,000ps and expected false positives are 10,000(1−p)(1−c). Divide true positives by their sum for positive predictive value. Also show false negatives, true negatives and negative predictive value where its denominator exists. The headline is the maximum defined positive predictive value across rows; the individual modeled cells remain next to each row, with no hidden premium explanation.
Every sample code, measurement, date, price, fingerprint and scenario is invented. Artifact checks do not verify reader data, policies, actual files, tickets, votes or health/accessibility outcomes.
Google’s official Gemini pricing page, fetched 2026-10-01, lists AI Studio access in its Free section, limited model access and free input/output tokens. Free-tier content may be used to improve products. Optional external formatting may require an account; limits/access can change. Manual local entry needs none. Do not send sensitive records.
Before: sensitivity sounded like the chance an alert was correct. After: the positive and negative populations build the actual alert denominator before its probability is inverted.
At two percent prevalence in a reference population of 10,000, Cedar has 200 positive-class cases: 180 alert and 20 do not. Among 9,800 negative-class cases, 490 alert and 9,310 do not. Thus 180 of 670 modeled alerts are true positives: about 26.865672 percent. Willow detects more positive cases but also creates more false positives, giving about 16.239316 percent. The headline is the larger predictive value, not a recommendation to deploy Cedar.
The same prevalence gives 160 true-positive alerts and 98 false-positive alerts per 10,000, or about 62.015504 percent positive predictive value. Changing specificity changes the denominator of all alerts, not just the negative-class count. These are modeled expected counts and may be fractional under other inputs; they are not a measured classroom dataset or proof of detector quality.
Every modeled case alerts, so the alert’s positive predictive value equals the entered two-percent prevalence. Sensitivity of 100 percent alone is not enough to make an alert informative. If both modeled true-positive and false-positive alerts are zero, the conditional probability is undefined and the app gives an explicit denominator error rather than printing zero confidence.
Optional AI formatting, never the calculation
Manual entry completes this base-rate counterfactual dial for free without signup. If available to you, the free AI Studio interface linked in the sources may format fictional or non-sensitive notes; external access may require an account. No API key or AI call is built into this tool. Free-tier content may be used to improve products. Review each cell and transcribe it to the labeled row schema; do not paste the JSON object into the row box.
Format only these fictional or non-sensitive notes for a base-rate counterfactual dial. Return strict JSON shaped as {"rows": [{"label": "string", "cells": ["string", "string"]}], "setting": "string"}. The columns are Detector code | sensitivity percent | specificity percent; the setting is Assumed positive-class prevalence (%). Keep all supplied strings and quantities exactly; do not calculate, infer missing entries, invent dates or add advice. If any required value is missing, return an empty rows array and ask me for it separately. I will verify every cell against my source and manually transcribe rows using vertical bars before running the local calculator.
An AI response is not executed, fetched or trusted as a result. Missing values remain questions; the strict local parser checks the rows you actually enter.