1
$\begingroup$

I'm trying to simulate a random process for a variable $-1<X(t)<1$ with average 0, i.e., $\left\langle X(t)\right\rangle =0$ and correlation $\left\langle X(t)X(0) \right\rangle \propto e^{-t/\tau_c}$. I'm wondering if there is any process already implemented within Mathematica for the situation I'm aiming.

Thanks!

$\endgroup$
2
  • 2
    $\begingroup$ OrnsteinUhlenbeckProcess is indeed implemented. Can you explain how it relates to the process you want? I don't think you are providing enough information for people to help you out. $\endgroup$
    – MarcoB
    Commented Nov 16, 2020 at 23:50
  • $\begingroup$ @MarcoB I've updated my question to be more clear. Its previous form was lacking what I really wanted to ask. Thanks! $\endgroup$
    – sined
    Commented Nov 17, 2020 at 2:08

1 Answer 1

1
$\begingroup$

This is just an extended comment as it doesn't answer the need for the correlation of $X(0)$ and $X(t)$ to be proportional to $e^{-t/\tau_c}$.

I'm unaware of a specific process in Mathematica that directly generates a random process between -1 and +1 but you can use TransformedProcess and the inverse of the Fisher z-transformation to convert a process between $-\infty$ and $+\infty$ to be between -1 and +1.

p = TransformedProcess[(-1 + E^(2 y[t]))/(1 + E^(2 y[t])), 
  y \[Distributed] OrnsteinUhlenbeckProcess[0, 0.4, 0.8], t]
SeedRandom[123]
data = RandomFunction[p, {0, 10, 0.001}]
ListLinePlot[data, PlotRange -> {Automatic, {-1, 1}}]

Example of a random process

ListPlot[{CorrelationFunction[data, {5000}], Table[{t, Exp[-t/500]}, {t, 0, 5000}]}, 
 PlotRange -> {Automatic, {-1, 1}}, PlotLegends -> {"From data", "From model"}, Joined -> True, 
 AxesLabel -> {"t", "Correlation"}]

Correlation over time for data and model

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.