Solving a Murder Mystery Using Bayesian Inference
Solving a Murder Mystery Using Bayesian Inference
用贝叶斯推断破解谋杀悬案
How Knives Out teaches Bayesian thinking (without you realizing it) 《利刃出鞘》是如何在潜移默化中教你贝叶斯思维的
Subha Ganapathi | May 31, 2026 | 11 min read Subha Ganapathi | 2026年5月31日 | 11分钟阅读
Overview 概述
I remember watching the Hollywood mystery thriller Knives Out, leaning towards the screen, as if the case were mine to crack. As detective Blanc’s team questions each person at the Thrombey Mansion, I, too, crossed off names in my head, only to reinstate them after a twist or two. Back then, it never struck me that this old-fashioned whodunit was making me do math in my head. 我记得在看好莱坞悬疑惊悚片《利刃出鞘》时,我整个人前倾着身子贴近屏幕,仿佛这起案件正等着我去破解。当布兰科侦探的团队在桑伯恩庄园审问每一个人时,我也在脑海中一一排除嫌疑人,却又在剧情反转后不得不将他们重新列入名单。当时我完全没意识到,这部老派的侦探片竟然在让我进行心算。
While it might seem like a stretch, I strongly feel that Benoit Blanc’s investigative style closely mirrors Bayesian Inference. But those who remember the interrogations in the movie will quickly realize that Benoit Blanc wasn’t even actively interrogating. He was seated beside a piano, letting his team (Lieutenant Elliot and Trooper Wagner) ask questions. Then why do I say that Blanc’s investigative style had anything to do with Bayesian Inference? 虽然这看起来有些牵强,但我强烈认为贝努瓦·布兰科的调查风格与贝叶斯推断非常相似。但看过电影中审讯过程的人很快就会发现,布兰科甚至没有亲自参与审讯。他只是坐在钢琴旁,让他的团队(艾略特中尉和瓦格纳警员)负责提问。那么,为什么我说布兰科的调查风格与贝叶斯推断有关呢?
Blanc himself mentioned this in the movie, and I quote: “I observe the facts without biases of the head or heart.” (Benoit Blanc, Knives Out [1]) This is the very essence of Bayesian Inference, where your conclusions are not driven by intuition but by evidence. 布兰科在电影中曾亲口说道:“我观察事实,不带头脑或情感的偏见。”(贝努瓦·布兰科,《利刃出鞘》[1])这正是贝叶斯推断的精髓所在——你的结论不是由直觉驱动的,而是由证据驱动的。
Let’s solve this murder mystery together using Bayesian Inference. Here’s a quick note before we begin. Throughout the movie, contradictions are presented in two forms. There are contradictions presented in the form of flashbacks, which are shown only to the audience and are mostly unknown to Blanc. Then, there are contradictions revealed by verbal inconsistencies that Blanc witnesses during the investigation. Therefore, we will focus only on the verbal inconsistencies noted by Blanc. 让我们一起用贝叶斯推断来破解这起谋杀案。在开始之前,先说明一点:在整部电影中,矛盾以两种形式呈现。一种是通过闪回呈现的矛盾,这些画面只展示给观众,布兰科大多并不知情;另一种是布兰科在调查过程中亲眼目睹的言语不一致所揭示的矛盾。因此,我们将只关注布兰科所注意到的言语不一致之处。
Also, a note on the probability weight assignments and updates. These are not calculated using the Bayesian formula, as likelihood values are difficult to assign to behavioral evidence such as behaving evasively or lying. Instead, we use informed estimates as a teaching tool and not as mathematical proof. So, hope you enjoy this journey. 此外,关于概率权重的分配和更新,这些并非通过贝叶斯公式精确计算得出,因为像“表现回避”或“撒谎”这类行为证据很难赋予具体的似然值。相反,我们使用基于信息的估算作为教学工具,而非数学证明。希望你能享受这段旅程。
Setting the Stage — Establishing the Initial Beliefs 搭建舞台——建立初始信念
Detective Blanc was hired anonymously by a family member to investigate the possibility of Harlan Thrombey being murdered. When his team begins the interrogation, Blanc quietly observes the potential suspects from behind. When the interrogation steers off course, he redirects the team to realign by tapping a piano key. He observes that each interaction is muddled with lies and contradictions. 布兰科侦探受某位家庭成员匿名委托,调查哈兰·桑伯恩被谋杀的可能性。当他的团队开始审讯时,布兰科在后方静静地观察着潜在的嫌疑人。当审讯偏离方向时,他会通过敲击琴键来引导团队回归正轨。他观察到,每一次互动都充斥着谎言和矛盾。
What he does right is not tossing aside a narrative as being baseless while holding on to another based on gut feeling. He understands that misleading accounts may contain fragments of truth. He carefully assesses each interaction, assigns weights to each observation, and then combines them to arrive at a conclusion. He starts from uncertainty but slowly builds towards the most probable truth, keeping his personal biases aside. 他做得正确的地方在于,他不会仅仅凭直觉就抛弃一种说法而坚持另一种。他明白,误导性的陈述中可能包含真相的碎片。他仔细评估每一次互动,为每个观察结果分配权重,然后将它们结合起来得出结论。他从不确定性出发,在排除个人偏见的同时,缓慢地构建出最可能的真相。
Blanc begins by listing the probable causes of death. In the Bayesian world, this is called a Prior Model. A prior model is the set of assumptions we hold before we have any evidence. In this case, the prior model is the initial hypotheses about Thrombey’s death before the investigation commences. 布兰科首先列出了可能的死因。在贝叶斯世界中,这被称为“先验模型”(Prior Model)。先验模型是指我们在获得任何证据之前所持有的假设集合。在本案中,先验模型就是调查开始前关于桑伯恩死亡的初步假设。
Assessing the Completeness of Initial Beliefs 评估初始信念的完备性
Let’s assess the initial beliefs to see if we’ve overlooked any other possibility. Have we overlooked the possibility that this was an attempt to frame someone? If so, should that be included as the sixth hypothesis? This is where the most important rule (MECE Principle) for formulating a hypothesis in Bayesian Inference comes into play. Each hypothesis formulated as part of Bayesian Inference should be Mutually Exclusive and Collectively Exhaustive (MECE). 让我们评估一下这些初始信念,看看是否遗漏了其他可能性。我们是否忽略了这可能是一场栽赃陷害?如果是的话,是否应该将其作为第六个假设纳入其中?这就是贝叶斯推断中制定假设最重要的规则——MECE原则(相互独立,完全穷尽)。贝叶斯推断中的每一个假设都应该是相互独立且完全穷尽的。
Let’s revisit the sixth potential hypothesis, ‘Trying to Frame Someone’. While the chosen hypothesis should answer what might have caused the death, this potential hypothesis talks more about the motive behind the death, provided it is proven that it was a murder. So, it breaks the mutual exclusivity rule of the MECE principle and hence cannot be a direct hypothesis. 让我们重新审视第六个潜在假设——“试图栽赃陷害”。虽然所选的假设应该回答“是什么导致了死亡”,但这个潜在假设更多是在讨论死亡背后的动机(前提是已证明这是一起谋杀)。因此,它违反了MECE原则中的“相互独立”规则,不能直接作为假设。
Assigning Probabilities (Prior Probabilities) 分配概率(先验概率)
Let’s stick with the hypotheses we had formulated earlier, as they consider all possible causes of death (collectively exhaustive). The next logical step is to assign probabilities to our initial beliefs. This means we start with an educated guess about how likely each hypothesis is to have caused Harlan Thrombey’s death. Since we assign probabilities before we have any direct evidence or data, we call this the prior probability. 让我们坚持使用之前制定的假设,因为它们考虑了所有可能的死因(完全穷尽)。下一步合乎逻辑的操作是为我们的初始信念分配概率。这意味着我们首先要对每个假设导致哈兰·桑伯恩死亡的可能性进行有根据的猜测。由于我们在获得任何直接证据或数据之前就分配了概率,因此我们称之为“先验概率”。
A question that naturally comes to our mind is whether each hypothesis carries the same probability of occurring. No, not always. It is a common misconception in Bayesian inference that we must assign equal probability to all hypotheses. In the absence of prior evidence, we assume that Detective Blanc assigns equal probability to each hypothesis. But that’s not always the case. 我们自然会想到一个问题:每个假设发生的概率是否相同?不,并非总是如此。在贝叶斯推断中,必须为所有假设分配相等概率是一个常见的误区。在缺乏先验证据的情况下,我们假设布兰科侦探为每个假设分配了相等的概率。但事实并非总是如此。
We may also assume non-uniform (unequal) probabilities if we have prior knowledge suggesting that a hypothesis is more probable than the others. General crime statistics may also be useful for estimating prior probabilities. For instance, according to FBI homicide data [2], it is said that in most homicides, murder victims know their murderer. Homicides by an outsider often require a motive involving burglary or some kind of revenge. Therefore, H4 receives greater weight, as family members have greater access to the victim. Moreover, in Harlan Thrombey’s case, the hypothesis that a family member caused his death carries more weight as his family members could be… 如果我们有先验知识表明某个假设比其他假设更有可能发生,我们也可以假设非均匀(不等)的概率。一般的犯罪统计数据对于估算先验概率也很有用。例如,根据FBI的凶杀案数据[2],大多数凶杀案的受害者都认识凶手。外人作案通常需要涉及入室盗窃或某种报复的动机。因此,H4(家庭成员作案)获得了更高的权重,因为家庭成员更容易接触到受害者。此外,在哈兰·桑伯恩的案例中,家庭成员导致其死亡的假设权重更高,因为他的家人可能……