Simple Random Walk

Two equally matched opponents are competing in a game in which changes in score occur often and in one point increments. (Imagine a basketball game in which every basket counts only one point.) We’ll use simulation to investigate the following questions.

Pause to think about these questions before proceeding.

Let \(X_n\) be the point difference (team A - team B) after the first \(n\) scores; \(X_n>0\) if team A is in the lead, \(X_n<0\) if team B is in the lead, and \(X_n=0\) if the score is tied. We can model \(X_n\) as a simple symmetric random walk on the integers starting from \(X_0=0\), like in the Harry and Tom example from the handout.

Consider the first \(2n\) steps of the walk. We say \(2n\) because that will be even. We are interested, in particular, in times at which the walk can be in state 0 (that is, the score is tied), which can only happen in an even number of steps.

We are interested in the following random variables, each of which has been scaled to take values between 0 and 1.

Write your own code to conduct and run a simulation to approximate the distribution of each of \(T/(2n)\), \(L/(2n)\), and \(M/(2n)\) for \(n=100\). Summarize the results with appropriate plots and summary statistics, and describe the distributions. Consider the three questions at the start of this page; what do your simulation results suggest? Write a brief report summarizing your results and conclusions.

Optional: experiment with different values of \(n\) and discuss how the results change with \(n\).