# Monte Carlo for first order dynamic system

I'm trying to help a friend with a uni exam he failed in December but I can't seem to work out this next question (translating from french, sorry for any mistakes):

Consider a first order continuous-time dynamic system:

$$\dot x = x \ , \quad x \in \mathbb R$$

where the condition $x(0)$ at the instant $t=0$ is distributed following the probability density in the image below:

density

Let $U=[0.15, \ 0.6, \ 0.53, \ 0.9, \ 0.34, \ 0.17, \ 0.82, \ 0.08, \ 0.37, \ 0.03]$ a sequence of 10 random numbers pulled from a uniform distribution between 0 and 1.

Estimate using the sequence $U$ and Monte Carlo:

• The average of the solution $x(1)$

• The probability that $x(1)>0.3$

Can anyone give me any tips or point me to some relevant resources online?

• First solve the ODE exactly in terms of the initial condition $x(0)=Z$, where $Z$ is a random variable with that density. So then $x(1)$ is also a random variable (it is a multiple of $Z$). So you can compute $E[x(1)]$ and $P[x(1)>.3]$ exactly. This problem likely does not want an exact answer: It wants you to generate 10 instances of $Z$ based on the 10 given outcomes of a uniform $U$. Do you know how to generate a random variable $Z$ from a uniform random variable $U$? You "invert" the CDF (the integral of PDF). – Michael Aug 21 '16 at 17:03
• As a first step (which is really the last step), suppose for example that you were given 10 independent samples of the random variable $x(1)$. Suppose they are the following (these numbers do not correspond to the actual numbers you need to calculate, I am just making them up): $\{2.3, 1.7, 0.2, 3.9, 3.4, 1.2, 3.5, 5.4, 1.1, 2.7\}$. From this data, how would you estimate $E[x(1)]$ and $P[x(1)>0.3]$? Of course, a good estimator would use a computer with thousands or millions of samples, but this problem has only 10 samples so you can do it by hand. – Michael Aug 21 '16 at 17:11