### Instruction: Legolas flips a fair coin 2008 times, and Gimli flips another fair coin 2009 times. What is the probability that Gimli flips more heads than Legolas?### Response: I want to compare the number of heads that Legolas and Gimli flip, so I need to keep track of that.
One way to do that is to define a random variable X that represents the difference between Gimli's heads and Legolas' heads.
For example, if Gimli flips 1000 heads and Legolas flips 999 heads, then X = 1.
If Gimli flips 1000 heads and Legolas flips 1001 heads, then X = -1.
I want to find the probability that X is positive, since that means Gimli flips more heads than Legolas.
To do that, I need to know the distribution of X.
How can I find that?
Well, I know that the number of heads that each person flips follows a binomial distribution, since they are flipping fair coins independently.
Let G be the number of heads that Gimli flips, and L be the number of heads that Legolas flips.
Then G ~ Binomial(2009, 1/2) and L ~ Binomial(2008, 1/2).
The distribution of X is the difference of two binomial distributions, which is not easy to work with directly.
However, I can use a normal approximation, since the number of trials is large and the probability of success is 1/2 for both distributions.
The normal approximation says that G is approximately normal with mean 2009/2 and standard deviation sqrt(2009/4), and L is approximately normal with mean 2008/2 and standard deviation sqrt(2008/4).
Then, by the properties of normal distributions, X is also approximately normal with mean 2009/2 - 2008/2 = 1/2 and standard deviation sqrt(2009/4 + 2008/4).
Now, I can use the standard normal table to find the probability that X is positive.
I need to convert X to a standard normal variable Z by subtracting the mean and dividing by the standard deviation.
So, Z = (X - 1/2) / sqrt(2009/4 + 2008/4).
The probability that X is positive is the same as the probability that Z is positive, since they are equivalent transformations.
Using the standard normal table, I find that the probability that Z is positive is 0.5199.
Therefore, the probability that Gimli flips more heads than Legolas is approximately 0.5199.