Calibration “resolves” epistemic uncertainty by giving predictions that are indistinguishable from the true probabilities. Why is this still unsatisfying?

This is Jessica. The last day of the year is like a good time for finishing things up, so I figured it’s time for one last post wrapping up some thoughts on calibration. 

As my previous posts got into, calibrated prediction uncertainty is the goal of various posthoc calibration algorithms discussed in machine learning research, which use held out data to learn transformations on model predicted probabilities in order to achieve calibration on the held out data. I’ve reflected a bit on what calibration can and can’t give us in terms of assurances for decision-making. Namely, it makes predictions trustworthy for decisions in the restricted sense that a decision-maker who will choose their action purely based on the prediction can’t do better than treating the calibrated predictions as the true probabilities. 

But something I’ve had trouble articulating as clearly as I’d like involves what’s missing (and why) when it comes to what calibration gives us versus a more complete representation of the limits of our knowledge in making some predictions. 

The distinction involves how we express higher order uncertainty. Let’s say we are doing multiclass classification, and fit a model fhat to some labeled data. Our “level 0” prediction fhat(x) contains no uncertainty representation at all; we check it against the ground truth y. Our “level 1” prediction phat(.|x) predicts the conditional distribution over classes; we check it against the empirical distribution that gives a probability p(y|x) for each possible y. Our “level 2” prediction is trying to predict the distribution of the conditional distribution over classes, p(p(.|x), e.g. a Dirichlet distribution that assigns probability to each distribution p(.|x), which we can distinguish using some parameters theta.

From a Bayesian modeling perspective, it’s natural to think about distributions of distributions. A prior distribution over model parameters implies a distribution over possible data-generating distributions. Upon fitting a model, the posterior predictive distribution summarizes both “aleatoric” uncertainty due to inherent randomness in the generating process and “epistemic” uncertainty stemming from our lack of knowledge of the true parameter values. 

In some sense calibration “resolves” epistemic uncertainty by providing point predictions that are indistinguishable from the true probabilities. But if you’re hoping to get a faithful summary of the current state of knowledge, it can seem like something is still missing. In the Bayesian framework, we can collapse our posterior prediction of the outcome y for any particular input x to a point estimate, but we don’t have to. 

Part of the difficulty is that whenever we evaluate performance as loss over some data-generating distribution, having more than a point estimate is not necessary. This is true even without considering second order uncertainty. If we train a level 0 prediction of the outcome y using the standard loss minimization framework with 0/1 loss, then it will learn to predict the mode. And so to the extent that it’s hard to argue one’s way out of loss minimization as a standard for evaluating decisions, it’s hard to motivate faithful expression of epistemic uncertainty.

For second order uncertainty, the added complication is there is no ground truth. We might believe there is some intrinsic value in being able to model uncertainty about the best predictor, but how do we formalize this given that there’s no ground truth against which to check our second order predictions? We can’t learn by drawing samples from the distribution that assigns probability to different first order distributions p(.|x) because technically there is no such distribution beyond our conception of it. 

Daniel Lakeland previously provided an example I found helpful of the difference between putting Bayesian probability on a predicted frequency, where there’s no sense in which we can check the calibration of the second order prediction. 

Related to this, I recently came across a few papers by Viktor Bengs et al that formalize some of this in an ML context. Essentially, they show that there is no well-defined loss function that can be used in the typical ML learning pipeline to incentivize the learner to make correct predictions that are also faithful as expressions of the epistemic uncertainty. This can be expressed in terms of trying to find a proper scoring rule. In the case of first order predictions, as long as we use a proper scoring rule as the loss function, we can expect accurate predictions, because a proper scoring rule is one for which one cannot score higher by deviating from reporting our true beliefs. But there is no loss function that incentivizes a second-order learner to faithfully represent its epistemic uncertainty like a proper scoring rule does for a first order learner. 

This may seem obvious, especially if you’re coming from a Bayesian tradition, considering that there is no ground truth against which to score second order predictions. And yet, various loss functions have been proposed for estimating level 2 predictors in the ML literature, such as minimizing the empirical loss of the level 1 prediction averaged over possible parameter values. These results make clear that one needs to be careful interpreting the predictors they give, because, e.g., they can actually incentivize predictors that appear to be certain about the first order distribution. 

I guess a question that remains is how to talk about incentives for second order uncertainty at all in a context where minimizing loss from predictions is the primary goal. I don’t think the right conclusion is that it doesn’t matter since we can’t integrate it into a loss minimization framework. Having the ability to decompose predictions by different sources of uncertainty and be explicit about what our higher order uncertainty looks like going in (i.e., by defining a prior) has scientific value in less direct ways, like communicating beliefs and debugging when things go wrong. 

What is the minimum bloggable contribution?

The other day someone sent me an email pointing me to an online article, a statistical analysis criticizing an online article that was a reanalysis of data from an article that was a meta-analysis and literature review of a controversial topic that had been written about in some earlier published papers that were themselves literature reviews.

My correspondent was interested in my take, and I replied that the latest article made some good points and also some errors. I didn’t think I had anything useful to say on this one so I didn’t post on the topic.

Given that I’d already gone to the trouble of reading–OK, skimming–all these articles, and I can post here for free, arguably I could contribute in a useful way just with a short post explaining where I agreed with this new article and where I thought it went wrong. I have no real or perceived beefs with any of the people involved in this one, and I expect that whatever feedback I were to provide would be taken constructively, not defensively.

So why not post? The difficulty here would come not directly in my comments on those articles but rather in the necessary scaffolding: all the bits I’d need to add to avoid writing something that could be misinterpreted.

One of the challenges of writing, as compared to speaking, is that your words are just out there, interpreted without the benefit of intonation, context, and dialogue. This isn’t anything specific to blogging; the same issue can arise when communicating with people by email. Not that direct face-to-face conversation works either; it’s just that something written is just out there in some way.

So it’s a cost-benefit calculation: weighing my contributions to this particular discussion against the effort of constructing the scaffolding. In this case I decided the best option was to not bother.

But then I became interested in the meta-topic of when to post, so I wrote this, which I’ll schedule to appear in a few months.

Most popular posts of 2024

John Cook writes that he looked on Hacker News to see which of his posts were most popular: “I [Cook] didn’t look at my server logs, but generally the posts that get the most traffic are posts that someone submits to Hacker News.”

I don’t look at my server logs either–that way lies madness! My question is, how much should we trust the popularity ranking from Hacker News?

I don’t know much about Hacker News myself. I went there and entered statmodeling in the search box, and by default it lists in order of popularity. Here are the first two pages of the most popular from 2024:

Suspicious data pattern in recent Venezuelan election (https://statmodeling.stat.columbia.edu/2024/07/31/suspicious-data-pattern-in-recent-venezuelan-election/)
903 points|kgwgk|5 months ago|470 comments

Bayesian Statistics: The three cultures (https://statmodeling.stat.columbia.edu/2024/07/10/three-cultures-bayes-subjective-objective-pragmatic/)
309 points|luu|5 months ago|109 comments

The immediate victims of a con would rather act as if the con never happened (https://statmodeling.stat.columbia.edu/2024/01/07/french-bio-lab-research-scandal/)
230 points|Tomte|1 year ago|140 comments

Bad stuff going down at the American Sociological Association (https://statmodeling.stat.columbia.edu/2024/01/17/bad-stuff-going-down-at-the-american-sociological-association/)
129 points|Tomte|1 year ago|116 comments

Those correction notices, in full (https://statmodeling.stat.columbia.edu/2024/11/24/those-correction-notices-in-full-yes-its-possible-to-directly-admit-and-learn-from-error/)
128 points|Tomte|1 month ago|35 comments

Dean of Engineering at University of Nevada wrote a paper that’s bad (https://statmodeling.stat.columbia.edu/2024/02/06/its-bezzle-time-the-dean-of-engineering-at-the-university-of-nevada-gets-paid-372127-a-year-and-wrote-a-paper-thats-so-bad-you-cant-believe-it-i-mean-really-you-have-to-take-a-look-at-t/)
123 points|Tomte|11 months ago|79 comments

Defining Statistical Models in Jax? (https://statmodeling.stat.columbia.edu/2024/10/08/defining-statistical-models-in-jax/#comments)
118 points|hackandthink|3 months ago|18 comments

Critique of Freakonomics interview with psychologist Ellen Langer (https://statmodeling.stat.columbia.edu/2024/10/28/freakonomics-does-it-again-not-in-a-good-way-jeez-these-guys-are-credulous/)
94 points|nabla9|2 months ago|82 comments

Refuted papers continue to be cited more than their failed replications (https://statmodeling.stat.columbia.edu/2024/03/10/refuted-papers-continue-to-be-cited-more-than-their-failed-replications-can-a-new-search-engine-be-built-that-will-fix-this-problem/)
79 points|nabla9|10 months ago|34 comments

Well-known paradox of R-squared is still buggin me (https://statmodeling.stat.columbia.edu/2024/06/17/this-well-known-paradox-of-r-squared-is-still-buggin-me-can-you-help-me-out/)
71 points|luu|6 months ago|103 comments

Levels of fraud: One-time, Linear, and Exponential (https://statmodeling.stat.columbia.edu/2024/09/27/3-levels-of-fraud-one-time-linear-and-exponential/)
4 points|Tomte|3 months ago|0 comments

You can guarantee that the term “statistical guarantee” will irritate me (https://statmodeling.stat.columbia.edu/2024/07/05/you-can-guarantee-that-the-term-statistical-guarantee-will-irritate-me-heres-why-and-lets-go-into-some-details/)
4 points|Tomte|6 months ago|0 comments

Is it really “the economy, stupid”? (https://statmodeling.stat.columbia.edu/2024/05/11/is-it-really-the-economy-stupid/)
4 points|munichpavel|8 months ago|0 comments

What are the best scientific papers ever written? (https://statmodeling.stat.columbia.edu/2020/06/09/what-are-the-best-scientific-papers-ever-written/)
4 points|reqo|9 months ago|0 comments

Zotero now features retraction notices (https://statmodeling.stat.columbia.edu/2024/03/12/zotero-now-features-retraction-notices/)
4 points|Tomte|10 months ago|0 comments

“the income of the average American will double approximately every 39 years”? (https://statmodeling.stat.columbia.edu/2024/05/15/the-income-of-the-average-american-will-double-approximately-every-39-years-who-says-that-sort-of-thing-show-some-respect-for-uncertainty-dude/)
3 points|luu|7 months ago|2 comments

Prediction markets and the need for “dumb money” as well as “smart money” (https://statmodeling.stat.columbia.edu/2024/10/25/prediction-markets-and-the-need-for-dumb-money-as-well-as-smart-money/)
3 points|nabla9|2 months ago|1 comments

If you want to play tennis at the top level there’s a benefit to being ____ (https://statmodeling.stat.columbia.edu/2024/09/06/meritocracy-and-womens-tennis/)
3 points|noelwelsh|4 months ago|1 comments

Why bother engaging outside reviewers at all? (https://statmodeling.stat.columbia.edu/2024/12/14/the-most-interesting-part-of-the-story-is-that-the-publisher-went-through-all-these-steps-of-reviewing-and-revising-if-they-just-want-to-make-money-by-publishing-crap-why-bother-engaging-outside-re/)
3 points|Tomte|16 days ago|0 comments

ChatGPT o1-preview can code Stan (https://statmodeling.stat.columbia.edu/2024/10/22/chatgpt-o1-preview-can-code-stan/)
3 points|lr0|2 months ago|0 comments

Sean Carroll/Ellen Langer: Credulous, scientist-as-hero reporting (https://statmodeling.stat.columbia.edu/2024/10/19/carroll-langer-credulous-scientist-as-hero-reporting-from-a-podcaster-who-should-know-better/)
3 points|nabla9|2 months ago|0 comments

Freakonomics asks, “Why is there so much fraud in academia,” missing one reason (https://statmodeling.stat.columbia.edu/2024/09/14/freakonomics-asks-why-is-there-so-much-fraud-in-academia-but-without-addressing-one-big-incentive-for-fraud-which-is-that-if-you-make-grabby-enough-claims-you-can-get-features-in-freako/)
3 points|nabla9|4 months ago|0 comments

Google is violating the First Law of Robotics (https://statmodeling.stat.columbia.edu/2024/07/16/google-is-violating-the-first-law-of-robotics/)
3 points|nabla9|6 months ago|0 comments

Best way to understand how a method works? Construct scenarios where it fails (https://statmodeling.stat.columbia.edu/2024/05/25/break-it-to-grok-it-the-best-way-to-understand-how-a-method-works-is-go-construct-scenarios-where-it-fails/)
3 points|rossdavidh|7 months ago|0 comments

Infovis, Infographics, and Data Visualization (https://statmodeling.stat.columbia.edu/2024/04/18/infovis-infographics-and-data-visualization-my-thoughts-12-years-later/)
3 points|Tomte|9 months ago|0 comments

What is the prevalence of bad social science? (https://statmodeling.stat.columbia.edu/2024/04/06/what-is-the-prevalence-of-bad-social-science/)
3 points|Tomte|9 months ago|0 comments

The Contrapositive of “Politics and the English Language.” (https://statmodeling.stat.columbia.edu/2024/03/25/the-contrapositive-of-politics-and-the-english-language-one-reason-writing-is-hard/)
3 points|luu|9 months ago|0 comments

The Contrapositive of “Politics and the English Language.” (https://statmodeling.stat.columbia.edu/2024/03/25/the-contrapositive-of-politics-and-the-english-language-one-reason-writing-is-hard/)
3 points|Tomte|9 months ago|0 comments

How can a top scientist be so confidently wrong? (2022) (https://statmodeling.stat.columbia.edu/2022/06/08/how-can-a-top-scientist-be-so-confidently-wrong-r-a-fisher-and-smoking-example/)
3 points|EndXA|10 months ago|0 comments

Michael Lewis (https://statmodeling.stat.columbia.edu/2024/02/22/michael-lewis/)
3 points|luu|10 months ago|0 comments

Is Matthew Walker’s “Why We Sleep” Riddled with Scientific/Factual Errors? (2019) (https://statmodeling.stat.columbia.edu/2019/11/18/is-matthew-walkers-why-we-sleep-riddled-with-scientific-and-factual-errors/)
3 points|Tomte|10 months ago|0 comments

Clinical trials that are designed to fail (https://statmodeling.stat.columbia.edu/2024/02/11/clinical-trials-that-are-designed-to-fail/)
3 points|Tomte|11 months ago|0 comments

Number of inline code comments is zero. Nada. Zilch. Nil. Naught (https://statmodeling.stat.columbia.edu/2024/02/07/when-all-else-fails-add-a-code-comment/)
3 points|thaumasiotes|11 months ago|0 comments

The Onion (ok, an Onion-affiliate site) is plagiarizing. For reals (https://statmodeling.stat.columbia.edu/2024/01/01/the-onion-ok-an-onion-affiliate-site-is-plagiarizing/)
3 points|Tomte|1 year ago|0 comments

The rise and fall of Seth Roberts and the Shangri-La diet (2023) (https://statmodeling.stat.columbia.edu/2023/11/20/the-rise-and-fall-of-seth-roberts-and-the-shangri-la-diet/)
2 points|sowbug|1 month ago|1 comments

Prediction markets need dumb money as well as smart money (https://statmodeling.stat.columbia.edu/2024/10/25/prediction-markets-and-the-need-for-dumb-money-as-well-as-smart-money/)
2 points|johndcook|2 months ago|1 comments

Whassup with those economists who predicted a recession that then didn’t happen? (https://statmodeling.stat.columbia.edu/2024/05/31/whassup-with-those-economists-who-predicted-a-recession-that-then-didnt-happen/)
2 points|_pfco|7 months ago|1 comments

Harvard time baby: completely botched data but you don’t change your conclusions (https://statmodeling.stat.columbia.edu/2024/12/12/harvard-lexicon-kerfuffle-is-what-you-call-it-when-you-completely-botched-your-data-but-you-dont-want-to-change-your-conclusions/)
2 points|nabla9|17 days ago|0 comments

What it takes to conclude that a research seam has been mined to exhaustion (https://statmodeling.stat.columbia.edu/2024/11/26/i-wonder-just-what-it-takes-to-get-people-to-conclude-that-a-research-seam-has-been-mined-to-the-point-of-exhaustion/)
2 points|domofutu|1 month ago|0 comments

Andrew Gelman is not the science police because there is no science police (https://statmodeling.stat.columbia.edu/2024/11/21/andrew-gelman-is-not-the-science-police-because-there-is-no-such-thing-as-the-science-police/)
2 points|Tomte|1 month ago|0 comments

I guess I should be thanking kgwgk, luu, nabla9, Tomte, and the rest of the gang for linking to us! It’s interesting how many of the links come from the same few Hacker News participants.

Also, I don’t know what these “points” represent. 2 points doesn’t sound like a lot, which is kind of a bummer . . . I put so much effort into writing these posts, I’d always appreciate more readers!

A very interesting discussion by Roy Sorensen of the interesting-number paradox

There’s this mathematical joke that all numbers–more precisely, all positive integers–are interesting. As Roy Sorensen puts it:

Mathematicians are fond of Edwin Beckenbach’s (1945) argument:

A. If some [positive] integer is not interesting, then there is a least such integer.

B. If some integer is the first uninteresting integer, then that fact makes the integer interesting.

C. Therefore, all integers are interesting.

The sophism has attracted no philosophical commentary because of a trivializing resemblance to Berry’s paradox and the sorites.

I’d not heard of either Berry’s paradox or the sorites–you can look them up yourself on wikipedia. Indeed, you can find a whole list of paradoxes of self-reference.

Sorensen’s article is fun and thought-provoking. The full reference is Roy Sorensen (2011). Interestingly dull numbers. Philosophy and Phenomenological Research 82, 655-673.

Here’s how he resolves the paradox:

My main objection is to premise B (`If some integer is the first uninteresting integer, then that fact makes the integer interesting’) of Beckenbach’s sophism. . . .

I [Sorensen] agree with Beckenbach that some numbers are interesting. . . . But I also think that there are infinitely many uninteresting integers. Since the dull integers must start somewhere, there must be a first one — even if the vagueness of `dull’ makes it impossible to specify which it is. . . .

Beckenbach bases premise B on the fact that any instance of D will imply E:

D. It is interesting that n is the first uninteresting integer.

E. Therefore, n is an interesting integer.

My counter-explanation of the unsoundness is that the inference is invalid. . . .

Sorensen’s key point is that a number can be embedded in an interesting statement without itself being interesting. Suppose, for example, we say that each of the integers from 0 through 20 are interesting, as are 23 and 24, but that 21 and 22 are dull (with the terms “dull” and “interesting” depending on context; the set of numbers that are interesting to a sports fan could differ from the set of numbers that are interesting to a mathematician; and also conditional on the level of focus, as the harder you look the more likely it is that you can find something interesting; but that doesn’t affect the paradox, it’s just a matter of definition). It’s arguably an interesting statement that 21 is the smallest dull positive integer, but that doesn’t make 21 itself interesting.

Sorensen gives several examples of that sort of thing:

An uninteresting fact can embed an interesting fact. (For instance, it is interesting that the coastline of Norway is longer than the coastline of the United States but it is not interesting that this fact is interesting.) The case for D centers on the dual of this embedding principle: An interesting fact can incorporate a dull fact.

Indeed, it can be interesting that a fact is dull . . . `873 is the difference between the squares of two consecutive integers’ looks interesting. But actually this fact is not interesting; any odd number greater than 1 is the difference between the squares of two consecutive integers. The dullness of `873 is the difference between the squares of two consecutive integers’ is interesting because this dullness is explained by an interesting generality.

Undistinctiveness is just one genre of instructive dullness. The monotony of `The decimal expansion of 1/9 is .111….’ is a sign that it is a non-terminating fraction. The enervating patternlessness of the decimal expansion of π is a sign that it is a transcendental number.

In an early example of computer program, Alan Turing analyzed chess into a sequence subtasks. The more menial he made the sub procedures, the more interest he added to the overall effect. Turing’s chess programs breathed new life into homuncular models of psychological processes. . . .

In defense of conceptual analysis, I say the dullness of an identity statement often promotes the interest of the analysis. Consider contested identities. Students at first deny 1 = .999…. The teacher then points out that 1/3 = .333…. and 1/3 x 3 = 1. This conjunction of trivial truths makes most students regard 1 and .999…. as alternate numeric representations of the same number. They stop viewing 1 = .999…. as a near miss and start regarding it as trivially true. In the final analysis, the interesting fact is not that 1 = .999…. Just the opposite! The interesting fact is that `1 = .999….’ is dull.

Or, for an even simpler example, you can write an article with about the color green, without that article itself being green.

The questions become more subtle when we move between mathematics and the social world (including the very use of base 10 as a social convention):

A dull number can be denoted by an interesting numeral. In hexadecimal (base 16), 570005 is denoted by DEAD. . . .

Once we become sensitized to the distinction between using an expression and merely mentioning it, we become more discriminating about the means by which a number can inherit interest from a fact. . . .

In mathematics, inheritance is restricted to internal relations. The interest of `92 is the number of different arrangements of 8 non-attacking queens on an 8 x 8 chessboard’ is assigned to chess rather than 92 because chess is an alien relatum.

People relate interestingly to numbers but the interest of these relationships attaches to people. The interest of `The grandmaster Bobby Fisher died at 64, the number of squares on a chessboard’ attaches to Fisher, not 64.

Plutarch remarks that “The Pythagoreans also have a horror for the number 17, for 17 lies exactly halfway between 16, which is a square, and the number 18, which is the double of a square, these two, 16 and 18, being the only two numbers representing areas for which the perimeter equals the area”. This is an interesting fact about Pythagoreans. Their horror does not add to the interest of 17 (though 17 may accrue interest from the mathematical relationship that troubled the Pythagoreans).

In 1866, sixteen year old B. Nicolò I. Paganini found the small amicable pair (1184, 1210). . . . Paganini’s amicable pair is interesting in that it partly answers `Which are the amicable pairs?’. But it is more interesting as evidence for the psychological question `How reliable were the great mathematicians?’. Mathematicians are reluctant to credit a pair of numbers with the interest that attaches to contingent facts about it.

Another obstacle to crediting interest to Paganini’s numbers 1184 and 1210 is that they are interesting as a pair. Interest in a pair need not pass down to the individuals comprising the pair (just as a husband and wife can each be bores and yet be interesting as a couple).

Also this:

The robustness of interesting dullness is manifested by the sheer volume of commentary on boredom. Philosophers marvel at the power of this motivational vacuum. . . . Social scientists agree that just as there can be sober studies of inebriation, there can be interesting studies of tedium, repetition, and apathy. . . .

When astronomers explain away coincidences with an identity hypothesis, loss of wonder is experienced as insight. Demystification is a sign of explanatory progress.

The balance of boredom

Sorensen’s article is full of striking insights, for example:

Satiation differs from boredom in that you can exit. The gorged gourmand just leaves the restaurant. But the dishwasher is obliged to stay. World weary, the dishwasher can only escape into daydreams and diversions. Boredom correlates with understanding. So there is some temptation to compress Heidegger into two lines: To understand everything is to be bored by everything. So everything is boring.

But boredom can also be produced by incomprehension or a slight distraction (too small to be recognized as the true cause of one’s inability to focus). The laggard is too far behind to make sense of the lesson. The prodigy is too far ahead to find the lesson stimulating. The interested student lies in between, challenged but not overwhelmed.

Prudent students monitor their boredom to check whether they have deviated from this balance. The vain misconstrue the boredom of incompetence as the boredom of mastery.

Relation to the philosophy or sociology of science

The discussion in the second half of Sorensen’s article reminds me of some things we’ve talked about regarding bad science:

1. My false theorem. I proved a false theorem once! Here’s the original article (Andrew Gelman and T. P. Speed (1993), Characterizing a joint probability distribution by conditionals, Journal of the Royal Statistical Society B 55, 185-188), and here’s the correction notice, from 1999. Embarrassingly for us, the falseness of our claim was shown by a one-line counterexample. Here’s the relevance to the present discussion: I always referred to this as our “false theorem,” but then someone pointed out that it’s not a theorem if it’s false! So what word to use? “Conjecture” doesn’t seem quite right, because we were offering it as a theorem, not a hypothesis. “Claim” is better, but that doesn’t convey that we were not just saying that a particular statement was true; we were claiming we’d proved it. I think this difficulty in explaining is “real,” not just a matter of the lack of a good word in English for “claimed proof.”

2. Evidence vs. truth. We’ve talked about this many times, for example here, here, and here. I think this is a big issue with problematic science, that researchers will make a claim that might well be true, but they don’t offer good evidence. When a scientific paper P is published claiming to demonstrate statement X, what the paper is really claiming is not “X is true” but rather “P contains strong evidence in favor of the truth of X.” When an outsider (such as me!) criticizes the paper’s “methods,” we’re typically arguing against that second claim, i.e. we’re saying that P does not contain strong evidence in favor of the truth of X. The original authors of the paper will typically respond with some version of, “We believe that X is true,” which might be fine, but I think it impedes the discussion for them to not first accept that P does not contain strong evidence in favor of the truth of X–or at least to address the outsider’s criticism on that level.

3. Big if true. This comes up a lot, for example studies of extra-sensory perception, or the claim that women are three times more likely to wear red or pink clothing during certain times of the month, or claims that subliminal messages can cause huge opinion swings, or claims of a stolen election in 2020, or various other topics we’ve covered in this space over the years: these claims are implausible on their face, and a careful look at the published evidence offered in their support do not change this assessment. But, if they were true, they’d be interesting! Thus, as Sorensen discusses, these are statements whose interestingness depends on their truth value.

P.S. I just wrote this post this morning. The next slot on the schedule is in May, but I bumped today’s scheduled post and stuck in this one instead, because the topic is so interesting (to me). Really.

Sorry, NYT, but, yes, “Equidistant Letter Sequences in the Book of Genesis” was junk science

From the New York Times:

It sounds like a headline ripped from a supermarket tabloid: In 1994, three Israeli researchers claimed to have found a secret code embedded in Genesis, the first book of the Old Testament.

But this wasn’t junk science.

Ahhhh . . . but it was!

The Times continues:

The paper in which they revealed their findings appeared in an esteemed, peer-reviewed journal. And the academic reputations of the three authors — Eliyahu Rips, Yoav Rosenberg and Doron Witztum — were unimpeachable, especially that of Dr. Rips.

The reporter’s mistake was to think that, just cos something’s authored by professors at a legitimate journal and published in a reputable journal, that it can’t be junk science.

An understandable mistake to make in 1994, but hard to support nowadays. Lucky golf ball, anyone?

P.S. I remember talking with Dave Krantz a couple years after that Bible code paper came out. Some of his colleagues were really bothered by it and went to the trouble of figuring out and explaining what was going on. Dave was kind of irritated that they were wasting any time on it at all, and I just thought the whole thing was a big joke.

In retrospect I think Dave and I should’ve shown more respect to the debunkers. The Bible code paper was an early example of junk science leveraging the authority of the academic community to get publicity.

The junk-science-to-journal-to-NPR/Ted pipeline must have seemed like a great deal for everyone at the time: more publicity for researchers, more credibility for unconventional scientific claims, more fun feature stories for the news media. And for awhile it seemed to be going just fine, turning Malcolm Gladwell into a New Yorker celebrity, powering the Freakonomics franchise, and providing raw material for Jeffrey Epstein’s Edge Foundation. The Pizzagate and Shreddergate researchers became wildly successful, and even fringe players such as the beauty-and-sex-ratio guy were able to land book contracts. Formerly obscure law professors got to mingle with Henry Kissinger! It was boom time in This Week in Psychological Science.

Eventually the weight of the junk science overwhelmed the system, and ultimately I think that the whole thing was a bit of a deal with a devil: In the short term, academic social science got lots of publicity, and a few well-placed and credulous or unscrupulous professors became media stars. In the medium term, academic journals justly lost much of their authority. In the longer term, who knows.

Bayesian inference (and mathematical reasoning more generally) isn’t just about getting the answer; it’s also about clarifying the mapping from assumptions to inference to decision.

Palko writes:

I’m just an occasional Bayesian (and never an exo-biologist) so maybe I’m missing some subtleties here, but I believe educated estimates for the first probability vary widely with some close to 0 and some close to 1 with no good sense of the distribution. Is there any point in applying the theorem at that point? From this Wired article:

If or when scientists detect a putative biosignature gas on a distant planet, they can use a formula called Bayes’ theorem to calculate the chance of life existing there based on three probabilities. Two have to do with biology. The first is the probability of life emerging on that planet given everything else that’s known about it. The second is the probability that, if there is life, it would create the biosignature we observe. Both factors carry significant uncertainties, according to the astrobiologists Cole Mathis of Arizona State University and Harrison Smith of the Earth-Life Science Institute of the Tokyo Institute of Technology, who explored this kind of reasoning in a paper last fall.

My reply: I guess it’s fine to do the calculation, if only to make it clear how dependent it is on assumps. Bayesian inference isn’t just about getting the answer; it’s also about clarifying the mapping from assumptions to inference to decision.

Come to think about it, that last paragraph remains true if you replace “Bayesian inference” with “Mathematics.”

Announcing two new members of our blogging team . . .

. . . Nick Hornby and David Roche!

Just kidding.

Really, though, these guys are great and should be blogging for us.

Nick Hornby you know about. He’s the author of High Fidelity, the book that Phil once said that no woman should be allowed to read because it’s a cheat code for understanding guys. I’ve been reading an old collection of his book columns for the Believer, and it’s so bloggy . . . it would fit in so well right here. OK, he’s not gonna be blogging here; his monthly blog (I guess that’s too low a frequency of posts to be a “blog,” so let’s call it a “colummn”) is here . . . I guess I’ll put it in the Blogs We Read page.

Hornby’s what I’ve called a writer in the David Owen mode (that is, David Owen the American journalist, not David Owen the British politician): serious, earnest, somewhat intelligent but a bit of a blockhead. Which I mean in a good way. Not clever-clever or even clever, but he wants to get things right. There’s kind of a paradox: Hornby’s shtick is that he’s an unpretentious regular guy, writing about unpretentious regular guys—also, though, he’s a brilliant and successful author. It’s a little different than John Updike, who wrote about his uncultured hero Rabbit, while maintaining the urbane “Updike” character for his public image. Also different from Kingsley Amis, who basically tore himself apart in his attempt to be the regular guy befitting his literary and political ideology. In his blogging columns, Hornby is pretty upfront about the tension between his literary-intellectual and regular-guy personas.

Our other new blogger (not really) is David Roche, who I’d never heard of until I read this interview of him by Dennis Young. Roche is a funny guy, also very analytical, would be a good blogger for us. Like Hornby, he also has a column, but it’s in Trail Runner magazine, and it’s full of articles like “New Study Shows Strategically Reduced Carbohydrate Intake Does Not Improve Performance,” and I could care less about trail running. That interview, though, it’s great.

Here’s a sample:

A few studies have come out with athletes pushing 120 grams of carbs per hour, showing improved fatigue resistance late in events. But my mind was opened to how I could solve the Leadville equation during Stage 18 of the Tour de France. Victor Campenaerts won the stage unexpectedly, and after the stage, his sponsor Precision Fueling & Hydration released his data (rare in cycling, where everyone holds secrets like they’re Gollum). He did 132 g/hr, pushing closer to 150 g/hr at times. I had never heard of anyone trying that and succeeding at such a high level. So I went for it, and I think I showed that it’s possible in running too.

Cycling is conducting the biggest uncontrolled performance experiment in the world. In ultras, the margins of human performance are not here yet. I was 1.6 percent ahead of Matt Carpenter, and I bet someone is going to be a few percent ahead of me. In cycling, everyone has (very roughly) the same power at baseline. When the margins are that narrow, the best training/fueling wins, and that’s one reason why doping has such a troubled history in that sport—it’s a confounding variable that fucks up a true understanding of human biking performance over longer time horizons.

All this self-experimentation . . . he’s kind of like a sane Seth Roberts.

Softmax is on the log, not the logit scale

Bad Stan naming

I realized recently that we followed the confusing terminological convention of ML in our description of Stan’s categorical_logit function. In Stan, if there’s a suffix to a distribution, it describes the scale of one or more of the parameters. For example,

poisson_log(y | u) == poisson(y | exp(u)).

So when we write categorical(y | p) we take p to be a simplex (sequence of finite, non-negative values that sum to 1). So it would make sense that categorical_logit(y | logit(p)) would be equivalent, where logit(p) = log(p / (1 - p)). But that’s not how it works in Stan. Instead,

caetgorical_logit(y | u) = categorical(y | softmax(u)).

We made the same mistake everyone on ML makes in their variable naming! We call the u here “logits”, when in fact they’re (unnormalized [see below]) log probabilities. This is probably due to the fact that if u is a regression, then the resulting system is called “multinomial logistic regression.”

Example

The softmax function is defined by softmax(u) = exp(u) / sum(exp(u)). When used like this, the arguments to softmax are log probabilities, not logit probabilities. Here’s a little snippet of Python to illustrate (the style sheet is adding the extra space, not me, and I don’t want to fix it manually in this post with a hack because it’ll mess up the page if the style sheet is ever fixed).


>>> p = np.asarray([0.2, 0.5, 0.3])

>>> def logit(p): return np.log(p / (1 - p))
...

>>> logit_p = logit(p)

>>> log_p = np.log(p)

>>> sp.special.softmax(logit_p)
array([0.14893617, 0.59574468, 0.25531915])

>>> sp.special.softmax(log_p)
array([0.2, 0.5, 0.3])

This shows that for the round trip probabilities through softmax, the appropriate operation is the natural logarithm, not the logit function.

Origin of the confusion

So where did this confusion come from? Let’s look at a standard binary logistic regression. There we take


p(y | alpha, beta, x) = bernoulli(y | inv_logit(alpha + beta * x))

where

inv_logit(v) = exp(v) / (1 + exp(v)).

Writing inverse logit this way suggests how to write a logistic regression with a categorical distribution and softmax.


p(y | alpha, beta, x) = categorical(y | softmax([0, alpha + beta * x]))

that’s because

softmax([0, alpha + beta * x])
= [exp(0), exp(alpha + beta * x)] / (exp(0) + exp(alpha + beta * x))
= [1, exp(alpha + beta(x)] / (1 + exp(alpha + beta * x))
= [1 / (1 + exp(alpha + beta * x), exp(alpha + beta * x) / (1 + exp(alpha + beta * x)]
= [1 - inv_logit(alpha + beta * x), inv_logit(alpha + beta * x)],

This derivation shows that the probability of the categorical in this formulation returning 1 is inv_logit(alpha + beta * x). But this connection falls apart in the multinomial case when there are more than two outcomes.

In traditional frequentist K outcome multinomial logistic regressions, the first input to softmax is pinned to 0 for identifiability just as in the binary case.

softmax([0, u[2], ..., u[K1])
= [exp(0), exp(u[2]), ..., exp(u[K])] / (exp(0) + exp(u[2]) + ... + exp(u[K]))

This leads to asymmetry in the regression as we don’t have a regression for the first element. What it does do is make softmax and log proper inverses. If you reduce the choice to just the first category and some other category, then you get a standard binomial logistic regression again. But you still can’t round trip the multinomial case with logit, because


exp(u[2]) / (exp(0) + exp(u[2]) + ... + exp(u[K])) != inv_logit(u[2])

To see that this is still not going to produce logits in the multinomial case, here’s some more Python.


>>> log_p
array([-1.60943791, -0.69314718, -1.2039728 ])

>>> log_p_zero = log_p - log_p[0]

>>> log_p_zero
array([0. , 0.91629073, 0.40546511])

>>> sp.special.softmax(log_p_zero)
array([0.2, 0.5, 0.3])

So as you can see, softmax isn’t identified without pinning one of the values—we can add or subtract a constant from each element of the input and get the same value. But this still doesn’t turn the inputs to softmax into logits.

>>> def inv_logit(v): 1 / (1 + exp(-v))
…

>>> inv_logit(log_p_zero)
array([0.5 , 0.71428571, 0.6 ])

So you can see that the input 0.91629073 is not the logit of the probability even when pinning a value to zero to identify.

P.S. I really miss being able to write math on the blog and really hate that all my old posts with math no longer render. Maybe if Andrew reminds us why it went away, someone will have a suggestion on how to fix.

Data manipulation in the world of long-distance swimming!

The story is here. It’s kind of like the Excel error in that famous economics paper, except that (a) it seems to have been on purpose, not an accident (according to the alleged perp, “The hacker has hacked into my administrative account and is using my accounts to make changes”), and (b) it did not do any damage to the world economy, it just enabled a fictionalized story to be presented as fact in a Hollywood movie.

So, no biggie except for people involved in long-distance swimming—for them it’s a big deal.

How to cheat at Codenames; cheating at board games more generally

This is a good post for Christmas Day, with all of you at home with your families playing board games.

Dan Luu has an amusing post explaining how you can win Codenames by just memorizing the configurations of the 40 setup carts. The basic strategy is to play your best until you can figure out the unique configuration, then you win. The fun part is that if you’re playing against a team that hasn’t learned this memorization trick, then you can win even if you don’t guess any words yourself—you just take advantage of the config information that you get from their correct guesses (along with any wrong guesses that come up)! If both teams have memorized the 40 cards, then you get to a new level of strategy.

As Luu says, no one would want to play Codenames in this way. The whole point of the game is to guess the words; if you’re gonna do it by memorizing patterns, why play the game in the first place? On the other hand, he also points out that once this information is there, you can’t un-see it. So it’s a balance.

This comes up in the rules of Codenames itself: you’re not allowed to give clues that suggest the position of the word on the grid, nor are you allowed to make faces or otherwise give clues as people are guessing. It can be hard to avoid giving this information sometimes!

More generally, most games can be “cracked” through a backdoor approach in some way or another. Here’s how Luu puts it:

Personally, when I run into a side-channel attack in a game or a game that’s just totally busted if played to win . . . I think it makes sense to try to avoid “attacking” the game to the extent possible. I think this is sort of impossible to do perfectly in Codenames because people will form subconscious associations (I’ve noticed people guessing an extra word on the first turn just to mess around, which works more often than not — assuming they’re not cheating, and I believe they’re not cheating, the success rate strongly suggests the use some kind of side-channel information. That doesn’t necessarily have to be positional information from the cards, it could be something as simple as subconsciously noticing what the spymasters are intently looking at.

Dave Sirlin calls anyone who doesn’t take advantage of any legal possibility to win is a sucker (he derogatorily calls such people “scrubs”) (he says that you should use cheats to win, like using maphacks in FPS games, as long as tournament organizers don’t ban the practice, and that tournaments should explicitly list what’s banned, avoiding generic “don’t do bad stuff” rules). I think people should play games however they find it fun and should find a group that likes playing games in the same way. If Dave finds it fun to memorize arbitrary info to win all of these games, he should do that. The reason I, as Dave Sirlin would put it, play like a scrub, for the kinds of games discussed here is because the games are generally badly broken if played seriously and I don’t personally find the ways in which they’re broken to be fun.

It gets tricky sometimes, though. Consider those goofy words that are in the Scrabble dictionary but aren’t really words, for example ef (“the letter F”) or po (“a chamber pot”). These are not English words! On the other hand, when you’re actually playing and you see an opportunity for ef or po or whatever, it’s hard to deny yourself the opportunity. In that case, there’s an easy solution: the rules allow the players to agree on any dictionary ahead of time, so no need to use the Scrabble dictionary. On the other hand, this will annoy serious players.

There’s more of gray area with collusion, which can “break” almost any multiplayer game. In poker, collusion is a form of cheating. I don’t know how casinos or informal games monitor or enforce the rule against collusion, but you’re not supposed to do it. You’re allowed to lie in poker but not to cheat.

But what about a game such as Monopoly or Risk where bargaining is part of the game? Here’s a simple strategy in a 3-player game of Monopoly that will up your odds of winning from 1/3 to nearly 1/2: Before the game begins, pick one of the other players and agree to flip a coin, after which the winner of the flip will devote all their effort to helping the other player win. That’s easy enough to do: just buy whatever property that comes up and sell to the other player for $1. It won’t guarantee a win but it’s gotta take the win probability to very close to 100%. Similarly with Risk. Now, nobody’s gonna play this way because it’s no fun (except maybe once as a joke). To put it another way, “winning a game of Monopoly or Risk” does not have much positive value in itself; the fun is in winning the game legitimately. Again, though, there is a gray zone, and other players will rightly get annoyed if they see player A deliberately trying to help player B without there being a good reason in the context of a game. In Risk, “I won’t attack you here if you don’t attack me there” is a legitimate strategy, but “I don’t attack you because I want to help you win” is not so cool.

A few years ago I was playing a lot of online chess, and one thing I noticed is that some players would set up opening traps: clearly unsound sequences of moves that would get them a win if their opponents played naively and hadn’t seen the trick before. My thought was: Why do that? Winning against a stranger using a trap, what’s the point of that? Upon reflection, though, I decided to not be so bothered by this. If you try to spring a trap, then the fun part is when the trap fails and then you have to get out of a bad position of your own devising. So, all good.

Years ago I read the book Thursday Night Poker by Peter Steiner. One thing Steiner discusses is that in a casual game you can often do just fine by playing really tight, a strategy that won’t work against good players but can make you steady money if some of the people at the table are just playing for fun. As Steiner says, though, most of us are not playing in a friendly poker game with the goal of maximizing our dollars. We’re playing poker for fun, and “action”—getting involved in hands, making betting decisions, going up against the other players—is where the fun is at. No poker player would be a “scrub”—you’ll always take advantage of any legal way to win, it’s not like you’d ignore relevant information that someone reveals—but, even in poker, winning is not the only goal.

All of this is kind of obvious, but as Luu discusses, sometimes it needs to be pointed out, to push against naive models of the world. Also, the bit about the Codenames cards is cool—I’d never thought about that!

Addressing legitimate counterarguments in a scientific review: The challenge of being an insider

Review articles can be written by outsiders or insiders.

From the outside, it’s easier. You assess the evidence and draw your conclusions. For example, this is what I did when summarizing the research on ballot-order effects and addressing the question of whether Donald Trump won the 2016 election because his name came first on the ballot in key states; see pages 240-242 of Active Statistics for the full story. Or when my colleagues and I wrote about “nudge” interventions. We could be right, we could be wrong, but in any case the job is clear enough.

Writing a review is more difficult from the inside. For example, consider the meta-analysis of nudge that was written by some nudge researchers. It had big problems: garbage in, garbage out. It’s hard to step back and examine the evidence, if you’re part of the story. For another example, we recently discussed a review of the controversial Implicit Association Test that was flawed in only presenting part of the story, not even acknowledging that there was a controversy.

What to do if you’re an insider and you want to write a review that includes some of your own work?

I don’t think you should just give up. As an insider, you have a special perspective, and it makes sense that you’ll want to review the evidence. At the same time, you have to avoid the natural inclination to try to present too much of a coherent story. In real life, the evidence doesn’t always all go in the same direction!

My recommendation, for the insider writing a review article, is not to try to debate or shoot down such counterarguments but rather to acknowledge the disagreement and fit it into your larger story.

Here’s an example where we did exactly that. Our article is called Reconciling Evaluations of the Millennium Villages Project, and it begins:

The Millennium Villages Project was an integrated rural development program carried out for a decade in 10 clusters of villages in sub-Saharan Africa starting in 2005, and in a few other sites for shorter durations. An evaluation of the 10 main sites compared to retrospectively chosen control sites estimated positive effects on a range of economic, social, and health outcomes (Mitchell et al. 2018). More recently, an outside group performed a prospective controlled (but also nonrandomized) evaluation of one of the shorter-duration sites and reported smaller or null results (Masset et al. 2020). Although these two conclusions seem contradictory, the differences can be explained by the fact that Mitchell et al. studied 10 sites where the project was implemented for 10 years, and Masset et al. studied one site with a program lasting less than 5 years, as well as differences in inference and framing. Insights from both evaluations should be valuable in considering future development efforts of this sort. Both studies are consistent with a larger picture of positive average impacts (compared to untreated villages) across a broad range of outcomes, but with effects varying across sites or requiring an adequate duration for impacts to be manifested.

“Mitchell et al. 2018” was us! I worked with the Millennium Villages Project to help conduct a retrospective evaluation, which yielded positive estimated effects. My take was that the project worked well. That’s what I believe, but I’m an insider. Masset et al. 2020 was an outside team that did a different analysis on different data and reported null results. The purpose of our review article was to understand how these two studies of the same program came to such different conclusions. In writing this paper we had to walk a fine line: we’re trying our best to assess the past work objectively, but one of the papers was ours. The key here is that we presented the disagreement—we did not pretend the dissenting article did not exist, nor did we dismiss it—; rather, we incorporated it into a larger understanding. I’m not saying that this new paper of ours was perfect, nor that it was influential—indeed, according to Google scholar it has exactly zero citations, really a low payoff given all the work we put into it—but I still think of it as a model for how to present and assess conflicting evidence from the inside.

The marginalization or Jeffreys-Lindley paradox: it’s already been resolved.

Nicole Wang writes:

I am a PhD student in statistics starting this year. I read the Dawid et al. (1973) marginalization paradoxes paper. I found several approaches claiming their “resolution” to this paradox. I am very curious whether you think there is a complete resolution to this paradox so far. If there is one, I sincerely wonder what it is. If not, which approach(s) do you think it(they) is(are) closer to the resolution?

I replied by pointing to these two posts:
Christian Robert on the Jeffreys-Lindley paradox; more generally, it’s good news when philosophical arguments can be transformed into technical modeling issues
and
My problem with the Lindley paradox.
It’s not a topic I’ve thought about much lately because to me it’s already been resolved.

Stanford medical school professor misrepresents what I wrote (but I kind of understand where he’s coming from)

This story is kinda complicated. It’s simple, but it’s complicated.

The simple part is the basic story, which goes something like this:

– In 2020, a study was done at Stanford–a survey of covid exposure–that I publicly criticized: I wrote that this study had statistical problems, that its analysis did not adjust for uncertainty in the false positive rate of the test they were using, and that they did something wrong by not making use of the statistical expertise that is readily available at Stanford.

– In 2023, one of the people involved in that study wrote a long post about that study and its aftermath. In that post, my comments from 2020 on that study were misrepresented–hence the title of the present post.

– Just last week someone pointed me to the 2023 post. I was unhappy to have been misrepresented so I emailed the author of the post. He didn’t respond–I don’t take that personally: he’s very busy, the holiday season is coming, the post came out over a year ago (I just only happened to hear about it the other day), and my complaint concerns only one small paragraph in a long post–so, just to correct the record, I’m posting this here.

The more complicated, and interesting, part, involves the distinction between evidence and truth. It’s something we’ve talked about before–indeed, I published a short article on the topic back in 2020 using this very example!–and here it has come again, so here goes:

And now, the details:

Stanford professor Jay Bhattacharya wrote about a covid study from 2020 that he was involved in, which attracted some skepticism at the time:

Some serious statisticians also weighed in with negative reviews. Columbia University’s Andrew Gelman posted a hyperbolic blog that we should apologize for releasing the study. He incorrectly thought we had not accounted for the possibility of false positives. He later recanted that harsh criticism but wanted us to use an alternative method of characterizing the uncertainty around our estimates.

On the plus side, I appreciate that he characterizes me as a serious statistician. He also called my post “hyperbolic.” He doesn’t actually link to it, so I’ll give the link here so you can make your own judgment. The title of that post is, “Concerns with that Stanford study of coronavirus prevalence,” and I don’t think it’s hyperbolic at all! But that’s just a matter of opinion on Bhattacharya’s part so I can’t say it’s wrong.

He does have two specific statements there that are wrong, however:

1. It’s not true that I “incorrectly thought their study had not accounted for the possibility of false positives.” In my post, I explicitly recognized that their analysis accounted for the possibility of false positives. What I wrote is that they were “focusing on the point estimates of specificity.” Specificity = 1 – false positive rate. What I wrote is that they didn’t properly account for uncertainty in the false positive rate. I did not say they had not accounted for the possibility of false positives.

2. I never “recanted that harsh criticism.” What I wrote in my post is that their article “does not provide strong evidence that the rate of people in Santa Clara county exposed by that date was as high as claimed.” But I also wrote, “I’m not saying that the claims in the above-linked paper are wrong . . . The Bendavid et al. study is problematic if it is taken as strong evidence for those particular estimates, but it’s valuable if it’s considered as one piece of information that’s part of a big picture that remains uncertain.” And I clarified, “When I wrote that the authors of the article owe us all an apology, I didn’t mean they owed us an apology for doing the study, I meant they owed us an apology for avoidable errors in the statistical analysis that led to overconfident claims. But, again, let’s not make the opposite mistake of using uncertainty as a way to affirm a null hypothesis.”

I do not see this as a “recanting,” nor did I recant at any later time, but I’m fine if Bhattacharya or anyone else wants to quote me directly to make clear that at no time did I ever say that their substantive claims were false; I only said that the data offered in that study did not supply strong evidence.

This bothers me. I’d hate for people to think that I’d incorrectly thought they had not accounted for the possibility of false positives, or that I’d recanted my criticism. Again I emphasize that my criticism was statistical and involved specification of uncertainty; it was not a claim on my part that the percentage of people who’d been exposed to Covid was X, Y, or Z.

The good news is that this post from Bhattacharya appeared in 2023 and I only heard about it just the other day, so I guess it did not get wide circulation. Maybe more people will see this correction than the original post! In any case I’m glad to have the opportunity to correct the record.

Stanford contagion

I have no problem with Bhattacharya making arguments about covid epidemiology and policy–two topics he’s thought a lot about. It’s completely reasonable for him and his colleagues to say that their original study was inconclusive but that it was consistent with their larger message.

Bhattacharya also writes:

In the end, Stanford’s leadership undermined public and scientific confidence in the results of the Santa Clara study. Given this history, members of the public could be forgiven if they wonder whether any Stanford research can be trusted.

He doesn’t fully follow up on this point, but I think he’s right.

A few weeks before the above-discussed covid study came out, Stanford got some press when law professor Richard Epstein published something through Stanford’s Hoover Institution predicting that U.S. covid deaths would max out at 500, a prediction he later updated to 5000 (see here for details). I’ve never met Epstein or corresponded with him, but he comes off as quite the asshole, having said this to a magazine interviewer: “But, you want to come at me hard, I am going to come back harder at you. And then if I can’t jam my fingers down your throat, then I am not worth it. . . . But a little bit of respect.” A couple years later, he followed up with some idiotic statements about the covid vaccine. Fine–the guy’s just a law professor, not a health economist or anyone else with relevant expertise here–the point is that Stanford appears to be stuck with him. In Bhattacharya’s words, “Given this history, members of the public could be forgiven if they wonder whether any Stanford research can be trusted.”

This sort of guilt-by-Stanford-association would represent poor reasoning. Just cos Stanford platforms idiots like Richard Epstein, it doesn’t mean we shouldn’t trust the research of serious scholars such as Rob Tibshirani and Jay Bhattacharya. But I guess that members of the public could be forgiven if they show less trust in the Stanford brand. Just as my Columbia affiliation is tarnished by my employer’s association with Mehmet Oz, Robert Hadden, and its willingness to fake its U.S. News numbers. And Harvard is tarnished by its endorsement of various well-publicized bits of pseudoscience.

Reputation goes both ways. By publishing Epstein’s uniformed commentary, Stanford’s leadership undermined public and scientific confidence, and then Bhattacharya had to pay some of the price for this undermined confidence. That’s too bad, also too bad that he ended up on the advisory board of an organization that gave the following advice: “Currently, there is no one for whom the benefit would outweigh the risk of these [covid] vaccines–even the most vulnerable, elderly nursing home patients.”

The challenge is that legitimate arguments about policy responses under uncertainty get tangled with ridiculous claims such as that covid would only kill 500 Americans, or ridiculous policies such as removing the basketball hoops in the local park. On one side, you had people spreading what can only be called denial (for example, the claim that the pandemic was over in the summer of 2020); on the other side were public health authorities playing the fear card and keeping everyone inside.

So I can see how Bhattacharya was frustrated by the response to his study. But he’s missing the mark when he misrepresents what I wrote, and when, elsewhere in his post, he disparages Stephanie Lee for doing reporting on his study. We’re doing our jobs–I’m assessing the strength of statistical evidence, Lee is tracking down leads in the story–just like Bhattacharya is doing his job by making policy recommendations.

The true meaning of the alzabo

OK, I guess this is obvious, but it hadn’t occurred to me until recently.

Nonexistent books

Here’s the background: The other day we went to the Grolier Book Club, which had an exhibition on lost, incomplete, and imaginary books. The fun gimmick was that they made mock-ups of physical books representing various books that no longer exist or never were. Examples included a lost play of Shakespeare, a never-finished novel by Sylvia Plath, the complete version of Kubla Khan, a monograph by Sherlock Holmes, the legendary Necronomicon, The Theory and Practice of Oligarchical Collectivism, by Emmanuel Goldstein, the code of the Bene Gesserit, and that famous original work which is a word-for-word remake of Don Quixote. I was pleased to see a copy of the “original” Garden of Forking Paths but disappointed not to see anything by Nathan Zuckerman, and really disappointed not to see some version of The Book of Gold, but I understand, as there are so many lost, incomplete, and imaginary books that any library of them would overflow beyond the space allotted to the exhibition.

When I was at the Grolier looking at these real objects representing unreal books–actually, the objects were just the outsides of the books, I’m pretty sure they weren’t filled with text on their pages–I was thinking that there must be a wikipedia entry with a long list of famous books that don’t exist. Wikipedia has its flaws (see also here and here), but . . . a list of fake books, this seems like it would be right in Wikipedia’s wheelhouse, kind of like if you want the plot of every Simpsons episode or a list of all the flavors of Pop Tarts.

Some googling led to the wikipedia page for “fictional book”. It’s not as comprehensive as I was expecting, but it does include The Grasshopper Lies Heavy—I’d forgotten about that one! Wikipedia also has this list, which is even more disappointing.

What’s up, Wikipedia? I was gonna say that the editors are so laser-focused on modern pop culture that they can’t be bothered to collect a list of old-fashioned books . . . but then I checked out the page on “lost literary works”, which offers an impressively comprehensive list starting with antiquity and going through the centuries since then, ending with this:

Terry Pratchett’s unfinished works were destroyed in 2017 after his death, fulfilling his last will; his computer hard drive containing his unfinished works was deliberately crushed by a steamroller.

The list of lost works includes novels by L. Frank Baum, plays by James Joyce, August Strindberg, and Leon Trotsky (!), treatises by Adam Smith, all sorts of things. It’s a list worth reading. Wikipedia also has an entry on unfinished creative work, which includes things like Mozart’s requiem and Schubert’s eighth symphony as well as various books.

The alzabo

As noted above, when I saw nonexistent books, I thought of The Book of Gold, and that made me think of the alzabo, that fictional animal who, if it eats a person, will ingest his or her personality as well, and then if you kill the alzabo, prepare it in a certain way, and swallow its extract, you will retain the memories of the person who’d been eaten.

Seeing the exhibition of the books gave me the sudden understanding that the alzabo is, very directly, a metaphor for literature:

– When, as an author, you pour your memories, ideas, and emotions into a book, that is like feeding yourself to the alzabo. As Paul Gallico said, “It is only when you open your veins and bleed onto the page a little that you establish contact with your reader.”

– When, as a reader, you dive into a book, this is like eating the alzabo. The characters, themes, and events of the book become part of your memory.

In the Book of the New Sun, there are times when Severian is overwhelmed by the memories he’s absorbed from Thecla, and there’s a point where he gets lost among the accumulated memories of all the past autarchs. When I read that, I recall thinking this was implausible (even in the science-fiction context of a willing suspension of disbelief)–how would there be room in his head for the memories of thousands of people?–but then I realized that my head contains memories of many thousands of books that I’ve read (not to mention TV shows and various other story-delivering mechanisms), so, yeah, that’s how it works. The alzabo is a beautifully poetic representation of this two-stage transfer, first from author to book, then from book to reader.

In one of history’s greatest fish-out-of-water stories, a retired Hollywood actor became president of the United States. Ronald Reagan was notorious for confusing his memories of movies with reality–but, at some level, all of us can relate to this, as we all “know” fictional characters who seem realer than people we know, we remember fictional stories that are scarier and more tearjerking than real events in our lives, and so forth.

Connection to statistics

And then, writing this, I realize that something similar happens in statistics! Measurements are performed that abstract complex reality into “data,” which are then analyzed by the researcher, who uses these data to reconstruct the world. Wow. I’d never thought of it that way before.

Delicate language for talking about statistical guarantees

This is Jessica. As I’ve been reading papers on uncertainty quantification in machine learning (related to topics like conformal prediction or calibration), I’ve been reflecting on the language choices that authors make. 

It started when I was reading a paper about an approach that uses set-aside data labeled with human reports to learn a threshold on a function that predicts the “alignment” (e.g., similarity) of predictions with those reports. They do this to ensure that new predictions are sufficiently aligned. There are many new methods for quantifying prediction uncertainty or controlling prediction risk in ML that have a similar flavor — they involve learning either thresholds (e.g., conformal prediction) or adjustments (e.g., posthoc calibration algorithms) on held-out calibration data that are then applied to predictions. Some of them come with “statistical guarantees”: If the data used for calibration is a good approximation of future data (e.g., is i.i.d. or at least exchangable), then we can expect calibration in the future.

Anyway, I paused when I got to this sentence:

new reports are selected if their predicted alignment scores exceed a data-driven threshold, which is delicately set with Dcal such that the FDR is strictly controlled at the desired level

because I found the choice of the phrase “delicately set” interesting. It seems like a good way to describe this kind of procedure: naturally there are assumptions on which the expectation about controlling the FDR rate depend, like statistical exchangeability between the calibration data and new instances, that might not hold. By using a term like “delicately” the authors signal some fragility.

It makes me think of all of the other words that could be used to signal tentativeness or epistemic uncertainty when discussing such methods: “tenuously,” “gingerly,” “warily,“ or, if you want to sound like you just studied for the GRE, “frangibly.” Maybe a bit of poetic license would not be a bad thing when describing our expectations about such methods. It would certainly make for a more entertaining reading experience.

However, the fact that the above statement continues “… such that the FDR is strictly controlled at the desired level” makes it sound a lot less fallible. This phrasing is more typical of the unconditional way in which such methods are often described. 

Here’s another example, where the guarantee is about human behavior: 

we develop an efficient and near-optimal search method to find the conformal predictor under which the expert is guaranteed to achieve the greatest accuracy with high probability.

But can we ever really guarantee that future human behavior will remain consistent with the past? 

As I was writing this post, I noticed that Andrew has previously blogged on his dislike of the term “guarantees” because it hide assumptions. I agree that it’s problematic to talk about guarantees unconditionally, as if they cannot be violated even when the methods are applied in practice. This is why the unqualified statements about calibration being sufficient for good decisions bug me so much. Andrew’s post concludes by saying that it’s not so bad to talk about guarantees if you’re writing to a statistics and ML audience, since they may expect that.

But the more time I spend reading papers involving uncertainty or calibration guarantees, the more I find myself wishing there was a little more care taken in how their statistical properties are discussed, particularly when talking about practically-oriented methods that assume future data is like past data. Having poked around recent papers in domains outside of CS on topics like calibration and conformal prediction, it seems that the nuance is not necessarily obvious when people go to apply the methods in practice. So these days I’m trying to be more careful with my own word choices. For example, beyond trying to avoid flagrant use of the word guarantee, add the word “expected” more often. E.g., “under which the expert is expected to achieve the greatest accuracy…” or “delicately selected so that the FDR is expected to be strictly controlled at the desired level.” It’s minor but I think it better emphasizes that our assumptions may not always don’t hold, because they were unrealistic and/or because in practice we’re dealing with singular events rather than hypothetical replications. 

Another idea would be to deliberately choose weaker synonyms for guarantees, like “this method promises that the expected FDR will be less than…” Sounds a little odd. But maybe it’s a good thing for descriptions of methods to take the reader back to childhood when their so-called friend “promised” not to tell on them or their parent “promised” not to snoop in their room! Or as Paul Alper suggests, say “statistical oomph” instead of guarantees, which I think captures the same vibe of excitement and clout but sounds so much sillier.

“Accounting for Nonresponse in Election Polls: Total Margin of Error”

Jeff Dominitz and Chuck Manski write:

The potential impact of nonresponse on election polls is well known and frequently acknowledged. Yet measurement and reporting of polling error has focused solely on sampling error, represented by the margin of error of a poll. Survey statisticians have long recommended measurement of the total survey error of a sample estimate by its mean square error (MSE), which jointly measures sampling and non-sampling errors. Extending the conventional language of polling, we think it reasonable to use the square root of maximum MSE to measure the total margin of error. This paper demonstrates how to measure the potential impact of nonresponse using the concept of the total margin of error, which we argue should be a standard feature in the reporting of election poll results. We first show how to jointly measure statistical imprecision and response bias when a pollster lacks any knowledge of the candidate preferences of non-responders. We then extend the analysis to settings where the pollster has partial knowledge that bounds the preferences of non-responders.

Good stuff. This relates to two of my papers on nonsampling errors and differential nonresponse:

[2018] Disentangling bias and variance in election polls. Journal of the American Statistical Association 113, 607-614. (Houshmand Shirani-Mehr, David Rothschild, Sharad Goel, and Andrew Gelman)

[1998] Modeling differential nonresponse in sample surveys. Sankhya 60, 101-126. (Thomas C. Little and Andrew Gelman)

It’s funny about that last paper because Tom Little and I did that project nearly 30 years ago and I forgot about it even while doing applied research on differential nonresponse. I think there’s more to be done here, integrating the different perspectives here. I like the idea of modeling the nonsampling error rather than just treating it as another error term.

On the general point of reporting surveys and margins of errors, I recommend Ansolabehere and Belin’s paper from 1993.

How did the press do on that “black spatula” story? Not so great.

Act 1: The journal Chemosphere publishes a research article finding that black plastic kitchen items contain dangerous toxins arising from reprocessing of plastics that contained carcinogenic flame retardants. This result is publicized by the advocacy group that helped conduct the study, and it is picked up in the major media, with headlines such as, “Black-colored plastic used for kitchen utensils and toys linked to banned toxic flame retardants,” as CNN reported from 1 Oct. Various news organizations pick up the story and give recommendations about not reusing plastic containers, etc.

Act 2: It turns out that the journal article had a factor-of-10 error, where a given exposure was stated to be 80% of the legal limit for a certain toxin, but it was really only 8%.

We wrote about this the other day, citing, linking, and quoting from an article of 11 Dec from Canada’s National Post newspaper, that reported:

Plastics rarely make news like this . . . the media uptake was enthusiastic on a paper published in October in the peer-reviewed journal Chemosphere.

“Your cool black kitchenware could be slowly poisoning you, study says. Here’s what to do,” said the LA Times. “Yes, throw out your black spatula,” said the San Francisco Chronicle. Salon was most blunt: “Your favorite spatula could kill you,” it said.

The study, by researchers at the advocacy group Toxic-Free Future . . . estimated that using contaminated kitchenware could cause a median intake of 34,700 nanograms per day of Decabromodiphenyl ether, known as BDE-209. . . . The trouble is that, in the study’s section on “Health and Exposure Concerns,” the researchers said this number, 34,700, “would approach” the reference dose given by the United States Environmental Protection Agency. . . .

The paper correctly gives the reference dose for BDE-209 as 7,000 nanograms per kilogram of body weight per day, but calculates this into a limit for a 60-kilogram adult of 42,000 nanograms per day. . . . But 60 times 7,000 is not 42,000. It is 420,000. This is what [McGill University’s] Joe Schwarcz noticed. . . .

The article goes on to interview Schwarcz about the spatula claim and general issues of summarizing uncertainty.

The starting point of Act 2 of our story seems to have been this press release by Schwarcz from 6 Dec on the McGill University website, entitled, “Are Black Plastic Spatulas and Serving Spoons Safe to Use? For me, the risk would not be enough to discard them, but science should find a way to keep flame retardants out of such items.”

It’s a complicated problem. Indeed, only just now I’m realizing that “median intake” is a strange thing to look at when summarizing a public health risk.

Act 3: The error was corrected in the journal and in a press release by the advocacy organization, but in a minimizing way: “it is important to note that this does not impact our results.” This was mentioned in the above-linked National Post article.

Act 4: Several news organizations followed up on the correction.

And that’s the subject of today’s post. How did the news organizations do?

I’d say their record is mixed.
Continue reading →

He took public funds and falsified his data. Are they gonna make him pay back the $19 million?

As a former University of Maryland student, I’m incensed by this story. From Retraction Watch, this story about a professor of Biochemistry and Molecular Biology:

The ORI finding stated Eckert “engaged in research misconduct in research supported by” every NIH grant on which he served as principal investigator, totaling more than $19 million. The finding also lists multiple “Center Core Grants” worth hundreds of millions for shared resources and facilities at research centers. . . .

According to ORI’s findings, Eckert erased a band in one of the paper’s figures “to falsely show a favorable result.”

In the 13 papers and two grant applications, Eckert used and reused images “representing unrelated experiments, with or without manipulating them, and falsely relabeling them as data representing different proteins and/or experimental results,” ORI found.

I don’t really know what to think about the Center Core Grants, but the 19 million dollars he should have to pay back! OK, maybe he doesn’t have $19 million cash on hand, but there’s gotta be a system for this, right? Maybe they start by repoing his car, freezing his bank account, and selling his house, then he’s allowed some reasonable amount to live on . . . hmmm, it appears that the NIH predoc salary level is 28,224 per year, so they could let him keep that much . . . then he could try to come up with a payment plan. I dunno. They throw drug dealers in prison, but that would just cost the taxpayer more money. Better to just put an ankle monitor on him and take away his internet access. . . .

Ummm, let’s read on:

Eckert agreed to forgo contracting with the federal government or receiving government funding for eight years . . . Eckert also agreed not to serve on any advisory or peer review committees for the U.S. Public Health Service, which includes the NIH, for eight years.

OK, maybe after eight years if he shows some evidence of rehabilitation, maybe. But what about the $19 million? Paying that back should be the absolute minimum requirement, no?

Applications of (Bayesian) variational inference?

I’m curious about whether anyone’s using variational inference, and more specifically, using variational approximations to estimate posterior expectations for applied work. And if so, what kinds of reactions have you gotten from readers or reviewers?

I see a lot of talk in papers about how variational inference (VI) scales better than MCMC at the cost of only approximating the posterior. MCMC, which is often characterized as “approximate”, is technically asymptotically exact. MCMC’s approximation is not very many decimal places of accuracy rather than bias, at least in cases where MCMC can sample the posterior.

But I don’t recall ever seeing anyone use VI for inference in applied statistics. In particular, I’m curious if there are any Bayesian applications of VI, by which I mean applications where the variational approximation is used to estimate Bayesian posterior expectations in the usual way for an applied statistics problem of interest. That is, I’m wondering if anyone uses a variational approximation q(theta | phi), where phi is fixed as usual, to approximate a Bayesian posterior p(theta | y) and use it to estimate expectations as follows.

E[f(theta) | y] = INTEGRAL f(theta) q(theta | phi) d.theta.

This could be computed with Monte Carlo when it is possible to sample from q(theta | phi).

I’m using our Pathfinder variational inference system (now in Stan) to initialize MCMC, but I wouldn’t trust inference based on Pathfinder because of the very restrictive variational family (i.e., multivariate normal with low rank plus diagonal covariance). Similarly, most of the theoretical results I’ve been seeing around VI are for normal approximating families, particularly of the mean field (diagonal covariance) variety. Mean field approximations are easy to manipulate theoretically and computationally, but seem to make poor candidates for predictive inference, where there is often substantial posterior correlation and non-Gaussianity.

I know that there are ML applications to autoencoding that use variational inference, but I’m specifically asking about applied statistics applications that would be published in an applied journal, not a stats methodology or ML journal. I’ve seen some applications of point estimates from VI to “fit” latent Dirichlet allocation (LDA) models, but the ones I’ve seen don’t compute any expectations other than point estimates of parameters from a local mode among combinatorially many modes.

I’m curious about applications using ML techniques like normalizing flows as the variational family. I would expect those to be of more practical interest to applied statisticians than all the VI that has come before. I’ve seen cases where VI outperforms NUTS from Abhinav Agrawal and Justin Domke using a 10-layer deep, 20-ish neuron wide, real non-volume preserving (realNVP) flow touched up with importance sampling—their summary paper’s still under review and Abhinav’s thesis is being revised. But it requires a lot of compute, which isn’t cheap these days. The cases where realNVP outperforms include funnels, multimodal targets, bananas and other varying curvature models (like from an IRT 2PL posterior). I suspect the costs and accessibility of the equivalent of an NVIDIA H100 GPU will drop to a point where everyone will be able to use these methods in 10 years. It’s what I’m spending at least half my time on these days—JAX is fun and ChatGPT can (help) translate Stan programs pretty much line for line into JAX.

Iterative imputation and incoherent Gibbs sampling

Seeing this post by Tim Morris on the difference between iterative imputation and Gibbs sampling reminded me of some articles that my colleagues and I have written on the topic:

[2001] Using conditional distributions for missing-data imputation. Discussion of “Conditionally specified distributions” by B. Arnold et al. Statistical Science 3, 268-269. (Andrew Gelman and T. E. Raghunathan).

[2014] Multiple imputation for continuous and categorical data: Comparing joint and conditional approaches. Political Analysis 22, 497-519. (Jonathan Kropko, Ben Goodrich, Andrew Gelman, and Jennifer Hill).

[2014] On the stationary distribution of iterative imputations. Biometrika 1, 155-173. (Jingchen Liu, Andrew Gelman, Jennifer Hill, Yu-Sung Su, and Jonathan Kropko).

It’s something that’s been discussed in the Bayesian statistics community for a long time—I remember talking about it with Jun Liu around 1992 or so.

For a very simple example, consider these two incoherent conditional specifications:
x|y ~ normal(0, 1)
y|x ~ normal(x, 1).

These are obviously incoherent: in the specification for x|y, x and y are independent; in the specification for y|x, they are dependent.

What happens if you do Gibbs updating (following Morris, I won’t call it “Gibbs sampling,” as there is no underlying joint distribution)?
Iteration 1: Draw x from normal(0, 1)
Iteration 2: Draw y from normal(x, 1)
Iteration 3: Draw x from normal(0, 1)
Iteration 4: Draw y from normal(x, 1)
Etc.

What is the joint distribution of (x,y)? It depends on when you stop. If you stop at an odd iteration, the joint distribution is (x,y) ~ MVN((0,0), ((1,0),(0,2))). If you stop at an even iteration, the joint distribution is (x,y) ~ MVN((0,0), ((1,1),(1,2))). If you want a single joint distribution, you could stop at a random iteration, in which case the joint distribution will depend on your random process, but for any reasonable choice of random stopping point will be approximately (x,y) ~ 0.5*MVN((0,0), ((1,0),(0,2))) + 0.5*MVN((0,0), ((1,1),(1,2))).

Things get more complicated when you have more than two variables, because then there are other possible updating schedules. You could update x,y,z,x,y,z,…, or x,y,x,z,y,z,…, or do a random update—and these could lead to different joint distributions, even after averaging over a random stopping point. There have to be some conditions under which you could bound the variation around these possible distributions—at the extreme case where the conditional specifications are coherent and the process is ergodic, there’s no variation at all—but I don’t know what they are.

Iterative imputation for missing data is kinda like the above, except the conditional distributions are themselves estimated from available data. In some ways this makes the problem harder to analyze (which is why the math in the third article linked above gets so complicated), but in other ways it makes things better that the distributions are estimated from a common dataset, as this should enforce some approximate coherence among the conditional specifications.

Lots to chew about, from practical, theoretical, and computational perspectives.