Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [simulation]

A vast area which includes generating results from computer models.

6
votes
0answers
512 views

Proving that Markov Chain Monte Carlo converges

I am trying to understand how the very basic Markov Chain Monte Carlo approach works: We try to approximately calculate the expected value $E_{\pi(x)}[X]$ by drawing sequential samples from a Markov ...
4
votes
0answers
141 views

How to simulate a Super-Brownian Motion (SBM)?

I'll start by doing this in MATLAB. A Standard Brownian Motion $dX_t$ can be approximated by a scaled random walk through $\triangle{X}=Z\sqrt{\triangle t}$. Analogously the drift of a Super-Brownian ...
3
votes
0answers
41 views

How to implement an insurance risk model

So the problem goes as follows: "Suppose that the different policyholders of a casualty insurance company generate claims according to independent Poisson processes with a common rate $λ$, and that ...
3
votes
0answers
90 views

Queuing system - advice needed on what models to use, and suitable free simulation software

There is a system consisting of: $\mathbf{Workcentres:}$ 6 workcentres $W_i$ assumed to be operating at different rates $\mu_{W_i}$, which depends on which input is being worked on. Assume there are ...
3
votes
0answers
103 views

Simulate Brownian motion on a mesh surface

Does anybody know of any work on how to simulate Brownian motion on a mesh surface in $\mathbb{R}^3$ (i.e. treating it as an Ito process on a Riemannian manifold)? I'd like there to be a proof that ...
3
votes
0answers
26 views

Studying the behavior of curious but timid animals

Let $\mathcal {G}$ be an $n\times n$ grid inhabited by $k$ animals, time is indexed by the naturals, the metric $d(x_i,x_j)$ on $\mathcal G$ between two animals $i$ and $j$ is the Manhattan distance. ...
3
votes
0answers
73 views

Simulating a SDE

I have a question about simulating a SDE. I want to simulate $dS=\alpha(K-S)dt+\sigma S dZ$ with use of a Euler-marayama scheme. The numerical scheme becomes: $S_{i+1}=S_{i}+\alpha(K-S_{i})dt+\sigma ...
3
votes
0answers
280 views

How to compute this triple integral?

I am trying to do this triple integral $$\int_{0}^{\infty }\int_{0}^{\infty }\int_{0}^{\infty }(u+w)e^{-\frac{(u+w)^2}{2}}(v+w)e^{-\frac{(v+w)^2}{2}}(u+v)e^{-\frac{(u+v)^2}{2}}e^{-(\mu +\lambda )u}e^{-...
3
votes
0answers
159 views

Personal Experiences with Probability Simulation

Simulations methods are increasingly used in theoretical and (especially) applied probability. Personally, I have used simulation for purposes that range from recreational Q&A to applications of ...
3
votes
0answers
126 views

Maximize or find an upper bound of the function $kx^{k-1}\exp(-\mu(x^k-x))$

I was programming some random variable simulation using the acceptance-rejection method and I encounter with the Weibull$(k,\lambda)$ distribution. This random variable is posible to simulate with ...
3
votes
0answers
224 views

Approximation of SDE

I have been struggling with the following problem: If you want to find a numerical result by simulating the paths of a stochastic differential equation, in particular a geometric brownian motion I ...
3
votes
0answers
190 views

Simulation and Stochastic Processes

Supposing we want to take a sample from the distribution $p(x)=cp^*(x)$ where $c$ is the normalization constant and $p^*(x)$ is given by $$p^*(x)=0.5\exp(-(x-\mu_1)^2)+0.5\exp(-(x-\mu_2)^2).$$ ...
2
votes
0answers
27 views

How can I simulate the Stochastic integral $\int X_sdW_s$ when X is a stochastic process and W is a Brownian motion?

How can I simulate the Stochastic integral $\int_0^1 X_sdW_s$ where $X$ is strong solution of of an SDE driven by a Brownian motion independent of $W$(the integrator above). I have already computed $...
2
votes
0answers
18 views

Scaling behavior Levy flight (distance from the origin v number of steps)

In the question Numerical approximation of Levy Flight the implementation of a Levy-flight random walk with Matlab was discussed. For a classical random walk (Brownian motion), we have that the ...
2
votes
0answers
87 views

May the Euler equations, rather than the Navier-Stokes equations, generate turbulent flow?

In general, I think turbulence is resulted only from the viscosity term as in the Naiver-Stokes equation, and it dissipates energy in the flow. But the compressible Euler equations, which already ...
2
votes
0answers
179 views

Markov Processes and Detailed Balance

Section 2.2.3 of this book: http://itf.fys.kuleuven.be/~fpspXIII/material/Barkema_FPSPXIII.pdf discusses the detailed balance condition in the context of Markov chain Monte Carlo algorithms. First ...
2
votes
0answers
72 views

Is there any alternative way to simulate a continuous time model instead of discrete?

Normally I use the exponential matrix method to turn continuous time model to discrete time model. In this case, it's SS-models: $$\dot x = Ax + Bu + Eu \\ y = Cx + Du$$ $$\begin{bmatrix} A_d & ...
2
votes
0answers
392 views

A simulation: What's the difference between linear MPC and LQG?

I thought it would be good to do a cooperation between basic MPC and basic LQR. So i hook up a state space model for simulation. $$\dot x = Ax(t) + Bu(t) \\ y(t) = Cx(t) + Du(t)$$ Code: ...
2
votes
0answers
50 views

Finite-volume method applied to a particular advection equation

I'm trying to apply the finite-volume method (FVM), with which I'm not so familiar, so a simple 1D PDE equation. The equation I want to solve is, to simplify, $$\frac{\partial U}{\partial t} + A\...
2
votes
0answers
88 views

Definition of the term “De Rham map”

I am a PhD student working in the field of numerical simulation. In several papers, the term "De Rham map" pops up (for instance in the very good thesis by Jérôme Bonelle : https://tel.archives-...
2
votes
0answers
148 views

Finding Height In Gerstner Wave Function In World space.

Using the GPU Gems Article Effective Water Simulation From Physical Models I have implemented Gerstner Waves into UE4, I have built the function both on GPU for the tessellated mesh displacement and ...
2
votes
0answers
77 views

Continuous Variables generating from Simulation by Ross Sheldon.M

These questions are exercises from chapter Generating Continuous Variables. 14.Let $G$ be a distribution function with density $g$ and suppose, for constants $a < b$, we want to generate a random ...
2
votes
0answers
38 views

Inelastic Collision Response

It comes to mind that the coefficient of restitution (CR) for collision response only models the separating velocity in the normal direction. Thus, for $CR=0$, the separating velocity of two colliding ...
2
votes
0answers
166 views

Gaussian processes and bias

I would like to simulate three Gaussian processes $X$, $Y$ and $Z$ defined as $$dX_t=-(a_xX_t+b_x)dt+\sigma_XdW_t^x$$ $$dY_t=-(a_yY_t+b_y)dt+\sigma_YdW_t^y$$ $$dZ_t=(\int_{0}^tX_udu-\int_{0}^...
2
votes
0answers
302 views

Why does this cellular automaton generate circular patterns?

I made a kind of cellular automaton game with the following rules. Each cell in a rectangular grid has a "water level" (a 32-bit floating-point number). In the next generation, water "flows" from each ...
2
votes
0answers
42 views

Calculating integral with antithetic variables

Use simulation with antithetic variables and find $$\int_{-\infty}^\infty \int_0^\infty \sin(x+y)e^{-x^2+4x-y} \, dx \, dy.$$ so, my question and doubt is how struggle with the infinite limit ? It ...
2
votes
0answers
70 views

Likelihood that two markov chains are derived from the same transition matrix

Forgive me for my weak statistic background, hopefully what I'm asking makes sense. So some quick background, I have one markov chain from a data set and many additional chains that I'm producing from ...
2
votes
0answers
109 views

Solving Kepler's Equation

I've been working on simulating orbits. I've found that, when solving Kepler's equation, $M = E - \varepsilon\sin{E}$, I'm unsure about the solution to use. For a true anomaly $< \pi$, using the ...
2
votes
0answers
54 views

Are these two approaches to calculating return rate mathematically consistent?

I have coded two C# programs, which use two different approaches to evaluate the outcome of a certain casino-style game (casino-style in the sense that the user pays points to take a turn, and ...
2
votes
0answers
36 views

orderstatistics of uniform distributions on different ranges

During a simulation I discovered an interesting phenomenon: Given you have 3 agents. 2 are uniformly distributed between [0,1] and one between [0,2]. The question is how often do the smaller agents ...
2
votes
0answers
209 views

simulate hitting time of Brownian motion

let's say I have a brownian motion $W_t$, and I know the value of $W_1$. Is there a way to simulate the hitting time of $W_t$ and a given function $f(t)$ ? For instance I know that if $f(t)$ is a ...
2
votes
0answers
138 views

Positive eigenvalues in differential-algebraic equations not appearing in time-domain simulation

I am solving a system of equations derived from power system applications. It consists of index-1 differential and algebraic equations in the form: $$\dot{x}=f(x,y) \\ 0=g(x,y)$$ To get the ...
2
votes
0answers
189 views

Simulating first passage times

I have a Brownian motion $X_t = \mu t+\sigma W_t$, where $W_t$ standard Brownian motion. I know that the first passage time $\tau = \min\{t|X_t\leq\alpha\}$, is Inverse Gaussian distributed i.e., $\...
1
vote
0answers
27 views

show that $\frac{1}{k^{a-1}} - \frac{1}{(k+1)^{a-1}} \geq \frac{1}{\zeta(a).k^a}c $

I want to Apply the acceptance reject method to the zipf distribution. For that i want to use q(k)= $\frac{1}{k^{a-1}} - \frac{1}{(k+1)^{a-1}}$ I have to show there exist c>1, such that $\frac{1}{k^{...
1
vote
0answers
16 views

energy density spectrum vs energy spectral density

I am doing a project on ocean wave simulation and there is a formula I am trying to test. It is called the random coefficient scheme and it is meant to simulate a random time series. One part of the ...
1
vote
0answers
16 views

Is having a burn-in time relevant when only trying to sample from a distribution?

I'm trying to simulate - via the Metropolis-Hastings algorithm - a sample $X$ of size 10000 from a density $f$ using a proposal distribution $g$. The Markov chain $X$ obtained by this algorithm has ...
1
vote
0answers
51 views

Simulation of hitting time of brownian motion with drift

I want to generate the hitting time of brownian motion with drift (upper and lower depending on some binomial random variable $\delta = 0,1$). $\tau^{up} = inf(\tau : \mu \tau + \sigma W_{\tau}\ge h)...
1
vote
0answers
37 views

Stochastic simulation Gillespie algorithm for areas instead of volumes?

I am trying to find resources on the Gillespie stochastic simulation algorithm for my system which happens on a surface. The original algorithm was developed for a reactor of volume $V$, but my system ...
1
vote
0answers
55 views

“Change of measure” for fast simulation.

$\newcommand{\var}{\operatorname{var}}$The problem is here: Consider a nonnegative random variable X whose PDF is close to being exponential, of the form $$f_X(x) = g(x)e^{−x},$$ where $g(x)$ is a ...
1
vote
0answers
34 views

Option pricing and mean reversion

In different books one can find a formula for option pricing when we assume that $\ln(S)$ follows a mean reversion process $$ dS_t/S_t=\kappa(\theta-\ln(s)) - \ln(S)dt+\sigma dZ$$ If we calculate an ...
1
vote
0answers
16 views

Simulating normal distribution on “level surfaces”

What is a basic way to simulate points on the "level surfaces" of a multivariate normal distribution? That is, for a mean vector $\mu$ and covariance matrix $\Sigma$, how do we generate $X\sim N(\mu,\...
1
vote
0answers
39 views

Calculate the average promotion rate of an indivdual in society?

Imagine a hierarchy with $N$ layers (maybe $N=6$, say). And under each person except the bottom layer there are $M$ people ($M=30$, say). A person works for a length of time $T$ ($T=50$ years, say). ...
1
vote
0answers
147 views

Numerical integration of triple integral

I want to compute the following integral where the parameters are given by: $\alpha=3.95$, $w_{zeq} = 2.5$, $\sigma_R = 0.32$, $\mu = -0.05$, $A_0 = 0.0032$, $\sigma = 0.548$, $h_0 = 0.001$, and $\...
1
vote
0answers
89 views

How to generate a large PSD matrix $A \in \mathbb{R}^{n \times n}$, where $\mathcal{O}(n) \sim 10^3$

I would like to generate a large PSD matrix, i.e., $A \in \mathbb{R}^{n \times n}$, where $\mathcal{O}(n) \sim 10^3$. The entries of the matrix should be randomly generated using a standard function ...
1
vote
0answers
21 views

Simulation of fractional noncentral Wishart distribution

For a non-integer number of degrees of freedom $\nu > p-1$, one can simulate the central Wishart distribution $W_p(\nu, \Sigma)$ with the help of the Bartlett decomposition. How to simulate the ...
1
vote
0answers
189 views

Simulation of Cox processes with self-dependent intensity

A Cox Process $X_t$ is, in a nutshell, a Poisson process whose intensity $\lambda_t$ is a stochastic process itself. If $\lambda_t$ is independent from $X_t$ and it's possible to sample, then one can ...
1
vote
0answers
32 views

Metropolis-Hastings for doubly-unnormalised densities?

I wish to do inference in a joint space $P(x,y)$ that is particularly tricky, because I don't have access to an unnormalised density $f(x,y)\propto P(x,y)$. However, I do have: An unnormalised ...
1
vote
0answers
101 views

Time oriented simulation

A factory y has large g number of semiautomatic machines.On 50% of the working days none of the machines fail. On 30%of the days one machines fails and on 20%of the days two machines fail. The ...
1
vote
0answers
24 views

What platform or tool could I use for network traffic simulation?

Hopefully not totally off-topic: I want to simulate network traffic within a hierarchically meshed system. Based on packet loss probabilities the queuing and scheduling of system telegrams shall be ...
1
vote
0answers
91 views

Numerical Solution of coupled SDE using Runge kutta

I am trying to find the Runge-Kutta scheme for the simulation of Coupled Stochastic Differential Equations. This wikipedia article gives the basic scheme for non coupled equations, and just states ...