Questions tagged [random-process]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
47 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 ...
  • 5,291
0 votes
0 answers
43 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 ...
  • 477
0 votes
1 answer
72 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 ...
  • 105
3 votes
1 answer
87 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{...
  • 573
2 votes
0 answers
70 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 ...
  • 573
5 votes
1 answer
95 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
207 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 ...
  • 3,685
1 vote
2 answers
123 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,685
3 votes
1 answer
51 views

Plotting Individual Variables from RandomFunction

I have defined an Ito Process such that: ...
0 votes
0 answers
67 views

Computing Variance of an ItoProcess

Consider the following ItoProcess: ...
-1 votes
1 answer
103 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
101 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: <...
  • 6,914
0 votes
1 answer
105 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 ...
  • 101
3 votes
3 answers
98 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 ...
  • 51
3 votes
2 answers
168 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
120 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
300 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 ...
  • 1,857
7 votes
1 answer
957 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,243
1 vote
1 answer
162 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
62 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
87 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 ...
  • 397
6 votes
1 answer
315 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 ...
  • 365
1 vote
1 answer
120 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
166 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: ...
  • 3,685
1 vote
1 answer
89 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/\...
  • 573
0 votes
1 answer
116 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
118 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\...
  • 3,366
0 votes
0 answers
92 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 ...
  • 3,366
2 votes
1 answer
177 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. ...
  • 3,366
2 votes
1 answer
94 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 ...
  • 243
1 vote
0 answers
47 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 ...
  • 314
1 vote
0 answers
73 views

Mean of ItoProcess

I've defined the following ItoProcess ...
  • 159
0 votes
0 answers
103 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 ...
  • 573
7 votes
1 answer
270 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 ...
  • 22k
0 votes
0 answers
42 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
290 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 ...
  • 22.2k
2 votes
0 answers
50 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 ...
  • 127
3 votes
1 answer
264 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 ...
  • 1,558
4 votes
1 answer
282 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.$ ...
user avatar
0 votes
2 answers
148 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
679 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 ...
  • 4,823
1 vote
0 answers
35 views

RandomFunction of the InhomogeneousPoissonProcess: unexpected behavior

For a $ 100 000 $ realization of the inhomogenous Poisson random process ...
3 votes
0 answers
31 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 ...
  • 41
1 vote
2 answers
49 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: ...
3 votes
1 answer
198 views

Reverse graph generation

The more usual way of generating graphs and random graphs, is to start from a mechanism of adding nodes (e.g. randomly embedding or connecting, or randomly rewiring edges, etc), and for which we know ...
user avatar
2 votes
0 answers
74 views

Simulating Stochastic Matrix Differential Equation with Arbitrary Autocorrelation Function

I want to numerically simulate a matrix differential equation that includes a stochastic (vector) Gaussian noise $\mathbf{n}$, where the different vector components are independent, and each component ...
2 votes
2 answers
134 views

Combine WienerProcess and WhiteNoiseProcess

I'm trying to simulate an IMU (inertial measurement unit) using a simple model: $$ \tilde a(t) = a(t) + b(t) + c(t) $$ where $\tilde a$ is the measured value, $a$ is the true value, $b$ is the ...
1 vote
1 answer
185 views

How to generate Markov chains with given length and end state?

Suppose I have a discrete Markov process with states called 'Alice', 'Bob', 'Charlie', 'Daryl', 'Edith', and 'Fiona' and a given transition matrix. How can I get Mathematica to generate a finite ...
  • 1,857
2 votes
1 answer
409 views

Monte Carlo Simulation of a Double Well Potential (Edited)

I am looking for a possible way to simulate the temperature effect on a collection of atoms sitting within a double well potential, say something like ...
  • 153
0 votes
1 answer
669 views

Adding white noise to a signal of two variables

When a signal depends on two variables, e.g., f[k1_, k2_] := Exp[I 0.75 (k1 + 0.3 k2)] + 1.5 Exp[I (0.2 k1 + 0.3 k2)] + Exp[I (0.2 k1 + 0.4 k2)]; where ...