A vast area which includes generating results from computer models.

learn more… | top users | synonyms

1
vote
1answer
30 views

Log normal simulation.

I want to calculate numerically the expectation of a lognormal random variable $Y=e^X$, where $X$ is normally distributed with mean $m$ and variance $V$. The expectation is known as ...
-1
votes
0answers
19 views

Conditional probability of geometric brownian motion [on hold]

I created paths using GBM to implement The stochastic mesh method. But the method requires the conditional distribution, given some S(t) the probability of S(t+1). I've searched and can't find this ...
1
vote
0answers
24 views

Simulation of a diffusion on $[0,1]$

I have a diffusion process $X=(X_t)_{t \ge 0}$ with the generator $$Af(x)=\frac{1}{2}(a(1-x)-bx)f'(x)+\frac{1}{4}x(1-x)f''(x),$$ where $a,b >0$ are constants. I want to simulate $X$ to a ...
12
votes
4answers
673 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 ...
0
votes
0answers
22 views

Gaussian processes and bias

I would like to simulate two Gaussian processes along a time grid. Ideally, I would like to see the average of the samples, for each grid point, to be close to the mean. Using the antithetic method, I ...
0
votes
1answer
13 views

Correlated samples due to Metropolis algorithm

The Wikipedia article about the Metropolis algorith notes one disadvantage as follows: The samples are correlated. Even though over the long term they do correctly follow P(x), a set of nearby ...
1
vote
2answers
40 views

Generating Randomly distributed points inside a given triangle

Given the cartesian coordinates of three vertices of a triangle $P_1$, $P_2$, $P_3$ I know (have simulated) that I get randomly distributed points by using this protocol: $s=\text{rand}(0,1)\quad ...
1
vote
1answer
31 views

Debugging a Metropolis Hastings Algorithm Simulation

I have some questions about the Metropolis Hastings algorithm: Wikipedia says: ...choose an arbitrary probability density g(x|y) which suggests a candidate for the next sample value x, given ...
0
votes
0answers
5 views

How would you construct a proof that the simulation relation is transitive?

I am studying for an exam on model checking and one of the questions that appears in old exams is about Kripke structures, simulations etc.: problem statement (S = set of states; R = transition ...
1
vote
1answer
562 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
1answer
48 views

verifying a Low-Density Parity-Check (LDPC) code

Some years back I designed a low-density parity-check (LDPC) code ($n=816, k=408$) and I was able to verify the performance of the code (probability of error in an AWGN channel) down to $10^{-10}$, ...
0
votes
0answers
14 views

Intelligent Driver Model(IDM) traffic simulation

I want to create a software for traffic simulation. As a driving model we decided to opt for the Intelligent Driver Model (IDM): Wikipedia. We managed to model the Vfree part correctly. When it comes ...
47
votes
7answers
1k 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). ...
0
votes
0answers
15 views

Is there a simple distribution/function that behaves like fermi distribution but with a $\exp(-x^2)$ tail?

I have a data file with the following data (see picture). I try to find a simple function/distribution that follows the same trend : A behaviour like a Fermi-Dirac distribution A behaviour like a ...
0
votes
2answers
22 views

Simulation methods and generating random variables

Twenty aircraft are sent to bomb a target that is rectangular in shape. It has dimensions 150m by 50m. Each aircraft makes a bombing run along the horizontal x axis and drops one bomb. The point ...
0
votes
0answers
22 views

Analytical Case Differentiation

is there a analytical way for case differentiation? In my case a MonteCarlo Simulation calculates a system of equations. Parameters can randomly change so that the underlied mathematical condition ...
0
votes
2answers
13 views

generate 3 random variables uniformly that correspond to a hyper plane.

I am doing simulation that I want a point םמ a sphere to be picked at random. I used spherical coordinates, to uniformly generate $\theta$ ,$\phi$, but I found it that it does not really uniformly ...
0
votes
2answers
23 views

Simulate a random variable

I wish to simulate the random variable according to pdf $$ f(x)=xe^{-x} $$ I have to feeling that I should first simulate an exponential random variable $t$ with parameter -1 and try to use the ...
0
votes
0answers
11 views

Proving weak simulation

I want to prove something but I am not sure if it is the right way to do it. I have two LTS that define different semantics. A=($Q_a,Λ,\to)$, and B=$(Q_b,Λ\cup\{\beta\},\leadsto)$, where $\beta$ is ...
0
votes
1answer
26 views

Welch's procedure proof

In Welch's procedure, how does $E(\bar{Y}_i)=E(Y_i)$ and $V(\bar{Y}_i)=V(Y_i)/n$. I do not understand how it works?
0
votes
0answers
37 views

Adequacy of Monte-Carlo simulations

Suppose we have a number of independent random variables of the form $X_1 \sim U[a_1,b_1], X_2 \sim U[a_2,b_2], X_3 \sim U[a_3,b_3]$. Now, suppose we generate a random variable $Y$ as follows: $$Y = ...
0
votes
2answers
75 views

Slow convergence simulating log-normal sample from the normal

I am trying to simulate a log-normal random variable $Y$ with mean $m = \mathbb{E}[Y] = 0.001$ and standard deviation $s = 0.094$ by simulating a normal sample instead, and then exponentiating it. ...
0
votes
1answer
36 views

Integrated average value of a multivariate function doesn't match average obtained through simulation.

So, recently I have been trying to calculate the expected area of a convex cyclic quadrilateral with perimeter $1$. Nonetheless, I will only post what's relevant to the issue - the fact that the ...
0
votes
1answer
13 views

Inverse-Transformation Method gives complex results

Given the following pdf $$ f(x)=2x^{-3},\;\;\;1<x<\infty $$ it seems nature to me to use the inverse-transformation method. find that $$ F(x)=-x^{-2} $$ and set $$ x=-U^{-\frac{1}{2}} $$ where ...
1
vote
1answer
55 views

Formula for simulating radioactive decay for a large number of isotopes

Currently I'm working on a project where I need to simulate the decay of a number of isotopes after each second. One way to do so is each second do a uniform random roll for each particle, and if it ...
0
votes
0answers
17 views

Preventing cars from leaving a crossroad in a cellular automata traffic simulation

I'm writing a traffic simulation using cellular automata based on this paper It states that the rule in the middle of the crossroad always stays the same (184), but that the cell after the crossroad ...
0
votes
1answer
39 views

What is mean value of Jacobian in finite difference method?

I was reading a paper, where the author gives a method for solving a differential equations system using finite difference method. I am trying to simulate this result. The problem I am facing is that ...
0
votes
0answers
19 views

Plotting the fundamental diagram of traffic flow

I have a traffic simulation and I don't understand how I can plot the fundamental diagram (flow rate vs density). I simulate the traffic as follows: I have a matrix that has as many columns as the ...
1
vote
0answers
40 views

Simulate a non-homogeneous poisson process

I was trying to simulate a non-homogeneous poisson process with hazard rate function $$ \lambda(t)=3+\sin(2\pi t) $$ I tried to use the property that given $N=n$, arrivals in $[0,T]$ are distributed ...
0
votes
1answer
46 views

How to calculate expected value in the following scenario [duplicate]

Here is the problem I'm working on: Your bank makes 1,000 loans for 180,000 for each loan. The probability of default is 2%. The loss per loan that defaults is 120,000. The way your bank can give ...
0
votes
0answers
24 views

lemma proof for alias method for generating discrete random variables

I'm looking to prove the lemma written in chapter 11, page 274 of Sheldon M. Ross's Simulation, regarding the alias method for random variable generation. As a prelude to presenting the method for ...
1
vote
0answers
30 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 ...
0
votes
0answers
19 views

Using acceptance rejection method with two variables

I'm having trouble using Acceptance rejection method to simulate the following r.v $$ f(x,y)=Ke^{-x^2-y^2+x\sin(y)} $$ where $K$ is just the normalizing constant. Most specifically, any ideas on what ...
2
votes
2answers
82 views

Convergence rate of mean and standard deviation.

I have a random variable simulator with Normal distribution $(\mu,\sigma^2)$. I repeatedly conduction simulation. Each time, the simulation gives $N$ numbers $x_1,x_2,\ldots,x_N$. I use the $N$ ...
0
votes
0answers
17 views

Is the result of a Monte-Carlo simulation of a continuous function and with continuous input distributions again continuous?

Is the result of a Monte-Carlo simulation of a continuos function and with continuos input distributions again continuous? Suppose, we have a continuos function $f$ and a number of continuous random ...
2
votes
0answers
41 views

What is the benefit of stochastic models over deterministic models? [duplicate]

I have posted a similar question earlier and I guess this sounds naive to all of you, but nonetheless let me just ask: Consider I have a simple and deterministic model $M$, with a number of input ...
2
votes
0answers
37 views

Test a law-of-iterated-logarithm-like result, with numerical simulation

I have a non-standard random walk $S_n$ for which the increments are not exactly independent (I could describe it, but it would be a totally different long and complex topic). I expect it to have ...
0
votes
1answer
70 views

Monte-Carlo simulation with sampling from uniform distribution

I used to work with Monte-Carlo simulations for a while. In my case, I generated random data for a variety of input parameters according to uniform distributions (with non-negative support), say for ...
4
votes
1answer
71 views

Numerical evidence of law of iterated logarithm (random walk)

The law of iterated logarithm states that for a random walk $$S_n = X_1 + X_2 + ... X_n$$ with $X_i$ independent random variables such that $P(X_i = 1) = P(X_i = 1) = 1/2$, we have $$\limsup_{n ...
0
votes
1answer
41 views

How do you calculate the correlation between the intercept's and beta's standard error in a univariate linear regression?

I am running a regression to predict a variable Y as follows: $Y=\alpha+\beta\times x+\epsilon$ I am trying to get a distribution of the expected value of Y given standard errors in the model ...
0
votes
0answers
11 views

The exact usage of Sequential Monte Carlo for distributions over time?

I have wondered the usage of Sequential Monte Carlos and it is used as an alternative to Kalman filter for example. However I wonder if this can be also used for simulating a distribution over time? ...
0
votes
1answer
45 views

Average of Monte Carlo simulations of continuous functions again continuous?

I hope the following question is clear: Suppose, we have a continuous functions $f:\mathbb{N}^2 \rightarrow \mathbb{N}$. Now, suppose we run Monte Carlo simulations on the function, where the input ...
0
votes
2answers
105 views

What are numerical methods of evaluating $P(1 < Z \leq 2)$ for standard normal Z? [closed]

Let $Z \sim Norm(0, 1)$ and denote its PDF and CDF by $\phi$ and $\Phi$ respectively. Then, theoretically, $P(1 < Z \leq 2) = \Phi(2) - \Phi(1).$ However $\Phi$ cannot be expressed in closed form, ...
1
vote
3answers
55 views

Given a number '$N$' find how many how many numbers are there between $1$ to $N$ that doesn't contain the digit $3$?

You are given a number $N\le 10^{18}$. You need to find out how many numbers there exist in between $1$ to $N$, which doesn't contain the digit $'X'$ in it . Say $N = 5, X=4$ The answer is $4$. ...
1
vote
1answer
26 views

analytical hard sphere collision condition with periodic boundary conditions

Hello Stack Exchange Mathematics, I am curious if there is an analytical or efficient numerical solution for the collision of hard spheres in a rectangular unit cell with periodic boundary ...
0
votes
0answers
4 views

Block covariance

I generate a field ($n_x \times n_y$) with covariance structure (variogram). However, I have only access to an upscaled version of this field. I'm looking to simulate a field at the fine scale ($n_x ...
5
votes
3answers
361 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 ...
1
vote
1answer
30 views

Simulation of the variance of a typical waiting time W(q) in a queue

Write a computer programme that by means of stochastic simulation finds an approximation of the variance of a typical waiting time W(q) (in the queue) before service for a typical customer arriving to ...
1
vote
1answer
33 views

Klein Bottles in the Levine traffic model

The Biham–Middleton–Levine traffic model has recently fascinated me. I started learning about it on the Wikipedia Page found here. One way to run this simulation is on a Klein bottle surface. When ...
2
votes
1answer
38 views

Managing a bond fund: Simulating the maximum of correlated normal variates

Two rating agencies score the safety of bonds in a particular population on separate standard normal scales. Because the two agencies take some of the same factors into account in their ratings, the ...