A student is performing a random walk on the integer number line. Starting at any integer position > -20 and < 20, the student flips a coin. If it's heads, the student takes one step to the right, if tails, one step to the left, and flips again and again until one of the barriers is hit.
Given any integer starting point between the two barriers, what is the probability of hitting the yellow barrier? Click on the video to see a sample run of the Scratch project where the walker starts at +15. The answer is P(yellow) = 7/8.
The Scratch project can be viewed and downloaded by clicking on the following link.
I know of two simple proofs for the theoretical probability of the walker arriving at either barrier given the integer starting position of the walker. One uses an 'area' analysis and the other a tree diagram. You can obtain a free copy (PDF format) of either or both proofs by sending an e-mail request to firstname.lastname@example.org.
A related Scratch project is my project Feynman's Random Walk
I coded Dr. Feynman's amazing result that if a random walker starts at zero and performs an n-step random walk, with equal probabilities for moving one step to the right or left, and with no barriers left or right, then the ‘average displacement’ from 0 of the walker is √(n).