Library
Chapter 5 of 26

From PPE Study Notes

Statistics & Data Literacy

Suppose you paid $24.80 for a train to a client meeting. On payday the fare is missing from your reimbursements. The expense system flagged your receipt for review. Your manager says the checks catch 90% of fraudulent claims. What are the odds that a flagged claim is fraudulent?

Ninety percent of what?

Suppose employees submit 10,000 claims in a month. A later audit establishes that 100 were fraudulent. The checks flagged 90 of those and 495 of the 9,900 legitimate claims. These are invented numbers. Each claim appears once.

The base rate of fraud is 1%. The checks have 90% sensitivity, the share of fraudulent claims they flag, and 95% specificity, the share of legitimate claims they leave alone.

Of 100 fraudulent claims, 90 are flagged and 10 missed. Of 9,900 legitimate claims, 495 are flagged and 9,405 cleared. Only 90 of the 585 flags indicate fraud.
To find the share of flags that indicate fraud, divide by all 585 flags.

The 90 correct flags are true positives. The 495 mistaken flags are false positives. So 90 ÷ 585, or about 15.4%, of flags indicate fraud. Think of the legitimate claims piled up on the reviewer's desk. A 5% error rate in that much larger group swamps the correct flags.

Bayes' theorem combines the prevalence of fraud with how often the system flags each kind of claim. Base rate neglect overlooks that prevalence. The false positive paradox occurs when a rare event produces fewer correct detections than false alarms, even with a reasonably accurate check.

Suppose next month only 20 claims out of 10,000 are fraudulent. If the two error rates hold steady, we'd expect 18 correct flags and 499 false alarms. About 3.5% of flags would indicate fraud even though the check still catches nine out of ten fraudulent claims. If the original rates came from testing only suspicious claims, we'd first have to check whether they hold for ordinary expenses.

Say you randomly select 20 flagged claims from a much larger pool and find fraud in three. A separate audit finds 30 out of 200. Both estimates are 15%. In these invented audits, a 95% confidence interval runs from about 5% to 36% for the smaller sample and from 11% to 21% for the larger one. If you repeat the sampling and apply the same procedure each time, about 95% of the intervals should include the true share, assuming the sampling model holds.

Suppose the manager would keep the current system only if at least one in four flags identified fraud. The small audit leaves that possibility open. The larger one gives the manager reason to reconsider. Sampling more appeals alone would give a tighter estimate for the people who appealed. To learn about all flags, you'd still have to sample claims nobody appealed.

Who never reaches the table?

Suppose appealing means finding your original receipt, filling in a form, and asking the client to confirm the meeting. You might do that for a week's hotel bill and give up on a train fare. A review of appeals alone will miss the errors people decided to live with. That's selection bias. The people whose claims you see differ from the wider group in a way that matters to the question.

Survivorship bias is one version. Ask only thriving restaurants how they got there and you miss restaurants that followed the same advice and closed. The earlier chapter on publication bias describes the equivalent problem for studies.

What changes when you separate departments?

In UC Berkeley's six largest graduate departments in 1973, 44.5% of men's applications and 30.4% of women's resulted in admission. Women had the higher rate in four of the six departments. How did those results add up to a gap in the other direction?

Berkeley's six largest graduate departments in 1973: women had higher admission rates in A, B, D and F; men in C and E. Across these departments, 1,198 of 2,691 male applicants and 557 of 1,835 female applicants were admitted.
The 4,526 applications are from six departments. Different application patterns change the totals.

Departments A and B accepted the largest shares of their applicants. They received 51.5% of men's applications and 7.2% of women's. That gave the two high admission rates far more weight in the men's total. This is the weighting behind Simpson's paradox. A pattern in the total can weaken or reverse once we account for the groups that make it up.

Keep each department's observed rates, but imagine that a sixth of each group's applications went to each department. The resulting averages are 38.1% for men and 41.7% for women. We changed only how much each department counted. Within-department results still went both ways, and the figures leave open why applicants went to different departments in the first place.

Treating the group rate as a statement about individuals can also mislead. The ecological fallacy would be inferring that higher-income residents were more often unemployed because neighbourhoods with higher average incomes had higher unemployment rates.

Improvement needs a comparison

Suppose employees who attend a fraud-awareness workshop submit fewer fraudulent claims. Attendance and fraud are correlated. The workshop may have helped. Conscientious employees may also have been more likely to sign up.

Say managers single out the branch with last month's highest error rate for training. Its rate falls. If a bad batch of receipts helped make last month unusually bad, the same branch might improve without training. That's regression to the mean, the tendency for extreme measurements partly due to temporary variation to be followed by less extreme ones.

A randomized controlled trial assigns the workshop by chance and compares outcomes with a control group. Quasi-experimental methods use other sources of variation to build a comparison under stated assumptions.

A null hypothesis specifies a claim to test, such as no effect from the workshop. A p-value gives the probability of a test statistic at least as extreme as the observed one, assuming the null hypothesis and statistical model. Statistical significance means the p-value crossed a chosen threshold, often 0.05. A low p-value alone tells you little about the effect size, the magnitude of the difference or relationship.

Recall how p-hacking and a garden of forking paths can make a small p-value easier to find. If twenty independent tests each have a 5% false-positive rate and all null hypotheses are true, the chance of at least one false positive is 1 − 0.95²⁰, about 64%. Real tests often share data, so check their dependence before using that calculation.

What does the chart make you see?

Inflation rises from 5.1% to 5.35%. In the first two panels below, the change is 0.25 percentage points. The truncated axis makes that change look steeper. A narrow line-chart scale can help readers see detail. Bars that represent amounts generally need a zero baseline.

The same six invented inflation rates on narrow and wide y-axis ranges, followed by a stock series with a short declining window highlighted
Scale and time window change what stands out.

Starting a chart near a peak and ending it at a dip can be cherry-picking. A dual-axis chart can make unrelated series look alike by giving them different scales. On a logarithmic scale, equal distances represent equal ratios. With area and volume distortion, the size of the symbol overstates the quantity. Doubling an icon's height and width quadruples its area.

What happens when a target becomes a political test?

In 1958, Mao Zedong launched the Great Leap Forward to accelerate agricultural and industrial production. Local officials faced ambitious grain targets and pressure to demonstrate political commitment. They could report a bumper crop without producing one. Goodhart's law warns that targeting a measure can weaken its connection to the goal.

The state could demand compulsory grain deliveries based on inflated reports, even when a village's harvest fell short. Collectivization and coercion helped turn production and procurement failures into famine. In 1959, defence minister Peng Dehuai lost his post after criticizing Great Leap policies at the Lushan Conference. An official who saw what happened to Peng had reason to think twice before correcting an impressive harvest report.

Ask your employer what share of flags were confirmed in an independent audit of a representative sample, including flags nobody appealed. Employees need a way to correct mistakes without spending more time disputing the fare than they spent on the train. If the department starts paying a bonus for clearing cases by Friday, check whether reviewers start waving through real fraud. The deadline changes what a cleared claim tells you.