Riddler Express: November 19, 2021

David Ding

November 19, 2021

Gym Rat

From Michael Dell’Amico comes a riddle requiring some mental gymnastics:

After realizing that your friends on μετα (The Riddler Social Network) are more popular than you, you decide to make some new friends at your local gym, which is open daily from 5 p.m. to 8 p.m. Some gym members attend very often. Others barely show up at all. As a matter of fact, there’s a uniform distribution for how often the different members are in the gym — from 0 percent of the time that the gym is open to 100 percent of the time. As a new member, you plan to be in the gym 50 percent of the time that it’s open. While working out, you decide to make friends with the first person you see. (Aw!)

What is the probability that this person visits the gym more often than you?

\(\frac{3}{4}\)

Explanation:

At first, without any assumptions about number of gym members, it might be difficult to grasp what it means for you to identify the "first person" you see. In order to rectify this, below are the assumptions I am making:

  1. Each gym member attends gym independent of all others.
  2. There are many gym members attending the gym.

With those two pieces of assumptions, it is sufficient to interpret the "first person" you see as randomly picking out a gym member attending gym that day, each with probability \(p\) where \(0 \leq p \leq 1\) and taken from a uniform distribution, as given in the problem. From there, we solve a simpler problem by discretizing the value of \(p\) to just two values: 0.25 and 0.75.

Say there are only two other gym members besides you, one attending gym 0.25 of the time and the other 0.75 of the time. One day, you stumble upon one of them. What is the probability that you met each person?

simple example

From the above graph, the probability of meeting each person is proportional to that person's time spent at the gym, illustrated by the length of the corresponding bar making up the whole. This is due to two facts. First, each person is independent of the other and the probability of identifying a person is equally likely. Therefore, the only factor affecting the probability of seeing that person at the gym is how much he/she attends, which is proportional to the probability as we have a uniform distribution. Therefore, meeting person 1, the lazy 0.25-er, would be 0.25/(0.25 + 0.75) = \(\frac{1}{4}\), while meeting the much more active counterpart would have probability of 0.75/(0.25 + 0.75) = \(\frac{3}{4}\).

Translating this to our case with many gym members, we can treat it as a continous case, where we simply replace summation with integration. Assuming many gym goers, and with the uniform distribution of their gym-activeness, it is easy to see that the desired answer is the proportion of the area under the Probability Density Function (pdf) from 0.5 to 1 divided by the total area under the curve from 0 to 1. It is illustrated as below:

full graph

Mathematically, the solution is given as:

\begin{align} &P(\text{The first person you see is more active than you}) \\ &\\ &= \frac{\int_{0.5}^{1} x\, \mathrm{d}x}{\int_{0}^{1} x\, \mathrm{d}x}\\ &\\ &= \frac{x^2/2|_{0.5}^{1}}{x^2/2|_{0}^{1}} \\ &\\ &= \frac{1 - 0.25}{1} \\ &= \boxed{\frac{3}{4}} \end{align}

This means that on average, your gym buddy goes to the gym about 25% more than you, when you are the average gym goer. This is a more exaggerated "friendship paradox" phenomenon observed in the previous rendition of μετα, The Riddler Social Network.

Now, if you go to the gym \(c\) of the time, where \(0 \leq c \leq 1\), then the probability that the lucky gym buddy of yours will be more active than you would be \(\boxed{1 - c^2}\). It is graphed as below with \(c = 0.5\) highlighted:

general case

The above graph reveals an insight where if you are below average in going to the gym, most of the people you meet will be more active than you. However, as soon as you start to go to the gym above the average of the population, quickly those that you see will be less active than you. We can figure out the magical "active point", \(a\), where you will be more active than most people you meet if you go to the gym \(a\) fraction of the time, as:

\begin{align} 1 - a^2 &\leq a \\ a^2 + a - 1 &\geq 0 \\ a &\geq \frac{-1 + \sqrt{5}}{2} \quad \text{or}\\ a &\leq \frac{-1 - \sqrt{5}}{2} \\ \end{align}

Ignoring the negative solution, you need to be active at least \(\frac{\sqrt{5} - 1}{2} \approx 0.618\), or 1/(Golden Ratio) (a.k.a. the silver ratio) of the time in order to claim a gym buddy who would be more likely to go to the gym less frequently than you.

It follows that in general, if you go to the gym \(c\) of the time, where \(0 \leq c \leq 1\), and the gym goers' activeness follows an arbitrary distribution with pdf of \(f_X(x)\) with the same independence and large population assumptions, then

\begin{align} &P(\text{The first person you see is more active than you}) \\ &\\ &= \boxed{\int_{c}^{1} f_X(x)\, \mathrm{d}x}\\ \end{align}

As the area under the entirety of a pdf curve is always equal to 1.