Probability of two or more identical values in a set of random values Context:
I am a programmer.
I need to populate a table with random values.
Each table row is an ordered sequence of values. There are 8 such values in each row:
[first name][surname][streetaddress][ssn][city][foo][bar][baz]

I do this by, for each element in each row, picking values randomly from one pool containing 200 unique values of the elements type. E.g. the value in the first element in all rows would be picked from a common pool of 200 firstnames, the value in the second element is picked from a common pool of 200 surnames, and so on.
Question:
If I generate say, 1 000 000 such rows. What is the probability that I generate at least two identical rows?
 A: This is essentially the birthday paradox. There are $200^8 = 2.56 \times 10^{18}$ possible rows and you're randomly generating $10^6$ of them. A rough heuristic for the birthday paradox is that if there are $N$ equally likely possibilities then you need about $\sqrt{2N}$ samples for there to be a non-negligible probability of a collision, which here is $\sim 10^9$. So we expect a very small probability of a collision here.
Formally, if there are $N$ equally likely possibilities and you've generated $n$ samples, the probability of a collision is $1$ minus the probability of no collision. This is the probability that all of the $n$ samples are distinct, which is
$$\frac{N(N-1) \dots (N-(n-1))}{N^n} = \prod_{i=0}^{n-1} \left( 1 - \frac{i}{N} \right).$$
This gives
$$\mathbb{P}(\text{collision}) = 1 - \prod_{i=0}^{n-1} \left( 1 - \frac{i}{N} \right).$$
This is annoying to calculate exactly but for large $N$ and small $n$ compared to $N$ it's possible to estimate pretty precisely, as follows. We take the logarithm
$$\log \prod_{i=0}^{n-1} \left( 1 - \frac{i}{N} \right) = \sum_{i=0}^{n-1} \log \left( 1 - \frac{i}{N} \right).$$
If $n$ is small compared to $N$ then $\frac{i}{N}$ is small and then we can use the first-order Taylor approximation $\log (1 - x) \approx -x$, which gives
$$\sum_{i=0}^{n-1} \log \left( 1 - \frac{i}{N} \right) \approx \sum_{i=0}^{n-1} - \frac{i}{N} = \frac{1}{N} {n \choose 2} $$
and hence
$$\mathbb{P}(\text{collision})) \approx 1 - \exp \left( - \frac{1}{N} {n \choose 2} \right).$$
(This is where the $\sqrt{2N}$ heuristic comes from: we want ${n \choose 2}$ to be about the same size as $N$.) If we now further assume that ${n \choose 2}$ is small compared to $N$ (which is the case here) then we can use the first-order Taylor approximation $\exp(x) \approx 1 + x$ to get
$$\mathbb{P}(\text{collision}) \approx \frac{1}{N} {n \choose 2}.$$
This actually has a nice intuitive interpretation: $\frac{1}{N} {n \choose 2}$ is exactly the expected number of collisions, which is an upper bound on the probability of a collision. Plugging in $N = 200^8, n = 10^6$ gives
$$\boxed{ \mathbb{P}(\text{collision}) \le 1.93... \times 10^{-7} }.$$
