• Quick note - the problem with Youtube videos not embedding on the forum appears to have been fixed, thanks to ZiprHead. If you do still see problems let me know.

Probability question help

I think I have a (somewhat) closed form solution:

n = number of slots
k = number of events
m = number of open slots
F(n,k,m) = probability function

[latex]F(n,k,m) = \sum_{i=0}^n(-1)^{i+m-1}\binom{n}{i}\binom{i}{m}(1-i/n)^k[/latex]

The starting point came from GreedyAlgorithm's formula in this thread. He came up with a closed formula for when all slots are filled. It's then a matter of using a recursion formula to work downwards from there.

This formula has a problem. The combinations formula requires i > m, but that isn't always the case since i starts at 0.
 
Does that formula work?

The idea is right, in any case. Inclusion-exclusion is the key.

Here's what I get (but my m is the number of non-empty slots, like HappyCat's f):

[latex]\[\frac{\binom{n}{m}\sum_{i=0}^m(-1)^{m-i}\binom{m}{i}i^k}{n^k}\][/latex]


I get 0.0712 for this formula with n = 10, m = 8 and k = 28, which matches with the two independent simulations that have been posted. I think we have a winner!
 
This formula has a problem. The combinations formula requires i > m, but that isn't always the case since i starts at 0.
I think it still works if the binomial coefficient is defined as zero when the lower term is greater than the upper term.

Doesn't matter though, 69dodge's formula is neater, though I'm pretty sure the two are equivalent (aside from the sign error in my formula).
 
Here's the results of running the experiment 10,000,000 times. Showning the probability of 0 empty, 1 empty, 2 empty etc.

Rounded to the nearest decimal.

Code:
0-55.9%   1-36.6%   2-7.1%   3-0.5%   4-0.0%
 
Here's the results of running the experiment 10,000,000 times. Showning the probability of 0 empty, 1 empty, 2 empty etc.

Rounded to the nearest decimal.

Code:
0-55.9%   1-36.6%   2-7.1%   3-0.5%   4-0.0%
These percentages now make general intuitive sense to me. I believe that my previous percentages (2 empty - 0.19% and 3 empty - 0.0046%) are relevant to a different question, namely: What is the probability that there would be no recessions beginning in years ending in 2 and 5 in the last two centuries? However, as Beth notes, that isn't the right question because (at least as far as I know) a hypothesis that those two end-digit years would be unlikely to experience recessions had not been formulated beforehand. Rather, someone presumably noticed this anomaly in combing through the 200 years of data. So, the relevant question is: What is the probability that there would be no recessions beginning in years ending in ANY two single digits (e.g., 0 and 1, 1 and 2, 2 and 5, 8 and 9, etc. for a total of 45 combinations) in the last two centuries?

The reason I say that BobK's percentages make general intuitive sense is as follows: While, early on, it would take only one "event" (recession) to fill a "slot" (end-digit years), the number of events it will take to fill each slot will quickly rise as more slots fill. By the time 7 slots have filled, I estimate the average number of events per slot would be around two. This would mean that it would take an average of about 14 (of the 28 total) events to fill seven slots. At that point, the odds that none of the three empty slots will be filled by a particular remaining event would be 70%, since 7 of the 10 slots are filled. Because a total of 14 events remain, the odds that none of these events will fill any of the three empty slots is 70% to the 14th power, which equals 0.7% (compared to BobK's calculated 0.5%).

Further, 70% to the second power is about one-half, and so it will take an average of about two more events to fill one of the three remaining empty slots. Thus, it will take an average of about 16 events to fill eight slots. At that point, the odds that neither of the two empty slots will be filled by a particular remaining event would be 80%, since 8 of the 10 slots are filled. Because a total of 12 events remain, the odds that none of these events will fill either of the two empty slots is 80% to the 12th power, which equals 6.9% (compared to BobK's calculated 7.1%).

Finally, 80% to the third power is about one-half, and so it will take an average of about three more events to fill one of the two remaining empty slots. Thus, it will take an average of about 19 events to fill nine slots. At that point, the odds that the one empty slot will not be filled by a particular remaining event would be 90%, since 9 of the 10 slots are filled. Because a total of 9 events remain, the odds that none of these events will fill the one empty slot is 90% to the 9th power, which equals 39% (compared to BobK's calculated 36.6%).

This back-of-the-envelope analysis still does not address the second question posed by stocks in the opening post. However, looking at the relative probabilities that I calculated previously, I would estimate that the odds of 3 slots having a total of 18 or more events would be in the 1-2% range, and the odds of 2 slots having a total of 18 or more events would be just above zero. Has anyone figured out how to more exactly calculate those percentages?
 
Good estimate for the 2nd question Rodney.

Here are the results for the 2nd question, simulating the experiment 10,000,000 times. Shows the recession count distribution for largest totals of 2 slots and 3 slots.

Rounded to nearest decimal.

Counts not shown, didn't occur.

Code:
2 slot total.
6-0.0%   7-0.5%   8-11.1%   9-23.6%   10-29.5%   11-20.2%   12-10.0%   13-3.8%   14-1.1%   15-0.3%   16-0.1%   17-0.0%   18-0.0%   19-0.0%

Code:
3 slot total.
9-0.0%   10-0.5%   11-3.0%   12-13.7%   13-24.3%   14-25.3%   15-18.2%   16-9.6%   17-3.8%   18-1.2%   19-0.3%   20-0.1%   21-0.0%   22-0.0%   23-0.0%
 
Good estimate for the 2nd question Rodney.

Here are the results for the 2nd question, simulating the experiment 10,000,000 times. Shows the recession count distribution for largest totals of 2 slots and 3 slots.

Rounded to nearest decimal.

Counts not shown, didn't occur.

Code:
2 slot total.
6-0.0%   7-0.5%   8-11.1%   9-23.6%   10-29.5%   11-20.2%   12-10.0%   13-3.8%   14-1.1%   15-0.3%   16-0.1%   17-0.0%   18-0.0%   19-0.0%

Code:
3 slot total.
9-0.0%   10-0.5%   11-3.0%   12-13.7%   13-24.3%   14-25.3%   15-18.2%   16-9.6%   17-3.8%   18-1.2%   19-0.3%   20-0.1%   21-0.0%   22-0.0%   23-0.0%
Thanks, Bob. A very interesting problem. Perhaps stocks can inform us whether (s)he thinks the calculations and analysis on this thread support any particular position regarding the occurrence of recessions.
 
Last edited:
Thanks, Bob. A very interesting problem. Perhaps stocks can inform us whether (s)he thinks the calculations and analysis on this thread support any particular position regarding the occurrence of recessions.


Thanks for all the calc's. I will be expanding my idea in a new post
in the math/science forum entitled "Numerology and the American Economy."
The results are startling, but my methodology will be severly challanged.
I'm brainstorming, but not much of a details man.
Look for the post in a few days.
 
Thanks for all the calc's. I will be expanding my idea in a new post
in the math/science forum entitled "Numerology and the American Economy."
The results are startling, but my methodology will be severly challanged.
I'm brainstorming, but not much of a details man.
Look for the post in a few days.

I posted a new topic, "Numerology and the American Economy" in the
math/science forum.
 

Back
Top Bottom