March 18th, 2020 at 3:03:22 PM
permalink

I've got an enormous spreadsheet going that is doing this the hard way, but I don't think I'm going to bother finishing it. Maybe something more elegant will come to me.

It's not whether you win or lose; it's whether or not you had a good bet.

March 18th, 2020 at 3:26:13 PM
permalink

Okay. I’ll give djtehch34t some more time before I post the solution

It’s all about making that GTA

March 18th, 2020 at 4:34:59 PM
permalink

Quote:Ace2Okay. I’ll give djtehch34t some more time before I post the solution

I had an idea while roller-blading just now. Please wait for me to officially throw in the towel first.

It's not whether you win or lose; it's whether or not you had a good bet.

March 18th, 2020 at 5:22:27 PM
permalink

Here is my answer only. It was done in a fairly small spreadsheet, looking at all 55 possible states of the light bulbs, the probability of getting to each one, and the expected time to get there. It is just a number, no formulas.

4.622957064

Last edited by: Wizard on Mar 19, 2020

It's not whether you win or lose; it's whether or not you had a good bet.

March 18th, 2020 at 7:01:10 PM
permalink

Quote:Ace2Okay. I’ll give djtehch34t some more time before I post the solution

I was able to derive an expression for T[N][1], but T[N][N] seems out of reach of my techniques. I think generating functions might make the recurrence easier to work with, but I don't have time to try that now.

Nice problem. Looking forward to seeing a closed form solution.

Nice problem. Looking forward to seeing a closed form solution.

March 18th, 2020 at 7:47:55 PM
permalink

The answer is the integral from zero to infinity of:

1 - (1 - x/e^x - 1/e^x)^10 =

335641897646511216668163083 /

72603291141126144000000000

=~ 4.62 years

Here is my long-winded explanation of the formula. I’m sure a real math guru could explain it more eloquently.

If, for instance, we throw a single die and want to know the probability that a number has not appeared after x rolls, we take (5/6)^x. We also know that the sum of a geometric series equals 1 / (1 - a). So (5/6)^0 + (5/6)^1 + (5/6)^2 + .... = 1 / (1 - 5/6) = 6. What this infinite series says is: the sum of the probabilities that an event has not yet occurred at every possible state in time equals the average time the event will take to occur. In this case the average rolls needed to roll a number is 6.

Fortunately, this property is also true for exponential distributions. I don’t have the proof but I know it works, which seems reasonable since the exponential distribution is basically the continuous version of the geometric distribution. So to calculate the average time for our event to happen (all light bulbs to go out), we just need to sum the probabilities that they have not all gone out...at all possible times.

We use the Poisson distribution, where x is years passed, f is frequency, x/f = expected value and p = (x/f)^k / (e^(x/f)*k!). For our problem, a light burns out every 1 years on average so f = 1. The chance it has gone out once is x^1 / (e^x * 1!) and the chance it has gone out zero times is x^0 / (e^x * 0!). Therefore, the chance it has gone out more than once is the complement of those two states: 1 - x/e^x - 1/e^x. That probability for all 10 bulbs is (1 - x/e^x - 1/e^x)^10. And since we want to know the sum of the probabilities of NOT being in that state for all time, we take the integral from zero to infinity of 1 - (1 - x/e^x - 1/e^x)^10 =~ 4.62 years

1 - (1 - x/e^x - 1/e^x)^10 =

335641897646511216668163083 /

72603291141126144000000000

=~ 4.62 years

Here is my long-winded explanation of the formula. I’m sure a real math guru could explain it more eloquently.

If, for instance, we throw a single die and want to know the probability that a number has not appeared after x rolls, we take (5/6)^x. We also know that the sum of a geometric series equals 1 / (1 - a). So (5/6)^0 + (5/6)^1 + (5/6)^2 + .... = 1 / (1 - 5/6) = 6. What this infinite series says is: the sum of the probabilities that an event has not yet occurred at every possible state in time equals the average time the event will take to occur. In this case the average rolls needed to roll a number is 6.

Fortunately, this property is also true for exponential distributions. I don’t have the proof but I know it works, which seems reasonable since the exponential distribution is basically the continuous version of the geometric distribution. So to calculate the average time for our event to happen (all light bulbs to go out), we just need to sum the probabilities that they have not all gone out...at all possible times.

We use the Poisson distribution, where x is years passed, f is frequency, x/f = expected value and p = (x/f)^k / (e^(x/f)*k!). For our problem, a light burns out every 1 years on average so f = 1. The chance it has gone out once is x^1 / (e^x * 1!) and the chance it has gone out zero times is x^0 / (e^x * 0!). Therefore, the chance it has gone out more than once is the complement of those two states: 1 - x/e^x - 1/e^x. That probability for all 10 bulbs is (1 - x/e^x - 1/e^x)^10. And since we want to know the sum of the probabilities of NOT being in that state for all time, we take the integral from zero to infinity of 1 - (1 - x/e^x - 1/e^x)^10 =~ 4.62 years

Last edited by: Ace2 on Mar 18, 2020

It’s all about making that GTA

March 19th, 2020 at 4:06:00 AM
permalink

Thanks Ace.

This is vaguely coming back to me from college statistics 35 years ago (man I'm old!).

To use a simple example, the expected time to get a 6 on a fair die is also the integral from 0 to infinity of (1/6) exp (-x/6) dx

Ace submitted such a form of an answer to the first light bulb problem and I incorrectly rebuked him, thinking he was just approximating the answer.

I just spent an hour looking over my old college probability and statistics text, which is as beaten as a good Christian's bible, and couldn't find this principle in writing, but I know it's in there somewhere.

Does anyone else on the forum the term of why this is true? I'd like to see a proof of it, or at least a name for theorem.

This is vaguely coming back to me from college statistics 35 years ago (man I'm old!).

To use a simple example, the expected time to get a 6 on a fair die is also the integral from 0 to infinity of (1/6) exp (-x/6) dx

Ace submitted such a form of an answer to the first light bulb problem and I incorrectly rebuked him, thinking he was just approximating the answer.

I just spent an hour looking over my old college probability and statistics text, which is as beaten as a good Christian's bible, and couldn't find this principle in writing, but I know it's in there somewhere.

Does anyone else on the forum the term of why this is true? I'd like to see a proof of it, or at least a name for theorem.

It's not whether you win or lose; it's whether or not you had a good bet.

March 19th, 2020 at 8:14:05 AM
permalink

I first saw this method used to calculate the expected number of rolls to get all faces of a die twice.

Like the light bulb problem, calculating the expected value to get all faces once is easy: 6/6 + 6/5 + 6/4 + 6/3 + 6/2 + 6/1 = 14.7 rolls

But the calculation to get each face twice is surprisingly more complex. It’s the integral over all time of

1 - (1 - (x/6)/e^(x/6) - 1/e^(x/6))^6 =~ 24.13 rolls

Like the light bulb problem, calculating the expected value to get all faces once is easy: 6/6 + 6/5 + 6/4 + 6/3 + 6/2 + 6/1 = 14.7 rolls

But the calculation to get each face twice is surprisingly more complex. It’s the integral over all time of

1 - (1 - (x/6)/e^(x/6) - 1/e^(x/6))^6 =~ 24.13 rolls

It’s all about making that GTA

May 22nd, 2020 at 1:19:51 PM
permalink

Here is my solution to the two light bulb per socket version (PDF).

It's not whether you win or lose; it's whether or not you had a good bet.

May 31st, 2020 at 2:10:22 PM
permalink

New light bulb problem:

Light bulbs have an average life of 1 year, following the exponential distribution. New light bulbs are turned on at an average of 1 per year, also following the exponential distribution.

Starting from t = 0 (no light bulbs are on), how long will it take, on average, for the first light bulb to burn out? The first to burn out isn’t necessarily the first to be turned on.

Caveat: I think I have the exact answer but I’m not 100% sure since I haven’t been able to confirm it with a thorough simulation (I’m not a programmer, just Excel)

Light bulbs have an average life of 1 year, following the exponential distribution. New light bulbs are turned on at an average of 1 per year, also following the exponential distribution.

Starting from t = 0 (no light bulbs are on), how long will it take, on average, for the first light bulb to burn out? The first to burn out isn’t necessarily the first to be turned on.

Caveat: I think I have the exact answer but I’m not 100% sure since I haven’t been able to confirm it with a thorough simulation (I’m not a programmer, just Excel)

It’s all about making that GTA