The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
573 views

Poisson Process, Exponential inter-arrival times simulation conundrum

I am trying to simulate a poisson process by using the fact that the inter-arrival times are distributed as an exponential distribution. I want to generate patient arrival times in (say) 1 hour. So, ...
0
votes
1answer
319 views

Runge-Kutta 4 explanation

I'm a game developer and I need to write a solar system simulation. Unfortunately I'm not very good at math and most importantly I haven't got to differential equations in my maths classes at school ...
2
votes
1answer
404 views

Numerical/artifical damping in forward Euler?

I'm testing a code to find periodic solutions of nonlinear structural vibrating systems by solving a global time-discretized periodic system of equations. I am using a forward Euler (first order ...
3
votes
0answers
69 views

Classify knots in a closed bead-spring like polymer simulation

my problem is to detect the crossing number (or another knot invariant) of a simulated polymer. A polymer is a closed bead spring, which mean that it is represented by a set of points connected by ...
1
vote
0answers
46 views

Simulating of GBM

I have a question regarding the simulation of a GBM. I have found similar questions here but nothing which takes reference to my specific problem: Given a GBM of the form $dS(t) = \mu S(t) dt + ...
1
vote
1answer
290 views

Rejection method for beta distribution?

I have the follow function, $$\frac{8}{\pi}(x(1-x))^{1/2} 0<x<1$$ I am asked to use $U(0,1)$ as an envelope to construct a rejection algorithm for simulation samples from $Beta(3/2,3/2)$ with ...
1
vote
0answers
112 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 ...
1
vote
1answer
391 views

Simulation of a Gaussian process on $R^2$ with a stationary kernel using the Karhunen-Loève expansion

Assume $X(\omega, t) \sim \mathcal{N}(0, K(\cdot, \cdot))$ is a real-valued, centered Gaussian process on $R^2$, i.e., $X: \Omega \times R^2 \to R$. Let the covariance function of the process be ...
2
votes
0answers
113 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 ...
1
vote
2answers
153 views

simple (tan like shape) function needed

I need a function which initially falls slowly, then quickly and then slowly again. Shape should be like tan but I want to be able to control the gradient Properties needed: $x = 0, y=0$ As $x$ ...
1
vote
1answer
302 views

What are the differences between the random walk and the gaussian random walk?

I know the random walk mobility model, but I can not understand what are the differences with respect to gaussian random walk. In other words, I know how to implement the two-dimensional random walk: ...
0
votes
1answer
89 views

Moss scheduling Simulator and Standard Deviation in plain english?

source : http://www.ontko.com/moss/sched/user_guide.html Configuration File Options standdev n * The number of standard deviations from the average length of time a process should execute ...
4
votes
2answers
75 views

Letter in the table with 8 trays

Here is a problem: we have a table with 8 trays. With probability $0.5$, there is a letter somewhere in the table. What is the probability that there is a letter in a last tray, given that there is no ...
1
vote
0answers
107 views

Maximizing noisy unknown function

I'm interested in maximizing a function $f(\mathbf \theta)$, where $\theta \in \mathbb R^p$. The problem is that I don't know the analytic form of the function, or of its derivatives. The only thing ...
1
vote
2answers
3k views

Please help me solve this exponential distribution problem

Question 1 : The time to service a customer at a bank teller's counter is exponentially distributed with mean of 60 seconds. What is the probability that the three customers in the front of an ...
0
votes
1answer
53 views

How to resolve this?

I've the following problem to model and program it: suppose that we have a central server that provides 3 different services($S_1,S_2,S_3$), there are $N$ machines connected to this server: each ...
4
votes
2answers
94 views

What do I need to know to simulate many particles, waves, or fluids?

I've never had a numerical analysis course so I don't know what I need to know. I'm just wondering what kind of books I should get to make me able to simulate these things. I'm wanting to simulate ...
0
votes
1answer
70 views

$4$ way heat distribution multiplier problem

I'm making a simple heat distribution program. It's a $2D$ matrix with cells holding heat value. Every iteration looks for cells near current which have lower heat value and gives them some of its ...
1
vote
1answer
57 views

Comparing speed in stochastic processes generated from simulation?

I have an agent-based simulation that generates a time series in its output for my different treatments. I am measuring performance through time, and at each time tick the performance is the mean of ...
4
votes
1answer
370 views

Integral over the $\mathcal{S}^{n-1}$ sphere

I have been running into the following integral again and again: Let $S^{n-1}= \{x \in \mathbb{R}^{n} \: | \: ||x||=1 \}$ and let $\lambda_{S^{n-1}}$ denote the surface measure over $S^{n-1}$ as ...
1
vote
0answers
182 views

Expected value involving a conditional multinomial distribution

$X|z$ has a multinomial distribution $MN(m, \mathbf{q}(z))$ where $z$ is either 0 or 1 with probability $1/2$. I need to find: $E_X[\max\{\Pr(z=1|X), \Pr(z=0|X\}]$. Is there an analytical form to ...
2
votes
0answers
133 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
1answer
372 views

Fourier Transform of a Covariance Function for Spectral Simulation

I am learning about generating Gaussian random fields by spectral simulation... If I have a covariance function $C(h)$, then the spectral density is the Fourier transform of $C(h)$: ...
0
votes
3answers
1k views

Simulation of 2-dimensional Brownian motion

I am trying to simulate (for the first time) a 2-dimensional SDE, in Matlab. $$X(t)=F(t,X(t))\,dt + \sigma(t,X(t))\,dBt$$ I have no problem using the Euler-Maruyama method in the one dimensional ...
0
votes
1answer
43 views

Generating samples from $u(7,10)$

I have the following assignment: It requires to generate samples from $u(7,10)$,the uniform distribution on the interval $2 \leq x \leq 11$. Compare the normalized histogram with the density ...
1
vote
0answers
263 views

Semi implicit integration - stability issues

I am trying to decide whether to use semi-implicit integration vs. explicit integration (particularly Position Verlet over Semi implicit Euler). Although the Verlet approach is widely used and is ...
12
votes
3answers
396 views

Why can't you simulate isotropic fluid flow on a square lattice?

There are easy methods for discrete simulations of gas dispersion in two dimensions. If you take a large square lattice, each cell of which is assumed to contain at most one gas molecule, and you ...
4
votes
1answer
209 views

Pseudo random number generator: Why not to use “too many” random variables in one application

I found statement in an article "Good Practice in ( Pseudo ) Random Number Generation for Bioinformatics Applications" that you should not use too many random variables in a single simulation. Authors ...
2
votes
2answers
846 views

Generating random array in Maple

I'm trying to do simulation in Maple, but I can't figure out how to do the following: How does one generate a set of random whole numbers in an array of 24 element (in 1 column) where the sum of the ...
2
votes
1answer
166 views

Simulation of diffusion processes on the canonical space $C([0,t],\mathbb{R})$

I'm currently reading the article "Exact and computationally efficient likelihood-based estimation for discretely observed diffusion processes" by Beskos, Papaspiliopoulos, Roberts and Fearnhead. I'm ...
1
vote
1answer
93 views

Any simple function which behaves like this?

I'm looking for this behavior to simulate the movement of the recoil of a gun. I'm not sure the recoil exactly has this shape, that's a wild guess. I'm looking for a function that does this ...
0
votes
2answers
191 views

Random and Pseudo-random number generation

I heard that computation results can be very sensitive to choice of random number generator. I wonder whether it is relevant to program own Mersenne-Twister or other pseudo-random routines to get a ...
2
votes
1answer
4k views

Can't understand a simple wave equation matlab code

I'm trying to figure out how to draw a wave equation progress in a 2D graph with Matlab. I found this piece of code which effectively draw a 2D wave placing a droplet in the middle of the graph (I ...
0
votes
1answer
336 views

Why are random numbers necessary for a Monte Carlo simulation?

This may be somewhat of a question with an obvious answer, but I can not seem to understand the necessity of "truly" random numbers to make a Monte Carlo simulation a good one. I understand that not ...
0
votes
1answer
64 views

Continuum limit of cellular automata

Is there any function defined for say the plane, that has interesting nontrivial behaviour similar to Conway's Game Of Life, but where every point's on/off status is decided by something like the ...
1
vote
0answers
181 views

Optimization via Simulation

I want to minimize and objective function $\hat{B_i}$ $i\in l$, which can be computed by a matlab code (assume $\operatorname{findB}(a, b, c)$ returns $B$. I have the following optimization problem: ...
1
vote
0answers
163 views

Markov Chains - Using Gibbs & Metropolis algorithm.

Suppose $f_x,_y$ is bivariate normal distribution. I was given the parameters $(μ_1, μ_2, σ_1^2, σ_2^2)$ and $ρ=0.95$ the correlation coefficient. I want to generate $(x_1,y_1), ...
2
votes
1answer
632 views

Monte Carlo - Control Variates & Antithetic method

Supposing $g(x)=\sqrt[3]{x}$, I want to calculate the expected value of g, $E(\sqrt[3]{x})$, using Monte Carlo method, by generating $x_i$ from a Weibull distribution with parameters $(1,5)$. After ...
3
votes
0answers
182 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).$$ ...
0
votes
1answer
157 views

Algorithms and Simulation

Supposing we want to take a sample from a $N(0,1)$ distribution and i can take a sample from a $N(0,σ^2)$. (a) Construct a disposal/rejection algorithm with function $N(0,σ^2)$, which generates a ...
0
votes
1answer
122 views

simulation and algorithms

A variant method of squeezed rejection algorithm for the simulation of the exponential distribution $\exp(1)$ truncated to $(0,2)$ interval can be written as: (a) generate $Y \sim U(0,2)$ , $U\sim ...
3
votes
2answers
190 views

Finite differences of function composition

I'm trying to express the following in finite differences: $$\frac{d}{dx}\left[ A(x)\frac{d\, u(x)}{dx} \right].$$ Let $h$ be the step size and $x_{i-1} = x_i - h$ and $x_{i+ 1} = x_i + h$ If I ...
1
vote
2answers
373 views

Is there a simulation for the Birthday Paradox?

Is there a simulation for the Birthday Paradox problem? Something that uses data from Facebook would be ideal.
0
votes
1answer
110 views

Simple physics for a graphical user interface widget

I have developed a spinner view for an Android application. It's like the spinner wheel on the Price Is Right with Bob Barker (If you're not familiar with that show watch this video). I am looking ...
3
votes
2answers
3k views

Numerical approximation of Levy Flight

I'm trying to produce a computer simulation of a Levy Flight in 2-dimensions; an approximation would be ok. Please excuse the simplistic level of this question: my maths is very rusty. My proposed ...
2
votes
2answers
263 views

incremental simulation of GBM

(I asked this question in stackoverflow.com, but I am now thinking my mistake may be mathematical rather than programming). I am simulating geometric brownian motion, using closed-form solution for ...
11
votes
3answers
2k views

Simulating uniformly on $S^1=\{x \in \mathbb{R}^n \mid \|x\|_1=1\}$

A scheme to generate random variates distributed uniformly in $S^2=\{x\in \mathbb{R}^n \mid \|x\|_2=1\}$ is well known: generate a standard normal variate in $\mathbb{R}^n$ and normalize it to unit ...
1
vote
2answers
313 views

Stochastic Urn Process using a Pareto distribution

N urns are assigned m balls in a stochastic process based on a Pareto distribution. The process is as follows: X is a Pareto random variable (xminimum = 1, alpha is a parameter) if X > N, throw the ...
0
votes
2answers
401 views

passive heatsink simulation

I want to simulate a heat source (eg a cpu) connected to a heatsink without any cooling fans. The simulation will run indefinitely using small time steps. What i want to measure at each time step is ...
2
votes
2answers
494 views

Queueing Theory: How to estimate steady-state queue length for single queue, N servers?

I have a real-life situation that can be solved using Queueing Theory. This should be easy for someone in the field. Any pointers would be appreciated. Scenario: There is a single Queue and N ...