The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
1answer
342 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
177 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
129 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
299 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
42 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
253 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
373 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
205 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
736 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
161 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
91 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
189 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
320 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
62 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
169 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
162 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
570 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
179 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
156 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
121 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
186 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
365 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
104 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
252 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
298 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
376 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
462 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 ...
3
votes
2answers
195 views

Vector Force Fields and Their Physical Interpretations

The vector force field F=(yi,-xj) has a curl of -2. The acceleration of a particle in space is given by: ax=y/m ay=-x/m This vector field has a divergence of 0. Will particles in this vector FORCE ...
0
votes
1answer
711 views

What if analysis of an Excel spreadsheet

Here is my set up. I am running a simulation of a gambler betting over time Here are the givens I am using. Probability of win = 35% which is in B1 table Odds = 2 which is in B3 table Kelly # ...
0
votes
1answer
316 views

Calculation of G force

I have a formula which is G-force = velocity*omega/9.8. Omega is the angular velocity. I've seen on the internet that G force is actually acceleration/9.8. I'm confused as to which formula is correct. ...
-1
votes
1answer
112 views

How does the NCT model take angular velocity into account? (Nearly coordinated turn)

In a Kalman filter taking into account NCT, the state matrix is [x; vx; y; vy; omega]. Where omega is the angular velocity. What I don't understand is that when the F matrix for NCT is F=[ blah ...
3
votes
1answer
524 views

Sample Poisson Distribution

In Stochastic Simulation: Algorithms and Analysis by Søren Asmussen, on Page 38 A Poisson r.v. $N$ with rate $\lambda$ ($P(X = n) = e^{−\lambda} \frac{\lambda^n}{n!}$) can be constructed using the ...
1
vote
1answer
156 views

A problem of inversion method for sampling

I am reading the book Stochastic Simulation, Algorithms and Analysis by Asmussen. On page 39, when talking about inversion method for sampling a distribution, he gave an example: an r.v. ...