Step 1: Determine the probability distribution for one person tossing three coins.
Let X be the random variable representing the number of heads obtained when tossing three fair coins. The total number of possible outcomes is \(2^3 = 8\). The number of heads X can be 0, 1, 2, or 3. This follows a binomial distribution with n=3 and p=1/2.
- P(X=0) (TTT): \(\binom{3}{0}(\frac{1}{2})^3 = \frac{1}{8}\)
- P(X=1) (HTT, THT, TTH): \(\binom{3}{1}(\frac{1}{2})^3 = \frac{3}{8}\)
- P(X=2) (HHT, HTH, THH): \(\binom{3}{2}(\frac{1}{2})^3 = \frac{3}{8}\)
- P(X=3) (HHH): \(\binom{3}{3}(\frac{1}{2})^3 = \frac{1}{8}\)
Step 2: Calculate the probability of getting the same number of heads.
Let \(X_A\) be the number of heads for person A and \(X_B\) be the number of heads for person B. Since their tosses are independent, the probability that they both get k heads is \(P(X_A=k) \times P(X_B=k)\).
We want to find the probability that \(X_A = X_B\). This can happen if both get 0 heads, or both get 1 head, or both get 2 heads, or both get 3 heads.
\[ P(X_A = X_B) = P(X_A=0 \cap X_B=0) + P(X_A=1 \cap X_B=1) + P(X_A=2 \cap X_B=2) + P(X_A=3 \cap X_B=3) \]
Due to independence:
\[ P(X_A = X_B) = P(X_A=0)P(X_B=0) + P(X_A=1)P(X_B=1)\] \[+ P(X_A=2)P(X_B=2) + P(X_A=3)P(X_B=3) \]
Step 3: Substitute the probabilities and compute the sum.
\[ P(X_A = X_B) = \left(\frac{1}{8}\right)\left(\frac{1}{8}\right) + \left(\frac{3}{8}\right)\left(\frac{3}{8}\right) + \left(\frac{3}{8}\right)\left(\frac{3}{8}\right) + \left(\frac{1}{8}\right)\left(\frac{1}{8}\right) \]
\[ P(X_A = X_B) = \frac{1}{64} + \frac{9}{64} + \frac{9}{64} + \frac{1}{64} = \frac{1+9+9+1}{64} = \frac{20}{64} \]
Simplifying the fraction:
\[ P(X_A = X_B) = \frac{5 \times 4}{16 \times 4} = \frac{5}{16} \]