记 Alice 的点数为 A,Bob 两次为 B1,B2,Bob 的有效点数为 max{B1,B2}。
按 A>20 与 A≤20 分情况:
P(A>20)=31,P(A≤20)=32.
- 若 A>20,则 Alice 必胜。
- 若 A≤20,条件在 A=a 时 Alice 获胜需要 max{B1,B2}<a,即 B1<a 且 B2<a,概率为 (20a−1)2。
并且在 A≤20 条件下,A 在 1..20 上均匀,所以
P(赢∣A≤20)=201a=1∑20(20a−1)2=800247.
合并得
P(赢)=31+32⋅800247=1200647.
Original Explanation
Let W be the event Alice wins. Then we can use the Law of Total Probability to condition on whether or not Alice's roll is larger than 20. Let A be the value Alice rolls. Furthermore, let B1 and B2 be the values that Bob rolls on the first and second roll. We have that
P[W]=P[W∣A>20]P[A>20]+P[W∣A≤20]P[A≤20]
It is clear to see that
P[A>20]=31
as this accounts for 10 of 30 values. Furthermore,
P[W∣A>20]=1
as this is strictly larger than any value Bob can roll.
For the other case, we compute
P[W∣A≤20]=a=1∑20P[max{B1,B2}<a]P[A=a∣A≤20]=a=1∑20P[B1<a]2P[A=a∣A≤20]
This is the event of interest as we want Alice to have a strictly higher value than Bob. We simplify the maximum statement by noting that B1 and B2 are IID and that max{B1,B2}<a is equivalent to saying that B1<a,B2<a.
We know
P[A=a∣A≤20]=201
as we know A≤20, so there are 20 equally-likely values. Furthermore, we have that
P[B1<a]=20a−1
as we want B1 to take some value between 1 and a−1, inclusive of both. Therefore,
P[W∣A≤20]=201a=1∑20(20a−1)2=800247
Combining these, we have that
P[W]=31+32⋅800247=1200647