Questions tagged [random-process]
The random-process tag has no usage guidance.
69
questions
0
votes
0
answers
41
views
Defining function through a formula
I would like to define a cocycle on a group that maps into the unit circle. That is, I want to be able to define a function $f:G\times G\to\mathbb{T}$ such that $f(e_G,a)=f(a,e_G)=1$ for all $a\in G$ ...
2
votes
2
answers
104
views
Optimization of a Markov сhain with symbolic transition rate
I am trying to work on 1D random walk that can move to left, right or stay with probabilities $p_i$,$q_i$,$r_i$ that changes with the site $i$. I am trying to simulate this by using a recurrence ...
1
vote
2
answers
169
views
How to use first time generated randomly matrix? [closed]
I'm trying to solve one (very little) problem. :)
I've generated 3x3 randomly matrix with
V[i_, j_] := Table[RandomInteger[{-10i, 10j}], {3}, {3}];
Now I want to ...
3
votes
2
answers
157
views
Approximate a Wiener Process by a Karhunen-Loève expansion
I'm trying to approximate a Wiener Process by a Karhunen-Loeve expansion (see slide 20) with the following code:
...
2
votes
1
answer
185
views
Applying NDSolveValue on a differential equation
I am trying to solve stochastic Schrodinger equation (Schrodinger equation in the presence of Ornstein Uhlenbeck Process)
$$i\frac{d}{dt}\begin{pmatrix}c_1(t)\\ c_2(t)\end{pmatrix}=H(t)\begin{pmatrix}...
2
votes
1
answer
91
views
Simulating a discrete time stochastic process
I would like to simulate and plot many paths of a discrete random variable $\tau_{t}$ that follows the following process:
with probability $\tau_{t-1}$, $\tau_{t}$ is either $0.6$ with probability $x$...
1
vote
0
answers
37
views
How can I use RandomFunction to solve an SDE in reverse time?
I am working with a problem of the Ito-stochastic differential form given by
$$\mathrm{d}x=g(x,t)\,\mathrm{d}t+f(x,t)\,\mathrm{d}W,$$
where $W$ is a Wiener process.
I furthermore have to satisfy the ...
1
vote
0
answers
59
views
I am unable to improve the (MAProcess) time series model
I am a time series novice and have been learning the art/trade from examples while being governed by the NIST handbook (ch.6, sec.4).
My question is regarding:
How to improve the estimated time ...
0
votes
0
answers
45
views
Possible Bug with MultinomialDistribution
I think there is a bug in MultinomialDistribution[]. I want to generate N random variables with densities vec{p}={p1,p2,p3,...}
Of course I check that Total[vec{p}]=1 (they are densities so they sup ...
0
votes
1
answer
79
views
Bad performance of 3D self-avoid persistent random walk with periodic boundary conditions
I'm trying to simulate a self-avoiding persistent random walk with periodic boundary conditions a large number of times. For some reason, the script I've written is extremely slow for self-avoiding ...
3
votes
1
answer
302
views
Stochastic process: Understanding Ornstein Uhlenbeck Process
Recently, I have been trying to simulate a random/stochastic variable that follows Gaussian distribution and also has an exponential correlation function $\left\langle X(t)X(s)\right\rangle= e^{-\frac{...
2
votes
0
answers
88
views
Solving stochastic equation
I am trying to solve, numerically, a classic stochastic Liouville's equation, namely
\begin{equation}
\frac{dA(t)}{dt} = -B(t)A(t)+ {\cal C}(t)
\end{equation}
with $B(t)=\cos(\omega t)$, and ...
5
votes
1
answer
133
views
Applying Fourier Shift Theorem using Power Spectrum
I have a power spectrum $P(\omega) = 10/\omega^2$ and I want to simulate a random time-series realization of this process $f(t)$ and a time-shifted copy of that realization $f(t- \tau)$. To do this, I ...
2
votes
2
answers
307
views
How to define the density of random 3D points and plot it?
The following code draws a random distribution of particles in 3D. The Manipulate box allows to change a few parameters (number of particles, size of clusters, ...). I would like to define the local ...
1
vote
2
answers
126
views
How can I improve this code?
The code below is working well, but it's very slow in the Manipulate box. I know that the Do and AppendTo parts aren't very ...
3
votes
1
answer
56
views
Plotting Individual Variables from RandomFunction
I have defined an Ito Process such that:
...
-1
votes
1
answer
145
views
How to set Ornstein-Uhlenbeck function with deterministic, not a constant parameter [closed]
I want to calculate Mean and Variance of this equation
$$r(t) = x(t) +y(t) + k(t), r(0) = r_0,$$
$$dx(t) = -ax(t)dt + σdW_1(t), x(0) = 0,$$
$$dy(t) = -by(t)dt + ηdW_2(t), y(0) = 0,$$
Where $W_n(t)$ ...
4
votes
1
answer
106
views
What is this this application of KalmanEstimator doing?
I struggle to understand the Kalman filter and the documentation for KalmanEstimator. Please help me understand the first Application on that documentation page. The code in question is copied here:
<...
0
votes
1
answer
111
views
WienerProcess - estimate the expected value after `n` steps
Is there a way to adjust the estimated value of the WienerProcess after n steps?
Eg. could we evaluate the value of
...
3
votes
3
answers
107
views
Problems with DiscreteUniformDistribution
DiscreteUniformDistribution does not seem to work as it should. For a very simple example, let's consider a discrete random variable with PMF given by prob(-1)=1/2 and prob(1)=1/2. First, we create ...
3
votes
2
answers
191
views
Is there a way to generate a data-driven Monte Carlo sample from a histogram?
I have a vector with 50 elements. These are values of a random variable. I have represented the data as Histogram[RandomVariable1Histogram]. However, I need to ...
1
vote
2
answers
155
views
Add gaussian noise to 2D Point
I implemented a program for a camera calibration in Mathematica with with prototypical data to see if my calibration works. Here I converted 3D object coordinates into 2D sensor coordinates. I have ...
11
votes
1
answer
310
views
Generating random sequence of integers with ordering constraints
I would like to write a Mathematica routine for generating random musical melodies that obey (some of) the constraints of traditional tonal harmony. For simplicity's sake, I'm interested only in ...
7
votes
1
answer
1k
views
How can I generate the same random number in Mathematica and MATLAB?
As a part of my research studies, I have developed a code which is essentially based on random generation of numbers. The first version of the code was written in MATLAB, however, for some reasons I ...
1
vote
1
answer
230
views
Correlated random field generation
I need to generate two correlated gaussian random fields. As far as I know, this question and this other provides the means to generate a single autocorrelated process. However, I am clueless about ...
1
vote
0
answers
63
views
Stochastic noise with known propability density function
How can I generate samples for random function, which functional "probability density" is known? When I say "probability density" for random function $\xi(\mathbf{q},t)$, I mean, ...
2
votes
1
answer
96
views
Existing template for coalescing random walk
I would like to simulate a 2-dimensional random walk on a lattice where the particles coalesce/merge when they occupy a similar site on the lattice. Would it be possible to tweak in an efficient way ...
6
votes
1
answer
332
views
Animating a random walk of 3D water molecules?
Inspired by David G. Stork’s post https://mathematica.stackexchange.com/a/84097/10361, I tried to have the molecules perform a random walk
...
1
vote
1
answer
156
views
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
...
1
vote
1
answer
224
views
How to add noise to these random straight lines in 3D?
Here's a code that draws a pack of random straight lines in 3D:
...
1
vote
1
answer
101
views
Implementing Random process for exponential correlation function
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/\...
0
votes
1
answer
156
views
Simulation of a recursive stochastic process
I would like to simulate and plot multiple paths of the following stochastic difference equation, for any initial condition $\pi_{0} \in (0,1)$:
$\pi_{t+1} = \gamma \pi_{t}$ with probability $1/3 \pi_{...
2
votes
1
answer
125
views
ItoProcess with matrix of equations
What is the cleanest/simplest way to use ItoProcess to solve the equation
$$i \text{d}\boldsymbol{\psi} = H\cdot\boldsymbol{\psi} \text{d}t + \boldsymbol{\psi}^2\...
0
votes
0
answers
116
views
ItoProcess with WhiteNoiseProcess
Is there a way to use ItoProcess with a white noise process, instead of the usual WienerProcess? If I just naively use ...
2
votes
1
answer
194
views
Why is ItoProcess failing here? (Stochastic Differential Equation) [closed]
Why is this code returning errors and failing to run? If I replace Abs[x[t]]^2 with just x[t] it works perfectly.
...
2
votes
1
answer
100
views
RandomFunction with a QueueingProcess for more than one service handler hangs, why?
In Mathematica, I want to, say, investigate a M/M/4 queue, that is a single queue with 4 services each handling jobs from that same queue. The arrival rate is 4 and the service rate is 2. I've ...
1
vote
0
answers
48
views
Generalize WienerProcess
Together the WhiteNoiseProcess, which includes the option of specifying a specific distribution for the noise, and the TransformProcess, which allows functions of processes, provide a great deal of ...
1
vote
0
answers
84
views
Mean of ItoProcess
I've defined the following ItoProcess
...
0
votes
0
answers
130
views
Correlated random variables
Assume we have a random variable $X(t)$ that changes as a function of time satisfying a correlation $\left\langle X(0) X(\tau) \right\rangle=e^{-\tau/\tau_c}$. Is Mathematica able to generate random ...
7
votes
1
answer
319
views
RandomPoint inside mesh for walk-on-spheres Monte Carlo PDE solver
I'm trying to understand a Monte-Carlo Laplace/Poisson PDE solver:
http://www.cs.cmu.edu/~kmcrane/Projects/MonteCarloGeometryProcessing/paper.pdf
This method inspired by random-walks and ray-tracing ...
0
votes
0
answers
44
views
How can i calculate the dynamical evolution of states and a probability plot of them?
Using 4 correlation matrices i define as my market states i have to follow the evolution of the market as dynamical transitions between these states. In other words, i have to show the evolution ...
14
votes
1
answer
323
views
Ito Process sourced by Gaussian Process?
Question
Is it possible to extend the function ItoProcess so that it takes correlated noise?
I.e would like to be able to write
...
2
votes
0
answers
53
views
How is a Lévy stabile process pdf normalized?
I'm interested in how to deal with α-stabile probability density functions, for example one with the Laplace image like:
$ \phi(s) = s^{(\alpha-1)}*e^{-\nu s^{\alpha}} $
I can work with this ...
3
votes
1
answer
278
views
Fast way of re-ordering list
I have a list which at each iteration of my algorithm is being modified. What I want to do is to find the elements that satisfy certain criterion (below it's simply being above the neighborhood ...
4
votes
1
answer
311
views
Connecting 2 graphs according to NearestNeighbor and degree distribution
Context and example:
Suppose we have 2 graphs $g_1,g_2$ that we connect together by introducing edges between each node of $g_1$ and its corresponding nearest neighbors within the second graph $g_2.$ ...
0
votes
2
answers
173
views
Need to calculate total distance traveled in a 2D random walk
Part1
s = {0., 0.};
path = Table[s += RandomReal[{-0.5, 0.5}, 2], {100}];
ListLinePlot[path, ImageSize -> Small]
path
This part of the code generates 100 xy ...
0
votes
3
answers
837
views
How can I generate monotonic random real numbers
My question is simple, and therefore I made a search of an answer to it using the Repository of this forum. There are relevant questions, however, none of them answers to the following question.
My ...
1
vote
0
answers
40
views
RandomFunction of the InhomogeneousPoissonProcess: unexpected behavior
For a $ 100 000 $ realization of the inhomogenous Poisson random process
...
3
votes
0
answers
34
views
Fix parameter in EstimateProcess
Can I fix some parameter in EstimateProcess?
I want to estimate the transition matrix of a hidden markov process without optimization/change of the distribution ...
1
vote
2
answers
50
views
Generating random variates inside summation
I'd like to generate a table of sums which each a non-correlated, normally distributed random variate inside. Here is the sample code:
...