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 [monte-carlo]

Questions on Monte Carlo methods, methods that require the repeated generation of pseudo- or quasi-random numbers for computing their results.

0
votes
0answers
8 views

MCMC without detailed balance

The following paper provides a rather simple MCMC method that does not satisfy the detailed balance condition but rather only satisfies the balance condition: https://arxiv.org/pdf/1007.2262.pdf They ...
0
votes
0answers
23 views

Optimization and Monte Carlo and a process with no stochastical dynamic

Assume we are in a Brownian filtration where I denote $W$ the Brownian motion. My problem is to numerically compute $$ \min_X E (\int^1_0 X^2_tdt),\ \ \ \ (*) $$ where $X$ is adapted to the filtration ...
1
vote
0answers
9 views

Accuracy in Bayesian updating

Hello I have a question about the accuracy in Bayesian updating. I use the following procedure to compute a posterior distribution: Generate synthetic measurement data, i.e. I know the true mean and ...
0
votes
0answers
7 views

Accuracy of Euler Monte Carlo discretization without knowing exact solution?

By using Euler Monte Carlo discretization (for a Hull-White model) we simulate $$r(t+\Delta t)=r(t)+\lambda(\theta(t)-r(t))\Delta t+\eta\sqrt{\Delta t}Z$$ with $Z\sim N(0,1)$, $\lambda$, $\eta$ ...
2
votes
0answers
22 views

How to sample the position of many particles?

In Density Functional Theory, there are many types of trail variational wave functions. I have a question from the numerical viewpoint: when I have the 1D density functions, and the $N$-dimensional ...
0
votes
0answers
8 views

MonteCarlo Random Walk Simulation - steps should be scaled by tmp ? (MATLAB)

I have a question regarding this code snippet that we changed for project 3 Monte-Carlo & Random Walk. monte-carlo-code-segment The code was changed to process all the stepNs. it loops through a ...
0
votes
0answers
14 views

implement density function

I am going through my book , it states that " Write a sampling algorithm for this density function" For any interval $A \subset$ dom$(X)$, the empirical count of particles that fall into $A$ ...
1
vote
3answers
81 views

Don't understand way algorithm is described in paper about Monte Carlo algorithm

I'm reading An Improved Monte Carlo Factorization Algorithm by Richard P. Brent. I'm not sure I'm understanding some of the notation correctly. To my understanding $x_0$ is an arbitrary starting ...
0
votes
0answers
35 views

Are there any nice approximate formulas for computing the integral of $\int_{-\infty}^{y} \exp{(f(x))} dx$

In statistics, many distributions are left in the form $$p(x) \propto e^{f(x)}$$ I would like to compute the cdf of this distribution numerically or via Monte Carlo simulation. Suppose that the ...
0
votes
0answers
12 views

What is the discrepancy of Halton set?

I am interested in low discrepancy sets for its applications in Monte Carlo integration - KH inequality tells us that the error will be lesser if the discrepancy of the sample is lesser. Every ...
0
votes
2answers
31 views

Is it possible finding Real Shape using Monte Carlo [closed]

I have the image below, where you cannot find real shape using Monte Carlo. Same rasio but different shapes. The 1/2 rasio could have different shapes or angle, like triangle or half square or any ...
1
vote
2answers
43 views

Sine/Cosine of Random Angle from $0$ to $2\pi$

An excerpt of http://pdg.lbl.gov/2012/reviews/rpp2012-rev-monte-carlo-techniques.pdf (section 37.4.3) states that obtaining the sine/cosine of a random angle in 2D without the explicit use of $\pi$ is ...
-1
votes
1answer
35 views

Is it possible to calculate Monte Carlo without the unit of square? [closed]

I am in economic, first day a novice in Monte Carlo even both, today my stranger friend give me a sample to finding pi area using Random Sample where area of circle divided by area of square my ...
1
vote
1answer
77 views

How can we approximate a function by sampling a distribution proportial to it and making a histogram of samples?

I've read the following (here on page 2): Suppose that you want to approximate a function $f$. One way to do this is to produce a sampling distribution proportional to $f$ and then make a histogram ...
0
votes
0answers
13 views

How to Show that a Distribution is a Stationary Distribution for Metropolis-Hastings?

For an Ising Model with a (2L+ 1) by (2L+ 1) square grid of magnetic particles, show that $$\pi(\xi)=\frac{1}{Z_\beta}e^{\beta\sum_{x,y=x}{\xi_x\xi_y}}$$ Is indeed a stationary distribution for the ...
0
votes
3answers
55 views

Standard Deviation of product of two Gaussian Distribution

If we have, $Z = XY,$ where $X$ and $Y$ have Gaussian Distribtuion, and both are independent. I solved with the Monte Carlo Algorithm, it shows some values of Standard Deviation, but I don't know ...
0
votes
0answers
19 views

Samples from high dimensional distribution by exploiting the symmetry

I have a discrete 7-element random vector $\vec{X}$ with probability mass function $P_{\vec{X}}(\color{blue}{x_1,x_2,x_3},x_4,x_5,x_6,\color{red}{x_7})$ that has a symmetry in its certain components. ...
0
votes
0answers
30 views

2D disc-shaped region kernel density estimation boundary bias correction for Gaussian bandwidth $h$ and boundary radius $R$

I am trying to develop a closed form expression for the boundary bias correction factor for kernel density estimation in a circularly-bounded 2d region where Gaussian kernel diameter is $2h$ and ...
0
votes
0answers
22 views

Implementing Gibbs Sampler on joint distribution $X$ and $N$ where $X$ is continuous and $N$ is discrete

Q Random variables X and N have joint distribution, defined up to a constant of proportionality, $$f(x,n) \propto \frac{e^{-3x} x^n}{n!} ~,\quad n=0,1,2, \ldots , x>0$$ Implement a Gibbs sampler ...
0
votes
1answer
62 views

Chose the correct inputs for a Monte Carlo simulation

Motivation If have found my self answering to a SO question about Monte Carlo simulation. The model to design is stated as this: Let 20 people, including exactly 3 women, seat themselves randomly ...
0
votes
1answer
33 views

Simple Monte Carlo uncertainty quantification: why are more samples required with additional uncertain inputs?

Having read a little about simple Monte Carlo methods, I understand that, given a random variable $X$, the difference between its true mean $\mu$ and its sample mean $\hat{\mu}_n$ is of order $\sigma /...
0
votes
1answer
35 views

Proposed 'exact' solution for the Asian Option

https://www.researchgate.net/profile/Moawia_Alghalith/publication/331075967_Exact_Pricing_of_the_Arithmetic_Asian_Options_A_Simple_Formula/links/5c704a07a6fdcc47159419a0/Exact-Pricing-of-the-...
1
vote
0answers
15 views

An “Edgeworth Series-esque” approximation of ratio distribution using Monte Carlo methods. What is this method called?

I am hoping someone can provide me with the name of the following technique that appears to estimate the density of the ratio of independent random variables (although it could work for other ...
0
votes
1answer
22 views

Minimise computational cost for given level of MSE

I am trying to understand how to minimise cost of a Monte Carlo implementation for a given value of MSE/RMSE. Please see the notes attached...I do not follow the second line. I would be grateful if ...
2
votes
0answers
19 views

Derivation Contrastive Divergence

I am trying to follow the original paper of GE Hinton: Training Products of Experts by Minimizing Contrastive Divergence However I can't verify equation (5) where he says: $$ -\frac{\partial}{\...
2
votes
0answers
50 views

Identifying a conditional distribution for Gibbs sampling

I have $N$ samples with $M$ features with class labels $T\in\{-1, 1\}$ which were generated by drawing each feature $m$ from a normal distribution $N\sim N(0, \sigma_m)$. Class labels were assigned ...
0
votes
1answer
18 views

Weighted random sample over continuous data

I'm attempting to write an algorithm which gives a random value x in the domain [0-1) and is weighted according to a function. I don't seem to be able to determine how to do this with continuous data, ...
1
vote
1answer
111 views

Show that the larger $c$ is the faster ${\rm d}U_t^c=\frac c2h'(U_t^c){\rm d}t+\sqrt c{\rm d}W_t$ converges to its stationary distribution

Given two Markov chains $\left(X^{(1)}_n\right)_{n\in\mathbb N_0}$ and $\left(X^{(2)}_n\right)_{n\in\mathbb N_0}$ with transition kernel $\kappa_1$ and $\kappa_2$, respectively, and a common ...
0
votes
0answers
12 views

Efficient simulation for distribution of time until coin toss pattern

Suppose we flip a biased coin (with probability $p$ being Heads) repeatedly until a certain pattern (e.g., HHHTT) appears. We are interested in the number of flips $N$ required. It is well-known that $...
1
vote
0answers
31 views

Stochastic approximation of a Cauchy principle value integral.

Suppose I have a random variable $X\sim f_X(x|\boldsymbol\theta)$ with a well-defined expected value. The usual integral for an analytic solution of this expected value is $$\operatorname EX=\int_{\...
0
votes
0answers
20 views

Monte Carlo Markov Chain Line fitting

I am working on creating a Metro hastings MCMC simulation to fit a line so that I can learn more about MCMC by building one and learn more about statistics. My confusion: I am having trouble wrapping ...
0
votes
2answers
45 views

Prove Rate of Convergence of Monte Carlo

Let $X_1, X_2, \ldots$ be i.i.d. random variables with mean $\mu$ and variance $\sigma^2$. How does \begin{equation} \mathbb E\left[\,\left|\frac{1}{N} \sum_{i=1}^n X_i - \mu\, \right|\,\right] \to O\...
0
votes
0answers
13 views

How do I find the expectation of a non-stationary auto-regressive time series, with absorbing states?

Apologies for not knowing Latex! Consider the following recursive function: $$ y(t+1) = y(t) (1+r) + R - e(t) $$ Where $r,R$ are known constants, $r>0$, and $e(t)$ is distributed as a truncated ...
0
votes
0answers
13 views

Acceptance-Rejection ahas a Measure Theoretic Interpretation?

Question Does there exist a measure $\mathbb{Q}\ll\mathbb{P}$ justifying the "acceptance-rejection" sampling $$ \mathbb{E}_{\mathbb{P}}\left[X \mid f(X)\leq C\right] = \mathbb{E}_{\mathbb{Q}}\left[X \...
1
vote
1answer
57 views

Drawing random realisation from quantity with poisson error

How would I draw a random realisation of a variable with an upper and lower error determined from Poisson statistics using the Gehrels 1986 formula? See: http://adsabs.harvard.edu/abs/1986ApJ...303.....
0
votes
1answer
17 views

Integrating with a non-analytical solution (random effects)

I would like to integrate a function with two random effects, implying three successive integrations. My problem is that after the first integration, it is not possible to obtain an analytical ...
0
votes
1answer
34 views

Integrating a function over a random effect (Normal distribution)

I would like to integrate a function with a random effect. The function is : $G(t; \beta) = exp(- \lambda t^\gamma \exp(\beta Z))$, $\beta$ being the random effect taken from a normal distribution ...
0
votes
1answer
115 views

Monte Carlo method to find minimum value of a function

As far as I understand the Monte Carlo methods from a non-rigourous point of view because unfortunately I didn't study mathematics formally. For example to find a minimum value of a function $f(x)$ ...
0
votes
1answer
32 views

Can we use the control variate Monte Carlo variance reduction approach to estimate variance?

The control variate technique is a super useful was of fusing low- and high-fidelity models to reduce the variance in an estimate of an expected value. Consider an expensive, high-fidelity model $f(x)$...
0
votes
0answers
33 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
24 views

Unbiased Metropolis within Gibbs Sampler MCMC

I am currently using MCMC to estimate the inner cells of a contingency table. The date comes from a simulation I conducted and thus I know the true values of the inner cells. However, I have the ...
1
vote
0answers
13 views

Intuition behind convergence of MCMC inference methods

I'm studying Gibbs Sampling for inference, a popular MCMC algorithm and I was stunned by its ability to fit a Gaussian Mixture just by sampling. I would like to know the intuition behind it, and why ...
0
votes
0answers
25 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
51 views

Convergence in total variation distance of Markov kernel $n$-fold composition to the stationary measure

Let $(E,\mathcal E)$ be a measurable space $\mu$ be a measure on $(E,\mathcal E)$ $p:E\to(0,\infty)$ with $$\int p\:{\rm d}\mu=1$$ and $\pi$ denote the measure with density $p$ with respect to $\mu$ $...
2
votes
0answers
59 views

How to MCMC (or other simulation) given a non-stationary distribution?

Say I was given some directed graph that satisfies the Markov property, has a stationary distribution, $\pi$, and I know the transition probabilities are functions of some unknown parameters $P_{i\to ...
0
votes
0answers
19 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 ...
0
votes
0answers
20 views

About function V in geometric drift condition for Markov Chain

When I read the geometric ergodicity of Markov chain in Meyn and Tweedie, I note that in the drift condition $PV(x)<\lambda V(x)+bI_{x\in C}$, where $V(x)\ge 1$ is required. Why $V(x)\ge 1$ rather ...
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
68 views

Feynman-Kac formula in action.

Briefly speaking, the Feynman-Kac formula gives a way for constructing $C^2$ functions satisfying certain PDEs in the classical sense (at least, it's how it is explained in Oksendal's book that I am ...
1
vote
0answers
23 views

Lattice vs. Random sampling for function interpolation

Suppose $f: [0,1]\times[0,1]\rightarrow \mathbf R$ is smooth. I am to interpolate the function from the function values of $f$ at $n^2,\, n\in \mathbf N$ samples points. I have the freedom to pick ...