Skip to main content

Questions tagged [simulation]

A vast area which includes generating results from computer models.

Filter by
Sorted by
Tagged with
1 vote
0 answers
46 views

How to correctly simulate splitting in blackjack

I'm writing a probabilistic simulator for blackjack that returns the best action and expected profit for a given hand, dealer up card, and unseen cards (by calculating all possible scenarios, not ...
user448893's user avatar
1 vote
0 answers
53 views

Economic elasticity from a continuous-time dynamical systems perspective

I note that in system dynamics (Forrester (1961) Industrial Dynamics; Sterman (2000) Business Dynamics), which is applying differential-equation models to the social sciences, the concept of ...
gwr's user avatar
  • 115
2 votes
0 answers
59 views

Fractal Subdivision for Procedural Generation

This is my first attempt at creating a thread here, thus I'm not sure how much context I need to provide you. Please leave a commend if you need additional info. With that disclaimer out of the way, ...
James Sarantidis's user avatar
0 votes
0 answers
18 views

Benchmark Neural Networks on High-Dimensional Functions

For a personal project, I am interested in benchmarking certain neural network architectures in the context of high-dimensional function approximation. Specifically, I am interested in continuous, ...
user82261's user avatar
  • 1,257
1 vote
0 answers
45 views

How to correctly calculate Poisson's equation for electric potential using FFT with zero-padding?

I'm working on a program that simulates the electrostatic field in 3D using FFT to solve Poisson's equations based on the following formulas: $$ \phi_{(k)} = \frac{\rho_{(k)}}{\epsilon_0 \times K^2} $$...
pierniczki's user avatar
0 votes
0 answers
46 views

Two SDEs that share a Brownian motion

I have the system \begin{align} dX_t & = \beta(\alpha - X_t)dt + Y_t dt + dB^1_t + dB^2_t \newline dY_t & = \beta(\alpha - Y_t)dt + X_t dt + dB^2_t + dB^3_t \end{align} Now, I am creating a ...
Pero's user avatar
  • 13
1 vote
1 answer
141 views

Calculating probability of an analogy in Francis Crick’s book Life Itself

There is, in fact, a vanishingly small hope of even a billion monkeys, on a billion typewriters, ever typing correctly even one sonnet of Shakespeare’s during the present lifetime of the universe.(see ...
user avatar
0 votes
0 answers
17 views

Predicting simulated data for a known curve

I am a newbie here seeking advice on a mathematical problem I am currently having in my research. I have a pre-existing curve created by extrapolating known fitted experimental data. As shown below, ...
SSh's user avatar
  • 1
0 votes
0 answers
35 views

Circular Breakout Game: time or collisions needed to reach nth layer

Shower thoughts... A tiny ball starts inside a unit circle, surrounded by fixed concentric circles of increasing integer radius length. So it starts in is the 0-th "level". The ball moves in ...
vallev's user avatar
  • 406
0 votes
1 answer
25 views

Understanding Perimeter of Infected Area in Chessboard Virus Puzzle

In the Chess Board Virus Simulation found here: https://ves.ac.in/wp-content/uploads/sites/11/2015/12/Mangala_Gurjar_-_Use_of_invariants.pdf, I'm trying to understand the following statement: "...
Robin Andrews's user avatar
1 vote
1 answer
53 views

How to check if a set of randomly generated data matches a given distribution?

I have a random number generator that should generate values based on a Beta 4,4 distribution and some minimum and maximum. (IE, values between 0.9 and 1.1) I can generate a large set of numbers using ...
Tyler Shellberg's user avatar
0 votes
0 answers
22 views

How to factor in skewness when multiplying distributions

I am trying to simulate compounding interest on an investment modeled as a distribution. In the interest of efficiency I want to do this directly, but to test I ran a monte carlo simulation to ...
Luke Gabel's user avatar
0 votes
0 answers
38 views

Exit time squared of 3D Brownian motion

I am running simulations of 3D Brownian motion (starting at the origin in $\mathbb{R}^3$), recording the exit time from the unit-sphere, and plotting them all in a normalized histogram in order to fit ...
Ama's user avatar
  • 81
1 vote
0 answers
36 views

Stable timestep criterion for variable density acoustic wave equation

As part of my PhD, I am implementing the isotropic variable density acoustic wave equation numerically with finite-difference and I have a question regarding its stable timestep criterion. The ...
Anon's user avatar
  • 11
0 votes
0 answers
30 views

Number of distinct urns given randomly selected balls

Suppose, we have N distinct urns each having some number of balls $\ge$ 1. The distribution of balls in the urns follows a zero-truncated Poisson distribution with given $\lambda$. If we take out all ...
aishik roy chaudhury's user avatar
0 votes
1 answer
70 views

Getting closest relative position of a point in a toroidal space [closed]

I am writing a boid simulation in a toroidal space. The boids wrap around from the left to right edge and the top to bottom edge. To calculate what boids are visible, I need to find the minimum ...
caret_'s user avatar
  • 21
2 votes
1 answer
76 views

What is the correct MSD function for a biased random walk on a triangular grid?

I am trying to determine the mean squared displacement $\langle r^2\rangle$ as a function of time for a discrete random walk process on a triangular grid, where each step is of size $\ell$ over a time ...
BioPhysicist's user avatar
-1 votes
0 answers
56 views

calculating the probability of winning a streak, what approach should I take? [closed]

Here is the game: $A$ plays against $B$. Each round, $A$ has probability $a$ of winning, $B$ has a probability $b$ of winning, and the probability of a draw is $d$. So $a+b+d=1$. Each round is ...
user1289663's user avatar
0 votes
0 answers
67 views

Simulating an ODE

I am trying to simulate a ODE system written in the caption of Fig. 4 in the paper on Contraction of monotone phase-coupled oscillators. $$\dot\theta_i=\sum_{j}A_{ij}\cdot\eta(\theta_i-\theta_j)$$ ...
chloe's user avatar
  • 1,052
1 vote
1 answer
31 views

Metropolis Hastings with proposal of different support

I've been studying Metropolis Hastings and there is category of problems that troubles me. One approach that I usually use is the following: Given a previous accepted sample $x_t$ I generate a new ...
John Katsantas's user avatar
2 votes
1 answer
106 views

The stationary distribution of a rook's random walk

Let us consider a classic $8\times 8$ chessboard (grid), where a lone rook is doing a random walk. We assume that the rook starts its journey from the $(7, 0)$ square ($A1$), and that there are no ...
o.spectrum's user avatar
  • 1,170
1 vote
1 answer
69 views

Simulation of a pendulum without using the angle with the Euler-Cromer method.

I am trying to create a computer simulation of a simple pendulum with a mass $m$ hanging from an inextensible and negligibly massless string, but without using the angle, only using the positions of ...
Huntwer's user avatar
  • 31
0 votes
0 answers
27 views

Quaternion derivation and integration for attitude representation in common simulators

I have been checking the derivation and integration of quaternions to implement in my simple drone simulator. The problem is that I'm not sure if I can use a simplification for my case or not. The ...
Aurelie Navir's user avatar
0 votes
0 answers
19 views

How to use cumulative distribution functions within an interactive simulator

I am building a simple simulator in python that should simulate an event taking place based on its ...
FTM's user avatar
  • 101
0 votes
1 answer
37 views

State how inverse-transform sampling produces one random sample of $X$.

Let $0 < p < 1$. Let $X$ be a random one of two objects, coded as $1$ and $2$ , where $\mathbb{P}(x=1)= p$ and $\mathbb{P}(x=2)=1-p$. State how inverse-transform sampling produces one random ...
user1052623's user avatar
-1 votes
1 answer
100 views

How to simulate from $dY_i=Y_i( \mu dt$ $+ \sigma_{(2)}( \alpha dB^{(1)}_i + \sqrt{1- \alpha ^2} dB^{(2)}_i))$ for $\mu, \sigma>0, \alpha \in [-1,1]$?

I am studying numerical methods from the textbook Monte Carlo Methods in Financial Engineering by Paul Glasserman and have encountered the following exercise: I want to simulate from the stochastic ...
FD_bfa's user avatar
  • 4,343
0 votes
0 answers
38 views

Simulate sum of correlated and uncorrelated variables with uncertainty

This is surely a simple question for many. Suppose a sum S of linked variables must be simulated: x: independent variable sampled from empirical pdf. a = f1(x); f1 is a function with uncertainty ...
Oliver Amundsen's user avatar
0 votes
0 answers
18 views

How can I use the Metropolis Hastings Algorithm to sample from a posterior distribution

$$p(x) \propto \exp\left(-\frac{x_1^2}{10} - \frac{x_2^2}{10} - 2(x_2 - x_1^2)^2\right),\\ p(y|x) = \mathcal{N}(y; x_2, 0.1)$$ I want to sample from the posterior arising from this likelihood and ...
John Smith's user avatar
4 votes
0 answers
130 views

Simulating Random Multiples

I was running a statistical simulation, where I'd generate random numbers from 1 to $N$, where $N$ varies from 1 to $10^6$. I would keep generating random numbers until the current random number was a ...
PulseBeat_02's user avatar
0 votes
1 answer
57 views

Understanding correlation in the context of a time series, simulation and brownian motion

I have the doubt of calulating and meaning of correlation. I know it is from my incapacity to grasp a concept, specially regarding time series but would appreciate any comments on it. I think I ...
Curious student's user avatar
0 votes
0 answers
53 views

Point in use of Taylor Series to approximate functions in an age with computers?

I hope this doesn't sound too vague or like I'm dismissing the use of Taylor Series entirely, I'm just curious about any proper real-world applications. Many times Taylor Series are shown-off as a ...
Krys's user avatar
  • 73
0 votes
1 answer
23 views

Time step agnostic simulations - is there a general rule?

I'm working on a videogame where part of the logic involves increasing a value each render frame (a render frame is equivalent to a simulation step where the result is drawn on the screen). Frames can ...
Marcos Pereira's user avatar
2 votes
1 answer
35 views

Mean speed in a network

I am new to this community so I hope this is the rigth place for this question. I am working on traffic simulations on a certain area, and I need to know which is the average speed in the area during ...
Deffo's user avatar
  • 123
0 votes
0 answers
15 views

Mathematical modelling of resources vs population vs wealth generation and other factors

I was experimenting with ways to model population of some country given its initial population, initial resources and some coefficients to have a control on the population and resources, and I have ...
Akilan SS's user avatar
2 votes
0 answers
169 views

How to tell if a problem has no analytical solution?

Consider the following mathematical problem: Fish Pond: Suppose there is a pond that has $n_1$ fish on the first day ($n_1$ is a positive integer greater than 0) Generate a random number $x_1$ from ~...
stats_noob's user avatar
  • 3,252
0 votes
0 answers
29 views

Discrepancy in Calculating Stationary Distribution of a Markov Chain

I'm studying a Markov chain problem question 15 where a rat runs through a maze with the following transition matrix P: ...
Avraham's user avatar
  • 91
5 votes
2 answers
426 views

Find $P(\sum_{i=1}^{10} X_i>50)$ if $X_i\sim U\{\pm 1,\dots,\pm 6\}$.

A stock is currently worth \$$100$. each day a coin is flipped and a dice rolled. If the coin lands heads the stock price increases by the rolled value of the dice in $. If the coin lands tails, the ...
Lily's user avatar
  • 53
0 votes
0 answers
16 views

Using ks.test to check generated random values with an empirical cumulative distribution function

I was given a task to generate pseudo-random numbers from the seed that could fit to the given distribution function (and use with ks.test to test it.) However, my code seems to be faulty. I followed ...
engineeringbsc's user avatar
1 vote
0 answers
57 views

Conditional Probability Simulation Question

I have two variables $X$ and $Y$. $P(X<Y)=0$. I know $P(X=x)$ for all $x$ and $P(Y=y)$ for all $y$, how can I jointly simulate $10,000$ pairs of these values that fit these conditions? It seems ...
CamalotCoder's user avatar
1 vote
0 answers
64 views

Is the implicit first-order upwind scheme unconditionally stable?

In chapter 7 of Hirsch's "Numerical Computation of Internal and External Flows" (second edition, 2007, https://www.sciencedirect.com/book/9780750665940/numerical-computation-of-internal-and-...
user3760593's user avatar
3 votes
0 answers
34 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 ...
user39728_i_said_user_39728_i_'s user avatar
0 votes
0 answers
37 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 ...
nayan's user avatar
  • 3
0 votes
0 answers
80 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, ...
tabatuby's user avatar
1 vote
0 answers
47 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 ...
bATTLEGROUND's user avatar
2 votes
1 answer
308 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 ...
Dargscisyhp's user avatar
0 votes
0 answers
16 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, ...
MomentumEigenstate's user avatar
1 vote
0 answers
33 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 ...
girl_of_data's user avatar
0 votes
1 answer
130 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 ...
Chaotic Good's user avatar
2 votes
1 answer
89 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 \...
Analysis's user avatar
  • 2,482
1 vote
0 answers
40 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) & ...
subho's user avatar
  • 25

1
2 3 4 5
15