A Glimse at Chaos: How can I Implement a Logistic Growth Process in ThetaML?

· Risk Management

One of the simple models which lead to chaos is the logistic growth process. Using ThetaML, a technology designed for modeling and analyzing stochastic processes, we can implement a very short logistic growth model and get more insight than usual.

Logistic growth model

Suppose, we insert a simple logistic model:

x_{n+1} = r x_n (1-x_n)

This can be done in ThetaML by:

model logisticGrowth
  export X
  R = [2.9:0.1:4]

  loop r, x : R, X
    x = rand()

  loop 100
    Theta 1
    loop r, x : R, X
      x = r*x*(1-x)

Result figures

Running this model in Theta Suite now produces the following output graphics:

Logistic Process with random start value and different values of r in [2.9:0.1:4

This graphic shows that the values where the logistic process starts oscillating for some value of r>2.9. Another way of looking at it is the bifurcation graph, which we take from wikipedia here:

Logistic_Bifurcation_map from Wikipedia

1 Comment

Comments RSS
  1. Lissa

    Was totally stuck until I read this, now back up and rnunnig.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.