Chapter 1: probability, conditional probability, contingency tables and ROC curves

Why health needs statistics, probability vocabulary, counting, conditional probability and Bayes' theorem, contingency tables, sensitivity, specificity, ROC curves.

Slides (78, in French) · PDF in French (4.7 MB) · Questions

The chapter in 10 points

Key point. With a sensitivity and a specificity of 99%, a positive test points to a sick person only about one time in eleven when the prevalence is 1/1000: a Bayes calculation, not clinical guidance.

  1. Statistics defines what is normal, measures variability (between patients, between measurements) and adjusts treatments: the concentration of a drug varies widely from one patient to another for the same dose.
  2. Correlation is not causation: a hidden variable can create an apparent link, and the wording of a question changes the probability being sought (the two-children paradox).
  3. A probability is a model; the limiting frequency is its frequentist interpretation. P(A ∪ B) = P(A) + P(B) − P(A ∩ B) and P(Ā) = 1 − P(A), where A ∪ B means “A or B”, A ∩ B means “A and B”, and Ā is the complement of A.
  4. Under equiprobability, one counts: favorable cases over possible cases, with the tools of combinatorics.
  5. Conditional probability: P(A | B) = P(A ∩ B)/P(B), read “probability of A given B”; for independent events, P(A ∩ B) = P(A) P(B).
  6. Total probability and Bayes' theorem: P(D | +) = P(+ | D) P(D) / P(+), where D is the event “the person has the disease” and + the event “the test is positive”.
  7. Evaluating a test: sensitivity Se = TP/(TP + FN), specificity Sp = TN/(TN + FP). TP and TN count the true positives and true negatives; FP and FN the false positives and false negatives.
  8. Positive and negative predictive values (PPV, NPV) depend on the prevalence p, the proportion of people with the disease: PPV = Se·p / [Se·p + (1 − Sp)(1 − p)], NPV = Sp(1 − p) / [Sp(1 − p) + (1 − Se) p].
  9. The ROC curve (receiver operating characteristic) plots the sensitivity Se against the false-positive rate 1 − Sp as the threshold varies. The area under this curve is the AUC (area under the curve). An AUC of 0.5 means no discrimination on average when the score is used to rank people; it does not by itself describe the usefulness of a decision.
  10. The choice of threshold depends on the use, the prevalence and the consequences of errors. Maximizing Youden's index (Se + Sp − 1) and minimizing the distance to the corner (0, 1) are two different criteria.

Open this experiment on its own page

The slides (in French)

The 78 slides of this chapter are in French. Their text is written out and searchable in the French chapter, which shows one slide at a time (arrow keys, deep links). The summary, the experiments and the FAQ above are the English reading of the same chapter; formulas and numbers are identical.

Open the slides → · Download the chapter (PDF in French, 4.7 MB)

Outline of the chapter

  1. Introduction (slides 1–2, in French)
  2. I. Why statistics matters in health (slides 3–12, in French)
  3. II. Probability (slides 13–31, in French)
  4. III. Applications (slides 32–41, in French)
  5. IV. Conditional probability (slides 42–54, in French)
  6. V. Contingency tables (slides 55–71, in French)
  7. VI. ROC curves (slides 72–78, in French)

Going further: questions and answers

Why does prevalence change the predictive value?

With Se = Sp = 99% and a prevalence of 1/1000, among 1000 people one expects 0.99 true positives and 9.99 false positives, hence a PPV close to 9%. This illustrates Bayes' theorem; clinical management depends on context and protocol.

What does an AUC of 0.8 mean?

For a score oriented toward the presence of disease, AUC = P(score of a sick person > score of a healthy person) + 0.5 P(tie). An AUC of 0.8 describes this ranking, not the individual probability of being sick, nor the quality at a given threshold.

Does the best threshold always maximize Se + Sp?

No. Youden's index and the distance to the ideal corner optimize different criteria; neither automatically encodes the clinical cost of errors. A decision needs, among other things, the prevalence and the respective consequences of false positives and false negatives.

Why is the Bayesian approach used to adjust a dose?

It combines knowledge of the population (a prior distribution of the pharmacokinetic parameters) with the patient's own measurements: a few blood samples are enough for an individual estimate, which is refined with each new measurement.

Course contents Chapter 2 →

These slides are not a handout: they accompany the lectures and cannot replace them (disclaimer of the course). Teaching material, not clinical advice. The slides and the PDF are in French. License CC BY 4.0: free reuse, including modification and commercial use, with credit to the author (Cyril Voyant).