# Questions tagged [simulation]

A vast area which includes generating results from computer models.

460 questions
3k views

### What is the optimal path between $2$ fixed points around an invisible obstructing wall?

Every day you walk from point A to point B, which are $3$ miles apart. There is a $50$% chance each walk that there is an invisible wall somewhere strictly between the two points (never at A or B). ...
5k views

### Why is this coin-flipping probability problem unsolved?

You play a game flipping a fair coin. You may stop after any trial, at which point you are paid in dollars the percentage of heads flipped. So if on the first trial you flip a head, you should stop ...
53k 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$ ...
16k views

### Implementing Ornstein–Uhlenbeck in Matlab

I am reading this article on Wikipedia, where three sample paths of different OU-processes are plotted. I would like to do the same to learn how this works, but I face troubles implementing it in ...
3k 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 ...
1k views

### Double obstructing wall problem, what is the optimal walk path and length?

Every day, you walk from point A to point B which are exactly $2$ miles apart straight line distance, however, each day, there is a $50$% chance of there being an obstructing wall perpendicular to the ...
689 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 ...
2k views

### Why is a simulation of a probability experiment off by a factor of 10?

From a university homework assignment: There are $8$ numbered cells and $12$ indistinct balls. All $12$ balls are randomly divided between all of the $8$ cells. What is the probability that there is ...
346 views

### Distribution of time spent above $0$ by a Brownian Bridge.

Let's say I have a Brownian motion, such that I know its value at time 0 (0) and time T (also 0). I am trying to evaluate the time spent above 0 between time 0 and T. Obviously I know that the ...
6k views

### Probability that a quadratic equation with random coefficients has real roots

Consider quadratic equations $Ax^2 + Bx + C = 0,$ in which $A, B,$ and $C$ are independently distributed $Unif(0,1).$ What is the probability that roots of such an equation are real? This problem is ...
661 views

### Drunkards walk on a sphere.

I simulated the following situation on my pc. Two persons A and B are initially at opposite ends of a sphere of radius r. Both being drunk, can take exactly a step of 1 unit(you can define the unit, i ...
259 views

### Can you simulate from a cantor distribution?

Has someone run across a method for generating random variates from a Cantor Distribution? It seems like its abstract definition prevents this. In essence, can one "invert" the Cantor Function?
7k 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 ...
497 views

### Expected travel of random walk in arbitrary game with multiple payouts

As explained here, the average distance or 'travel' of a random walk with $N$ coin tosses approaches: $$\sqrt{\dfrac{2N}{\pi}}$$ What a beautiful result - who would've thought $\pi$ was involved! ...
226 views

### What's the maths behind the movements of a two-legged air dancer (aka skydancer, tube man)? How can I simulate its behavior?

I am trying to understand the maths behind the movements of a two-legged air dancer, aka skydancer aka tube man. Well, I mean these cheery friends here: The following discrete time algorithm is my ...
651 views

### strange duel chances and my analysis

There is two guy, A and B they are shooting each other by turns, A shoot first, A has 30 percent chances to shoot and kill B and 70 percent to miss, B has 50 percent chances to kill A and 50 percent ...
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 ...
7k views

### How to generate sample from bimodal distribution?

Is there any "classical" distribution that is considered bimodal? For example, "Normal" is unimodal, "Gamma" is unimodal. If I have to generate a sample of 100 numbers from a univariate bimodal ...
247 views

### Looking for good books about simulating stochastic processes.

Yes, like the title says im looking for books about simulating stochastic processes. If they are using R in the book its great. If they are using matlab its good too or if they are just describing ...
80 views

### Shaking a box of rocks (Optimal Packing)

My coworker was telling me that when he plants seeds on his farm, he puts them all in a large container on the tractor and after a period of just driving, the seeds are more densely packed than when ...
100 views

549 views

### Computational methods for the limiting distribution of a finite ergodic Markov chain

We wish to show what can be discovered about the limit of a finite, homogeneous, ergodic Markov Chain $X_1, X_2, \dots,$ using simple methods of computation and simulation. Specifically, consider the ...
159 views

### Hypercomputation & Higher Dimensional Variants of Conway's Game of Life

Conway's Game of Life is a simple and important mathematical game with some rules of evolution in a two dimensional space. It appears in many subjects in mathematics, artificial intelligence and ...
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 ...
171 views