TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why the 'Sleeping Beauty Problem' Is Keeping Mathematicians Awake

4 点作者 foweltschmerz6 个月前

1 comment

uberman6 个月前
This strikes me like the Monty Hall problem where people intuitively believe the answer to be 50&#x2F;50.<p>Does this not simulate the problem in python?<p><pre><code> import random coin = [&quot;heads&quot;, &quot;tails&quot;] guess = &quot;heads&quot; guesses_correct = 0 wakings = 0 n = 1_000_000 for _ in range(n): actual = random.choice(coin) if actual == guess: wakings += 1 guesses_correct += 1 else: wakings += 2 print(f&quot;guessed correctly: {guesses_correct&#x2F;wakings:0.2f}%&quot;)</code></pre>
评论 #42414417 未加载