14 comments

[ 7.5 ms ] story [ 44.3 ms ] thread
> Therefore likelihood functions can never be p-hacked by any possible clever setup without you outright lying, because you can't have any possible procedure that a Bayesian knows in advance will make them update in a predictable net direction.

(emphasis from the original)

This is overselling it a bit, or perhaps using an unusually narrow definition of p-hacking.

As used colloquially, p-hacking includes things like fitting models to various subsets of the available predictors to find a combination that makes a particular coefficient you're interested in have a large estimated effect size. Bayesian methods and likelihood functions are about as vulnerable to this as frequentist methods are.

I don’t understand the example about cherry-picking data and Python scripts. If a scientist is biased and selectively reports results that lean in one direction, I’d be shocked to hear that Bayesian statistics can mitigate the problem.

Or are they trying to say that cherry-picking is still a risk, but is less catastrophic than it is with a frequentist approach?

It's a particular form of cherry-picking, and a weak one. The data is all reported fully and honestly; the only cherry picking is that the experimenter decides when to end the experiment based on when the data they've collected so far is favorable to their preferred hypothesis.
Thanks for the reply! This is the bit I’m struggling with:

> Bayesian: "Shrug," I say. You can't mislead me by telling me what a real coin actually did.

> Scientist: I'm asking you what happens if I keep flipping the coin, checking the likelihood each time, until I see that the current statistics favor my pet theory, and then I stop.

> Bayesian: As a pure idealist seduced by the seductively pure idealism of probability theory, I say that so long as you present me with the true data, all I can and should do is update in the way Bayes' theorem says I should.

> Scientist: Seriously.

> Bayesian: I am serious.

> Scientist: So it doesn't bother you if I keep checking the likelihood ratio and continuing to flip the coin until I can convince you of anything I want.

> Bayesian: Go ahead and try it.

Maybe the part I’m struggling with is “You can't mislead me by telling me what a real coin actually did”. Is the author overstating the benefits, or are they trying to communicate something that I’m just not picking up?

I’d expect that frequentists are exactly as immune to this problem on a per-study basis, the only difference being that Bayesian statistics provide the ability to aggregate likelihoods from multiple studies in the hopes of counteracting bias.

> Scientist: I'm asking you what happens if I keep flipping the coin, checking the likelihood each time, until I see that the current statistics favor my pet theory, and then I stop.

This is the key line. This is the only type of cherry picking they are referring to: you run the experiment until the results look favorable and then you stop.

With a frequentist analysis the p-value depends on why you stopped, because that changes the reference set that the outcome is calibrated against (the set of outcomes that are considered as-or-more-extreme). This is illustrated by the example of flipping a coin and getting HHHHHT at the beginning. If the experiment was "flip a coin 6 times and then stop", then HTHHHH is as extreme as HHHHHT. But if the experiment was "flip a coin until you get tails" then HTHHHH isn't a possible outcome (because you would have stopped at HT), so it's not in the as-or-more-extreme set.

This is often used by Bayesians as an argument against frequentist statistics. Personally I've never found it very compelling, since (1) the effect tends to disappear as sample sizes grow (due to likelihoods approaching normal distributions in the limit under weak conditions) and (2) experiments generally have a predetermined stopping condition and I don't particularly care what the analysis would have been if the stopping condition had been defined differently. It is however a philosophical point in favor of Bayesian analysis.

Yudkowsky then presents this as a counterargument from the frequentist character:

> Scientist: Okay, that last claim in particular strikes me as very suspicious. What happens if I want to persuade you that a coin is biased towards heads, so I keep flipping it until I randomly get to a point where there's a predominance of heads, and then choose to stop?

Basically, "OK, if the stopping rule doesn't matter for Bayesians, what prevents me from using the stopping rule to manipulate the experiment by choosing to stop when the evidence looks favorable?"

I consider this a bit of a straw man because I've never heard a frequentist actually use this argument. I have heard Bayesians present it as a frequentist argument many times. But probably at some point in the past one or more frequentists did use this as an argument.

The Bayesian response is "You can try, but you probably won't be able to get very strong evidence in favor of a false hypothesis." Which is true and fine, as long as all the data are fully and fairly presented. But it doesn't prevent me from accumulating data over multiple attempts (by selectively failing to report attempts that don't turn out well): it's unlikely that I'll be able to get a 20:1 likelihood ratio against a true hypothesis in a single run (this is what the discussion about python programs is about), but it's not hard to get say 2:1 likelyhood ratio against a true hypothesis in a single run, and then do that several times, discarding runs that don't work out for me.

Yudkowsky's analysis doesn't address this. He assumes throughout that the data are all fully and fairly presented; I'm not throwing out any data from days when it didn't work out in my favor or anything like that. He also (as I pointed out in another comment, and as levocardia illustrated wonderfully in yet another top level comment) ignores the many other ways of manipulating outcomes other than just deciding when to stop collecting data: choosing which variables to include/exclude, choosing to analyze only a subpopulation, choosing transformations to apply to variables, and many more choices that a data analyst can make to obtain more favorable results. Bayesian analysis is not immune to any of these other manipulations.

Once you start discarding runs, doesn't that count as lying about the data/experiment? As in effectively equivalent to flipping the coin and only reporting it if it lands on heads?

In any case he does mention it won't fix all the problems but that it can clean up some of them and make addressing other problems a bit more straightforward. With p-values, sometimes even honest experiments end up with misleading conclusions. It takes a decent amount of complex understanding to perform properly, while something like gathering data and doing a conditional probability calculation has presumably less risk of honest mistakes

Well, I'm discarding whole experiments. Each experiment is reported in full, I just don't publish all of them. No scientist ever does.

His claim about likelihoods being immune to p-hacking is far too strong.

> With p-values, sometimes even honest experiments end up with misleading conclusions. It takes a decent amount of complex understanding to perform properly, while something like gathering data and doing a conditional probability calculation has presumably less risk of honest mistakes

Maybe. I've seen an experienced Bayesian statistician who had published a paper about Lindley's paradox fall prey to Lindley's paradox and publish a misleading conclusion as a result. Bayesian analysis also has some pitfalls. Name withheld to protect the innocent.

"You can't mislead me by telling me what a real coin actually did" is implying any amount observation of a real coin only aids the likelihood function.

that since bayesian methods account for both the likelihood it is real and the likelihood it is not real, the observations are gaining evidence AND counter-evidence together. So as long as you don't lie about what a real coin did, then you are describing the actions of a real coin and therefor cannot mislead

The textbook, "Bayesian Data Analysis" by Gelman et al, has a good discussion on this in Chapter 8. Here are some relevant bits:

"A naive student of Bayesian inference might claim that because all inference is conditional on the observed data, it makes no difference how those data were collected. This misplaced appeal to the likelihood principle would assert that given (1) a fixed model (including the prior distribution) for the underlying data and (2) fixed observed values of the data, Bayesian inference is determined regardless of the design for the collection of the data. Under this view there would be no formal role for randomization in either sample surveys or experiments."

"The notion that the method of data collection is irrelevant to Bayesian analysis can be dispelled by the simplest of examples. Suppose for instance that we, the authors, give you, the reader, a collection of the outcomes of ten rolls of a die and all are 6's. Certainly your attitude toward the nature of the die after analyzing these data would be different if we told you (i) these were the only rolls we performed, versus (ii) we rolled the die 60 times but decided to report only the 6's, versus (iii) we decided in advance that we were going to report honestly that ten 6's appeared but would conceal how many rolls it took, and we had to wait 500 rolls to attain that result."

(comment deleted)
> Likelihood functions are objective facts about the data which do not depend on your state of mind. You cannot deceive somebody by reporting likelihood functions unless you are literally lying about the data or omitting data. There's no equivalent of 'p-hacking'.

I think Yudkowsky misses the mark here. Much of the replication crisis is not because of p-values or test statistics, it's about what constitutes "the data." I didn't fully appreciate this until I was a working researcher myself. Rarely are studies done as imagined by outsiders--with a pristine and perfect hypothesis and data collection scheme, amenable to coin-flip analogies.

Suppose you run some psychology study (or public health study, or physiology study, or whatever). You sketch out an idea for an experiment, then collect some data. These "data" might be survey responses, biomarker measurements, sensor data, whatever. Now you have to analyze your data and work it into a paper, and now is where the trouble begins.

Let's say you are doing a study on an exercise program and mental health. Hypothesis: exercise boosts mood.

Some of your subjects bailed on the study after the first visit. Do you include them? Exclude them? Impute their missing values?

You measured mood with a survey instrument, but you forgot to validate some fields, so for "rate your mood from 1 (bad) to 5 (good)" which was supposed to be an ordinal 1-5 scale you got a few responses of "3-4", or "3.5", or "pretty good." You tell your grad student to figure it out somehow. She decides to use values from the 0-10 visual analog scale of mood as a surrogate to estimate the 1-5 values (you collected the VAS values but you don't want to bother with those now, you'll have an undergrad look at that this summer and write it up separately).

Now you have to measure your outcome. Someone at the biostats consulting center said something about "ordinal regression" but you didn't learn about that in grad school in the '90s, and all your colleagues just do t-tests anyways so you decide to do that. But hmm, maybe it makes more sense to divide people into "good mood (4 or 5)" and "bad mood (1, 2, or 3)" Ah well, let's do both.

Those results aren't publishable (p = 0.10 and p=0.08), but maybe only people in bad moods improve their mood with exercise? So let's go back to the data and measure increase in mood, relative to baseline. Better do it as both percentage and as absolute increase.

What do you know! Your master's student shows you a logistic model that says that among people with a bad mood initially, exercise increased the odds they'd have a good mood by the end of the study, p = 0.02. Awesome, let's write it up and submit. Wait, which of these excel sheets was the original analysis? Can you go back and double-check we excluded those three subjects with anomalous data? Great. Upload that spreadsheet with the manuscript.

[...]

This is where the replication crisis comes from. Likelihood functions won't save you from the situation I just outlined--which I saw unfold many, many times in the academy. The lines above commit many research sins, but the thorny thing is that sometimes you do run into unexpected or difficult data analysis situations and even honest researchers will be forced to make decisions that may affect the results.

Andrew Gelman's "The Garden of Forking Paths" article is apt here [1]. I think true pre-registration is the only way to really seek truth, as it avoids many (but not all) of the issues above.

[1] http://www.stat.columbia.edu/~gelman/research/unpublished/p_...

Took me a while to read (in this age of LLM, I'm proud of myself), but the key points are explained fairly well: the abuse of p-value and the advantages of Bayesian statistics. So why has the latter not caught on?

In my opinion, the fact that you need to specify a prior is not as much an advantage in practice. Sounds good in theory, but in practice, there are many phenomena and variables that we simply does not know that well to specify a distribution to it. Maybe if Bayesian statistics gets more popular and encourages raw data sharing, then the situation will be better, but for now, it is difficult still.

All that said, despite being a practical challenge, being explicit about your assumptions is still an important benefit of the Bayesian approach, and I hope it gets adopted more and more.

Is this not a false choice?

Why can't we keep using p-values and also have an addendum to papers that includes the raw data observed and their associated likelihood functions?

Nice article, worth reading. At first I thought the site was broken, because I got nothing but the top line header. I loaded it several times, tried chopping off the end of the URL, and then gave up. I tried again later, and it worked.

I think the issue is that it can just be slow to load, maybe because of high load. If it doesn't work for you, try walking away while the page is loading and then coming back to check after a minute.

If that fails: https://archive.ph/5Ui6n