Questions tagged [simulation]
A vast area which includes generating results from computer models.
688
questions
3
votes
0
answers
14
views
Nonlinear algebraic loop vs. discretized ODE system
I am not a mathematician and my question may not be well posed but I would appreciate any insight if you have it.
Suppose I have a model of a hydraulic system composed of nonlinear differential and ...
0
votes
0
answers
23
views
A probability simulation and probability distribution spike-graph are contradicting
I'm referring to the book: "Grinstead and Snell’s Introduction to Probability", and quoting a problem from the book,
Example 1.4 (Heads or Tails) For our next example, we consider a problem ...
0
votes
0
answers
50
views
Simulating Particle motion on a surface
I am working on a personal project to model the motion of a particle on a surface.
Using calculus, I parametrized a surface and then found the normal vector to that surface.
Using that normal vector, ...
1
vote
0
answers
38
views
Help with an article on convex-splitting method
I trying to simulate gradient flow $$\frac{\partial u}{\partial t}=-\nabla_x F(u)$$ where F(u) is (in my case): $$F(u)=2u^4-u^2$$ for u $\in [-0.5,0.5]$. Since the equation is non-linear, I would like ...
2
votes
1
answer
85
views
How to mathematically model my population growth simulation
In high-school we learn to model population growth as an exponential, but we know that this is different from reality because population growth seems to hit as asymptote as some point due to limited ...
0
votes
0
answers
14
views
How to quantify the convergence of a reverse Monte Carlo simulation, where the underlying distribution is entirely unknown
Background
I'm in the process of writing a Monte Carlo simulation, which solves the radiative transfer problem in arbitrary anisotropic media with (in general) scattering and absorptive properties, ...
1
vote
0
answers
21
views
Software to simulate angles in a pv system
I am trying to model a pv system and I want to simulate different angles, and to calculate values of different angles. I am asking if there is any software that allows me to design the figure below ...
0
votes
1
answer
59
views
Is running multiple simulations with fewer iterations the same as running a single simulation with as many total iterations?
I enjoy video games and one of the games that I play involves running simulations to test damage per second (DPS). I am wondering whether running five $10,000$-iteration simulations is equivalent to ...
0
votes
0
answers
16
views
Help with sample size for finding average distance betwee geographical points
I have a program that I want to test through simulations (since I don't know exactly how it works).
The program converts a precise location (lat, lon) to an approximate location (it adds noise and ...
2
votes
1
answer
68
views
Markov chain simulations including permutations
Let $S_n$ be the set of all permutations of $\{1,2,...,n\}$ and $$S_{k,n}=\left\{\sigma=(\sigma(1),...,\sigma(n)) \in \mathcal{S}_n : \sum \limits_{j=1}^{n}j\sigma(j)\geq k\right\}$$ for a $k\in \...
1
vote
0
answers
28
views
How to simulate samples from distribution of minimum of 3 distributions whose cdf are defined on different intervals.
Suppose, X,Y,Z are three positive independent variable.
The cumulative distribution of X is as follows:
\begin{equation}
F_X(t) =
\left\{
\begin{array}{cc}
F_1(t) & ...
1
vote
1
answer
95
views
Simulating a continuous-time jump process
I've got a continuous-jump process $(X_t)_{t\ge0}$ with generator $$(Af)(x)=\tilde\lambda(x)((\tilde\kappa f)(x)-f(x)),$$ where $$\tilde\lambda=\lambda+c$$ for some bounded measurable nonnegative $\...
1
vote
1
answer
102
views
Are there any Mathematical Theorems that Can Prove the Results of this Experiment?
I had the following question about Probability and Estimation.
Let $\hat{\theta}_n$ be an estimator of a parameter $\theta$ based on a random sample of size $n$. The estimator $\hat{\theta}_n$ is said ...
2
votes
1
answer
67
views
Prove projection of a computable function is computable without using Church-Turing Thesis
Let $R(x,y)$ be a computable relation. I want to prove that for any fixed $y$, the set $S_y$ defined by $S_y := \{ \; x\; | \; R(x,y) \; \}$ is computable. I know this can be reasoned with the Church-...
1
vote
0
answers
31
views
MCMC in practice : how much access do we have to the target distribution?
In real world applications how much do practitioners usually know about the target distribution $\pi$? do they know its form exactly? do they only know it up to constant multiple (I guess this is the ...
3
votes
1
answer
81
views
how many unique numbers will appear in simulation?
I am from ukraine and I start taking course on the computer programming. My classmate tells me about this website for interesting discussion and information about mathematics.
Today we learn about ...
0
votes
0
answers
29
views
Randomly generate points uniformly on an ellipsoid in general position
I want to uniformly generate points at random on the boundary of an ellipsoid in any dimension.
The method given by @elhuhdron here is very nice and it can be straightforwardly generalized to any ...
0
votes
0
answers
32
views
Is it a valid way to uniformly generate points in/on an ellipsoid?
I found this method somewhere (I don't remember where) and I'm wondering whether it is correct. One has an ellipsoid of any dimension and one wants to uniformly generate some points at random on its ...
0
votes
0
answers
9
views
Fisher test to aggregate p-values in a simulation (from Wilcoxon rank-sum tests )- interpret correctly null-hypothesis
I got contradictory results between p-values in single trials, obtained with Wilcoxon test, and Fisher's p-value, obtained from a simulation over 1000 trials.
I am confused about correctly ...
6
votes
3
answers
374
views
Best strategy for 6 sided dice game: Roll as many dice as you want, you lose if at least one $1$ appears.
I am new here because we got stuck with a question during the weekend's discussion.
Let's imagine we are playing a dice game. You can roll as many 6-sided dice as you want, and so can your opponents, ...
0
votes
1
answer
18
views
How to detect to groups which shows significant slope differences from a single scatter plot
Is it possible to create a dummy or continuous variable which separates the points into two separate groups which show significant slope differences? In effect, I would like to know whether a "...
0
votes
0
answers
33
views
Aproximating $E[g(X)]$ using Monte Carlo method
In an exercise, my teacher asked to approximate the expected value of $g(X)$ where X is a random variable with probability density function $f(x)$ using the Monte Carlo method.
I thought about it, ...
1
vote
0
answers
25
views
Sampling from Kolmogorov forward equation
I've asked this question over in cross-validated over here:https://stats.stackexchange.com/q/610492/383970
But no answers. I was curious if somebody in this stack has an answer.
I've been learning ...
2
votes
0
answers
89
views
PI Controller - Integral term is causing instability
I am simulating the height of the reservoir in a hydro power plant using Matlab, without Simulink. The radial gates of the power plant are used to control the height of the water in the reservoir. ...
1
vote
3
answers
108
views
Finding ellipse from points and distances, 2d space sim/two body problem
Good afternoon, everyone.
Is there any way to find the parameters of an ellipse, knowing random n points of the ellipse? Say, 3, 5, 10, 20 or any other reasonable number that doesn't require a lot of ...
1
vote
1
answer
38
views
Percentage Jobs drop in $M/M/1 K$ Queue with Finite Queue Length
In my simulation of the $M/M/1 K$ Queue, the arrival rate $\lambda$ is $2.7\ \mathrm{ jobs/s}$ while the service rate $\mu $ is $3 \ \mathrm{ jobs/s}$. The capacity $K$ of the buffer is $5$. I am ...
0
votes
0
answers
65
views
Dynamic Monte Carlo in a random walk
I am simulating a random walk of two particles connected by a spring that has spring energy $E(x)=\frac{1}{2}C(x-a)^2$, where $C$ is a spring constant and $a$ the equilibrium length of the spring, and ...
2
votes
1
answer
121
views
Implementing digital controller in the time domain
I have simulated a digital control system in the Z domain using MATLAB and I have got satisfactory results. However, when I converted the plant and the digital controller to difference equations and ...
1
vote
2
answers
103
views
Circular motion at constant speed
I have a question. I have an algorithm that computes the trajectory of a body moving in a circle. The program repeats the following at short intervals to update the body's X and Z positions:
$$x = \...
1
vote
1
answer
79
views
Why is Backward Euler not converging to 0?
I'm trying to implement Backward Euler for a simple physics simulation. My understanding is that Forward Euler 'overapproximates' and adds energy to the system, and so should spiral to infinity, but ...
0
votes
0
answers
8
views
I’m coding an implementation of the Lattice-Boltzmann algorithm and I was confused about one of the formulas
I'm following this paper: https://physics.weber.edu/schroeder/javacourse/LatticeBoltzmann.pdf, which has this equation: formula, where e, the combined velocity (times a constant c) is the velocity the ...
0
votes
0
answers
23
views
Simulation of a Brownian motion with random time points
I want to simulate a Brownian Motion on the interval $[0,1]$ with random time points in R Studio. I found a lot of stuff for the Brownian Motion with a fixed step size of 1.
...
3
votes
1
answer
136
views
How to find optimal policy to maximise a desired resource over time?
Each week, we can decide to do a hunt or skip it. Starting at week $1$, the available reward from that hunt is a yellow shard, then a blue shard, then a red shard, repeating in that order (so e.g. ...
0
votes
0
answers
16
views
Understanding Simulation in the Study
I'm trying to understand a simulation study by Cuevas, Febrero-Bande and Fraiman (2004) "An ANOVA test for functional data". In the paper they explain how they conducted the simulation. ...
0
votes
0
answers
19
views
Weighted position average in moving coordinate system
I have a point cloud that I want to use as a coordinate system.
The idea is that the points in the cloud can move arbitrarily, but still remain a coordinate system for objects on top of it.
I was ...
3
votes
1
answer
56
views
Simulation of N-parameter Wiener Field
In order to do some numerical experiment, I would like to simulate an N-parameter (or at least 2-parameter) Wiener Field (see : https://encyclopediaofmath.org/wiki/Wiener_field for definitions). I am ...
0
votes
0
answers
21
views
Computing gravity on a swinging object
I'm working on a software in which there is a simple model for a swinging object attached to a pivot (e.g. a stick that's nailed to the wall at one of it's extremities).
The object supports one basic ...
0
votes
0
answers
68
views
Numerical solution of PDE unstable
I'd like to solve the heat equation numerically:
\begin{equation}
\partial_tu=\partial_x^2u,
\end{equation}
and I've tested my algorithm with initial conditions $u(0,x)\propto\operatorname{exp}[-(x-...
0
votes
1
answer
226
views
An adaptive step size solver for an ODE
I am trying solve an ordinary differential equation numerically, $\,dy/dt=10e^{-(t-2)^2/2(0.075)^2}-0.6y\,\,$ with an initial value and initial step size between $t=0\, and\, t=4$.
In my code I ...
0
votes
0
answers
38
views
Numerical schemes for simulating path dependent SDEs
Background:
The Euler-Maruyama scheme for SDEs of the form
$$dX_t = \mu(t, X_t) dt + \sigma(t, X_t) dB_t,$$
is well studied and easy to implement. It is given by
$$X_{t_i}=X_{t_{i-1}}+\mu(t_{i-1}, X_{...
6
votes
1
answer
150
views
Double Pendulum Simulation Accuracy?
I have what I think is a very simple doubt, but one that I've never seen explicitly addressed.
It's a classic coding activity to simulate a double pendulum. You can code this simulation up more or ...
0
votes
1
answer
84
views
Simulation study for a Exponential Distribution
I have a pdf defined as:
$$f(x)=\lambda e^{-\lambda(x-b)}$$
Conduct a simulation study in R to explore the behaviour of the maximum likelihood estimator
$λ_{MLE}$ for λ on simulated data $X_1, · · · , ...
1
vote
0
answers
32
views
Geometric interpretation for p-series when $p=2$ [duplicate]
It is known that
$$\sum^{\infty}_{n=1} \frac {1}{n^2}={\pi^2\over 6} $$
Is there any geometric interpretation for this series? In other words, is there any way to visually showcase this result ...
4
votes
1
answer
169
views
Randomized algorithm to estimate $\pi$
I was looking for an algorithm to create a PI estimator, and I ran across this:
https://stackoverflow.com/questions/36659034/trying-to-create-a-pi-estimator-in-r
Briefly, the steps are:
...
0
votes
0
answers
60
views
Using Modified Cholesky to generate correlated returns, how should permutation be used
I'm trying generate correlated random variables of standard normals (initially) using a modified Cholesky function in rust using crate modcholesky. According to the docs:
Given a symmetric matrix A ...
0
votes
0
answers
108
views
How to simulate a control system with RK4
My question is simple yet I could not find answer on the internet. When I have a system described by its differential equation, I can simulate its states from time steps to time steps with RK4. But ...
0
votes
1
answer
38
views
How to solve this ill ODE with LMM(Linear Multi-Step Method)?
It's a 2D ODE in my assignment,
$\begin{bmatrix}x_1'(t)\\x_2'(t)\end{bmatrix}=\begin{bmatrix}-1&1\\1&-1000\end{bmatrix}\begin{bmatrix}x_1(t)\\x_2(t)\end{bmatrix}+\begin{bmatrix}2\sin(t)\\1000(\...
1
vote
0
answers
41
views
How can I simulate uncertainty propagation
I am learning about uncertainty propagation, but it is all very obscure and I am not sure I understand it very well.
I have a couple of exercises, but I want to run some simulations just to make sure ...
0
votes
0
answers
47
views
Expectation of survived sets
I have this problem:
Choose randomly six numbers in $\{1,2,...,56\}$ without replacement. Call $L_0$ to this choosen set.
Fix $N$. For each $n\in\{1,2,...,N\}$, generate a random set $L_n$ choosing ...
1
vote
1
answer
229
views
Implicit numerical ODE solvers: still unconditionally stable if Newton iterations limited?
Implicit ODE solvers like Backward Euler are often described as unconditionally stable, which I believe means that the solution never blows up regardless of how large the solver step size is chosen.
...