Questions tagged [random-process]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
78 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)$ ...
user avatar
4 votes
1 answer
93 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: <...
user avatar
  • 6,640
0 votes
1 answer
73 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 ...
user avatar
  • 101
3 votes
3 answers
97 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 ...
user avatar
  • 51
3 votes
2 answers
157 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 ...
user avatar
1 vote
2 answers
99 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 ...
user avatar
11 votes
1 answer
294 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 ...
user avatar
  • 1,857
7 votes
1 answer
893 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 ...
user avatar
  • 1,159
1 vote
1 answer
91 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 ...
user avatar
1 vote
0 answers
60 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, ...
user avatar
2 votes
1 answer
76 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 ...
user avatar
  • 397
6 votes
1 answer
285 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 ...
user avatar
  • 355
1 vote
1 answer
90 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 ...
user avatar
1 vote
1 answer
100 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: ...
user avatar
  • 3,533
1 vote
1 answer
74 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/\...
user avatar
  • 499
0 votes
1 answer
75 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_{...
user avatar
2 votes
1 answer
92 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\...
user avatar
  • 3,286
0 votes
0 answers
62 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 ...
user avatar
  • 3,286
2 votes
1 answer
132 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. ...
user avatar
  • 3,286
2 votes
1 answer
80 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 ...
user avatar
  • 243
1 vote
0 answers
41 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 ...
user avatar
  • 304
1 vote
0 answers
58 views

Mean of ItoProcess

I've defined the following ItoProcess ...
user avatar
  • 159
0 votes
0 answers
73 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 ...
user avatar
  • 499
7 votes
1 answer
203 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 ...
user avatar
  • 20.4k
0 votes
0 answers
38 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 ...
user avatar
14 votes
1 answer
255 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 ...
user avatar
  • 21.7k
2 votes
0 answers
47 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 ...
user avatar
  • 127
3 votes
1 answer
223 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 ...
user avatar
  • 1,548
3 votes
1 answer
237 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
113 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 ...
user avatar
0 votes
3 answers
504 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 ...
user avatar
  • 4,391
1 vote
0 answers
28 views

RandomFunction of the InhomogeneousPoissonProcess: unexpected behavior

For a $ 100 000 $ realization of the inhomogenous Poisson random process ...
user avatar
3 votes
0 answers
28 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 ...
user avatar
  • 41
1 vote
2 answers
48 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: ...
user avatar
3 votes
1 answer
179 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
69 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 ...
user avatar
2 votes
1 answer
106 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 ...
user avatar
1 vote
1 answer
151 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 ...
user avatar
  • 1,857
2 votes
1 answer
358 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 ...
user avatar
  • 153
0 votes
1 answer
526 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 ...
user avatar
7 votes
5 answers
1k views

Survival Probability for Random Walks

The Survival Probability for a walker starting at the origin is defined as the probability that the walker stays positive through n steps. Thanks to the Sparre-Andersen Theorem I know this PDF is ...
user avatar
  • 665
9 votes
1 answer
294 views

Modelling snowfall as a random walk with a drift

I am trying to simulate a (very) simple model of snow fall/accumulation using random walks in the following way: ...
user avatar
  • 665
4 votes
1 answer
412 views

Generate Gaussian process with squared exponential covariance function

In a (stationary) Gaussian Process, values which are closeby are more similar than values far away from each other. The correlation function tends to zero as distance increases. Often, one models the ...
user avatar
  • 1,535
7 votes
2 answers
334 views

Record Statistics for Discrete Random Walks

I code a random walk of length 100 drawn from a LaplaceDistribution: Accumulate[RandomVariate[LaplaceDistribution[0, 1], 10000]] I am having trouble counting the ...
user avatar
  • 665
5 votes
1 answer
148 views

Driving a system of differential equations with an AR1-Process

I have the following system of differential equations: ...
user avatar
  • 2,713
0 votes
0 answers
112 views

Non-Gaussian random field generation

I would like to generate a height field that has a user specified distribution of slopes. Generating a random field with Gaussian slope distribution is easy. Is there a relatively simple way to ...
user avatar
  • 1
8 votes
2 answers
406 views

How to simulate a random walk to randomly generated particle to another particle fixed at the center of a grid?

I am new in Mathematica, it is my first program. Many codes of diffusion-limited aggregation are available but, they are too difficult to understand. I basically want to create a simulation of the ...
user avatar
  • 237
4 votes
3 answers
651 views

How do I create a random point on the surface of a cube? [duplicate]

How do I create a random point on the surface of a cube? I mean on one of its six faces at random.
user avatar
  • 6,124
2 votes
1 answer
175 views

Simulation of the stochastic system

I have the stochastic system which consists of 4 nonlinear equations. White Gaussian noise is used in the third equation only. Nevertheless, the whole system is stochastic. Some problems arise when I ...
user avatar
3 votes
1 answer
133 views

How to plot more paths to this SDE simulation? [duplicate]

I have the following code that simulates an Ito process in Mathematica, ...
user avatar