Archive for The Riddler

fun sums

Posted in Books, Kids, Statistics with tags , , , , , , on May 26, 2021 by xi'an

Some sums and limits found from a [vacation] riddle by The Riddler:

For the first method, Friend 1 takes half of the cake, Friend 2 takes a third of what remains, and so on. After  infinitely many friends take their respective pieces, you get whatever is left.

\lim_{k\to\infty}\prod_{i=2}^k\left(1-\dfrac{1}{i}\right) = \lim_{k\to\infty} \dfrac{1}{k} = 0

For the second method, Friend 1 takes ½² of the cake, Friend 2 takes ⅓² of what remains, and so on. After infinitely many friends take their respective pieces, you get whatever is left.

\lim_{k\to\infty}\prod_{i=2}^k\left(1-\dfrac{1}{i^2}\right) = \lim_{k\to\infty}\dfrac{k+1}{2k} = \dfrac{1}{2}

For the third method, Friend 1 takes ½² of the cake, Friend 2 takes ¼² of what remains, Friend 3 takes ⅙² of what remains after Friend 2, and so on. After your infinitely many friends take their respective pieces, you get whatever is left.

\lim_{k\to\infty}\prod_{i=2}^k\left(1-\dfrac{1}{4i^2}\right) = \lim_{k\to\infty}\dfrac{4(2k+1)}{3\pi k} = \dfrac{2}{\pi}

you said that I said that you said that…

Posted in Books, Kids, pictures, Statistics with tags , , , on May 25, 2021 by xi'an

A riddle from The Riddler on limited information decision making, which I tought I failed to understand:

Two players, Martina and Olivia, are each secretly given realisations, m and u. Starting with Martina, they must state to the other player whom they think probably has the greater number until they agree. They are playing as a team, hoping to maximize the chances they correctly predict who has the greater number. For a given round, what is the probability that the person they agree on really does have the bigger number?

A logical strategy is as follows: If m>.5, P(U>m)<.5, hence Martina should state her number is probably bigger, which conveys to Olivia that M>.5. If u<.5, Olivia can agree for certain, else, if u>.75, P(M>u)<.5 and she can state a probably larger number, while if 0.5<u<.75, Olivia can state (truthfully) that her number us probably smaller, although there is a ½ probability she is wrong. As detailed in the solution, the probability of finishing on a false statement is ¼²+¼³+…, equal to 1/12.

bean bag win

Posted in Books, Kids, pictures, R with tags , , , , on May 19, 2021 by xi'an

A quick riddle from The Riddler, where a multiple step game sees a probability of a 3 point increase of .4 and a probability of a 1 point increase of .3 with a first strategy (A), versus a probability of a 3 point increase of .4 and a probability of a 1 point increase of .3 with a second strategy (B), and a sure miss third strategy (C). The goal is to optimise the probability of hitting exactly 3 points after 4 steps.

The optimal strategy is to follow A while the score is zero, C when the score is 3, and B otherwise. The corresponding winning probability is 0.8548, as checked by the following code

win=function(n=1,s=0){
  if(n==4)return((s==3)+.4*(!s)+.8*(s==2))
  else{return(max(c(
    .4*win(n+1,s+3)+.3*win(n+1,s+1)+.3*win(n+1,s),
    .1*win(n+1,s+3)+.8*win(n+1,s+1)+.1*win(n+1,s),
    win(n+1,s))))}}

Georgia on my mind

Posted in Books, Kids, Statistics, Travel with tags , , , , , , , , on May 12, 2021 by xi'an

The riddle of this week was inspired by the latest presidential elections when one State after another flipped the winner from Trump to Biden. Incl. Georgia.

On election night, the results of the 80 percent who voted on Election Day are reported out. Over the next several days, the remaining 20 percent of the votes are then tallied. What is the probability that the candidate who had fewer votes tallied on election night ultimately wins the race?

Assuming many votes, perfect balance between both candidates (p=½), and homogeneity between early and late ballots, the question boils down to the probability of a sum of two normals, X+Y, ending up being of the opposite sign from X, when the variances of X and Y are α and 1-α. Which writes as the expectation

2 \mathbb{E}_\alpha[\Phi(-X/\sqrt{1-\alpha})]

equal to

\frac{2}{2\pi}\left(\frac{\pi}{2} + \arctan\{\sqrt{\alpha/(1-\alpha)|}\}\right)

which returns a probability of about 0.14 when α=0.8. When looking at the actual data for Georgia, out of 5 million voters, at some point 235,000 ballots remained to be counted with Trump on the lead. This means an α about 0.05 and implies a probability of 7% (not accounting for the fact that the remaining mail-in-ballots were more favourable to Biden.)

one-way random walks

Posted in Kids, R, Statistics with tags , , , on May 2, 2021 by xi'an

A rather puzzling riddle from The Riddler on an 3×3 directed grid and the probability to get from the North-West to the South-East nodes following the arrows. Puzzling because while the solution could be reasonably computed with an R code like

sucz=0
for(i in 1:2^12){
  path=intToBits(i)[1:12]
  sol=0
  for(j in 1:12)sol=max(sol,
        prod(path[paz[[j]][paz[[j]]>0]]==01)*
        prod(path[-paz[[j]][paz[[j]]<0]]==00))
  sucz=sucz+sol

where paz is the list of the 12 possible paths from North-West to South-East (excluding loops!), leading to a probability of 1135/2¹², I could not find a logical reasoning to reach this number. The paths of length 4, 6, 8 are valid in 2⁸, 2⁶, 2⁴ of the cases, respectively and logically!, but this does not help as they are dependent.