Thread Rating:

Bondy3
Bondy3
  • Threads: 23
  • Posts: 106
Joined: Jan 4, 2013
February 12th, 2013 at 11:35:39 PM permalink
Hi,

it is my understanding that in a random walk the probability of getting +n before -m is n/(n+m) but what if the probability of going forward isn't the same as going backwards?

to give this a gambling context, if playing roulette lets say that I have $n and if I earn double or more I walk away and if I go broke I walk away, if I bet $1 on a specific number every spin, what is the probability of success of hitting my goal of doubling my money vs going broke? (35:1 payoff)

is there a formula that I can type in? I have tried to figure out the math and it is complicated, I tried doing it for n=1, n=2, n=3 etc but when the payoff is not even and/or the probability of success is not 50% I get confused in the math. I tried reading the wiki for random walk but it didn't help me for different size steps/payoffs

Any help would be appreciated, Thanks
MangoJ
MangoJ
  • Threads: 10
  • Posts: 905
Joined: Mar 12, 2011
February 13th, 2013 at 12:03:16 AM permalink
I guess you would need to figure out the probability of getting to n in k steps for the undirected discrete random walk.

It would probably be easier to calculate it for a continuous random walk. I would model a potential function V(x) with a simple linear slope in the region between n and -m, and a steep drop beyond those points to trap the process. The probability finding the procress in x should be A(k)*exp(-V(x)/k), where k determines your average step size, and A the normalization constant. Then find some clever limit with your potential depths to find the desired result.

Another fully discrete ansatz would be to write down the Markovian transition matrix with n+m entries, where the process is trapped at both ends, and find the equilibrium distribution.
Fuengirola2
Fuengirola2
  • Threads: 10
  • Posts: 105
Joined: Jan 18, 2013
February 13th, 2013 at 12:23:41 AM permalink
I don't know the maths, but just put all-in and either win big or lose big. That's the law of the large numbers!
Bondy3
Bondy3
  • Threads: 23
  • Posts: 106
Joined: Jan 4, 2013
February 13th, 2013 at 12:27:19 AM permalink
Quote: MangoJ

I guess you would need to figure out the probability of getting to n in k steps for the undirected discrete random walk.

It would probably be easier to calculate it for a continuous random walk. I would model a potential function V(x) with a simple linear slope in the region between n and -m, and a steep drop beyond those points to trap the process. The probability finding the procress in x should be A(k)*exp(-V(x)/k), where k determines your average step size, and A the normalization constant. Then find some clever limit with your potential depths to find the desired result.

Another fully discrete ansatz would be to write down the Markovian transition matrix with n+m entries, where the process is trapped at both ends, and find the equilibrium distribution.



I tried to make the markovian transition matrix, from what I remember from what I took stachastics in College back in the day

I got something stupid like this

Loss Win
Loss [ 36/17 1/37 ] = P = Probability transition matrix
Win [ 36/17 1/37 ]


I know that after that I would have to do a phase type reprisentation or something, (I-T)^-1 or something, I don't really remember
MangoJ
MangoJ
  • Threads: 10
  • Posts: 905
Joined: Mar 12, 2011
February 13th, 2013 at 12:40:31 AM permalink
The transition matrix should be more like

1 p 0 0 0
1-p 0 p 0 0
0 1-p 0 p 0
0 0 1-p 0 p
0 0 0 1-p 1

where p is the probability to move in one direction, and 1-p to move in the other direction. The 1 traps the process at the stop win or stop loss conditions.

I'm not used to these calculations, but I would try to compute T^inf (probably by some way of eigenvalue decomposition), and look at the row corresponding to your starting position.
Bondy3
Bondy3
  • Threads: 23
  • Posts: 106
Joined: Jan 4, 2013
February 13th, 2013 at 1:37:27 AM permalink
oohh I see, I was doing it with win/loss states instead of individual numbers.

I dont remember for to compute the T^inf, but I think it would end up as the identity because its a negetive EV, so every spin has more of a chance to be an agregate loss than the one before, so it would go to 100% loss as t => inf
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
February 14th, 2013 at 8:58:15 AM permalink
Quote: Bondy3

if playing roulette lets say that I have $n and if I earn double or more I walk away and if I go broke I walk away, if I bet $1 on a specific number every spin, what is the probability of success of hitting my goal of doubling my money vs going broke? (35:1 payoff)

is there a formula that I can type in?

I have seen a formula in SN Ethier's Doctrine of Chances book (p468)
Lots of everything and summing over all outcomes. Looks really fun.
he does not just give a simple example and show how the formula works. (the book is college level ++)
I have not tried to duplicate it in a spreadsheet as I find a simulation to be sufficient for my needs.
(not needing 6 decimals accuracy)


Now...
The Classic Gambler's Ruin is simply a Random Walk as you know (and a well know formula to plug numbers into)
but other Ruin problems with unequal steps can be solved using
an absorbing transition matrix that has been mentioned above.

The challenge is to account for every possible bankroll state one can be in and entering the correct transition probabilities.
There are many online pdfs available and even videos showing how to create and solve the matrix for a GR problem.

For small bankrolls and bets this is not too difficult,
but for a system that can have over 1,000 possible states or more making for a very large matrix, another method,
mostly simulations would be preferred if a general formula is not available.

There are recursion formulas to calculate the Gamblers Ruin states after X rounds, they are advanced,
but once understood a spreadsheet can easily handle the math needed or just write some code (like in R)
to do the calculations needed.
"Gambler’s Ruin and The Three State Markov Process" by Blake Hunter comes to mind

As long as every state can be accounted for, it is just very easy to raise the matrix to some power (number of trials)
or to a very high power (does not have to be infinity) to make all the transition values other than ruin state or success state in all rows 0.

example: this shows from each state to each state. Each state being the gambler's fortune from 0 to 6 units
Gamblers Ruin bankroll target is to hit 6 units
This is a coin flip game where the transition probabilities are 50% and the payoff is even money.

They can be changed to any probability
(I use "from" on the left side, others use it on the top, makes no difference as long as the transition probabilities are correct)
	to						
from 0 1 2 3 4 5 6
0 1 0 0 0 0 0 0
1 0.5 0 0.5 0 0 0 0
2 0 0.5 0 0.5 0 0 0
3 0 0 0.5 0 0.5 0 0
4 0 0 0 0.5 0 0.5 0
5 0 0 0 0 0.5 0 0.5
6 0 0 0 0 0 0 1

using Matrix Algebra tool link below (it does fractions or decimals)
copy and paste this matrix
p=[1	0	0	0	0	0	0
0.5 0 0.5 0 0 0 0
0 0.5 0 0.5 0 0 0
0 0 0.5 0 0.5 0 0
0 0 0 0.5 0 0.5 0
0 0 0 0 0.5 0 0.5
0 0 0 0 0 0 1]

In the formulas enter p^5 and hit compute
it returns this
p^5 = 
1 0 0 0 0 0 0
0.6875 0 0.15625 0 0.125 0 0.03125
0.375 0.15625 0 0.28125 0 0.125 0.0625
0.21875 0 0.28125 0 0.28125 0 0.21875
0.0625 0.125 0 0.28125 0 0.15625 0.375
0.03125 0 0.125 0 0.15625 0 0.6875
0 0 0 0 0 0 1

Just read thru it remembering what each state is.
After 5 rounds, if one started with 1unit, (the 2nd row)
they would be busted (state 0) .6875 and just a .03125 chance of making it to 6 units (0.5^5) and
also shows the probabilities after 5 rounds of being in the other bankroll states.

Now for 10 rounds
p^10 = 
1 0 0 0 0 0 0
0.7539 0.04004 0 0.0791 0 0.03906 0.08789
0.5479 0 0.1191 0 0.1182 0 0.2148
0.3418 0.0791 0 0.1582 0 0.0791 0.3418
0.2148 0 0.1182 0 0.1191 0 0.5479
0.08789 0.03906 0 0.0791 0 0.04004 0.7539
0 0 0 0 0 0 1

Now 1000 rounds p^1000
p^1000 = 
1 0 0 0 0 0 0
5/6 0 0 0 0 0 1/6
2/3 0 0 0 0 0 1/3
1/2 0 0 0 0 0 1/2
1/3 0 0 0 0 0 2/3
1/6 0 0 0 0 0 5/6
0 0 0 0 0 0 1

Notice all the 0s. OK. that just tells us the probability of being in a state after 1k trials.
It just tells us that if we start with 1unit and keep playing, by 1000 rounds we would be busted 5/6 of the time
with 0 chance of having 1,2,3,4 or 5 units. We have either hit our target or busted

If we started with 3 units we would have a 50% chance of being busted and a 50% chance of hitting 6 units
3 / 3+3

I assume you can work with matrix multiplication.
Any matrix program, except Excel IMO, can do this very fast.

some good info on Markov Chains here
http://people.hofstra.edu/Stefan_Waner/RealWorld/Summary8.html
Matrix Algebra tool here
http://people.hofstra.edu/Stefan_Waner/RealWorld/matrixalgebra/fancymatrixalg2.html

By adding an initial distribution vector
v=[0, 0, 1, 0, 0, 0, 0]
It says we want the results from the 3rd row, with our example starting with a 2unit bankroll
we enter the formula
v*p^1000
returns
v*p^1000 =
2/3 0 0 0 0 0 1/3
Being the 3rd row of the matrix, starting with a 2unit bankroll
we have a 2/3 chance or ruin and a 1/3 chance of success and a 0 chance to end at 1-5

added: craps pass line bet
vector is to start with 4 units (say $20) and target win goal is 5 units ($25 win just $5)
paste this into the program and enter the formula v*p^10
p=[1	0	0	0	0	0	
251/495 0 244/495 0 0 0
0 251/495 0 244/495 0 0
0 0 251/495 0 244/495 0
0 0 0 251/495 0 244/495
0 0 0 0 0 1]

v=[0,0,0,0,1,0]

returns
v*p^10 = 
0.1704 0 0.0552 0 0.03317 0.7412

busted, at 1 unit, at 2 unit, at 3 unit, at 4 unit, at 5 unit
After 10 resolved bets, the probabilities of being in each state
0 chance of being at 1 or 3 units (this comes from making a number of even bets)

enter the formula v*p^1000
returns
v*p^1000 = 
0.2115 0 0 0 0 0.7885

Only a 78.85% chance of winning 1 unit when starting with 4 units betting the pass line bet at Craps.
The remaining chances are to bust out

Good Luck in your studies
winsome johnny (not Win some johnny)
stoneynv
stoneynv
  • Threads: 7
  • Posts: 162
Joined: Jan 9, 2013
February 14th, 2013 at 9:10:35 AM permalink
Quote: 7craps

The Classic Gamblers Ruin is simply a Random Walk as you know but other Ruin problems with unequal steps can be solved using
an absorbing transition matrix that has been mentioned above.

The challenge is to account for every possible bankroll state one can be in and entering the correct transition probabilities.
There are many online pdfs available and even videos showing how to create and solve the matrix for a GR problem.

For small bankrolls and bets this is not too difficult,
but for a system that can have over 1,000 possible states or more making for a very large matrix, another method,
mostly simulations would be preferred if a general formula is not available.

There are recursion formulas to calculate the Gamblers Ruin states after X rounds, they are advanced,
but once understood a spreadsheet can easily handle the math needed or just write some code (like in R)
to do the calculations needed.
"Gambler’s Ruin and The Three State Markov Process" by Blake Hunter comes to mind

As long as every state can be accounted for, it is just very easy to raise the matrix to some power (number of trials)
or to a very high power (does not have to be infinity) to make all the transition values other than ruin state or success state in all rows 0.
I assume you can work with matrix multiplication.
Any matrix program, except Excel IMO, can do this very fast.

I realize this can be confusing about a transition matrix without examples,
but I do not have the interest in showing any at this time because I use different methods for Risk of Ruin calculations
(mostly simulations and programs) than using a transition matrix.

some good info on Markov Chains here
http://people.hofstra.edu/Stefan_Waner/RealWorld/Summary8.html
Matrix Algebra tool here
http://people.hofstra.edu/Stefan_Waner/RealWorld/matrixalgebra/fancymatrixalg2.html

Good Luck in your studies

wait, what?
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
February 15th, 2013 at 4:52:10 PM permalink
Quote: stoneynv

wait, what?

OK.
I placed an absorbing transition matrix example.
Gambler attempting to hit a 6 unit bankroll target

homework

The first link I provided has some good examples and should explain it better than I.

(I am weak at explanations, so study away. yeah)
Good Luck
winsome johnny (not Win some johnny)
Moivre
Moivre
  • Threads: 0
  • Posts: 4
Joined: Feb 19, 2013
February 19th, 2013 at 6:28:37 AM permalink
You're right, the relevant formula is on page 468 of Ethier's "The Doctrine of Chances." Numerical examples are given on page 470. For the specific problem posed here, namely finding the probability of doubling an initial capital of W units betting only on a single number at roulette, results are given for W=10, 100, and 1000, and for 37- and 38-number wheels. For example, with W=1000, the probability for a 37-number wheel is 0.171 and for a 38-number wheel is 0.043.

The thing that makes this problem tricky is the 35-to-1 payoff odds. Usually, the gambler's ruin formula is stated for even-money payoffs, and then it is easy, even with arbitrary probabilities. But when the payoff odds are m-to 1, the formula is relatively recent (due to Kozek, 2002). See Example 7.2.2 of "The Doctrine of Chances," page 253. For more complicated payoffs, such as 7-to-6 (as in a place bet on 6 or 8), no explicit formula is known! (There is a recursive formula known, but that doesn't count.)
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
February 19th, 2013 at 10:53:44 AM permalink
Quote: Moivre

You're right, the relevant formula is on page 468 of Ethier's "The Doctrine of Chances."
Numerical examples are given on page 470.
For the specific problem posed here,
namely finding the probability of doubling an initial capital of W units betting only on a single number at roulette,
results are given for W=10, 100, and 1000, and for 37- and 38-number wheels.
For example, with W=1000, the probability for a 37-number wheel is 0.171 and for a 38-number wheel is 0.043.

The results on p.470
for w=10 and M=1 (both 37 and 38) can not be correct.

If you do not win in the first 10 spins betting 1 unit at a time, you are done.
The first win and you have hit the goal of at least doubling on any one of those 10 spins with the 35 to 1 payout.
37 wheel
1 - (36/37)^10 = 0.2396601
instead of .172 094

also looks like for w=10, m=2 and m=3 also are not correct. (I did just a quick sim)
m=4 and above look ok.
maybe because of the overshoot.

Might be fun to work with his solution on a cold rainy day when no sports events are on.
Then again, one could just make some large transition matrices, for w=100 (235x235) for example and power away for results.

Reading a bit more in the book,
I was a bit disappointed that Ethier did not address the fact that the attempt to double a certain size W
could easily take a very long time, that should have naturally lead to a section on doubling a bankroll within N turns.
added: he does of course on p248

I still like the matrix approach.
We can even get the mean wait times for visiting each state, the average number of spins until ruin or success
and some other stats from the matrix

of course, one needs a good matrix program to work with.
I use Peanut Software WinMat (another free program)
No problem handling a 1000x1000 and calculating away
I am sure there are better programs available, some even can create a transition diagram that are cool to look at.

Good Luck to all
winsome johnny (not Win some johnny)
mdh
mdh
  • Threads: 0
  • Posts: 169
Joined: Feb 23, 2011
February 19th, 2013 at 11:02:26 AM permalink
I dont follow half the stuff you post 7craps but please dont stop. You are the PACOMARTIN of craps.
Moivre
Moivre
  • Threads: 0
  • Posts: 4
Joined: Feb 19, 2013
February 19th, 2013 at 12:26:51 PM permalink
You're right, the m=1,2,3 figures for W=10 are incorrect for both 37 and 38 number wheels. I just ran the numbers in Mathematica, and all except these six entries are correct, assuming that the formula is correct. Here is the code:

For[z=1,z<=2,z++,For[e=1,e<=3,e++,For[m=1,m<=18,m++,If[m<=4||m==6||m==12||m==18,k=Floor[36/m]-1;p=m/(36+z);q=1-p;W=10^e;L=W;a[M_]:=Sum[(-1)^j Binomial[M-j k-1,j](p q^k/(p+q)^(k+1))^j,{j,0,Floor[(M-1)/(k+1)]}];prob=1-(q/(p+q))^L a[W]/a[L+W];Print[36+z,", ",m,", ",W,", ",N[prob]]]]]];
37, 1, 10, 0.23966
37, 2, 10, 0.401158
37, 3, 10, 0.423052
37, 4, 10, 0.424473
37, 6, 10, 0.439998
37, 12, 10, 0.423364
37, 18, 10, 0.368031
37, 1, 100, 0.432285
37, 2, 100, 0.405719
37, 3, 100, 0.36883
37, 4, 100, 0.328931
37, 6, 100, 0.247713
37, 12, 100, 0.0615135
37, 18, 100, 0.00446628
37, 1, 1000, 0.170727
37, 2, 1000, 0.0382378
37, 3, 1000, 0.00688387
37, 4, 1000, 0.00108294
37, 6, 1000, 0.0000183671
37, 12, 1000, 1.59799*10^-12
37, 18, 1000, 3.30297*10^-24
38, 1, 10, 0.234084
38, 2, 10, 0.392121
38, 3, 10, 0.409749
38, 4, 10, 0.406437
38, 6, 10, 0.412602
38, 12, 10, 0.360404
38, 18, 10, 0.258533
38, 1, 100, 0.393647
38, 2, 100, 0.331735
38, 3, 100, 0.264168
38, 4, 100, 0.201192
38, 6, 100, 0.102633
38, 12, 100, 0.00481854
38, 18, 100, 0.0000265607
38, 1, 1000, 0.0432298
38, 2, 1000, 0.00177585
38, 3, 1000, 0.0000576927
38, 4, 1000, 1.51651*10^-6
38, 6, 1000, 5.13773*10^-10
38, 12, 1000, 8.31206*10^-24
38, 18, 1000, 1.74787*10^-46
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
February 20th, 2013 at 12:43:33 AM permalink
Nice.
Excellent work.
Looks like the code is right on from my data below.
Did we have any doubts?

An 800+ page math book can easily have a few errors in it,
from typos to just correct data in wrong places.

I set up a 37x37 matrix for 37, 2, 10 and it returned
0.40115773
at P^1000
same for 38, 2, 10 and it returned
0.39212135

Here is the distribution for the ending bank units starting with 10
end units / probability to double stake
2/37, 10 units, 17 to 1 payoff
0	0.59884227
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0
17 0
18 0
19 0
20 0.0382421
21 0.04042737
22 0.0427375
23 0.04517964
24 0.04776134
25 0.05049056
26 0.05337573
27 0.05642577
28 0.00250725
29 0.00265052
30 0.00280198
31 0.00296209
32 0.00313135
33 0.00331028
34 0.00349944
35 0.00369941
36 0.0019554
success 0.40115773
total 1

Here is the distribution for the ending bank units starting with 10
end units / probability to double stake
2/38, 10 units, 17 to 1 payoff
0	0.60787865
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0
17 0
18 0
19 0
20 0.03762761
21 0.03971803
22 0.04192458
23 0.04425373
24 0.04671227
25 0.04930739
26 0.05204669
27 0.05493818
28 0.00243474
29 0.00257001
30 0.00271278
31 0.00286349
32 0.00302258
33 0.0031905
34 0.00336775
35 0.00355485
36 0.00187617
success 0.39212135
total 1


One can expand on the tables from the book very nicely
Good Luck
winsome johnny (not Win some johnny)
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
September 10th, 2014 at 5:13:56 PM permalink
Quote: Moivre

You're right, the m=1,2,3 figures for W=10 are incorrect for both 37 and 38 number wheels. I just ran the numbers in Mathematica, and all except these six entries are correct, assuming that the formula is correct. Here is the code:<snip> <snip>

Thank you for all that code

I got busy (my 2nd attempt) with the free program R
and set up this code for these type of problems using a Matrix solution

R can also be used online like here
http://www.compileonline.com/execute_r_online.php
it works - I just used it

I am doing a bunch of stuff so this code, so as is for all to use

the example I used was m=1 and W =100
(p=1/37 and target = 200)

the matrix returned below (as I learned how to do this)
shows all starting W (bank) attempting to hit a 200 target (and going over)
code used
#odds money matrix integers only
p <- 1/37 #enter
odds <- 35 #enter odds pays
t <- 200 #enter target >=4
q <- 1-p
m <- t-1 #money states to money states
vQ <- c(rep(1,m))
#vP <- c(0,0,1,0)

A = matrix(0,t+odds,t+odds,dimnames = list(c(1:(m+odds),0),c(1:(m+odds),0)))
A[t:(t+odds),t:(t+odds)] = diag(1,odds+1,odds+1) #absorb diag
A[1,t+odds]=q #state1 to ruin
A[1:m,(1+odds):(m+odds)] = diag(p,m,m)
#A
S <- A[1:m,1:m]
diag(S[-1,])<- q
#S
T <- A[1:m,t:(t+odds)]
#T
I <- diag(m)
#I
Q <-solve(I-S) # Gives Matrix Q
#Q
#Q %*% vQ # gives Matrix Mu
B <-Q %*% T # gives Matrix SteadyState
#B
C <- as.matrix(1-B[1:m,odds+1])
D <- as.matrix(B[1:m,odds+1])
E <-cbind(C,D)
colnames(E) <- c("success","ruin")
E



the result
look down to 100 = 0.432284873 for success
your code produced: 37, 1, 100, 0.432285
yes!!!

Executing the program....
$Rscript main.r
success ruin
1 0.003998556 0.99600144
2 0.008003339 0.99199666
3 0.012014361 0.98798564
4 0.016031631 0.98396837
5 0.020055161 0.97994484
6 0.024084962 0.97591504
7 0.028121046 0.97187895
8 0.032163426 0.96783657
9 0.036212113 0.96378789
10 0.040267120 0.95973288
11 0.044328459 0.95567154
12 0.048396143 0.95160386
13 0.052470184 0.94752982
14 0.056550594 0.94344941
15 0.060637386 0.93936261
16 0.064730569 0.93526943
17 0.068830155 0.93116984
18 0.072936153 0.92706385
19 0.077048572 0.92295143
20 0.081167420 0.91883258
21 0.085292701 0.91470730
22 0.089424422 0.91057558
23 0.093562586 0.90643741
24 0.097707192 0.90229281
25 0.101858242 0.89814176
26 0.106015736 0.89398426
27 0.110179677 0.88982032
28 0.114350067 0.88564993
29 0.118526913 0.88147309
30 0.122710221 0.87728978
31 0.126900004 0.87310000
32 0.131096273 0.86890373
33 0.135299045 0.86470095
34 0.139508338 0.86049166
35 0.143724170 0.85627583
36 0.147946565 0.85205344
37 0.152175544 0.84782446
38 0.156411134 0.84358887
39 0.160653358 0.83934664
40 0.164902241 0.83509776
41 0.169157807 0.83084219
42 0.173420082 0.82657992
43 0.177689086 0.82231091
44 0.181964840 0.81803516
45 0.186247362 0.81375264
46 0.190536667 0.80946333
47 0.194832766 0.80516723
48 0.199135666 0.80086433
49 0.203445369 0.79655463
50 0.207761874 0.79223813
51 0.212085173 0.78791483
52 0.216415251 0.78358475
53 0.220752088 0.77924791
54 0.225095657 0.77490434
55 0.229445925 0.77055408
56 0.233802849 0.76619715
57 0.238166379 0.76183362
58 0.242536458 0.75746354
59 0.246913020 0.75308698
60 0.251296040 0.74870396
61 0.255685532 0.74431447
62 0.260081536 0.73991846
63 0.264484115 0.73551588
64 0.268893352 0.73110665
65 0.273309339 0.72669066
66 0.277732178 0.72226782
67 0.282161974 0.71783803
68 0.286598834 0.71340117
69 0.291042857 0.70895714
70 0.295494140 0.70450586
71 0.299952769 0.70004723
72 0.304418819 0.69558118
73 0.308892351 0.69110765
74 0.313373411 0.68662659
75 0.317862029 0.68213797
76 0.322358215 0.67764179
77 0.326861960 0.67313804
78 0.331373237 0.66862676
79 0.335891993 0.66410801
80 0.340418159 0.65958184
81 0.344951640 0.65504836
82 0.349492320 0.65050768
83 0.354040060 0.64595994
84 0.358594699 0.64140530
85 0.363156053 0.63684395
86 0.367723915 0.63227609
87 0.372298057 0.62770194
88 0.376878229 0.62312177
89 0.381464159 0.61853584
90 0.386055555 0.61394445
91 0.390652103 0.60934790
92 0.395253471 0.60474653
93 0.399859307 0.60014069
94 0.404469241 0.59553076
95 0.409084786 0.59091521
96 0.413707233 0.58629277
97 0.418337666 0.58166233
98 0.422976973 0.57702303
99 0.427625862 0.57237414
100 0.432284873 0.56771513
101 0.436954390 0.56304561
102 0.441634652 0.55836535
103 0.446325761 0.55367424
104 0.451027699 0.54897230
105 0.455740330 0.54425967
106 0.460463414 0.53953659
107 0.465196615 0.53480338
108 0.469939507 0.53006049
109 0.474691584 0.52530842
110 0.479452266 0.52054773
111 0.484220906 0.51577909
112 0.488996796 0.51100320
113 0.493779177 0.50622082
114 0.498567238 0.50143276
115 0.503360127 0.49663987
116 0.508156955 0.49184305
117 0.512956798 0.48704320
118 0.517758704 0.48224130
119 0.522561699 0.47743830
120 0.527364786 0.47263521
121 0.532166953 0.46783305
122 0.536967176 0.46303282
123 0.541764419 0.45823558
124 0.546557641 0.45344236
125 0.551345796 0.44865420
126 0.556127838 0.44387216
127 0.560902723 0.43909728
128 0.565669407 0.43433059
129 0.570426857 0.42957314
130 0.575244408 0.42475559
131 0.580115338 0.41988466
132 0.585033241 0.41496676
133 0.589992020 0.41000798
134 0.594985874 0.40501413
135 0.600009284 0.39999072
136 0.605057006 0.39494299
137 0.610124054 0.38987595
138 0.615205699 0.38479430
139 0.620297449 0.37970255
140 0.625395046 0.37460495
141 0.630494455 0.36950555
142 0.635591854 0.36440815
143 0.640683627 0.35931637
144 0.645766355 0.35423365
145 0.650836807 0.34916319
146 0.655891934 0.34410807
147 0.660928861 0.33907114
148 0.665944878 0.33405512
149 0.670937438 0.32906256
150 0.675904144 0.32409586
151 0.680842746 0.31915725
152 0.685751135 0.31424886
153 0.690627338 0.30937266
154 0.695469509 0.30453049
155 0.700275925 0.29972407
156 0.705044983 0.29495502
157 0.709775190 0.29022481
158 0.714465163 0.28553484
159 0.719113621 0.28088638
160 0.723719384 0.27628062
161 0.728281362 0.27171864
162 0.732798559 0.26720144
163 0.737270063 0.26272994
164 0.741695044 0.25830496
165 0.748676259 0.25132374
166 0.755468793 0.24453121
167 0.762077744 0.23792226
168 0.768508076 0.23149192
169 0.774764614 0.22523539
170 0.780852057 0.21914794
171 0.786774974 0.21322503
172 0.792537813 0.20746219
173 0.798144899 0.20185510
174 0.803600442 0.19639956
175 0.808908538 0.19109146
176 0.814073173 0.18592683
177 0.819098222 0.18090178
178 0.823987459 0.17601254
179 0.828744555 0.17125545
180 0.833373080 0.16662692
181 0.837876511 0.16212349
182 0.842258227 0.15774177
183 0.846521518 0.15347848
184 0.850669585 0.14933042
185 0.854705542 0.14529446
186 0.858632419 0.14136758
187 0.862453165 0.13754684
188 0.866170647 0.13382935
189 0.869787656 0.13021234
190 0.873306909 0.12669309
191 0.876731046 0.12326895
192 0.880062640 0.11993736
193 0.883304190 0.11669581
194 0.886458131 0.11354187
195 0.889526830 0.11047317
196 0.892512591 0.10748741
197 0.895417656 0.10458234
198 0.898244206 0.10175579
199 0.900994363 0.09900564


added: the expected number of trials - not the distribution - for success or ruin
100: 320.220317 spins
results for all start banks
> Q %*% vQ # gives Matrix Mu
[,1]
1 5.741899
2 11.435064
3 17.079417
4 22.674883
5 28.221383
6 33.718838
7 39.167171
8 44.566301
9 49.916150
10 55.216637
11 60.467682
12 65.669205
13 70.821126
14 75.923364
15 80.975841
16 85.978477
17 90.931193
18 95.833912
19 100.686557
20 105.489053
21 110.241326
22 114.943303
23 119.594915
24 124.196094
25 128.746771
26 133.246880
27 137.696351
28 142.095113
29 146.443093
30 150.740214
31 154.986398
32 159.181561
33 163.325619
34 167.418483
35 171.460062
36 175.450264
37 179.388992
38 183.276152
39 187.111644
40 190.895372
41 194.627237
42 198.307144
43 201.934996
44 205.510699
45 209.034165
46 212.505304
47 215.924034
48 219.290275
49 222.603954
50 225.865003
51 229.073361
52 232.228973
53 235.331792
54 238.381780
55 241.378906
56 244.323150
57 247.214500
58 250.052953
59 252.838520
60 255.571160
61 258.250793
62 260.877303
63 263.450549
64 265.970368
65 268.436583
66 270.849005
67 273.207443
68 275.511700
69 277.761587
70 279.956917
71 282.097516
72 284.183221
73 286.213882
74 288.189370
75 290.109571
76 291.974396
77 293.783775
78 295.537664
79 297.236042
80 298.878915
81 300.466315
82 301.998300
83 303.474958
84 304.896401
85 306.262773
86 307.574241
87 308.831005
88 310.033289
89 311.181346
90 312.275455
91 313.315922
92 314.303081
93 315.237289
94 316.118930
95 316.946205
96 317.717558
97 318.431661
98 319.087400
99 319.683860
100 320.220317
101 320.696220
102 321.111183
103 321.464975
104 321.757505
105 321.988818
106 322.159081
107 322.268577
108 322.317693
109 322.306918
110 322.236828
111 322.108084
112 321.921425
113 321.677657
114 321.377653
115 321.022343
116 320.612709
117 320.149780
118 319.634630
119 319.068369
120 318.452140
121 317.787118
122 317.074501
123 316.315509
124 315.511383
125 314.663377
126 313.772757
127 312.840799
128 311.868786
129 310.858005
130 309.728107
131 308.486269
132 307.139367
133 305.693988
134 304.156439
135 302.532757
136 300.828722
137 299.049863
138 297.201468
139 295.288597
140 293.316085
141 291.288553
142 289.210415
143 287.085888
144 284.918998
145 282.713586
146 280.473318
147 278.201689
148 275.902029
149 273.577515
150 271.231168
151 268.865868
152 266.484352
153 264.089225
154 261.682962
155 259.267915
156 256.846316
157 254.420283
158 251.991826
159 249.562846
160 247.135147
161 244.710433
162 242.290316
163 239.876319
164 237.469879
165 232.051775
166 226.780105
167 221.650913
168 216.660348
169 211.804663
170 207.080212
171 202.483450
172 198.010924
173 193.659278
174 189.425243
175 185.305642
176 181.297381
177 177.397452
178 173.602926
179 169.910955
180 166.318767
181 162.823666
182 159.423026
183 156.114296
184 152.894990
185 149.762693
186 146.715053
187 143.749781
188 140.864652
189 138.057499
190 135.326215
191 132.668750
192 130.083108
193 127.567349
194 125.119582
195 122.737972
196 120.420730
197 118.166115
198 115.972436
199 113.838046

thank you for the inspiration (both meanings and your book) Prof E
learning = fun

Sally
I Heart Vi Hart
beachbumbabs
beachbumbabs
  • Threads: 100
  • Posts: 14265
Joined: May 21, 2013
September 10th, 2014 at 8:35:35 PM permalink
Quote: 7craps

Nice.
Excellent work.
Looks like the code is right on from my data below.
Did we have any doubts?

An 800+ page math book can easily have a few errors in it,
from typos to just correct data in wrong places.

I set up a 37x37 matrix for 37, 2, 10 and it returned
0.40115773
at P^1000
same for 38, 2, 10 and it returned
0.39212135


Here is the distribution for the ending bank units starting with 10
end units / probability to double stake
2/37, 10 units, 17 to 1 payoff
0	0.59884227
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0
17 0
18 0
19 0
20 0.0382421
21 0.04042737
22 0.0427375
23 0.04517964
24 0.04776134
25 0.05049056
26 0.05337573
27 0.05642577
28 0.00250725
29 0.00265052
30 0.00280198
31 0.00296209
32 0.00313135
33 0.00331028
34 0.00349944
35 0.00369941
36 0.0019554
success 0.40115773
total 1

Here is the distribution for the ending bank units starting with 10
end units / probability to double stake
2/38, 10 units, 17 to 1 payoff
0	0.60787865
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0
17 0
18 0
19 0
20 0.03762761
21 0.03971803
22 0.04192458
23 0.04425373
24 0.04671227
25 0.04930739
26 0.05204669
27 0.05493818
28 0.00243474
29 0.00257001
30 0.00271278
31 0.00286349
32 0.00302258
33 0.0031905
34 0.00336775
35 0.00355485
36 0.00187617
success 0.39212135
total 1


One can expand on the tables from the book very nicely
Good Luck



Does anybody know 7craps in person? It would be nice to see him again, kinda wondering where he might be.
If the House lost every hand, they wouldn't deal the game.
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
September 11th, 2014 at 12:37:04 PM permalink
Quote: beachbumbabs

Does anybody know 7craps in person?

he is my uncle
but no DNA test results I have ever seen
Quote: beachbumbabs

It would be nice to see him again,

wow, all women over 40 say that. I do not see the big deal unless he has a big deal...ugh...
Quote: beachbumbabs

kinda wondering where he might be.

he deals Craps in SoCal still I hear
oh, you one of his women too?

so is my Mom too since my Dad died... ugh... so beware

did you like my math here?
It did cause me to cry, I was so happy

Sally
I Heart Vi Hart
beachbumbabs
beachbumbabs
  • Threads: 100
  • Posts: 14265
Joined: May 21, 2013
September 11th, 2014 at 8:24:33 PM permalink
Sally,

You are truly unique. lmao.

I have never met 7craps and am not likely to; I just appreciated his insights on the forum.

Your math is fun, and yes, I liked it, though some of it was above my head.

Babs
If the House lost every hand, they wouldn't deal the game.
  • Jump to: