Associated Topics || Dr. Math Home || Search Dr. Math

### Social Security Number Probability

```Date: 02/13/2004 at 20:43:26
From: John
Subject: probability/statistics

I think I've finally solved a nagging question I've had, and I wanted
to see if I was right.  The question is determining the chances of
having a Social Security number comprised of only two digits, such as
211-12-1221.  My daughter, who is now five, has such a number, and

I found it really confusing to come up with a formula that goes
place-by-place through the nine digits, determining the likelihood
that each digit will be a match for the previous digits.  Instead, I
tried the approach below, and was wondering if it yields the correct

There are 1 billion 9 digit numbers (000,000,000 through
999,999,999).

There are 45 different combinations of two different numerals (10 x 9
divided by 2).  There are 512 (2 to the 9th power) different
permutations for any two numbers to be used in a 9 digit number.

45 x 512 = 23,040 - 10 = 23,030.  This is the total number
of unique combinations for 2 different numerals to appear as a 9
digit number.  The subtracting 10 removes the 10 single digit cases,
such as 111,111,111.

23,030                               1
-------------   equals approximately   ------
1,000,000,000                          43,421

Therefore, there are 1 in 43,421 chances that a 9 digit number
will be comprised of exactly two different numerals.

What do yo think??  (Thanks!!)

```

```
Date: 02/13/2004 at 23:52:35
From: Doctor Douglas
Subject: Re: probability/statistics

Hi John.

Thanks for writing to the Math Forum.  You should check out our FAQ
page on techniques for enumerating possibilities:

Permutations and Combinations
http://mathforum.org/dr.math/faq/faq.comb.perm.html

Having said that, let's work out your problem:

# of possible SSN's = 10^9.

Of course, this assumes that any digit can appear in any location.
This isn't entirely true because there are rules that determine what
digits can appear where and what they mean.  But it's okay for
argument's sake.  Now, on to enumerating the number of two-digit numbers:

First suppose that the two allowed digits are A and B.  For this
set of numerals,

# of ways to choose the first digit X**-**-**** = 2
# of ways to choose the second digit *X*-**-**** = 2
...
# of ways to choose the ninth digit ***-**-***X = 2

All 2x2x2x2x2x2x2x2x2 = 2^9 = 512 patterns are permitted, with
the exception of AAAAAAAAA and BBBBBBBBB (which are 1-digit SSN's).
So there are 510 nine-digit patterns consisting of numerals A and B.
There are

C(10,2) = (10 x 9)/2 = 45

ways to choose the numerals A and B from the set {0,1,...,9}.

Hence the number of 2-digit numbers is 45 x 510 = 22950.

Your calculation has most of the ingredients, but the single-digit
cases are counted multiple times in your total of 23040, and all of
these must be removed.  Each single-digit (e.g. 111-11-1111) is
counted once for each occurrence of a pair that contains that number.
In other words, 111-11-1111 is counted in 1, 2, ... 9, for a total of
nine times.  Since there are ten single-digit cases, you must remove
9 x 10 = 90 instances of single-digit SSN's, leaving you with
23040 - 90 = 22950.

- Doctor Douglas, The Math Forum
http://mathforum.org/dr.math/
```

```
Date: 02/14/2004 at 00:49:26
From: John
Subject: Thank you (probability/statistics)

Dear Doc Douglas,

Brilliant explanation!  Very clear!  It's gratifying to know I was so
close, and also really interesting to me to see where my mistake was.
I'll definately check out the link you suggested.  Thanks so much!
```
Associated Topics:
College Probability
High School Probability

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search