首页 >> 知识 >> 1.2 Types of simulations

1.2 Types of simulations

1.2 Types of simulations

Before starting the construction of a simulation model, we need to decide upon the principal characteristics of that model. There are various choices to be made, which depend upon the system we are trying to understand.

1.2.1 Stochastic vs deterministic simulations

A model is deterministic if its behavior is entirely predictable. Given a set of inputs, the model will result in a unique set of outputs. A model is stochastic if it has random variables as inputs, and consequently also its outputs are random.

Consider the donut shop example. In a deterministic model we would for instance assume that a new customer arrives every 5 minutes and an employee takes 2 minutes to serve a customer. In a stochastic model we would on the other hand assume that the arrival times and the serving time follows some random variables: for instance, normal distributions with some mean and variance parameters.

In this course we will only consider stochastic simulation, but for illustration we consider now an example of a deterministic simulation.

A social media influencer decides to open a new page and her target is to reach 10k followers in 10 weeks. Given her past experience, she assumes that each week she will get 1.5k new followers that had never followed the page and of her current followers she believes 10% will stop following the page each week. However, 20% of those that the left the page in the past will join again each week. Will she reach her target?

To answer this question we can construct a deterministic simulation. Let (F_t) the number of followers at week (t) and (U_t) the number of users that are unfollowing the profile at week (t). Then[F_t = F_{t-1} + 1500 - L_{t} + R_{t}, hspace{1cm} U_t= U_{t-1} + L_{t} - R_{t}]where (L_{t}=0.1cdot F_{t-1}) is the number of unfollowers from time (t-1) to time (t), and (R_{t}=0.2cdot U_{t-1}) is the number of users that follow the page back from time (t-1) to time (t).

To compute the number of followers after ten weeks we can use the R code below. It does not matter if you do not understand it now, we will review R coding in the next chapters.

Ft
网站地图