By the end of this lesson, you can turn a starting event frequency and two alert rates into a probability after an alert. You will build a frequency table, derive Bayes’ rule from its counts and check how the answer changes when the starting frequency changes. This helps you interrogate an accuracy claim before relying on it.
A fraction is a part divided by the whole. For example, 3 red counters among 12 equally likely counters gives 3 ÷ 12 = 1/4 = 0.25 = 25%. To convert a decimal to a percentage, multiply by 100. In this lesson, all probabilities are unitless proportions; an issuer is a borrower issuing debt. Counts are issuer-years, with one issuer-year meaning one issuer followed for one year.
Default means failing to meet a specified debt obligation. An event is an outcome with a clear definition, such as default within the next year. Conditional probability restricts the group before counting. If 2 of the 3 red counters also have a dot, the chance of a dot given red is 2/3, because only the 3 red counters belong in the denominator. The original 12 counters are no longer the whole being considered.
Write P(D) for the probability of default, D, within the specified year. Write A for an alert issued at the beginning of that year. The vertical bar in P(D | A) means “given”: the probability of default among alerted cases. P(A | D) instead asks how often an alert appears among default cases. Keep that direction explicit.
Illustrative assumptions: imagine 1,000 equally weighted, comparable issuer-years. Exactly 2% default within their one-year observation windows. An alert is issued for 80% of default cases, and for 10% of non-default cases. Default and non-default cover every outcome and cannot both occur for the same case. Assume the rates describe this same group, horizon and alert definition.
The starting probability, or prior, is P(D) = 0.02. The remaining probability is P(not D) = 1 − 0.02 = 0.98. The detection rate P(A | D) = 0.80 is also called sensitivity. The false-positive rate P(A | not D) = 0.10 describes alerts among cases that do not default. These conditional rates are the likelihoods of observing an alert in the two possible cases.
These deliberately chosen counts make the arithmetic visible. A real dataset need not match them exactly, and using estimated rates to construct a group of 1,000 would give expected counts, not a promise that the group will realize those counts.
Each following row lists three columns: default within one year; no default within one year; row total. Every entry is an illustrative count of issuer-years.
Alert issued: 16; 98; 114. The calculations are 1,000 × 0.02 × 0.80 = 16 and 1,000 × 0.98 × 0.10 = 98.
No alert issued: 4; 882; 886. Subtract the alerted cases from each group: 20 − 16 = 4 and 980 − 98 = 882.
Column totals: 20; 980; 1,000. The rows also add up: 114 + 886 = 1,000. Checking both directions helps catch a misplaced denominator or an omitted group.
Now restrict attention to the 114 alerted cases. Of these, 16 default, so P(D | A) = 16 ÷ 114 ≈ 0.14035, or 14.04%. Dividing 16 by 20 would return the 80% detection rate, answering the opposite conditional question. Dividing 16 by 1,000 would give the 1.6% fraction with both an alert and a default, not the chance after an alert.
The fraction with both default and an alert is P(A | D) × P(D). All alerts come from two groups: default cases and non-default cases. Adding their fractions gives P(A) = P(A | D) × P(D) + P(A | not D) × P(not D). This is the law of total probability for these two exhaustive, non-overlapping groups.
Divide the fraction with both outcomes by the fraction with an alert. Bayes’ rule is P(D | A) = [P(A | D) × P(D)] ÷ [P(A | D) × P(D) + P(A | not D) × P(not D)], provided the denominator is positive. The result is called the posterior probability: the probability after conditioning on the alert.
Substitution gives (0.80 × 0.02) ÷ [(0.80 × 0.02) + (0.10 × 0.98)] = 0.016 ÷ 0.114 ≈ 14.04%. Multiplying numerator and denominator by 1,000 returns 16 ÷ 114, so the formula and the frequency table answer exactly the same question. The arbitrary teaching group size cancels.
An “80% accurate” headline is insufficient. Ask whether it means detection among defaults, correct predictions among all cases or defaults among alerts. Request the underlying event count, reference group, observation dates, alert timing, horizon and false-positive rate. Those are needed to reconstruct the conditional question.
The illustrative alert increases probability from 2% to 14.04%, despite most alerts being false positives. Calling it useless solely because most alerts are false would also miss the update. But a posterior probability does not specify a trade: the loss if default occurs, recovery of money after default, price, costs and other possible outcomes are separate inputs.
If issuer selection changes or economic conditions change, the original rates may no longer fit. With few default cases, sensitivity itself is uncertain. Excluding failed issuers after the fact or using an alert created after the outcome would distort the evidence. An exact formula does not make such estimates trustworthy.
For another alert B, the next update must use its probabilities given both the default status and the alert A already seen, such as P(B | D, A). The comma here means both conditions are included. Reusing P(B | D) is justified only when B and A are conditionally independent given D, and likewise given non-default: knowing A then adds no information about B within either group. Two alerts derived from the same report may repeat the same evidence.
Illustrative assessment: keep sensitivity at 80% and the false-positive rate at 10%, but change the one-year default base rate to 10%. In a teaching group of 1,000 issuer-years, how many alerts come from each outcome group? What is the default probability given an alert? Why does it differ from the earlier result?
Answer: 100 cases default and 900 do not. Alerts occur in 100 × 0.80 = 80 default cases and 900 × 0.10 = 90 non-default cases. There are 170 alerts, so the posterior is 80 ÷ 170 = 8/17 ≈ 47.06%. More of the starting group defaults, so more alerts come from defaults even though neither conditional alert rate changed. The detection rate remains 80%; it is still not the posterior.
Second check: if both groups trigger an alert 10% of the time, does an alert change the original 2% prior? Answer: no. In 1,000 cases, 2 of the 20 default cases and 98 of the 980 non-default cases trigger alerts. The posterior is 2 ÷ 100 = 2%. Evidence occurring equally often in both groups does not distinguish them. If neither group could ever trigger an alert, conditioning on one would instead have a zero denominator and be undefined under that model.
General education, not investment advice. Every issuer count, default rate and alert rate below is illustrative and assumed, not measured market data or a Quantustik performance claim. The exercise explains probability arithmetic, not how to select investments. Real estimates remain uncertain and may not apply to future cases.
No. It is a convenient teaching scale. Multiplying every count by the same positive factor leaves the conditional proportion unchanged. Real sample size still matters for how precisely the input rates can be estimated.
Generally no. You also need the probability of the observed alert among non-default cases, or equivalent information giving the overall alert probability.
No. The second update must describe genuinely additional evidence and account for what is already known. Repeating the same observation supplies no new information.
Investor education only — not investment advice, and never a promise of profit. Every investment can lose value.