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

· Risk Management
Authors

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()
end

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

```

# 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