View Single Post
  #3  
Old 11-26-2007, 08:52 PM
Keepitsimple Keepitsimple is offline
Senior Member
 
Join Date: Sep 2005
Location: Göteborg
Posts: 3,368
Default Re: Staking Question

Hi,

If you know matlab you could check out this. There are probably a couple of wrongs since its the first time I do this:

%h=number of hands the stake is over
%s=standard deviation in BB/100
%w=assumed winrate of stakee
%r=stake amount
%percent= % you take

function ror(h,s,w,r,percent)

result=zeros(1000,1);
org=r;

for p=1:100000
for i=1:h/100
r=r+s*randn(1)+w; %randn gives numbers normally distributed around 0.
if r<=0
r=0;
break
end
end
if r>=org
result(p)=(r-org)*percent;
else
result(p)=r-org;
end
r=org;
end
result=sum(result)/100000

%%%%%%%%%%
I plugged in some sample numbers and ran it

ror(10000,30,2,200,0.5) => 57
ror(10000,30,1,200,0.5) => 3
Reply With Quote