A vast area which includes generating results from computer models.

learn more… | top users | synonyms

1
vote
0answers
57 views

Samples from the Dirichlet measure

In Ferguson, 1973, Definition 2, he defines a sample of size $n$ from a random probability measure $G$ on $(\mathcal{X}, \mathcal{B})$ as: $$ P(X_1 \in C_1, \cdots, X_n \in C_n | G(A_1), \cdots, ...
5
votes
1answer
8k views

Generate Correlated Normal Random Variables

I know that for the $2$-dimensional case: given a correlation $\rho$ you can generate the first and second values, $ X_1 $ and $X_2$, from the standard normal distribution. Then from there make $X_3$ ...
0
votes
0answers
52 views

STINT Approximate stochastic integrals

This is a matlab code to simulate stochastic integrals: ...
0
votes
2answers
3k views

command randn(1,N) in matlab

This program is in Matlab to simulate Brownian motion Generating GBM: ...
0
votes
1answer
102 views

Why calculating variance this way is wrong?

I'm conducting a set of computer simulations (of membrane). I sample a property (area, $a$) in the following manner: $ A = \sum _1^N a \\ S = \sum _1^N a^2 $ During my data analysis, I calculate ...
1
vote
1answer
51 views

Is it allowed to use the quadratic solution formula for a differential equation

I have some trouble with a challenging fluid mechanics problem. The problem leads me to a non-linear ode 1st order. $0={\dot p_C}^2+\frac{k_1}{k_2 C}\dot p_C+\frac{p_C-p_0}{k_2C^2}$ My Idea was now ...
0
votes
1answer
193 views

How to simulate IMU data using position and orientation?

I want to make a simulator to verify that my imu algorithm is working. I am given: $p_0$ - starting position $p_1$ - final position $q_0$ - starting orientation $q_1$ - final orientation I want ...
1
vote
1answer
46 views

Simulation Model

How do I find the Inter-arrival time when the Inter-arrival time is described on as exponentially distributed with mean of 12 minutes? This is a single server model with a generalized service time. I ...
1
vote
0answers
31 views

Single evaluation for using exponential sampling until past a point

I am trying to improve an algorithm that looks like the following (and am getting stumped): I am provided with a starting time, rate, and a target time. I then use an exponential distribution to ...
0
votes
1answer
608 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
336 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
425 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
70 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
47 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
297 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
113 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
418 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
114 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
156 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
303 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
101 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
76 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
58 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
385 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
183 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
135 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
392 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
264 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
404 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
217 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
877 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
167 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
94 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
192 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
344 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
182 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
166 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
658 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
124 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 ...