Statistics for Analytics

Session 3: Probability & Bayesian Updating

Dr Zexun Chen

Today’s route

Connect long-run frequencies to probability, combine events, and use total probability and Bayes’ theorem.

Probability Foundations

Recall last week’s two-loan case

For two loans over the next year, \(S=\{RR,RD,DR,DD\}\).

\(R\) means no default; \(D\) means default. Read the loans in order.

  • Which outcomes mean at least one default?
  • If \(P(\text{no defaults})=0.81\), what is \(P(\text{at least one})\)?
  • Does listing four outcomes make each probability \(0.25\)?

Count the loan outcomes with a tree

Outcome tree for two loans. Loan 1 branches into no default R or default D. Each branch splits into R or D for Loan 2, giving four outcomes: RR, RD, DR and DD.

\[2\times2=4\text{ outcomes: }RR,\ RD,\ DR,\ DD.\]

Counting rule: multiply the numbers of choices at successive steps: \(n_1n_2\cdots n_r\).

Combinations: count a selection once

Choose three distinct loan files from ten for audit.

A combination counts a selection once: \(\{A,B,C\}\) is the same set in any order.

Equivalent textbook notation (\(n\) available, \(r\) selected):

\[\mathrm{C}(n,r)=\mathrm{C}_r^n={}^n\mathrm{C}_r={}_n\mathrm{C}_r =\binom nr=\frac{n!}{r!(n-r)!}.\]

\[\binom{10}{3}=\frac{10!}{3!\,7!}=120.\]

\(n!=n(n-1)\cdots2\times1\), with \(0!=1\).

Permutations: count each order

Now put the selected files into an audit queue. Order matters.

Each set of three files gives \(3!=6\) possible orders:

\[ABC,\ ACB,\ BAC,\ BCA,\ CAB,\ CBA.\]

Equivalent textbook notation (\(n\) available, \(r\) arranged):

\[\mathrm{A}(n,r)=\mathrm{P}(n,r)=\mathrm{A}_r^n={}^n\mathrm{A}_r={}_n\mathrm{A}_r =r!\binom nr=\frac{n!}{(n-r)!}.\]

\[\mathrm{P}(10,3)=3!\times120=10\times9\times8=720\text{ audit queues}.\]

Choose a counting rule

Task Assumptions Count
Fill \(r\) positions from \(n\) options Order matters; repeats allowed \(n^r\)
Choose \(r\) objects from \(n\) Order irrelevant; no repeats \(\binom nr=n!/[r!(n-r)!]\)
Arrange \(r\) objects from \(n\) Order matters; no repeats \(n!/(n-r)!\)

For a multiple-step experiment with \(n_1,\ldots,n_r\) choices, use \(n_1\cdots n_r\).

Count before assigning probabilities: equal counts imply equal probabilities only under an equally likely model.

Probability: what the number means

Probability is a numerical measure of the likelihood that an event or outcome will occur.

\(P(A)\) denotes the probability of event \(A\).

\[0\le P(A)\le1,\qquad P(S)=1,\qquad P(\varnothing)=0.\]

Probability Interpretation
\(0.1\) Unlikely: a 10% chance
\(0.5\) Equally likely to occur or not occur
\(0.9\) Likely: a 90% chance

The probabilities of all outcomes in a finite sample space sum to one.

Frequentist interpretation

Probability describes an event’s long-run relative frequency over comparable repetitions.

For a loan model with default probability \(p=0.02\):

  • Observe many comparable loans over the same one-year horizon.
  • The proportion that default should be close to 2% in a sufficiently large collection under the model.
  • A small batch can contain zero, one, two or more defaults.

The underlying probability \(p\) is fixed; the observed proportion varies between samples.

Bayesian interpretation

Probability expresses a degree of belief given the available information.

For the event “this loan defaults during the next year”:

  1. Form a prior assessment using comparable loans and relevant knowledge.
  2. Observe new evidence, such as repayment information.
  3. Combine the prior and the evidence to obtain an updated probability.

Different information or model assumptions can lead to different assessments.

Both interpretations obey the same probability rules. Bayes’ rule will make the update precise later.

Law of large numbers: the long-run proportion

Observe independent trials with the same probability \(p\) of an event.

Here, independent means that learning one outcome leaves the other trials’ probabilities unchanged.

\[\widehat p_n=\frac{\text{number of times the event occurs in }n\text{ trials}}{n} \ \longrightarrow\ p\qquad\text{as }n\to\infty.\]

As \(n\) grows, the chance that \(\widehat p_n\) is close to \(p\) approaches one.

For loans with \(p=0.02\), the running default proportion approaches 2%.

Law of large numbers in the loan simulation

The running default proportion in one simulation of 10,000 independent loans fluctuates around a fixed model probability of 0.02. It finishes at 0.0186.

Loans observed \(n\) Defaults Running proportion \(\widehat p_n\)
100 1 0.0100
1,000 18 0.0180
10,000 186 0.0186

Illustrative simulation: independent loans, \(p=0.02\), seed 202603. The table gives points from the plotted sequence.

Does a quiet run change the next risk?

Assume independent loan outcomes with a constant 2% default probability. None of the first 50 loans defaults. What is the next loan’s default probability?

  1. Less than 2%
  2. Exactly 2%
  3. More than 2%
  4. 50%

A quiet run and the next loan

Under the activity’s model, each independent loan has the same known risk \(p=0.02\).

\[\widehat p_{50}=\frac{0}{50}=0,\qquad P(\text{next loan defaults})=0.02.\]

  • A quiet run is possible; later loans keep the same risk.
  • The running proportion can fluctuate as it approaches \(p\).
  • The LLN concerns a proportion over many trials. A finite batch can finish above or below \(p\).

Calling a default “due” after a quiet run is the gambler’s fallacy.

Assigning probabilities

How do we choose a numerical probability for a defined event?

Method Basis Banking example
Classical Equally likely outcomes: favourable / total Select one of 10 files uniformly; 3 are overdue, so \(P(\text{overdue})=3/10=0.3\)
Relative frequency Observed event count / observations 5,289 subscriptions in 45,211 campaign records give an observed rate of \(0.1170\)
Subjective Judgement informed by evidence and assumptions Assess a new stress scenario using models, comparable cases and expert knowledge

State the event, observation period, evidence and assumptions behind the number.

Campaign counts: UCI Bank Marketing. The audit and stress examples are illustrative.

From outcome probabilities to event probabilities

For \(S=\{RR,RD,DR,DD\}\), use this illustrative joint probability assignment:

Outcome \(RR\) \(RD\) \(DR\) \(DD\)
Probability 0.81 0.09 0.09 0.01

The probabilities sum to \(0.81+0.09+0.09+0.01=1\).

Let \(A\) mean the first loan defaults and \(B\) the second loan defaults:

\[A=\{DR,DD\},\qquad B=\{RD,DD\}.\]

Add the probabilities of the outcomes in each event:

\[P(A)=0.09+0.01=0.1,\qquad P(B)=0.09+0.01=0.1.\]

Complement of an event

The complement of \(A\) contains all outcomes in \(S\) that are outside \(A\).

Sample space for two loans. Event A contains DR and DD, where the first loan defaults. Its shaded complement contains RR and RD, where the first loan does not default.

Write it as \(A^c\) or \(A^{\complement}\).

\(A^c\): the first loan does not default.

\[A^c=\{RR,RD\}.\]

\[P(A^c)=1-P(A)=1-0.1=0.9.\]

Exactly one of \(A\) and \(A^c\) occurs, so their probabilities sum to one.

Union of two events

The union \(A\cup B\) contains outcomes in \(A\) or \(B\), including outcomes in both.

Venn diagram for two loan-default events. A-only contains DR, B-only contains RD, and their overlap contains DD. The union shades all three outcomes; RR is outside.

\(A\): first loan defaults; \(B\): second loan defaults.

\(A\cup B\): at least one loan defaults.

\[A\cup B=\{RD,DR,DD\}.\]

\[P(A\cup B)=0.09+0.09+0.01=0.19.\]

“Or” includes the possibility that both loans default.

Intersection of two events

The intersection \(A\cap B\) contains outcomes in both \(A\) and \(B\).

Venn diagram for the same two loan-default events. Only their overlap, containing DD, is shaded. DR, RD and RR are outside the intersection.

\(A\): first loan defaults; \(B\): second loan defaults.

\(A\cap B\): both loans default.

\[A\cap B=\{DD\}.\]

\[P(A\cap B)=P(DD)=0.01.\]

When we add \(P(A)\) and \(P(B)\), how many times have we counted \(DD\)?

Addition rule

Two Venn diagrams: the union shades every part of A or B, including their overlap; the intersection shades only the overlap.

\[P(A\cup B)=P(A)+P(B)-P(A\cap B)\]

The overlap \(A\cap B\) was counted in both \(P(A)\) and \(P(B)\), so subtract it once.

For our loans: \(P(A\cup B)=0.1+0.1-0.01=0.19\).

Two loan indicators in real data

Select a record uniformly from the 45,211 bank campaign records.

Let \(H\) mean housing loan and \(L\) mean personal loan.

\[P(H)=0.5558,\quad P(L)=0.1602,\quad P(H\cap L)=0.0966.\]

Use the exact counts to avoid rounding the intermediate values:

\[P(H\cup L)=\frac{25130+7244-4367}{45211}\approx0.6195.\]

About 62% have at least one of the two loan types.

Source: UCI Bank Marketing; empirical proportions calculated from 45,211 records.

Conditional probability

\[P(A\mid B)=\frac{P(A\cap B)}{P(B)}, \qquad P(B)>0\]

Conditioning changes the reference group from the whole sample space to event \(B\).

Read \(P(A\mid B)\) as “the probability of \(A\), given \(B\)”.

A two-way table

Let \(H\) mean housing loan and \(C\) mean campaign subscription.

Housing loan? Subscribed Did not Total
No 3,354 16,727 20,081
Yes 1,935 23,195 25,130
Total 5,289 39,922 45,211

\[P(C\mid H)=\frac{1935}{25130}\approx0.0770,\qquad P(H\mid C)=\frac{1935}{5289}\approx0.3659.\]

The same joint count, 1,935, is divided by different reference groups.

Multiplication rule

Rearrange the conditional-probability definition:

\[P(A\cap B)=P(A\mid B)P(B)=P(B\mid A)P(A)\]

For the campaign table,

\[P(C\cap H)=\frac{1935}{25130}\times\frac{25130}{45211} =\frac{1935}{45211}\approx0.0428.\]

Multiply a subgroup’s share by its conditional rate to obtain the joint probability.

Independence

\(A\) and \(B\) are independent when knowing one does not change the probability of the other:

\[P(A\mid B)=P(A)\quad\text{when }P(B)>0.\]

Equivalently,

\[P(A\cap B)=P(A)P(B).\]

In the campaign records, \(P(C\mid H)=0.0770\) while \(P(C)=0.1170\).

Housing-loan status and subscription are dependent in this empirical distribution.

Mutually exclusive or independent?

Relationship Meaning Probability rule
Mutually exclusive Both cannot occur \(P(A\cap B)=0\)
Independent Knowing one leaves the other’s probability unchanged \(P(A\cap B)=P(A)P(B)\)

For one loan, default and no default are mutually exclusive.

For two independent loans, both can default: \(0.1\times0.1=0.01\).

Two mutually exclusive events with positive probabilities are dependent.

Add probabilities to the loan tree

Probability tree for two independent loans with 10% default risk: joint probabilities RR 0.81, RD 0.09, DR 0.09, DD 0.01.

Multiply probabilities along a path; add probabilities across mutually exclusive paths.

\[P(\text{at least one default})=0.09+0.09+0.01=1-0.81=0.19.\]

Illustrative model: two independent loans, each with a 10% default probability.

Dependent events: sampling without replacement

An illustrative audit contains 10 files, 3 overdue. Select two files uniformly, without replacement.

Let \(O_1\) and \(O_2\) mean the first and second selected files are overdue.

\[P(O_1)=\frac3{10},\qquad P(O_2\mid O_1)=\frac2{9}.\]

\[P(O_1\cap O_2)=\frac3{10}\times\frac2{9}=\frac1{15}\approx0.0667.\]

Replacing and reshuffling the first file would give \(0.3\times0.3=0.09\).

Law of Total Probability

Total probability: split into two groups

Every occurrence of \(B\) lies either in \(A\) or in its complement \(A^c\).

\[P(B)=P(B\cap A)+P(B\cap A^c).\]

Apply the multiplication rule to each part:

\[P(B)=P(B\mid A)P(A)+P(B\mid A^c)P(A^c).\]

Overall probability = sum of each group’s share × its conditional probability.

Loan approvals: the problem

A bank receives loan applications:

  • 90% contain all required documents at submission.
  • Of these complete applications, 95% are approved within one week.
  • Of applications with documents missing at submission, 30% are approved within one week.

Let \(A\) mean complete at submission and \(B\) mean approved within one week.

What is the probability that a randomly selected application is approved within one week, \(P(B)\)?

Illustrative banking example; the probabilities are assumed.

Loan approvals: draw the two routes

All loan applications split into A, all documents at submission, with probability 0.9, and its complement with probability 0.1. Both routes lead to approval within one week, B, with conditional probabilities 0.95 and 0.3 respectively.

Multiply along each route to find its joint probability.

Add the two routes to include all approvals within one week.

Loan approvals: work through the solution

1. Split approval into disjoint events: \[B=(B\cap A)\cup(B\cap A^c).\]

2. Multiply along each route: \[\begin{aligned} P(B\cap A)&=P(B\mid A)P(A)=0.95\times0.9=0.855,\\ P(B\cap A^c)&=P(B\mid A^c)P(A^c)=0.3\times0.1=0.03. \end{aligned}\]

3. Add the joint probabilities: \[P(B)=0.855+0.03=\boxed{0.885}.\]

88.5% of applications are approved within one week in this model.

Total probability: extend to several groups

Suppose every application requires \(N\) documents. Let \(A_k\) mean exactly \(k\) were supplied at submission, for \(k=0,\ldots,N\).

All applications split into document-count groups A0 through Ak to AN, with omitted intermediate groups indicated by dots. Each group has share P(Ai) and contributes through its conditional approval probability P(B given Ai) to the same approval event B.

\[\begin{aligned} P(B)&=P(B\mid A_0)P(A_0)+\cdots+P(B\mid A_k)P(A_k)+\cdots+P(B\mid A_N)P(A_N)\\ &=\sum_{i=0}^{N}P(B\mid A_i)P(A_i). \end{aligned}\]

The groups form a partition: they cover all applications and do not overlap.

Real credit-default decomposition

September repayment status Group share Default within group Joint probability
No recorded delay 0.7727 0.1383 0.1069
One-month delay 0.1229 0.3395 0.0417
Two+ months delay 0.1043 0.6955 0.0726

For the first group, \(0.7727\times0.1383\approx0.1069\).

Overall empirical default probability: \(0.1069+0.0417+0.0726=0.2212\).

Source: Yeh, UCI Default of Credit Card Clients, 30,000 Taiwan credit-card records. Categories group PAY_0; rates are descriptive of this dataset.

Bayes’ Theorem

Bayes’ theorem: reverse the condition

Multiplication gives \(P(A\cap B)=P(B\mid A)P(A)=P(A\mid B)P(B)\).

Therefore, when \(P(B)>0\),

\[P(A\mid B)=\frac{P(B\mid A)P(A)}{P(B)}.\]

Prior Likelihood of the evidence Posterior
\(P(A)\) \(P(B\mid A)\) \(P(A\mid B)\)

Bayes’ theorem updates the prior using evidence; total probability supplies the denominator.

Loan approvals: reverse the question

Use the same bank and the same probabilities:

Quantity Probability
Complete at submission, \(P(A)\) 0.9
Approved within one week given complete, \(P(B\mid A)\) 0.95
Approved within one week given incomplete, \(P(B\mid A^c)\) 0.3

An application was approved within one week. What is the probability that it contained all required documents at submission, \(P(A\mid B)\)?

Same illustrative model as the total-probability example.

Loan approvals: highlight the required route

The same two routes from all applications to approval within one week. The route through A, complete at submission, is highlighted for the numerator P(A and B). Both the A and complement routes remain visible because their sum is the denominator P(B).

Numerator: approvals from the highlighted route through \(A\).

Denominator: approvals from both routes to \(B\).

Loan approvals: work through Bayes

1. Find the highlighted joint probability: \[P(A\cap B)=P(B\mid A)P(A)=0.95\times0.9=0.855.\]

2. Include every route in the denominator: \[P(B)=0.855+0.03=0.885.\]

3. Divide the highlighted contribution by the total: \[P(A\mid B)=\frac{P(A\cap B)}{P(B)} =\frac{0.855}{0.885}\approx\boxed{0.9661}.\]

Among applications approved within one week, about 96.6% were complete at submission.

Bayes: extend to several groups

Given approval within one week, what is the probability that exactly \(k\) documents were supplied at submission?

All applications split into groups A0 through Ak to AN and converge on approval B. The complete route through Ak is highlighted for the numerator; all group routes remain for the denominator.

\[P(A_k\mid B)=\frac{P(A_k\cap B)}{P(B)} =\frac{P(B\mid A_k)P(A_k)}{\displaystyle\sum_{i=0}^{N}P(B\mid A_i)P(A_i)}.\]

One group’s contribution ÷ the sum of all groups’ contributions.

Causality and Bayes’ Theorem

Under a causal model, let \(C_0,\ldots,C_N\) form a partition of possible cause states, and let \(E\) be the effect.

Possible cause states split into C0, Cj and CN, with intermediate states indicated by dots, then converge on effect E. Forward reasoning uses total probability to predict the effect. Reverse reasoning uses Bayes to update the probability of a cause state after observing the effect.

Predict: combine the routes to \(E\). Diagnose: observe \(E\), then update the probability of \(C_j\).

Total probability vs Bayes: two directions

Total probability: predict

From possible causes to an effect

\[P(E)=\sum_{i=0}^{N}P(E\mid C_i)P(C_i).\]

Weight each state’s effect probability by how common that state is.

Banking question: across all system states, how likely is a payment to settle late?

Bayes’ theorem: diagnose

From an observed effect to a cause state

\[P(C_j\mid E)= \frac{P(E\mid C_j)P(C_j)} {\displaystyle\sum_{i=0}^{N}P(E\mid C_i)P(C_i)}.\]

Divide one state’s contribution by the total probability of the effect.

Banking question: a payment settled late; how likely is a network outage?

Total probability supplies the denominator that Bayes needs.

Causal direction and direction of inference

In an illustrative payment system, a network outage can delay settlement.

A solid forward arrow shows the assumed causal mechanism from network outage to late settlement. A separate dashed backward arrow shows Bayesian inference from observing late settlement to updating belief about an outage.

  • Observe a late payment: use Bayes to update the probability of an outage.
  • Repair the network: ask how an intervention changes late-settlement probability.

Causal claims need a justified mechanism and study design. Bayes alone does not establish causation.

Conceptual distinction: Pearl, Causal Diagrams for Empirical Research.

A simple arrears-review flag

Let \(D\) mean next-month default and \(F\) mean at least two months late in September.

Quantity Probability
Prior default probability, \(P(D)\) 0.2212
Flag given default, \(P(F\mid D)\) 0.3281
Flag given no default, \(P(F\mid D^c)\) 0.0408

Question: Among flagged accounts, what proportion defaulted, \(P(D\mid F)\)?

Source: UCI Default of Credit Card Clients. Teaching flag: PAY_0 >= 2; rates rounded to four decimals.

Interpret the review flag

Given \(P(D)=0.2212\), \(P(F\mid D)=0.3281\) and \(P(F\mid D^c)=0.0408\), what is the probability of default given a flag, \(P(D\mid F)\)?

  1. 7.26%
  2. 22.12%
  3. 32.81%
  4. 69.6%

Bayes calculation: combine both routes to a flag

\[P(F)=\underbrace{0.3281(0.2212)}_{\text{flagged defaults}} +\underbrace{0.0408(0.7788)}_{\text{flagged non-defaults}} \approx0.1043.\]

\[P(D\mid F)=\frac{P(F\mid D)P(D)}{P(F)} =\frac{0.3281(0.2212)}{0.3281(0.2212)+0.0408(0.7788)}\approx0.696.\]

The flag updates the risk from 22.12% before conditioning to about 69.6% among flagged records.

Check Bayes using the observed counts

Default No default Total
Flagged 2,177 953 3,130
Not flagged 4,459 22,411 26,870
Total 6,636 23,364 30,000

\[P(D\mid F)=\frac{P(D\cap F)}{P(F)}=\frac{2177}{3130}\approx0.6955.\]

Finding: 69.6% of flagged records defaulted; 30.4% did not.

Source: UCI Default of Credit Card Clients, flag defined as PAY_0 >= 2.

Base-rate neglect: what is being neglected?

The base rate is the probability of default before using the flag, \(P(D)\).

Base-rate neglect means judging a flag while ignoring how common defaults are in the portfolio.

In the credit data, a base rate of 22.12% led to about 69.6% default among flagged accounts.

Suppose only 2% of a new portfolio defaults, while the conditional flag rates stay the same. Would a flag still imply a 69.6% default probability?

See the base rate through account counts

Imagine 1,000,000 accounts, with a 2% default rate.

Keep \(P(F\mid D)=0.3281\) and \(P(F\mid D^c)=0.0408\).

Account group Accounts Conditional flag rate Expected flagged accounts
Default, \(D\) 20,000 32.81% \(20{,}000\times0.3281=6{,}562\)
No default, \(D^c\) 980,000 4.08% \(980{,}000\times0.0408=39{,}984\)

\[P(D\mid F)=\frac{6{,}562}{6{,}562+39{,}984} =\frac{6{,}562}{46{,}546}\approx0.141.\]

The much larger non-default group contributes more flagged accounts, even with its lower flag rate.

Hypothetical portfolio; expected counts under the model, using the rounded UCI conditional flag rates.

Same flag rates, different base rates

Default base rate Flag given default Flag given no default Default given flag
22.12% 32.81% 4.08% About 69.6%
2% 32.81% 4.08% About 14.1%

In the second portfolio, a flag still raises the probability from 2% to about 14.1%.

Most flagged accounts do not default, because non-defaulting accounts are much more common.

Interpret the evidence together with the portfolio’s base rate.

First row: UCI credit records, rounded rates. Second row: hypothetical portfolio with unchanged conditional flag rates.

Random Variables

From outcomes to numbers

A random variable assigns a number to each possible outcome.

Use uppercase \(X\) for the variable and lowercase \(x\) for a possible value: \(P(X=x)\).

Type Possible values Banking example
Discrete A finite or countably infinite set Number of defaults: \(0,1,2,\ldots\)
Continuous Values over an interval Time until an application is reviewed

Define what is measured, for whom, and over what period.

A random variable counts defaults

For two independent loans, each with default probability \(0.1\), let \(X\) count defaults over the next year.

Outcomes Defaults \(x\) Probability \(P(X=x)\)
RR 0 0.81
RD or DR 1 0.18
DD 2 0.01

\[P(X=x)\ge0,\qquad \sum_xP(X=x)=1.\]

This table is the probability mass function (PMF) of \(X\).

Work out the expected loss

Two independent loans each have default probability \(0.1\).

Number of defaults \(X\) 0 1 2
Probability 0.81 0.18 0.01

Each default causes an illustrative £1,000 loss.

Calculate the expected total loss. Can any one pair of loans lose exactly that amount?

Expected value

The expected value is the probability-weighted mean of the possible values.

\[\mu=E(X)=\sum_x xP(X=x)\]

\[E(X)=0(0.81)+1(0.18)+2(0.01)=0.20\text{ defaults}.\]

At £1,000 per default, expected total loss is £200.

Variance of a random variable

\[\operatorname{Var}(X)=E[(X-\mu)^2]=\sum_x(x-\mu)^2P(X=x)\]

Standard deviation is \(\sigma_X=\sqrt{\operatorname{Var}(X)}\).

  • Variance averages the squared distance from the distribution mean.
  • SD expresses spread in the same units as \(X\).

Calculate the spread, one value at a time

For the default count, \(\mu=0.20\).

\(x\) \(P(X=x)\) \((x-0.20)^2\) \((x-0.20)^2P(X=x)\)
0 0.81 0.04 0.0324
1 0.18 0.64 0.1152
2 0.01 3.24 0.0324
Total 1 0.1800

\[\operatorname{Var}(X)=0.18,\qquad SD(X)=\sqrt{0.18}\approx0.424\text{ defaults}.\]

From counts to pounds

For constants \(a,b\) and \(Y=a+bX\),

\[E(Y)=a+bE(X),\qquad \operatorname{Var}(Y)=b^2\operatorname{Var}(X).\]

Here, total loss is \(L=1000X\) pounds.

Summary Default count \(X\) Loss \(L\)
Mean 0.20 £200
Variance 0.18 180,000 pounds squared
SD 0.424 £424.26

A fixed charge shifts the mean; scaling multiplies SD by \(|b|\).

Combining losses

For random losses \(U,V\) and fixed weights \(a,b\):

\[E(aU+bV)=aE(U)+bE(V).\]

If the losses are independent,

\[\operatorname{Var}(aU+bV)=a^2\operatorname{Var}(U)+b^2\operatorname{Var}(V).\]

Expected losses add even with dependence. The variance formula above needs independence.

Two independent losses or twice the same loss?

Suppose \(U\) and \(V\) are independent, each with mean \(\mu\) and variance \(\sigma^2\).

Quantity Mean Variance
Two independent losses, \(U+V\) \(2\mu\) \(2\sigma^2\)
Twice the same loss, \(2U\) \(2\mu\) \(4\sigma^2\)

\(U+U=2U\). Reusing the same random loss creates perfect dependence.

Probability Distributions

Discrete probability distributions

A probability distribution describes how probability is allocated across a random variable’s possible values.

For discrete \(X\), its probability mass function (PMF) is \[p(x)=P(X=x).\]

\[0\le p(x)\le1,\qquad \sum_xp(x)=1.\]

  • Possible values form a finite or countably infinite set.
  • Describe the same distribution using a table, graph or equation.

Use a PMF to add probabilities

Let \(X\) count defaults among the same two independent loans, each with default probability \(0.1\).

The earlier table can be written as \[p(x)= \begin{cases} 0.81,&x=0,\\ 0.18,&x=1,\\ 0.01,&x=2,\\ 0,&\text{otherwise}. \end{cases}\]

PMF bars at zero, one and two defaults have heights 0.81, 0.18 and 0.01. The bars at one and two are orange to show the event of at least one default.

\[P(X\ge1)=p(1)+p(2)=0.18+0.01=0.19.\]

Add the probability masses at the values belonging to the event.

Continuous probability distributions

A continuous random variable can take values across an interval or collection of intervals.

We model it with a probability density function (PDF), \(f(t)\).

\[f(t)\ge0,\qquad \int_{-\infty}^{\infty}f(t)\,dt=1.\]

The probability of an interval is its area under the density: \[P(a<T<b)=\int_a^bf(t)\,dt.\]

A continuous example: loan-review times

Let \(T\) be the time, in minutes, to review a loan application.

Density-scaled histogram of 500 simulated loan-review times between zero and twenty minutes. The five one-minute bins from ten to fifteen minutes are highlighted.

In this simulated sample, 203 of 500 reviews take between 10 and 15 minutes: \[\text{Sample proportion}=\frac{203}{500}=0.406.\]

Illustrative simulation of 500 review times; the histogram uses one-minute bins.

From a histogram to a continuous density

The same histogram of simulated review times appears behind the continuous density used to generate the sample. The curve and histogram share axes and a total area of one.

The histogram describes this sample. The density models how probability is distributed over review times.

Compare areas over intervals; a new sample would give a different histogram.

Illustrative density model and one sample of 500 simulated review times.

Probability is the shaded area

For the model, what is the probability of a review taking between 10 and 15 minutes?

The same review-time density has the area from ten to fifteen minutes shaded orange and labelled 0.3965. The sample histogram remains faintly visible behind the model.

\[P(10<T<15)=\int_{10}^{15}f(t)\,dt\approx0.3965.\]

Model probability: about 39.65%. The sample proportion was 40.6%.

An exact point has zero area

The same density and faint histogram show a single vertical line at exactly ten minutes. Its zero width gives zero area, even though the density at ten is positive.

\[P(T=10)=0,\qquad\text{although }f(10)=0.09375.\]

Zero probability does not make an exact value impossible in a continuous model.

A recorded time of 10.0 minutes represents a rounding interval.

A simple area calculation

Suppose an audit starts at a time \(T\) chosen uniformly over the next 10 minutes.

Flat density of 0.1 per minute from zero to ten minutes, with the interval from two to five minutes shaded and labelled area 0.30.

\[P(2<T<5)=\underbrace{(5-2)}_{\text{width}}\times \underbrace{0.1}_{\text{height}}=0.30.\]

Total area is \(10\times0.1=1\).

Discrete and continuous: what carries probability?

Discrete distribution Continuous distribution with a density
Function PMF: \(p(x)=P(X=x)\) PDF: \(f(t)\)
Individual value Can have positive probability \(P(T=t)=0\)
Interval or event Add the relevant probability masses Find the area under the density
Total probability \(\sum_xp(x)=1\) \(\int_{-\infty}^{\infty}f(t)\,dt=1\)
Banking example Defaults among two loans Time to review an application

A PMF gives probability at a value; a density gives probability through area.

Session 3 takeaway

  • The LLN connects a stable probability to the proportion observed over many trials.
  • Total probability combines group risks using the groups’ population shares.
  • Bayes’ rule updates a prior probability using new evidence and the base rate.
  • Expected value and variance describe the average and spread of a random loss.
  • Discrete probabilities add masses; continuous probabilities are areas under a density.

Next: choose models for individual outcomes, counts and waiting times, then explain why sample estimates vary.