Evaluating U(l) with Applied Linear Algebra: A Gambler's Demise

In summary: No, tau determines the rate at which ultimate ruin is reached. It can be of any magnitude, i.e. seconds, months or...years.In summary, the author asks for help in solving an exercise on applied linear algebra, but does not provide any code or instructions. They state that the problem is one in which a gambler's ruin is modeled, but do not provide any more information on what the problem entails.
  • #36
haruspex said:
Yet the equation used for U(l) in post #34 and earlier divides by tau, and taking different values of tau is producing different probabilities.
I cannot understand why tau features there in conjunction with T. T should already be rate-independent.
Supposedly it's just the rate the ultimate probability is reached with. The ultimate probability is inversely proportional to tau, so large values of tau might correspond to years.

I've emailed the professor to clarify things.
 
Last edited:
Physics news on Phys.org
  • #37
Schwarzschild90 said:
Supposedly it's just the rate the ultimate probability is reached with. The ultimate probability is inversely proportional to tau, so large values of tau might correspond to years.

I've emailed the professor to clarify things.

If you are given a specific matrix ##\mathbf{T}## with actual numerical values, then there is no choice for ##\tau##. Your ##(M-1) \times (M-1)## matrix ##\mathbf{T}## must be a submatrix of the ##(M+1) \times (M+1)## matrix whose first and last rows equal zero and whose rows all sum to zero (just as in post #28). So, if the first row of your ##T## has the form ##[-2r, r, 0, \ldots, 0]## then your equations to detemine the vector of ruin probabilities
$$\mathbf{u} = \pmatrix{u_1\\ u_2\\ \vdots \\u_{M-1}} $$
read as
$$ \mathbf{0} = \mathbf{h} + \mathbf{T u}, $$
where
$$\mathbf{h} = \pmatrix{r \\ 0 \\ \vdots \\ 0} = r \pmatrix{1\\0\\ \vdots\\0} \equiv r \mathbf{e}$$
Thus
$$ \mathbf{u} = - r \mathbf{T}^{-1} \mathbf{e}$$.
The answer you get will be independent of the actual numerical value of ##r##.
 
  • Like
Likes Schwarzschild90
  • #38
Ray Vickson said:
If you are given a specific matrix ##\mathbf{T}## with actual numerical values, then there is no choice for ##\tau##. Your ##(M-1) \times (M-1)## matrix ##\mathbf{T}## must be a submatrix of the ##(M+1) \times (M+1)## matrix whose first and last rows equal zero and whose rows all sum to zero (just as in post #28). So, if the first row of your ##T## has the form ##[-2r, r, 0, \ldots, 0]## then your equations to detemine the vector of ruin probabilities
$$\mathbf{u} = \pmatrix{u_1\\ u_2\\ \vdots \\u_{M-1}} $$
read as
$$ \mathbf{0} = \mathbf{h} + \mathbf{T u}, $$
where
$$\mathbf{h} = \pmatrix{r \\ 0 \\ \vdots \\ 0} = r \pmatrix{1\\0\\ \vdots\\0} \equiv r \mathbf{e}$$
Thus
$$ \mathbf{u} = - r \mathbf{T}^{-1} \mathbf{e}$$.
The answer you get will be independent of the actual numerical value of ##r##.
Correct. I am given a specific matrix. What do you mean by no choice for tau? (I might have difficulties putting your explanation into context, as I am not familiar with your notation)

I determined the ultimate probability by taking tau = 1 and computing the inverse of T, like so:

U=-(inv(T)/tau).
 
  • #39
Schwarzschild90 said:
Correct. I am given a specific matrix. What do you mean by no choice for tau? (I might have difficulties putting your explanation into context, as I am not familiar with your notation)

I determined the ultimate probability by taking tau = 1 and computing the inverse of T, like so:

U=-(inv(T)/tau).

My notation is essentially the same as yours in post #1, except that what you call N0 I call ##\mathbf{u}## and what you call n0 I call ##\mathbf{e}## (and I write ##\mathbf{T}^{-1}## instead of Inv(T)). Otherwise, there is no difference at all!

Look at the formula I wrote: it ##\mathbf{u} = - r \mathbf{T}^{-1} \mathbf{e}##. This is using ##\tau = 1/r## is it not? For the case of your specific ##T## you take ##r = 1## and so ##\tau = 1/1##, and you really have no choice: any other value of ##\tau## would give incorrect results.
 
  • Like
Likes Schwarzschild90
  • #40
Ray Vickson said:
My notation is essentially the same as yours in post #1, except that what you call N0 I call ##\mathbf{u}## and what you call n0 I call ##\mathbf{e}## (and I write ##\mathbf{T}^{-1}## instead of Inv(T)). Otherwise, there is no difference at all!

Look at the formula I wrote: it ##\mathbf{u} = - r \mathbf{T}^{-1} \mathbf{e}##. This is using ##\tau = 1/r## is it not? For the case of your specific ##T## you take ##r = 1## and so ##\tau = 1/1##, and you really have no choice: any other value of ##\tau## would give incorrect results.
I figured as much, but I wanted to know for sure.

I set tau=1 for simplicity, as I thought it simplified the expression, but I also see there's a rigorous mathematical reason to do so.
 
Last edited:
  • #41
But you determine the first column of u, while the professor said that only the first row is of interest.
 
  • #42
Schwarzschild90 said:
But you determine the first column of u, while the professor said that only the first row is of interest.

It does not matter in this case because the first row of Inv(T) equals the first column.

Anyway, I much prefer to avoid matrix inverses altogether. What you have is an equation-solving problem, and using a matrix inverse is one of the worst ways to do it (although is often used nevertheless). If your 4x4 matrix T has first row [-2r,r,0,0] and last row [0,0,r,-2r], the equations you need to solve for the ruin probabilities ##u_1,u_2,u_3,u_4## are:
$$\begin{array}{rcl}
0 = r - 2r u_1 + r u_2 &\Rightarrow& u_1 = \frac{1}{2} + \frac{1}{2} u_2 \\
0 = r u_1 - 2r u_2 + u_3 &\Rightarrow& u_2 = \frac{1}{2} u_1 + \frac{1}{2} u_3 \\
0 = r u_2 -2r u_3 + r u_4 &\Rightarrow&u_3 = \frac{1}{2} u_2 + \frac{1}{2} u_4 \\
0 = r u_3 - 2r u_4 & \Rightarrow& u_4 = \frac{1}{2} u_3
\end{array}
$$
That's it: just solve those equations. You will get ##(u_1,u_2,u_3,u_4) = (4/5, \, 3/5, \, 2/5, \, 1/5)## for any ##r > 0##.
 
  • Like
Likes Schwarzschild90
  • #43
Schwarzschild90 said:
I set tau=1 for simplicity, as I thought it simplified the expression, but I also see there's a rigorous mathematical reason to do so.
I'd go a bit further than that. Tau simply should not appear in that equation. There must be a flaw in the algebra lesding to it.
 
  • Like
Likes Schwarzschild90
  • #44
Ray Vickson said:
It does not matter in this case because the first row of Inv(T) equals the first column.

Anyway, I much prefer to avoid matrix inverses altogether. What you have is an equation-solving problem, and using a matrix inverse is one of the worst ways to do it (although is often used nevertheless). If your 4x4 matrix T has first row [-2r,r,0,0] and last row [0,0,r,-2r], the equations you need to solve for the ruin probabilities ##u_1,u_2,u_3,u_4## are:
$$\begin{array}{rcl}
0 = r - 2r u_1 + r u_2 &\Rightarrow& u_1 = \frac{1}{2} + \frac{1}{2} u_2 \\
0 = r u_1 - 2r u_2 + u_3 &\Rightarrow& u_2 = \frac{1}{2} u_1 + \frac{1}{2} u_3 \\
0 = r u_2 -2r u_3 + r u_4 &\Rightarrow&u_3 = \frac{1}{2} u_2 + \frac{1}{2} u_4 \\
0 = r u_3 - 2r u_4 & \Rightarrow& u_4 = \frac{1}{2} u_3
\end{array}
$$
That's it: just solve those equations. You will get ##(u_1,u_2,u_3,u_4) = (4/5, \, 3/5, \, 2/5, \, 1/5)## for any ##r > 0##.
But does r > 0 not imply that tau is likewise greater?

Does it hold for a 100 x 100 matrix as well?

A plot of the ultimate probabilities show a linear relationship between matrix elements and ultimate probabilities.

haruspex said:
I'd go a bit further than that. Tau simply should not appear in that equation. There must be a flaw in the algebra lesding to it.
If only one is the correct value to pick for tau, then it should not appear in the equation. We're better off absorbing the variable into the expression.
 
  • #45
Schwarzschild90 said:
If only one is the correct value to pick for tau, then it should not appear in the equation. We're better off absorbing the variable into the expression.
I feel it is more than that - it is a dimensionality issue. If tau represents a rate it should have a dimension, like time-1, which would give the expression in the equation for probability a dimension. But without seeing the derivation I cannot be sure.
 
  • Like
Likes Schwarzschild90
  • #46
haruspex said:
I feel it is more than that - it is a dimensionality issue. If tau represents a rate it should have a dimension, like time-1, which would give the expression in the equation for probability a dimension. But without seeing the derivation I cannot be sure.
I thought about that, but decided to take a leap of faith and take tau = 1.

With tau = 1, then a 100 x 100 matrix presents me with 99,01% chance of ultimately ruining my opponent, as expected.

I present a plot of U(l) versus position l.
 

Attachments

  • Exercise2.jpg
    Exercise2.jpg
    17.6 KB · Views: 281
Last edited:
  • #47
Schwarzschild90 said:
I thought about that, but decided to take a leap of faith and take tau = 1.
I am not sure you are grasping my point.
Suppose I wanted an equation for the speed of a car and came up with (engine rpm)x(gear ratio)x(wheel radius)x(some constant)/(number of steering wheels). Setting the number of steering wheels to 1 may give the right answer, but that does not mean it is the right value to plug in. The number of steering wheels should not have featured in the equation in the first place.
 
  • Like
Likes Schwarzschild90
  • #48
haruspex said:
I am not sure you are grasping my point.
Suppose I wanted an equation for the speed of a car and came up with (engine rpm)x(gear ratio)x(wheel radius)x(some constant)/(number of steering wheels). Setting the number of steering wheels to 1 may give the right answer, but that does not mean it is the right value to plug in. The number of steering wheels should not have featured in the equation in the first place.
I see your point.

Ray Vickson said:
It does not matter in this case because the first row of Inv(T) equals the first column.

Anyway, I much prefer to avoid matrix inverses altogether. What you have is an equation-solving problem, and using a matrix inverse is one of the worst ways to do it (although is often used nevertheless). If your 4x4 matrix T has first row [-2r,r,0,0] and last row [0,0,r,-2r], the equations you need to solve for the ruin probabilities ##u_1,u_2,u_3,u_4## are:
$$\begin{array}{rcl}
0 = r - 2r u_1 + r u_2 &\Rightarrow& u_1 = \frac{1}{2} + \frac{1}{2} u_2 \\
0 = r u_1 - 2r u_2 + u_3 &\Rightarrow& u_2 = \frac{1}{2} u_1 + \frac{1}{2} u_3 \\
0 = r u_2 -2r u_3 + r u_4 &\Rightarrow&u_3 = \frac{1}{2} u_2 + \frac{1}{2} u_4 \\
0 = r u_3 - 2r u_4 & \Rightarrow& u_4 = \frac{1}{2} u_3
\end{array}
$$
That's it: just solve those equations. You will get ##(u_1,u_2,u_3,u_4) = (4/5, \, 3/5, \, 2/5, \, 1/5)## for any ##r > 0##.
For a 4 x 4 matrix, I would expect a 4/5% probability of winning if I have 4 coins and my opponent has one?
 
  • #49
We have that O(j) for k = 1.. M-1 is a column matrix, but does this imply that O(j) is a row vector with matrix elements (k,j)=(1,1), (1,2), (1,3), (1,4)?
 

Attachments

  • 3 and 4.PNG
    3 and 4.PNG
    81.8 KB · Views: 297
  • 3 and 4 part 2.PNG
    3 and 4 part 2.PNG
    62.6 KB · Views: 337
Last edited:

Similar threads

  • Calculus and Beyond Homework Help
Replies
14
Views
583
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
5K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
3K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Math Proof Training and Practice
Replies
25
Views
2K
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
Replies
3
Views
1K
Replies
9
Views
2K
Back
Top