Question

In: Statistics and Probability

R Programming Question Marie plays gambling. With the initial balance, a single play results in either...

R Programming Question

Marie plays gambling. With the initial balance, a single play results in either gain(+1) or loss(-1) with probabilities of 0.5. She stops the game when her balance becomes either 0 or 20.

How could I obtain a Monte Carlo distribution of the duration of single game with 2,000 simulated trials?

Game Duration : # of plays in a single game.

Solutions

Expert Solution

Below is a monte carlo distribution with initial balance 10.


Related Solutions

Question 2 The following trial balance was extracted from the books of R Giggs at the...
Question 2 The following trial balance was extracted from the books of R Giggs at the close of business on 28 February 2007. Dr Cr RM RM Purchases 92,800 Sales 157,165 Cash at bank 4,100 Cash in hand 324 Capital 11,400 Drawings 17,100 Office furniture 2,900 Rent 3,400 Wages and salaries 31,400 Discount received 160 Discount allowed 820 Accounts receivable 12,316 Accounts payable 5,245 Inventory 1/3/2006 4,120 Provision for doubtful debts 405 Motor vehicles 3,750 Motor expenses 615 Bad debts...
R Programming Exercise Book Problem 39 (Problem Difficulty: Easy Thinking Question) Suppose you have an arbitrary...
R Programming Exercise Book Problem 39 (Problem Difficulty: Easy Thinking Question) Suppose you have an arbitrary data set "airquality.csv" which consists of a data of temperature in different months throughout the year. If you wanted to take 30 random temperature reading from each month and then calculate its mean and standard deviation, then how would you do it? Name the commands that you would use to solve this problem and explain in few words your logic to approach this problem....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT