A vast area which includes generating results from computer models.

learn more… | top users | synonyms

-1
votes
1answer
16 views

how to generate a Bernoulli sequence of 1 and -1 with autocorrelation 0.3 [on hold]

Please provide some hint about how to generate a Bernoulli sequence of 1 and -1 with autocorrelation 0.3 .
1
vote
0answers
11 views

Numerical scheme and boundary condition for 2D Fokker Planck equation

$\newcommand{\P}{\mathbb{P}}$ I have a 2D stationary Fokker-Planck equation $$\frac{\partial^2 \P(A,B)}{\partial A^2}+\frac{\partial^2 \P(A,B)}{\partial B^2}=\frac{\partial f_1(A,B) \P(A,B)}{\partial ...
1
vote
0answers
21 views

Calculate Density of Values in Cellular Automata

I am working with a special cellular automata that uses hexagonal cells rather than square cells, a hexagonal grid, rather than a square grid, and the set of complex numbers, rather than a finite set, ...
2
votes
2answers
46 views

Simulating a Stochastic Integral of OU process

The stochastic integral I want to simulate is $$\int_{0}^{1}J_c(s)dJ_c(s)$$ where $J_c(s) = \int_{0}^{s}e^{-c(s-r)}dB(r)$, is an OU process. I simulate the data using Matlab and the sample codes are ...
0
votes
0answers
9 views

Estimating Feasibility of Nonconvex Constraints via Monte Carlo

I have a set of nonconvex (in particular indefinite quadratic) constraints in standard form, i.e. $f_i(x) \leq 0.$ In general, I am having trouble establishing the feasibility of the constraints. I ...
0
votes
0answers
31 views

Is this a valid simulation of this minesweeper-related question?

The question: Probability of getting a 7 in Minesweeper. Description of what I tried to do: Create empty $16 \times 30$ matrix Pick random cells and set them to $1$ until the matrix has $99$ "mines"...
-1
votes
1answer
36 views

Monte Carlo method for solving integrals [closed]

My professor gives us an intro to how to evaluate integration using Monte Carlo method. But I tried to search about it and never find the algorithm he used. Any help how can I find an explanation ...
0
votes
0answers
9 views

Simulation Model for Estimation of Flood qauntile at Ungauged Site

I have proposed a new model to estimate flood quantile at ungauged site. The model is wavelet GMDH. In order to test the strength of my proposed model i want to design a simulation for ungauged ...
1
vote
1answer
42 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 $e^{m+\frac{1}{2}...
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 ...
0
votes
0answers
39 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
14 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
1answer
33 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
6 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
2answers
41 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 t=\...
0
votes
0answers
19 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 ...
12
votes
4answers
704 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
17 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
25 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 ...
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
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
24 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
27 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
38 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
1answer
38 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
16 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
56 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
40 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
21 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
46 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
50 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
25 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
36 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
20 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 ...
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
42 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
71 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
73 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 \...
2
votes
2answers
110 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
12 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
46 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
117 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
56 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,...
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
6 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
394 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 ...