Deadline September 15, 2022.

Student Puzzle Editor Anirban DasGupta poses what he calls, “an exercise in merriment, on basic statistical inference”:

Your friend is thinking of a two-digit positive integer $N$ consisting of two distinct nonzero digits. The friend won’t tell you what $N$ is, but will give truthful answers to two yes/no questions.
You ask your friend, “Is it a prime number?”
Then, you ask, “If you reverse the digits of your number, is it still a prime number?”

You have a uniform prior distribution on $N$. Find explicitly the posterior median of $N$ in the four cases when your friend gives the answers “Yes–Yes,” “Yes–No,” “No–Yes,” and “No–No” to your two questions, respectively.

Do you prefer the posterior median or the posterior mean as your report in this problem, and why?

Student members of IMS are invited to submit solutions to bulletin@imstat.org (with subject “Student Puzzle Corner”). The names of student members who submit correct solutions, and the answer, will be published in the issue following the deadline. The Puzzle Editor is Anirban DasGupta. His decision is final.

 

Solution to Puzzle 39

The puzzle is here. Anirban DasGupta explains:

For $X \sim \mbox{Bin}(2n, \frac{1}{2})$, let $p_n = P(X = n)$. Let also, for $Y \sim \mbox{Bin}(m,p), $ and $k \geq 0, \theta = \theta_(m,p,k) = P(Y \geq k)$.
The previous puzzle asked for $\theta $ when $n = 5000, m = 250, k = 4, p = p_n$.

By using the Stirling series for factorials,
$p_n = \frac{1}{\sqrt{n\,\pi}}+\frac{1}{8\,\sqrt{\pi}\, n^{3/2}} +O(n^{-5/2})$.

With $n = 5000$, we get the approximate value $p = 0.00798$.
With $m = 250, k = 4$, by using a Poisson approximation, $\theta \approx P(\mbox{Poisson}(1.995) \geq 4) =0.14198 $.

Interestingly, Mathematica gives an exact value of both $p$ and $\theta$ in a rational form. This was pointed out to me by
Chris Burdzy and Jon Peterson. Stewart Ethier went ahead and obtained the Mathematica answer for the rational value of $\theta$. The numerator had 752,198 digits and the denominator had 752,199 digits. This rational value took Dr. Ethier 431
pages when converted to a PDF file.

Junshi Wang from the University of Hong Kong sent us a numerical answer to the puzzle. Thank you, Junshi!