23
$\begingroup$

Awhile back I bought 2 identical rolls of dental floss, each with 50 uses, and picked them randomly. Tonight, the one I picked hit the 50 use mark. What is the expected number of uses in the remaining roll?

With a 100000 case brute force, I get an expected answer of 8 uses. Neat, so I have maybe a week.

dental floss graph

What is the non-brute force answer?

$\endgroup$
4
  • 5
    $\begingroup$ en.m.wikipedia.org/wiki/Banach%27s_matchbox_problem $\endgroup$
    – Steve D
    Commented Aug 29, 2018 at 6:19
  • 3
    $\begingroup$ @SteveD: For a slight difference between the two problems, see this question. $\endgroup$
    – joriki
    Commented Aug 29, 2018 at 6:52
  • 1
    $\begingroup$ There is no concrete evidence that flossing is useful for your dental hygiene (I mean, if you have something specific to clean, sure). Some say it is even damaging to your gums. The 8 uses should probably last you about two months, not a week. $\endgroup$
    – Asaf Karagila
    Commented Aug 29, 2018 at 13:02
  • $\begingroup$ @joriki: It's really the same problem though, no? But you set $N=50-1$ to account for stopping on the 50th try, and you add $1$ to the expectation you get because the other roll cannot be empty. $\endgroup$
    – Steve D
    Commented Aug 29, 2018 at 14:13

2 Answers 2

13
$\begingroup$

Model your floss use as a random walk in the plane starting at $(0,0)$ and taking a unit step to the right when you pick from roll A, and a unit step up when you pick from roll B.

The first time you use up one of the rolls, there are $k$ uses remaining in the other roll, for some $k$ between $1$ and $50$. There are two mutually exclusive possibilities: you must have arrived at the point $(50, 50-k)$ by taking a step to the right of the point $(49, 50-k)$, or you arrived at the point $(50-k, 50)$ by taking a step up from the point $(50-k, 49)$.

For the first option there are $49 + (50-k)\choose 49$ ways to reach the penultimate point, followed by a step to the right; each path has probability $(1/2)^{99-k}\cdot(1/2)$, giving an overall probability of ${99-k\choose 49}(1/2)^{100-k}$. Since same result holds for the second option, the probability that the remaining roll has $k$ uses is twice this last number: $$p_k:={99-k\choose 49}\left(\frac12\right)^{99-k}.\tag1$$ To compute $E(K)$, the expected number of uses in the remaining roll, you can evaluate the summation $\sum k p_k$, as in @joriki's approach. Alternatively you can use the following device to obtain a closed form expression: Rearrange (1) into the recursion relation $$ 2[50-k]p_k = [100-(k+1)]p_{k+1},\tag2 $$ valid for all $k=1,\ldots,50$. Sum both sides of (2) over all $k$: $$ 2[50 - E(K)] = 100(1-p_1) - (E(K)-p_1).\tag3 $$ Finally rearrange (3) to obtain $$E(K)=99p_1= 99{98\choose49}\left(\frac12\right)^{98}\approx7.96.$$

$\endgroup$
2
  • $\begingroup$ Your calculation of the expectation is very nice! :-) $\endgroup$
    – joriki
    Commented Aug 29, 2018 at 19:10
  • 1
    $\begingroup$ @joriki Thanks! I just now fixed an error in (3) which fortunately leads to the same result :-) $\endgroup$
    – grand_chat
    Commented Aug 29, 2018 at 19:38
12
$\begingroup$

I understand “hit the $50$-use mark” to mean that you can tell when the $50$-th use has used up the roll, and you don't need to pick it one more time to find that it's empty.

The probability that the other roll has $0\lt k\le 50$ uses left is

$$ \mathsf P(K=k)=2^{-(100-k)}\binom{99-k}{49}, $$

since in that case you chose the now empty roll any $49$ times out of $99-k$ times and then once tonight.

I assume that you're implying that you haven't hit the $50$-use mark on the other roll yet, so we want the conditional probabilities $\mathsf P(K=k\mid K\gt0)$. Fortunately, we have $\mathsf P(K\gt0)$ by symmetry, so for $k\gt0$ we have

$$ \mathsf P(K=k\mid K\gt0)=\frac{\mathsf P(K=k\land K\gt0)}{\mathsf P(K\gt0)}=\frac{\mathsf P(K=k)}{\mathsf P(K\gt0)}=2\mathsf P(K=k)\;. $$

Thus

\begin{eqnarray*} \mathsf E[K\mid K\gt0] &=& \sum_{k=1}^{50}k\,\mathsf P(K=k\mid K\gt0) \\ &=& \sum_{k=1}^{50}k\cdot2\cdot2^{-(100-k)}\binom{99-k}{49} \\ &=& \frac{315285451704888104171289053925}{39614081257132168796771975168} \\ &\approx& 7.96\;, \end{eqnarray*}

in agreement with your simulation.

Alternatively, you could get the factor of $2$ by saying that the last use emptied either of the rolls, so you don't get a factor of $\frac12$ for the last use, and then using $2^{-(99-k)}$ for the probability of a certain pattern of choices of that or the other roll.

$\endgroup$
5
  • $\begingroup$ Can you explain why the exponent is not $-(99-k)$? $\endgroup$
    – Steve D
    Commented Aug 29, 2018 at 6:25
  • $\begingroup$ @SteveD: I will in a bit, but I need to fix an error first :-) $\endgroup$
    – joriki
    Commented Aug 29, 2018 at 6:26
  • $\begingroup$ @SteveD: Actually, it turned out the error yielded a factor of $2$ :-) Does that resolve your question? $\endgroup$
    – joriki
    Commented Aug 29, 2018 at 6:36
  • $\begingroup$ @SteveD: I added another paragraph about another way of arriving at $2^{-(99-k)}$ -- perhaps this is what you had in mind? $\endgroup$
    – joriki
    Commented Aug 29, 2018 at 6:40
  • 2
    $\begingroup$ Yes, thanks! See my comment above for the history of this nice problem :) $\endgroup$
    – Steve D
    Commented Aug 29, 2018 at 6:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .