Erica tosses a fair coin $n$ times and, independently, Fred tosses a fair coin $n+1$ times. What is the probability Fred gets more heads than Erica?
I have been able to solve this problem theoretically, and found that the probability is $1/2.$ The next step is to code it in R, and I am not sure where to begin.
If you want R code for a simulation, here is about the simplest possible version. I used a million iterations with $n = 9.$ With a million iterations, you can expect about three place accuracy.
Extras: