- #1

chuy52506

- 77

- 0

x(n+1)= 0 if x(n)≤2 and p(n+1) = A*x(n)-B if P(n)>2

Where A=Normal(1.1,0.2) and B=Normal(100,20)

Let the initial population x(0)=1000

So far i created this mfile:

xlist = [];

x0=1000;

x=x0; xlist=x; N=100;

for n=1:N

R = 1.1+.2*rand(1); a = 100+20*rand(1);

x = R*x-a;

xlist = [xlist,x];

end

plot(0:N,xlist)

I ran it for 100 time steps

The question is,

What is the probability that x(100)≥10000?

I have no idea how to calculate the probability of this using matlab, any ideas?