View Single Post
  #22  
Old 09-01-2005, 01:56 AM
Guest
 
Posts: n/a
Default Re: Correct answer

Not trying to offend anybody here. I don't know how to do this using a formula. If anybody does, please let me know. Using MATLAB, i got $19,900 as the expected return. The only assumptions i used were that each bet paid off even money and there was a 56% chance of a good outcome.

Here's the code:
>> home
>> clear
>> TotalBets=500;

p=.56; %chance of winning
PercentBet=.05;

for trial=1:10000

Bankroll=10000;
for i =1:TotalBets;
betsize=Bankroll*PercentBet;
temp=rand(1);
if temp < .56
Bankroll=Bankroll+betsize;
else
Bankroll=Bankroll-betsize;
end
end
finalBank(trial)=Bankroll;
mean(finalBank)
end
Reply With Quote