Math489/889
Stochastic Processes and
Advanced Mathematical Finance
Homework 5

Steve Dunbar

Due Wed, October 6, 2010
  1. Use a fair coin, say a penny, to play a simple coin-flipping game, as described throughout the chapter. Use the chart in the section to record the outcomes of the game. Save your chart as you will use this random record several times later in the course to test and illustrate some of the theorems. Each “gambler” flips the coin, and records a +1 (gains $1) if the coin comes up “Heads” and records 1 (loses $1) if the coin comes up “Tails”. On the chart, the player records the outcome of each flip by recording the flip number, the outcome as “H” or “T” and keeps track of the cumulative fortune of the gambler so far. It is best to keep these records in a neat chart, since we will refer to them later. Each “gambler” should record 100 flips, which takes about 10 to 20 minutes.

    For the homework, to turn in:

    1. Record the total number of heads, the total number of tails, and the difference of the number of heads and tails.
    2. Record whether the coin flip game reached “victory” +10 before reaching 10, or “ruin” or conversely reached ruin before reaching “victory”, or reached neither in 100 flips.
    3. Record the number of flips to first reach either +10 or 10 or state that the game reached neither.
    4. Record the total number of flips out of 100, i.e the total time, that the number of Heads exceeded the number of Tails.
    1. For T0 = 10 and a = 20, draw a graph of the probability of ruin as a function of the probability q.

      PIC

      This graph was produced with the Maple command plot(subs(T0 = 10, a = 20, p = 1-q, Ruin), q = 0 .. 1) where the expression Ruin was defined with  Ruin := ((q/p)^a-(q/p)^T0)/((q/p)^a-1) 

    2. For a = 20 and q = 0.55 draw a graph of the probability ruin as a function of T0.

      PIC

      This graph was produced with the Maple command plot(subs(a = 20, p = .45, q = .55, Ruin), T0 = 0 .. 20)

    3. For a = 20 and q = 0.45 draw a graph of the probability of ruin as a function of T0.

      PIC

      This graph was produced with the Maple command plot(subs(a = 20, p = .55, q = .45, Ruin), T0 = 0 .. 20)

  2. A gambler starts with $2 and wants to win $2 more to get to a total of $4 before being ruined by losing all his money. He plays a coin-flipping game, with a coin that changes with his fortune.
    1. If the gambler has $2 he plays with a coin that gives probability p = 12 of winning a dollar and probability q = 12 of losing a dollar.
    2. If the gambler has $3 he plays with a coin that gives probability p = 14 of winning a dollar and probability q = 34 of losing a dollar.
    3. If the gambler has $1 he plays with a coin that gives probability p = 34 of winning a dollar and probability q = 14 of losing a dollar.

    Use “first step analysis” to write three equations in three unknowns (with two additional boundary conditions) that give the probability that the gambler will be ruined. Solve the equations to find the ruin probability.

    Solution: The first step equations for the ruin are:

    q4 = 0 q3 = (34)q2 + (14)q4 q2 = (12)q1 + (12)q3 q1 = (14)q0 + (34)q3 q0 = 1

    The solution of the equations is: q1 = 58, q2 = 12, q3 = 38.

  3. A gambler plays a coin flipping game in which the probability of winning on a flip is p = 0.4 and the probability of losing on a flip is q = 1 p = 0.6. The gambler wants to reach the victory level of $16 before being ruined with a fortune of $0. The gambler starts with $8, bets $2 on each flip when the fortune is $6,$8,$10 and bets $4 when the fortune is $4 or $12 Compute the probability of ruin in this game.

    Solution: Writing the set of first-step equations:

    q16 = 0 q12 = 0.6q8 + 0.4q16 q10 = 0.6q8 + 0.4q12 q8 = 0.6q6 + 0.4q10 q6 = 0.6q4 + 0.4q8 q4 = 0.6q0 + 0.4q8 q0 = 1

    Rewrite the equations as:

    0.6q8 q12 = 0 0.6q8 q10 + 0.4q12 = 0 0.6q6 q8 + 0.4q10 = 0 0.6q4 q6 + 0.4q8 = 0 q4 + 0.4q8 = 0.6

    In matrix form this is

    0 0 0.6 0 1 0 0 0.61 .4 0 0.610.4 0 0.610.4 0 0 1 0 0.4 0 0 q4 q6 q8 q10 q12 = 0 0 0 0 0.6 .

    The solution is q4 = 0.90857, q6 = 0.85371, q8 = 0.77143, q10 = 0.64800, q12 = 0.46286.

  4. Use the ruin probability notation to show that in a random walk starting at the origin the probability of reaching the point a > 0 before the random walk returns to the origin is p(1 q1).

    Solution: The random walk starts at the origin T0 = 0. Consider the case that the first step is to the left, occurring with probability q, so that T1 = 1. Then if the walk is ever to reach the goal a > 0, then the walk must necessarily pass through the origin again. Hence for the walk to reach the goal a > 0 the walk must first step to the right with probability p. Then the walk starts from state one, and we seek the subsequent probability that the walk reaches a before reaching 0. In our terminology, that is the probability of victory from 1 before being ruined. That is p1 or equivalently 1 q1. Hence the combined probability of these two independent events is p(1 q1).