Section 1 of 9

1 Before you start

Before you begin, take a few minutes to check what you already know and how confident you feel. You will see the same questions again at the end of the module — this helps both you and us measure what you have learned. Click an option for every question and confidence rating, then click Next to continue.

Pre-test

A probability is a number that must always lie in which range?

Pre-test

A calculation of the risk of a post-operative complication returns 1.4. What has most likely gone wrong?

Pre-test

In a clinic, 42% of patients are blood group A and 10% are group B, and no one is both. What is the probability a patient is group A or group B?

Pre-test

Two events are mutually exclusive when:

Pre-test

A rapid test works correctly with probability 0.95 on any one run, and two patients are tested on separate, unrelated cartridges. What is the probability both runs work correctly?

Pre-test

Two blood-pressure readings are taken on the SAME patient five minutes apart. Why is it wrong to multiply the two probabilities of being hypertensive to get the chance of two high readings?

Pre-test

In the notation P(disease given a positive test), what does conditioning on the positive test do?

Pre-test

How does the chance of disease given a positive test compare with the chance of a positive test given disease?

Pre-confidence

I can state that a probability must lie between 0 and 1, and spot an impossible value such as 1.4 as a sign of an error.

Not at all confident
Fully confident
Pre-confidence

I can apply the addition rule for mutually exclusive events and the multiplication rule for independent events, and say which rule a clinical question calls for.

Not at all confident
Fully confident
Pre-confidence

I can explain why repeated measurements on one patient are not independent, and why the chance of disease given a positive test differs from the chance of a positive test given disease.

Not at all confident
Fully confident
Section 2 of 9

2 Introduction

In Module 3 you summarised data you already had — a mean here, a proportion there. This part turns that around. Probability is the language for what you have not yet seen: the next patient, the next test result, the chance a finding is just noise. Every inference test later in the course — a t-test, a confidence interval, a p-value — rests on the handful of rules you build here.

This part of the module covers two foundations, the second leaning on the first:

  • Probability and its three rules — what a probability is, why it must lie between 0 and 1, and how to combine the chances of separate events with the addition and multiplication rules.
  • Independence and conditional probability — when one event changes the odds of another, why repeated measures on one patient are not independent, and the idea that powers every diagnostic test.

By the end of this part you will be able to state and apply the addition rule for mutually exclusive events and the multiplication rule for independent events, keep a probability inside the 0-to-1 scale, explain why two readings on the same patient are not independent, and read a conditional probability such as P(disease given a positive test) without confusing it with its reverse.

Try every snippet in the R Scratchpad on the right. This part needs no data file — you will build small examples by hand with c() and simple arithmetic, and let R confirm the numbers.

Section 3 of 9

3 What a probability is, and the three rules

A probability is a number between 0 and 1 that measures how likely an event is. A probability of 0 means the event never happens; 1 means it always happens; 0.5 is an even chance. A risk of 0.30 means thirty patients in every hundred, on average, experience the event.

A probability is a single number between 0 (the event never occurs) and 1 (it always occurs), and a value like 0.30 means the event is expected in 30 of every 100 people.
A probability is a single number between 0 (the event never occurs) and 1 (it always occurs), and a value like 0.30 means the event is expected in 30 of every 100 people.

Watch the scale. A probability can never exceed 1 or drop below 0. If a calculation hands you 1.4, you have made an error — most often by adding probabilities that should not have been added.

You will report risks as percentages in a paper, but R works in the 0-to-1 scale. A 30% risk is 0.30 to R. Convert in your head: multiply by 100 to read it aloud, divide by 100 to feed it back in.

Section 3.1 of 9

3.1 The addition rule: this OR that

Two events are mutually exclusive when they cannot both happen at once. A single patient's ABO blood group is exactly one of A, B, AB, or O — never two. For mutually exclusive events, the addition rule says the chance of one OR the other is the sum of their separate chances.

Because a patient's ABO blood group is exactly one mutually exclusive category, the chance of being group A or group B is simply P(A) + P(B).
Because a patient's ABO blood group is exactly one mutually exclusive category, the chance of being group A or group B is simply P(A) + P(B).

Suppose blood group A has probability 0.42 and group B has probability 0.10 in your clinic's population. The chance a patient is A or B is 0.42 + 0.10, which is 0.52. You add because no one can be both.

Try it out

Try this snippet in the R Scratchpad on the right.

Try this snippet
p_A <- 0.42
p_B <- 0.10
p_A_or_B <- p_A + p_B
p_A_or_B

The trap: adding probabilities when the events can overlap. If two events can happen together, plain addition double-counts the overlap. Knowing a patient is over 60 and knowing they smoke can both be true, so you cannot simply add those two probabilities.

Probabilities of two outcomes add only when the events are mutually exclusive, because overlapping events share outcomes that plain addition counts twice.
Probabilities of two outcomes add only when the events are mutually exclusive, because overlapping events share outcomes that plain addition counts twice.
Section 3.2 of 9

3.2 The multiplication rule: this AND that

Two events are independent when knowing one happened tells you nothing about the other. For independent events, the multiplication rule says the chance of one AND the other is the product of their separate chances.

Two events are independent when one outcome gives no information about the other, and for such events the chance of both happening is the product of their individual chances, P(A and B) = P(A) x P(B).
Two events are independent when one outcome gives no information about the other, and for such events the chance of both happening is the product of their individual chances, P(A and B) = P(A) x P(B).

Imagine a rapid test with a 95% chance of working correctly on any one run, and two patients tested on separate, unrelated cartridges. The chance both runs work is 0.95 * 0.95, which is 0.9025. You multiply because the two runs do not influence each other.

Try it out

Try this snippet in the R Scratchpad on the right.

Try this snippet
p_work <- 0.95
p_both <- p_work * p_work
p_both
When two events are independent, the chance that both happen is the product of their separate chances, so two test runs that each work with probability 0.95 both work with probability 0.95 times 0.95, which is 0.9025.
When two events are independent, the chance that both happen is the product of their separate chances, so two test runs that each work with probability 0.95 both work with probability 0.95 times 0.95, which is 0.9025.

The classic blunder lives here, and we meet it head-on next: multiplying probabilities for events that are not actually independent. The multiplication rule only holds when the events truly do not affect one another.

Section 4 of 9

4 Independence and conditional probability

The multiplication rule from the last section came with a condition: the events must be independent. In clinical data, that condition fails far more often than students expect. This section makes independence concrete and introduces the idea that powers diagnostic testing.

Plenty of clinical events are not independent. Smoking and lung-cancer risk move together — knowing someone smokes raises the chance of lung cancer. Treating dependent events as independent, then multiplying their probabilities, gives a badly wrong answer.

Two events are independent only if knowing one leaves the other's probability unchanged; because conditioning on smoking raises the lung-cancer probability from 5% to 25%, the events are dependent and their joint probability cannot be found by multiplying the separate probabilities.
Two events are independent only if knowing one leaves the other's probability unchanged; because conditioning on smoking raises the lung-cancer probability from 5% to 25%, the events are dependent and their joint probability cannot be found by multiplying the separate probabilities.

The trap that catches everyone: repeated measures on one patient. Two blood-pressure readings on the same person are not independent — a patient with high pressure at 9am is likely high at 9:05 too. So the chance of two high readings is not just one probability times itself. The readings share a cause: that patient.

Two measurements on the same patient are statistically dependent because they share a common cause (the patient), so their joint probability is far higher than the product of the individual probabilities.
Two measurements on the same patient are statistically dependent because they share a common cause (the patient), so their joint probability is far higher than the product of the individual probabilities.
Section 4.1 of 9

4.1 Conditional probability: P(A given B)

A conditional probability is the chance of one event once you already know another has happened. Write it P(A | B) and read it as the probability of A given B. The vertical bar means given — it narrows the world to only the cases where B is true.

A conditional probability P(A | B) is found by shrinking the sample space to only the outcomes where B is true, then asking how much of that smaller world is A.
A conditional probability P(A | B) is found by shrinking the sample space to only the outcomes where B is true, then asking how much of that smaller world is A.

A worked clinical reading: P(disease | positive test) is the chance a patient truly has the disease given that their test came back positive. That is exactly the number a clinician wants, and it is usually quite different from P(positive test | disease), the chance the test fires when disease is present.

Keep those two apart. P(A given B) and P(B given A) are different questions and usually different numbers. Swapping them is the single most common error in reading a diagnostic test. Turning one into the other is the job of Part II — for now, just hold the idea that the order inside the bar matters.

P(A given B) and P(B given A) answer different questions because conditioning fixes a different denominator: the same 9 true positives give a 90% test sensitivity but only a 33% chance of disease given a positive result.
P(A given B) and P(B given A) answer different questions because conditioning fixes a different denominator: the same 9 true positives give a 90% test sensitivity but only a 33% chance of disease given a positive result.
Section 5 of 9

5 Check your understanding

You have reached the end of the module. Try the same questions again — your answers here, paired with your pre-test answers, are how we measure what the module taught you. Answer every question and confidence rating, then click Submit and see results to view your score.

Post-test

A probability is a number that must always lie in which range?

Post-test

A calculation of the risk of a post-operative complication returns 1.4. What has most likely gone wrong?

Post-test

In a clinic, 42% of patients are blood group A and 10% are group B, and no one is both. What is the probability a patient is group A or group B?

Post-test

Two events are mutually exclusive when:

Post-test

A rapid test works correctly with probability 0.95 on any one run, and two patients are tested on separate, unrelated cartridges. What is the probability both runs work correctly?

Post-test

Two blood-pressure readings are taken on the SAME patient five minutes apart. Why is it wrong to multiply the two probabilities of being hypertensive to get the chance of two high readings?

Post-test

In the notation P(disease given a positive test), what does conditioning on the positive test do?

Post-test

How does the chance of disease given a positive test compare with the chance of a positive test given disease?

Post-confidence

I can state that a probability must lie between 0 and 1, and spot an impossible value such as 1.4 as a sign of an error.

Not at all confident
Fully confident
Post-confidence

I can apply the addition rule for mutually exclusive events and the multiplication rule for independent events, and say which rule a clinical question calls for.

Not at all confident
Fully confident
Post-confidence

I can explain why repeated measurements on one patient are not independent, and why the chance of disease given a positive test differs from the chance of a positive test given disease.

Not at all confident
Fully confident
Section 6 of 9

6 Your results

Here is how your post-test answers compare with your pre-test answers. The pre/post pairing is the most reliable way to see what this module actually taught you.

Your score

Submit the post-test to see your results.

Muddiest point

What is the one thing from this module that is still unclear to you?

Rate this module

Overall, how would you rate this module?

How likely are you to recommend this module to a peer? (0 = not at all, 10 = extremely likely)