Umair Ahmed
Student
- Jun 12, 2021
- 1
I am trying to model Dice Rolling (fair die) as a Stochastic process.
I used a row vector p of size 6 with each entry equals to 1/6 in order to represent probabilties of outcomes (1 to 6):
p = ones(1,6)/6
This gives me the following output :
p =
0.1667 0.1667 0.1667 0.1667 0.1667 0.1667
Now, I want to define another random variable T5 such that it shows me the first time I got a 5 when rolling the dice . I tried to plot the outcomes in another matrix [1,2,3,4,5,6] and also tried to do it using a rand function. But I am not getting the desires expression for it.
What would be the MatLab expression for :
P[T5=t] = P { Xt is the first random variable with outcome 5} .
I used a row vector p of size 6 with each entry equals to 1/6 in order to represent probabilties of outcomes (1 to 6):
p = ones(1,6)/6
This gives me the following output :
p =
0.1667 0.1667 0.1667 0.1667 0.1667 0.1667
Now, I want to define another random variable T5 such that it shows me the first time I got a 5 when rolling the dice . I tried to plot the outcomes in another matrix [1,2,3,4,5,6] and also tried to do it using a rand function. But I am not getting the desires expression for it.
What would be the MatLab expression for :
P[T5=t] = P { Xt is the first random variable with outcome 5} .