# mp3 inspired stats/prob question

**URL:** <https://boards.straightdope.com/t/mp3-inspired-stats-prob-question/433716>\
**Category:** Factual Questions\
**Created:** [January 16, 2008, 5:52am UTC](https://boards.straightdope.com/t/mp3-inspired-stats-prob-question/433716 "2008-01-16T05:52:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qwertyasdfg](https://avatars.discourse-cdn.com/v4/letter/q/ecc23a/32.png) [@Qwertyasdfg](https://boards.straightdope.com/u/Qwertyasdfg)\
**Post date:** [January 16, 2008, 5:52am UTC](https://boards.straightdope.com/t/mp3-inspired-stats-prob-question/433716/1 "2008-01-16T05:52:01Z")

</div>

I thought of this question whilst loading mp3s onto my iPod. Suppose my iPod has N songs on it, and each song of average length 4 minutes. Also suppose a truly random shuffle (ie the same song may be repeated.) How long must it play continuously to have a .5 probability of having played each song at least once?

---

<div class="post-metadata">

**Author:** ![lexus\_kinexus](https://avatars.discourse-cdn.com/v4/letter/l/df788c/32.png) [@lexus\_kinexus](https://boards.straightdope.com/u/lexus_kinexus)\
**Post date:** [January 16, 2008, 1:10pm UTC](https://boards.straightdope.com/t/mp3-inspired-stats-prob-question/433716/2 "2008-01-16T13:10:01Z")

</div>

Just N/2\*4, or 2N. Imagine you have 4 songs. If you listen for 8 minutes, after 4 minutes each song has a 1/4 chance of being played. In the second 4 minutes, they also have a 1/4 chance of being played, so the total probability is 1/2

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [January 16, 2008, 1:21pm UTC](https://boards.straightdope.com/t/mp3-inspired-stats-prob-question/433716/3 "2008-01-16T13:21:48Z")

</div>

This looks a lot like the [collector’s problem](http://www.mathpages.com/home/kmath047.htm), although the bit where you need every song twice makes it slightly more complicated.

[QUOTE=lexus kinexus]  
Just N/2\*4, or 2N. Imagine you have 4 songs. If you listen for 8 minutes, after 4 minutes each song has a 1/4 chance of being played. In the second 4 minutes, they also have a 1/4 chance of being played, so the total probability is 1/2  
[/QUOTE]

After 20 minutes, is there a 5/4 chance of each song having been played twice?

---

<div class="post-metadata">

**Author:** ![muttrox](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@muttrox](https://boards.straightdope.com/u/muttrox)\
**Post date:** [January 16, 2008, 3:19pm UTC](https://boards.straightdope.com/t/mp3-inspired-stats-prob-question/433716/4 "2008-01-16T15:19:03Z")

</div>

[QUOTE=lexus kinexus]  
Just N/2\*4, or 2N. Imagine you have 4 songs. If you listen for 8 minutes, after 4 minutes each song has a 1/4 chance of being played. In the second 4 minutes, they also have a 1/4 chance of being played, so the total probability is 1/2  
[/QUOTE]

Just plain wrong.

---

<div class="post-metadata">

**Author:** ![Qwertyasdfg](https://avatars.discourse-cdn.com/v4/letter/q/ecc23a/32.png) [@Qwertyasdfg](https://boards.straightdope.com/u/Qwertyasdfg)\
**Post date:** [January 16, 2008, 4:48pm UTC](https://boards.straightdope.com/t/mp3-inspired-stats-prob-question/433716/5 "2008-01-16T16:48:36Z")

</div>

[QUOTE=ultrafilter]  
This looks a lot like the [collector’s problem](http://www.mathpages.com/home/kmath047.htm), although the bit where you need every song twice makes it slightly more complicated.

[/QUOTE]

I agree that this does look similar to the problem you linked to. But when did I say anything about needing to play songs twice?

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [January 16, 2008, 5:17pm UTC](https://boards.straightdope.com/t/mp3-inspired-stats-prob-question/433716/6 "2008-01-16T17:17:10Z")

</div>

[QUOTE=Qwertyasdfg]  
I agree that this does look similar to the problem you linked to. But when did I say anything about needing to play songs twice?  
[/QUOTE]

That’s a very good question. Chalk it up to the early morning.

---

<div class="post-metadata">

**Author:** ![Giles](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/giles/32/60_2.png) [@Giles](https://boards.straightdope.com/u/Giles)\
**Post date:** [January 16, 2008, 5:27pm UTC](https://boards.straightdope.com/t/mp3-inspired-stats-prob-question/433716/7 "2008-01-16T17:27:47Z")

</div>

[QUOTE=lexus kinexus]  
Just N/2\*4, or 2N. Imagine you have 4 songs. If you listen for 8 minutes, after 4 minutes each song has a 1/4 chance of being played. In the second 4 minutes, they also have a 1/4 chance of being played, so the total probability is 1/2  
[/QUOTE]

If N = 1, the probability is 1 after just 1 song has played. (Clearly).

If N = 2, the probability is 1/2 after just 2 songs have played. (The calculation is pretty easy).

So this formula is invalid in at least 2 cases.

---

<div class="post-metadata">

**Author:** ![Cabbage](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@Cabbage](https://boards.straightdope.com/u/Cabbage)\
**Post date:** [January 16, 2008, 7:20pm UTC](https://boards.straightdope.com/t/mp3-inspired-stats-prob-question/433716/8 "2008-01-16T19:20:11Z")

</div>

This problem has come up on the board before (different context, but essentially the same problem):

> **[Birthday statistics question](https://boards.straightdope.com/sdmb/showthread.php?t=99561)**
>
> I’ll admit I’ve always been weak with statistics, so I’ll throw this one out for the more mathematically inclined. How large a group of people would you have to have before you had a 50% or better chance of at least one person in the group being...

That thread asks how many people you need to have at least a 50% chance of having all 365 possible birthdays (ignore leap years) represented.

The answer I gave in post 3 can easily be modified for this question, given a specific number of songs N on your ipod.
