To find the difference between the experimental probability and the theoretical probability of getting three heads when tossing three coins, we will first calculate both probabilities.
Theoretical Probability:
When tossing a coin, the probability of getting heads (H) is \( \frac{1}{2} \). When tossing three coins, the probability of getting three heads (HHH) can be calculated as:
\[ P(\text{3 heads}) = P(H) \times P(H) \times P(H) = \left(\frac{1}{2}\right) \times \left(\frac{1}{2}\right) \times \left(\frac{1}{2}\right) = \frac{1}{8} \]
Experimental Probability:
The experimental probability of getting three heads is calculated based on the results of the experiment. In the experiment, three heads occurred 40 times out of 100 trials. Therefore, the experimental probability is:
\[ P(\text{3 heads, experimental}) = \frac{\text{Number of times 3 heads occurred}}{\text{Total number of trials}} = \frac{40}{100} = \frac{2}{5} \]
Calculating the Difference:
Now, we need to find the difference between the experimental probability and the theoretical probability:
\[ \text{Difference} = P(\text{3 heads, experimental}) - P(\text{3 heads, theoretical}) = \frac{2}{5} - \frac{1}{8} \]
To perform this subtraction, we need a common denominator. The least common multiple of 5 and 8 is 40. We can convert both fractions:
\[ \frac{2}{5} = \frac{2 \times 8}{5 \times 8} = \frac{16}{40} \]
\[ \frac{1}{8} = \frac{1 \times 5}{8 \times 5} = \frac{5}{40} \]
Now we can subtract:
\[ \frac{16}{40} - \frac{5}{40} = \frac{16 - 5}{40} = \frac{11}{40} \]
The difference between the experimental probability and the theoretical probability is:
\[ \frac{11}{40} \]
Thus, the answer in simplest form is:
\[ \boxed{\frac{11}{40}} \]