It is a gambler's ruin problem
= probability
that you reach M before 0
p= probability that you win a doller
1-p = probability that you lose a doller
x= you have x doller at begining
From gambler's ruin formula for markov chain
= {1-
(q/p)^x}/{1-(q/p)^M}
4. Fix an integer M > 0 and a parameter p E (0,1) such that pメ, You play repeatedly a gamble whe...
Each game you play, you win with probability p, 0<p<1. You plan to play 5 games, but if you win the fifth game, you will keep playing until you lose. Assume the outcome of each game is independent of all others. a) Find the expected number of games you loss. b) Find the expected number of games you win.
e (4 marks) Let m be an integer with the property that m 2 2. Consider that X1, X2,.. ., Xm are independent Binomial(n,p) random variables, where n is known and p is unknown. Note that p E (0,1). Write down the expression of the likelihood function We assume that min(x1, . . . ,xm) 〈 n and max(x1, . . . ,xm) 〉 0 5 marks) Find , and give all possible solutions to the equation dL dL -...
(5) Fixm 2 1, an integer, and suppose P~ Uniform([0, 1]) and N ~Binomial(m, P) (a) Determine E(Xk(NP) where χκ (n), k-0, 1, 2, . . . , are defined as follows: 1 if n-k 0 otherwise (b) Determine E(Xk(N)h(N)) for a general function h : R R (c) Determine E(PIN) Warning: E(PN) is not N/m as you might be tempted to guess. Hint: Use the law of total probability together with the following result which you showed (in greater...
please use python and provide run result, thank you!
click on pic to make it bigger
For this assignment you will have to investigate the use of the Python random library's random generator function, random.randrange(stop), randrange produces a random integer in the range of 0 to stop-1. You will need to import random at the top of your program. You can find this in the text or using the online resources given in the lectures A Slot Machine Simulation Understand...