What is the probability that the sun will rise tomorrow?

1 min read

Laplace introduced the sunrise problem in 18th century. With prior knowledge that the sun has risen N days in the past consecutively (not knowing the gravity rules etc), what is your confidence that the sun will rise tomorrow?

Let p be the probability that the sun rise. Apparently p range from 0 to 1. Without any prior knowledge, we have same level of confidence to believe p=0, 0.1, 0.2, …, or 1. So we assume equal probability distribution on p.

Now assume day 1 passed and we found the sun rose. Based on this knowledge, how should we update our belief on p? Well, p=0 is impossible, otherwise we will have not observed the sunrise. p=0.1 is possible but unlikely. Because if p=0.1 we only have 10% probability to observe a sunrise but we did observe one. We can actually formally calculate P(p=q|N=1) = P(N=1|p=q) * P(p=q) / P(N=1) using Bayes’s theorem. Since p(N=1) is in the denominator and it doesn’t depend on q, we don’t care. Our prior belief of P(p=q) was a uniform distribution. P(N=1|p=q) is equal to q. So the result is P(p=q|N=1) = q. After normalization (i.e. our total ‘belief’ over all p should be 1), P(p=q|N=1) = 2*q. So we have updated our belief from uniform distribution to a skewed distribution towards bigger probability of sunrise.

Based on our new belief (i.e. P(p=q)=2*q), what is our confidence that the sun will rise tomorrow? We simply need to sum (or integrate) all the possibilities. The final result equals to int(2*q^2) = 2/3. Yes, we have 2/3 confidence to say the sun will rise tomorrow, given we have observed one sunrise.

We then continue doing this for N=2, 3, …. The confidence level equals to (N+1)/(N+2). If we have observed sunrise for 1000 days, our confidence level raised to 0.999.

The belief of the probability of sunrise based on n observations of sunrise
The belief of the probability of sunrise based on n observations of sunrise

But if we have prior knowledge of the gravity rules, our belief will be dramatically different.


两千多年前的战国时期,魏王的大臣庞葱对魏王说:“如果有人说外面的街市有老虎,您相信吗?”魏王说不信。“如果又有一个人说呢?”魏王说:“我将半信半疑。”“如果有第三个人说呢?”魏王说:“我会相信。” 上面的故事被总结成一个成语,叫“三人成虎”。当一件事情,即使是谣言,被多人说之后,听的人就会相信。这种因为证据的出现而导致人对某个事情的可能性判断的变化,其实就是统计学的贝叶斯公式的应用。 我们假设一开始魏王对“街上有老虎”这个事情的可能性是0.01 。现在有个新的证据\(E\),即有人说街上有老虎。那么听到这个证据后,魏王对“街上有老虎”这个事情的可能性的最新判断是多少呢? 要计算这个数值,就需要用到贝叶斯公式: $$P(H|E)=\frac{P(E|H)P(H)}{P(E)}$$ 其中H就是某个假设,比如“街上有老虎”,E就是证据,比如“有人说街上有老虎”。P(H)就是“街上有老虎”的概率,就是魏王一开始认为“街上有老虎”的概率。P(E|H)是指,如果街上有老虎是事实,那么有人说街上有老虎的概率是多少?P(H|E)是指,如果有人说街上有老虎,那么街上真有老虎的概率是多少?P(E)是指出现“有人说街上有老虎”的概率,可以这样计算: $$P(E)=P(E|H)P(H)+P(E|¬H)P(¬H)$$ 其中¬H指的是“街上没有老虎”。 现在假设一开始魏王认为 “街上有老虎” 的概率为0.01,即\(P(H)=0.01\)。假设如果街上有老虎是事实,那么有人说街上有老虎的概率是0.9,如果街上没有老虎,那么有人说街上有老虎的概率是0.1。根据这些值,我们可以算出来,听到有人说街上有老虎后,魏王认为街上有老虎的概率是: $$P(H|E)=\frac{P(E|H)P(H)}{P(E)}=\frac{0.9\times0.01}{ 0.9\times0.01 + 0.1\times0.99 }=\frac{1}{12}=0.08333…$$ 现在魏王对“街上有老虎”的判断已经上升到了0.08了,不过还很低,因此他说“不信”。根据上面的公式,如果有第二个人也说“街上有老虎”,那么魏王的最新判断是什么呢? $$P(H|E)=\frac{P(E|H)P(H)}{P(E)}=\frac{0.9\times\frac{1}{12}}{ 0.9\times \frac{1}{12} + 0.1\times \frac{11}{12}}=0.45$$...
Xu Cui
26 sec read

LaTex support (2020)

I used to use jsMath to support latex in this website, but it no longer works (I have no idea why). The one I...
Xu Cui
29 sec read

Recommend 3blue1brown

When I was in high school and saw the following equation, my mind was blown! $$1+\frac{1}{4}+\frac{1}{9}+\frac{1}{16}+…=\frac{\pi^2}{6}$$ Why is Pi here? Isn’t it supposed to...
Xu Cui
22 sec read

One Reply to “What is the probability that the sun will rise…”

  1. If n observations is equal to the number of days the world has existed what is the probability that the sun will rise? This with the prior knowledge of gravity, what is the probability, is it known or solvable?

Leave a Reply

Your email address will not be published. Required fields are marked *