Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [simulation]

A vast area which includes generating results from computer models.

-1
votes
0answers
10 views

Simulation Geometric Brownian Motion and C++ Implementation [on hold]

I am a student and have some exercises to do. Could you please help me with these? Any contribution highly appreciated! Thank you for yout time! enter image description here
0
votes
1answer
24 views

Possible configurations in a 5*5 square matrix

I noticed a building outside my house with randomly lit rooms and dark rooms. If I treat each one of those windows as a square, is it possible to calculate the total number of patterns that can be ...
0
votes
0answers
21 views

Modelling Random Variables with Specified PDF and Correlation

I am trying to develop a radar simulation system that is able to generate random processes whose elements are taken from a specified probability density function and have also have a specified ...
0
votes
0answers
30 views

simulation/ probabilty

Suppose a population control plan for the country of Transylvania allows parents to have at most four children each, and they must stop having children when they get two girls. Explain how to ...
1
vote
0answers
16 views

energy density spectrum vs energy spectral density

I am doing a project on ocean wave simulation and there is a formula I am trying to test. It is called the random coefficient scheme and it is meant to simulate a random time series. One part of the ...
0
votes
0answers
12 views

If $v_t=cv(u-d)$ is scaled to $v_t=v(u-d)$, then what does “scaling $t$ by $c$” apply to?

If $v_t=cv(u-d)$ is scaled to $v_t=v(u-d)$, then what does "scaling $t$ by $c$" apply to? Particularly, this equation is advanced w.r.t. time $t$. But if one scaled it, then does it mean that e.g. $\...
0
votes
0answers
7 views

How is normalization of coefficients in Lotka-Volterra done?

I'm only able to find very vague references about this, such as: https://zone.biblio.laurentian.ca/bitstream/10219/2795/1/Draper_Paul_MSc_Thesis.pdf But nothing seems to explain, how exactly is the ...
2
votes
1answer
22 views

Lotka-Volterra: is stability analysis done on both equations separately or to their sum?

Lotka-Volterra: is stability analysis done on both equations separately or to their sum? So if the systems are e.g. notated as: $$u_t=u(v-1)$$ $$v_t=v(1-u)$$ then would one do stability analysis ...
2
votes
0answers
18 views

Scaling behavior Levy flight (distance from the origin v number of steps)

In the question Numerical approximation of Levy Flight the implementation of a Levy-flight random walk with Matlab was discussed. For a classical random walk (Brownian motion), we have that the ...
0
votes
0answers
12 views

What should I study in order to understand and develop “deformations”?

What should I study in order to understand and develop "deformations"? In order to describe how e.g. parts may deform? Intuitively deformation is solving DEs on some object meshes. However, I ...
0
votes
0answers
31 views

How to do Monte Carlo Method for exceedingly large numbers?

For a paper I'm writing for my math class, I need to do several Monte Carlo simulations for a game I'm playing. The $p=0.6190411273$, a normal number... but the $n=2.14974(10^{10})$. I've tried to run ...
0
votes
0answers
17 views

Proposal density of Metropolis algorithm

I am new to the Metropolis-Hastings algorithm and am trying to wrap my head around the key points of it. I understand that it uses a Markov Chain Monte Carlo simulation to sample points throughout a ...
0
votes
0answers
32 views

Is there any mathematical formula to calculate the minimum value from the below presumption?

I am trying to balance a board game, where monsters activated based on a given rule, and I am looking for a formula, which takes in account the attacks of the heroes (2-4 heroes [noh], each with a ...
0
votes
0answers
17 views

simulation of customer negotiation strategies using R

If I ask the question in the wrong forum, let me know, I will delete it. It is still difficult for me to decide the forum. I am currently studying the issue of Models for customer-supplier negotiation ...
1
vote
0answers
16 views

Is having a burn-in time relevant when only trying to sample from a distribution?

I'm trying to simulate - via the Metropolis-Hastings algorithm - a sample $X$ of size 10000 from a density $f$ using a proposal distribution $g$. The Markov chain $X$ obtained by this algorithm has ...
3
votes
0answers
39 views

How to implement an insurance risk model

So the problem goes as follows: "Suppose that the different policyholders of a casualty insurance company generate claims according to independent Poisson processes with a common rate $λ$, and that ...
0
votes
0answers
39 views

Is there a way to solve differential equation $\dot x = f(x,u)$ with linear algebra?

I'm going to solve a ODE system on the form: $$\dot x(t) = f(x(t),u(t))$$ Where an example of the system migth look like: $$(\dot x_1(t) ,\dot x_2(t) ,\dot x_3(t))= a x_1(t) + b x_2 (t) + c x_3 (t) +...
0
votes
0answers
32 views

Pros and cons of multivariate interpolation techniques for scattered data?

I have a numerical simulation $f$ that takes 6 input parameters $\mathbf x = x_1, x_2, \ldots x_6$. I have randomly selected $25,000$ random combinations of these inputs and calculated $f(\mathbf x)$. ...
0
votes
1answer
9 views

Simulate the number of times a random condition is met in n attempts

If every time a condition is evaluated, there is exactly an x chance of it succeeding (RAND() < x), is there any way to ...
0
votes
1answer
45 views

How to discard negative values while adopting Monte Carlo?

I am trying to simulate a random variable, for a Monte Carlo simulation, which is equal to another Normal random variable, superimposed with a zero mean gaussian random variable as specified below -- ...
2
votes
0answers
78 views

May the Euler equations, rather than the Navier-Stokes equations, generate turbulent flow?

In general, I think turbulence is resulted only from the viscosity term as in the Naiver-Stokes equation, and it dissipates energy in the flow. But the compressible Euler equations, which already ...
1
vote
0answers
46 views

Simulation of hitting time of brownian motion with drift

I want to generate the hitting time of brownian motion with drift (upper and lower depending on some binomial random variable $\delta = 0,1$). $\tau^{up} = inf(\tau : \mu \tau + \sigma W_{\tau}\ge h)...
0
votes
0answers
17 views

Derivation of tau time-stepping in Gillespie algorithm?

I'm trying to find the derivation of tau ($\tau$) in the Gillespie algorithm. All the papers and chapters I've found simply say, without actually showing its derivation: "Tau is given by" $\tau = \...
0
votes
0answers
20 views

For simulation purposes, how long samples to draw from distributions?

For simulation purposes, how long samples to draw from distributions? E.g. if I want something to follow an exponential distribution with mean 25, then upon trialing in scipy I found that ...
0
votes
1answer
26 views

How to simulate the random variable $Y$ using another random variable $X$?

Let $X$ be the discrete uniform random variable on taking values in the set $\{1,2,3,4,5\}.$ We want to simulate the random variable $Y$ which is the discrete uniform random variable taking values in ...
0
votes
1answer
32 views

is there a formula to “invert” the binomial distribution - for simulation purposes

My apologies if this should be in one of the programming sites rather than the mathematics one... I decided it was theoretical enough to post here. Feel free to move if someone with authority ...
0
votes
2answers
28 views

Stretching the Brownian Motion in $[0,1]$ to get another Brownian Motion in $[0,t]$

I'm running a simulation of a Standard Brownian Motion by limit of a Symmetric Standard Random Walk $\{S_n ,n\geq 1\}$ and $S_n=\sum_{k=1}^n X_k$, where $$P(X_k =-1)=P(X_k =1)=\frac{1}{2},$$ and ...
0
votes
0answers
127 views

The average service time of the drive-in teller and the inside-bank teller?

A bank has one drive-in teller (who can serve customers without leaving their cars). The drive-in teller has a room (i.e., a queue) for one additional customer to wait. Customers arriving when the ...
0
votes
0answers
9 views

Is there a clear distinction between event-based and process-based modelling?

Is there a clear distinction between event-based and process-based modelling? Particularly, because I've noticed that once one starts to add "structures" to "purely event-based" model, then it starts ...
1
vote
1answer
39 views

CDF with probability and Weibull

A bakers oven may be out of use due for two reasons. With probability 0.8 the oven will be damaged from dirt and it will take exactly 5 minutes to repair it. With probability 0.2 the oven will need ...
10
votes
3answers
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 ...
0
votes
0answers
16 views

Range of the bounded expectation

I have a probability function $P$ depends on a standard normal random variable $\eta$. Given a random draw of $\eta^r$ from the standard normal distribution ($\eta\~N(0,1)$), I can get a probability $...
0
votes
0answers
59 views

Ito or Stratonovich equation

Consider the two coupled Ito SDEs $dX_t=-\lambda X_t\cdot dt+\sigma\cdot dB_t$ $dY_t=-\sin Y_t\cdot dt+s\cdot X_t\cdot \cos Y_t dt$ I assume that $X_t$ is an Ornstein-Uhlenbeck process, and that $...
0
votes
0answers
18 views

Algebraic construction of a state space system

How could a state space system be automatically constructed based on the knowledge of underlying circuit? E.g. - $$ \dot{v_c}=\frac{-v_c}{CR}+\frac{V_{dc}}{CR} $$ That is, the representation is ...
0
votes
0answers
15 views

Can we use average simulation results to predict an event with randomness?

The subject is quite ambiguous. Let me use an example to clarify. For example, we have a patient booking schedule for a doctor, which specifies the schedule time for patients. There are so many ...
-1
votes
2answers
35 views

Simulate a discrete random variable

We have a discrete random variable $X$ with the following probability distribution \begin{equation*} p(X=i)=p_i,\quad i=1,2,\ldots 1000, \quad \sum_{i=1}^{1000}p_i=1. \end{equation*} How we can apply ...
0
votes
1answer
38 views

Richards equation unique solution

Richards equation is used for describe flow in unsaturated porous media: $$C{(h)}\frac{\partial h}{\partial t}= \nabla [K{(h)} \nabla (H)]$$ $h=$ capillary pressure $K$ and C properties in ...
0
votes
1answer
111 views

Cauchy simulation in R

How do I simulate Cauchy distribution from Uniform distribution in (-pi/2, pi/2) in R? Not allowed to used any functions that already exist in R that generate Cauchy
0
votes
2answers
28 views

Simulation of Poisson using exponential

I have shown using the inverse method that if $U\sim U(0,1)$ then $X=-1/\lambda \cdot \log(U) \sim\exp(\lambda)$. Using that, how do I write a code in R that generates $n$ samples from the $\...
1
vote
3answers
59 views

Does Runge Kutta methods run well with variable $h$?

When using Runge Kutta methods for real time simulations there is a problem with the constant step length $h$ since the operating systems often interrupt the simulation and the main loop therefore has ...
0
votes
0answers
11 views

Rejection-Samplig starting from Cumulative Distributions

Could you please help me on the following problem on a rejection sampling method? I know the cdf of a random variables $X$ that depends on two positive parameters $a\ge 0$, $b\ge 0$ with $a\le b$, ...
0
votes
0answers
22 views

Simulating inter- and intra-person variability in Gaussian distributions

I'm writing a Monte Carlo simulation and it involves a number of different variables which can exhibit both inter-person and intra-person variability. These variables are modeled using Gaussian ...
1
vote
2answers
254 views

Monte Carlo to evaluate infinite integral on R

I am using Monte Carlo method to evaluate the integral above: $$\int_0^\infty \frac{x^4sin(x)}{e^{x/5}} \ dx $$ I transformed variables using $u=\frac{1}{1+x}$ so I have the following finite integral: ...
1
vote
1answer
62 views

Log transforming an ODE

I'm doing some numerical simulations of an exponential growth like system which, for simplicity, has the form: $$ \frac{dx}{dt}= ax + bxy \quad\quad \frac{dy}{dt}= cy + dxy $$ For some parameter ...
0
votes
0answers
63 views

Antithetic sampling and Monte Carlo simulation

Consider: \begin{align} f(x) = \left\{ \begin{array}{ll} 0, & 0 < x < 0.9 \\ 100, & 0.9 < x < 0.91 \\ 0, & \textrm{otherwise} \\ \end{array}\right. \end{align} Determine ...
2
votes
1answer
69 views

Can we find an unbiased estimator of $\pi$?

Suppose we want to estimate $\pi$. We adopt the following strategy. We generate $n$ iid observations $Z_1,Z_2,...,Z_n$ from the unit disk $D=\{(x,y):x^2+y^2<1\}$ and let $R=\{(x,y):-\dfrac{1}{\sqrt{...
0
votes
0answers
42 views

Simulation of jump times of Cox process with CIR intensity

I want to sample the jump times of a Cox process where the intensity $\lambda(t)$ is given by a CIR process, i.e. $$ \mathrm{d}\lambda(t)=\kappa(\theta-\lambda(t))\mathrm{d}t+\sigma\sqrt{\lambda (t)}\...
0
votes
0answers
23 views

Generating correlated QUASI random numbers

Hi I am trying to generate correlated quasi random numbers using a sobol sequence in matlab. My Problem is the Following: Using "standard" random numbers it is easy to generate the 6 correlated random ...
0
votes
0answers
45 views

Am I doing simulation the correct way?

The probability of finding a particle at a particular location $(x,y,z)$ and a particular time $t$ in a 3-D diffusion environment with drift $u,v,w$ and diffusion coefficient $D$ is given by: $$f(x,y,...
1
vote
0answers
35 views

Stochastic simulation Gillespie algorithm for areas instead of volumes?

I am trying to find resources on the Gillespie stochastic simulation algorithm for my system which happens on a surface. The original algorithm was developed for a reactor of volume $V$, but my system ...