Hypothesis Testing: Frequentist & Bayesian

Week 6 lecture

Open full screen ↗ Week 6 workshop → F full screen · S speaker notes · ? shortcuts

Explore it: Bayes' theorem as a population

Each square is one building. The left block holds the damaged buildings. The right block holds the intact ones. The black boxes hold the buildings that the PWTT damage detector flags: red if the building is really damaged, orange if it is intact. Purple buildings are damaged but missed, and green buildings are intact and not flagged. The colours are the same as on the maps. A flag is the alarm. The question is: if the alarm goes off, how likely is it that the building is really damaged? To answer it, count the squares inside both black boxes, and see what share of them is in the left block. That share is the posterior. The width of the left block is the prior, and the height of each black box is a likelihood.

PWTT damage detector: choose a city

Population

Bayes' theorem

Posterior = Likelihood × Prior Evidence

Accuracy of the model

Accuracy = TP+TNTP+TN+FP+FN

= + +

Table 1 of the paper gives "% damaged" as a share of buildings, not of building area. Damaged buildings are often large, so that share is lower than the area-weighted prior here.

  • Compare Kharkiv with Gaza. The detector is the same. Only the base rate (the prior) changes. In Kharkiv, about 2% of building area is damaged, so most flags are false alarms. In Gaza, about 62% is damaged, so most flags are real.
  • Drag the prior down. Keep the two likelihoods the same. The left block becomes narrow, and the posterior falls. A flag means less when damage is rare.
  • Press "Test it a second time". The posterior from the first test becomes the new prior. A second flag makes you much more sure than the first one did. (This assumes that the second test is independent of the first.)