# Mean of an Ito Process

I would like to compute the mean of s[t] which is given by the first equation in these coupled stochastic ordinary differential equation

p[y_, a_] := a/((1 + a)*(1 + 0.5*y))
q[m_] := q0/2*(1 + Tanh[(m - 0.05)/0.005])
q0 = 0.5;
beta = 0.15;
alpha = 0.15;
gamma = .1;
s0 = 0.038;
sigma = 0.1;
FF[t_] = alp (1 + Tanh[llSin[2*Pit/P0]]) /. {ll -> 10, P0 -> 1, alp -> 2}
F = ItoProcess[{
\[DifferentialD]s[t] == ((2*p[y[t], a[t]] - 1)*s[t]  +
q[m[t]]*y[t]) \[DifferentialD]t + s[t]  \[DifferentialD]w1[t],
\[DifferentialD]y[t] == (2*(1 - p[y[t], a[t]])*
s[t]  - (0.2 (1 + FF[t]) + q[m[t]]) y[
t]) \[DifferentialD]t + y[t] \[DifferentialD]w2[t],
\[DifferentialD] a[t] == (a[t]*(beta*s[t]*a[t]/(1 + a[t]) -alpha)) \[DifferentialD]t + \[DifferentialD]w[t],
\[DifferentialD]m[t] == (gamma*Exp[-s[t]/s0] - alpha*m[t]) \[DifferentialD]t},
s[t], {{s, y, a, m}, {0.1, 0.1, 0.5, 0.1}}, t,
{w1 \[Distributed] WienerProcess[],
w2 \[Distributed] WienerProcess[],
w \[Distributed] WienerProcess[]}]

OO = RandomFunction[F , {0, 1, 0.01}, 8]
ListLinePlot[OO , PlotRange -> All]

I want to compute the mean of these 8 curves could anybody help ? I tried Mean[OO[t]] but it does not give the answer

• Please include the values of all the parameters so we can run your code. Dec 9, 2020 at 15:38
• Something like {Mean@OO["ValueList"]} // ListLinePlot Dec 9, 2020 at 15:41
• or {OO["PathTimes"], Mean@OO["ValueList"]} //Transpose//ListLinePlot Dec 9, 2020 at 15:55
• these are the parameters and functions:p[y_, a_] := a/((1 + a)*(1 + 0.5*y)) q[m_] := q0/2*(1 + Tanh[(m - 0.05)/0.005]) q0 = 0.5; beta = 0.15; alpha = 0.15; gamma = .1; s0 = 0.038; sigma = 0.1; FF[t_] = alp (1 + Tanh[llSin[2*Pit/P0]]) /. {ll -> 10, P0 -> 1, alp -> 2} Dec 9, 2020 at 16:36
• @elKettaniPerla Please edit your question accordingly with parameters in your comment. Dec 9, 2020 at 17:28

proc = ItoProcess[{\[DifferentialD]x[t] ==
v[t] \[DifferentialD]t, \[DifferentialD]v[
t] == -x[t] \[DifferentialD]t + \[DifferentialD]n[t]},
x[t], {{x, v}, {1, 0}}, t, n \[Distributed] WienerProcess[]]

path = RandomFunction[proc, {0., 2. Pi, 0.05}, 12,
Method -> "StochasticRungeKutta"];

pl1=ListLinePlot[path];

pl2 = {path["PathTimes"], Mean@path["ValueList"]} // Transpose //
ListLinePlot[#, PlotStyle -> AbsoluteThickness[4]] &;

Then

Show[pl1,pl2]