Probability Question
Moderators: gmalivuk, Moderators General, Prelates
Probability Question
The number of my address in 2417.
My mom has the number 4127 in her credit card number and 7412 in her bank account number.
She thinks it's an act of god.
I'm trying to show her that the probability of something like that isn't THAT small.
So:
What is the probability that a given 4 digits appear consecutively in any ordering in a random 16digit number AND a random 10digit number? Or rather, what is the probability that a given ndigits appear consecutively in any ordering in a random mdigit number?
I've tried various methods, but they all have their flaws. Can YOU do it?
My mom has the number 4127 in her credit card number and 7412 in her bank account number.
She thinks it's an act of god.
I'm trying to show her that the probability of something like that isn't THAT small.
So:
What is the probability that a given 4 digits appear consecutively in any ordering in a random 16digit number AND a random 10digit number? Or rather, what is the probability that a given ndigits appear consecutively in any ordering in a random mdigit number?
I've tried various methods, but they all have their flaws. Can YOU do it?
 Torn Apart By Dingos
 Posts: 817
 Joined: Thu Aug 03, 2006 2:27 am UTC
Re: Probability Question
Probably pretty small anyway. This can be calculated, but you are asking the wrong question, for many reasons.
1. The probability depends on the given string. "11" will appear less often than "12" in a longer string.
2. The four digits don't appear in her phone number, or social security number, etc. You should condition against the four digits appearing in any two out of dozens of digit strings that are specific to her.
3. What's particular about the number in your address? Just as remarkable would have been if the four last digits of your social security number had been in her credit card and bank account numbers. You should seek the probability that any number sequence in any of your own digit strings particular to you appear in your mom's own digit strings.
4. This is just one out of millions of possible coincidences. It could be that the digits 2417 occured in order in her numbers, but not consecutively. You should test against all of these things too.
5. The numbers you are talking about are probably not random. For example, they probably can't start with zeros.
The probability that no apparent coincidences would happen is intuitively pretty damn small, but it's hard to quantify this, as one would need to define what would qualify as a coincidence.
1. The probability depends on the given string. "11" will appear less often than "12" in a longer string.
2. The four digits don't appear in her phone number, or social security number, etc. You should condition against the four digits appearing in any two out of dozens of digit strings that are specific to her.
3. What's particular about the number in your address? Just as remarkable would have been if the four last digits of your social security number had been in her credit card and bank account numbers. You should seek the probability that any number sequence in any of your own digit strings particular to you appear in your mom's own digit strings.
4. This is just one out of millions of possible coincidences. It could be that the digits 2417 occured in order in her numbers, but not consecutively. You should test against all of these things too.
5. The numbers you are talking about are probably not random. For example, they probably can't start with zeros.
The probability that no apparent coincidences would happen is intuitively pretty damn small, but it's hard to quantify this, as one would need to define what would qualify as a coincidence.
 gmalivuk
 GNU Terry Pratchett
 Posts: 26767
 Joined: Wed Feb 28, 2007 6:02 pm UTC
 Location: Here and There
 Contact:
Re: Probability Question
Yeah, when "unusual" things like this crop up, people usually try to figure out the prior probability of something very specific after it happened, when really they should be considering Pr(something surprising happens) rather than Pr(this specific surprising thing happens).Torn Apart By Dingos wrote:4. This is just one out of millions of possible coincidences....
The probability that no apparent coincidences would happen is intuitively pretty damn small
It's related to the birthday "paradox": the probability that there is some pair of people in a group of 23 who have the same birthday is over 50%. But people are surprised when it happens because the probability of two people in a group of 23 both having that particular day as their birthday is very low, and the probability that another person in a group that contains you and 22 others would have your same birthday is also low. And it's these two probabilities that people seem to be more inclined to apply to the birthday situation.

 Posts: 21
 Joined: Wed Apr 21, 2010 2:43 am UTC
Re: Probability Question
She is making the mistake of looking for a pattern then determining if it is likely or not. Almost any set of data will have a pattern that is very rare because of the large number of random patterns possible. In other words, like others have posted, she will find something unusual or surprising but because of the multitude of surprising things possible, it isn't surprising that she found something surprising.
Re: Probability Question
Agreed. Events which have a milliontoone chance of occurring still happen every few years, simply because there are millions of potential coincidences around.
But if somebody had predicted beforehand that "your bank account number and your credit card number will both contain the digits 1,2,4 and 7 consecutively in some order.", then the probability of them being right is (according to my crude calculations) about 1 in 1000. Unlikely? Definitely. But nowhere near an Act Of God.
But if somebody had predicted beforehand that "your bank account number and your credit card number will both contain the digits 1,2,4 and 7 consecutively in some order.", then the probability of them being right is (according to my crude calculations) about 1 in 1000. Unlikely? Definitely. But nowhere near an Act Of God.
The preceding comment is an automated response.
 Yakk
 Poster with most posts but no title.
 Posts: 11128
 Joined: Sat Jan 27, 2007 7:27 pm UTC
 Location: E pur si muove
Re: Probability Question
This is really approximate. The real math would take time, and I'm lazy.
So we have a pool of 100 12 or so digit sequences that you might care about. What is the approximate odds that some sequence of 4 numbers will appear in at least 3 of them?
My goal is to find an orderofmagnitude of the probability, or even the orderofmagnitude of the orderofmagnitude.
So we have 100 choose 3 different numbers. That is about E5.5 (ie, 10^5.5) different possibilities.
There are E4 different 4 digit sequences. So the odds that 3 different 4 digit sequences that are random match is E8.
Each 12 digit sequence has 9 different spots (E1) where your 4 digit sequence could start. With any 3 of them, that works out to an E3 contribution.
E5.5 * E3 * E8 =~ E0.5. Ie, the approximate probability that there will be a 4 digit sequence in common among a pool of 100 different 12 digit random sequences is ... that it will happen. Now, the above is a very approximate calculation  so if the probability was as low as 1% it wouldn't be surprising. The above doublecounted, undercounted, and did a bunch of extremely questionable transformations all over the place.
So we have a pool of 100 12 or so digit sequences that you might care about. What is the approximate odds that some sequence of 4 numbers will appear in at least 3 of them?
My goal is to find an orderofmagnitude of the probability, or even the orderofmagnitude of the orderofmagnitude.
So we have 100 choose 3 different numbers. That is about E5.5 (ie, 10^5.5) different possibilities.
There are E4 different 4 digit sequences. So the odds that 3 different 4 digit sequences that are random match is E8.
Each 12 digit sequence has 9 different spots (E1) where your 4 digit sequence could start. With any 3 of them, that works out to an E3 contribution.
E5.5 * E3 * E8 =~ E0.5. Ie, the approximate probability that there will be a 4 digit sequence in common among a pool of 100 different 12 digit random sequences is ... that it will happen. Now, the above is a very approximate calculation  so if the probability was as low as 1% it wouldn't be surprising. The above doublecounted, undercounted, and did a bunch of extremely questionable transformations all over the place.
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision  BR
Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.
Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.
Re: Probability Question
gmalivuk wrote:Yeah, when "unusual" things like this crop up, people usually try to figure out the prior probability of something very specific after it happened...
P_{(that wild coincidence that just occurred)}=1, 'cause, well, it happened. It's not even about rare events. Probability doesn't look back. Apophenia doesn't change this.
Time flies like an arrow, fruit flies have nothing to lose but their chains Marx
 gmalivuk
 GNU Terry Pratchett
 Posts: 26767
 Joined: Wed Feb 28, 2007 6:02 pm UTC
 Location: Here and There
 Contact:
Re: Probability Question
Which is why I said prior.
Re: Probability Question
This reminds me of:
How to sort a deck of cards in O(1) time:
The probability of a deck of cards being in the exact order it's in is 1/(52!). There is such a small likelihood of this that it's clearly absurd to say that this happened by chance, so it must have been consciously put in that order by an intelligent Sorter. Therefore it's safe to assume that it's already optimally Sorted in some way that transcends our naïve mortal understanding of "ascending order". Any attempt to change that order to conform to our own preconceptions would actually make it less sorted.
addams wrote:This forum has some very well educated people typing away in loops with Sourmilk. He is a lucky Sourmilk.
Re: Probability Question
gmalivuk wrote:Which is why I said prior.
Sorry. Should have made it clear I was agreeing and expanding.
Time flies like an arrow, fruit flies have nothing to lose but their chains Marx
Re: Probability Question
Ok, I agree with all of you. She could've found any number of coincidences in a group of numbers.
But take away the context for a second and consider it just a math problem. How would one go about solving this?
For starters: What is the probability that a given 4digits appear consecutively in any ordering in a random 16digit number?
This is pretty easy for numbers up to 7 or 8 digits, but then it gets messy. Who knows what to do?
In response to Torn Apart By Dingos: Let's assume that all digits of the number we are looking for are different.
In response to Yakk: Did you really just calculate a probability of over 300%?
But take away the context for a second and consider it just a math problem. How would one go about solving this?
For starters: What is the probability that a given 4digits appear consecutively in any ordering in a random 16digit number?
This is pretty easy for numbers up to 7 or 8 digits, but then it gets messy. Who knows what to do?
In response to Torn Apart By Dingos: Let's assume that all digits of the number we are looking for are different.
In response to Yakk: Did you really just calculate a probability of over 300%?
Re: Probability Question
The Fuzz wrote: What is the probability that a given 4digits appear consecutively in any ordering in a random 16digit number?
Well, I'd say approximately 13/10000 (rationale: total number of combinations is 10^16; there are 13 possible spaces for a 4digit block to take, hence around 13*10^12 valid combinations; of course, this is not exactly correct because some valid are counted more than once (when the given number repeats multiple times), so the actual probability is somewhat less).
 NathanielJ
 Posts: 882
 Joined: Sun Jan 13, 2008 9:04 pm UTC
Re: Probability Question
VPeric wrote:Well, I'd say approximately 13/10000 (rationale: total number of combinations is 10^16; there are 13 possible spaces for a 4digit block to take, hence around 13*10^12 valid combinations;
Aren't the four digits allowed to appear in any order, meaning we should multiply by 4! = 24? This makes the probability about 3%.
 Torn Apart By Dingos
 Posts: 817
 Joined: Thu Aug 03, 2006 2:27 am UTC
Re: Probability Question
Fix m=4, the length of the shorter string. Let x(n) be the number of strings of length n containing the shorter string as a substring (for now, we don't allow it be reordered). The first occurrence of the shorter string in a string of length n is after at some position i such that 0<=i<=nm (so that there are i digits before the substring and nmi digits after it). The string preceding the substring must not contain the substring, so there are 10^ix(i) of those, whereas the string following the substring is arbitrary, so there are 10^(nmi) of those. So x(n) can be solved from the recurrence
[math]x(n)=\sum_{i=0}^{nm}(10^ix(i))10^{nmi},[/math]
[math]x(0)=...=x(m1)=0.[/math]
Now, the number we are looking for is
[math]y(n):=\dfrac{m!x(n)}{10^n}[/math]
where the factor m! comes from reordering the substring, and dividing by 10^n gives us the probability that the whole string contains the substring. So the probability for n=16 and n=10 are:
3.11892008399976 %
2.1596400024 %
(exactly, since the probabilities are integers divided by a power of 10).
[math]x(n)=\sum_{i=0}^{nm}(10^ix(i))10^{nmi},[/math]
[math]x(0)=...=x(m1)=0.[/math]
Now, the number we are looking for is
[math]y(n):=\dfrac{m!x(n)}{10^n}[/math]
where the factor m! comes from reordering the substring, and dividing by 10^n gives us the probability that the whole string contains the substring. So the probability for n=16 and n=10 are:
3.11892008399976 %
2.1596400024 %
(exactly, since the probabilities are integers divided by a power of 10).
 Yakk
 Poster with most posts but no title.
 Posts: 11128
 Joined: Sat Jan 27, 2007 7:27 pm UTC
 Location: E pur si muove
Re: Probability Question
The Fuzz wrote:In response to Yakk: Did you really just calculate a probability of over 300%?
Yep. I said it was likely. And I didn't even factor in the fact that "in any order" was an option!
(What is really going on is that I'm counting things more than once to a certain degree (and undercounting at other points), and using approximate orders of magnitude. This means that the answer is approximate  having a 300% probability from an approximate series of probability calculations is expected!)
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision  BR
Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.
Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.
Who is online
Users browsing this forum: No registered users and 7 guests