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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

Estimating the divergence of the score in score matching in very high dimensions

I'm training a network to obtain the score $s:=\nabla\ln p$ of a probability density $p$. Say $\tilde s$ is the score predicted by the network. My loss function contains the divergence $\nabla\cdot\...
0xbadf00d's user avatar
  • 13.4k
2 votes
0 answers
44 views

Is Hutchinson's trick $\operatorname E\left[\langle V,AV\rangle\right]=\sigma^2\operatorname{tr}A$ of any practical use?

Let $d\in\mathbb N$ and $A\in\mathbb R^d$. Hutchinson's trick is the easy to prove observation that if $(\Omega,\mathcal A,\operatorname P)$ is a probability space and $(V_1,\ldots,V_d)$ is a real-...
0xbadf00d's user avatar
  • 13.4k
2 votes
1 answer
31 views

Bayesian Inference Intractability

When looking at Bayesian posteriors $$ p(z \mid x) = \frac{p(x \mid z)p(z)}{\int p(x \mid z')p(z')dz'} $$ The denominator commonly intractable. I understand this is due to the possibility of high ...
Lehmann's user avatar
  • 177
1 vote
0 answers
84 views
+50

How can we derive this integral inequality?

Furthermore, let $(E,\mathcal E,\lambda)$ be a $\sigma$-finite measure space; $\mu$ be a probability measure on $(E,\mathcal E)$; $\zeta$ be a Markov kernel on $(E,\mathcal E)$; $\pi$ be a ...
0xbadf00d's user avatar
  • 13.4k
1 vote
0 answers
23 views

Monte Carlo scheme for Ornstein–Uhlenbeck processes

Given a family of Ornstein-Uhlenbeck processes $(Y_t^x)_{t \geq 0}$ that has been discretized in the spatial variable $x \in (0,\infty)$, I am trying to understand how to discretize it with respect ...
gb2718's user avatar
  • 11
1 vote
0 answers
23 views

Monte Carlo Control Reinforcement Learning

I'm reading the "Reinforcement Learning" book by Sutton & Barto. It's available here http://incompleteideas.net/book/RLbook2020.pdf . I'm currently in chapter 5 on Monte Carlo methods. I ...
user278486's user avatar
0 votes
0 answers
14 views

Does a Poincaré inequality for a Markov process $X_t$ with invariant measure $μ$ infer a convergence rate of $\frac1t\int_0^tf(X_s){\rm d}s$ to $μf$?

Let $(X_t)_{t\ge0}$ be a time-homogeneous shift-ergodic Markov process with transition semigroup $(\kappa_t)_{t\ge0}$ and invariant measure $\mu$. One implication of a Poincaré inequality is a $L^2$-...
0xbadf00d's user avatar
  • 13.4k
3 votes
0 answers
87 views

How do we get an estimator for $\operatorname E\left[\int_0^\tau f(X_t)\:{\rm d}t\right]$?

Let $(X_t)_{t\ge0}$ be a time-homogeneous Markov process with transition semigroup $(\kappa_t)_{t\ge0}$ and $\tau$ be a finite stopping time adapted to $(X_t)_{t\ge0}$. Say I run the following ...
0xbadf00d's user avatar
  • 13.4k
0 votes
0 answers
4 views

x parameter as a "fit" in the normal probability density function - MCMC calculating likelihood

My company recently implemented software that uses an MCMC method. In that program, a handful of randomly generated nuisance parameters are used to calculate expected values in a function modeling ...
Dan's user avatar
  • 101
0 votes
0 answers
6 views

Ensuring Local Proximity in Proposed Samples for MCMC with a Given Unconditional Proposal Distribution

I'm currently working on a project where my objective is to sample from a target distribution $p(x)$ using Markov Chain Monte Carlo (MCMC) techniques. The primary tool at my disposal is an ...
andy90's user avatar
  • 309
0 votes
0 answers
27 views

Standard deviation on Monte Carlo runs

I'm currently working on dynamic system identification and performing Monte Carlo runs with different noise realisations at a given $SNR$ ratio. Once the parameters converge, I save them in a matrix ...
Jean-Fr's user avatar
0 votes
0 answers
20 views

Does the error of monte carlo integration scale with the number of dimensions or not?

In this Wikipedia article, they derive the variance of a Monte Carlo estimator $Q_N$ for a function $f: \mathbb R^m \rightarrow \mathbb R$, using $N$ samples drawn uniformly over an integration region ...
skymonkey's user avatar
  • 125
2 votes
0 answers
53 views

Probability that a random reduced fraction has an odd denominator

Suppose you choose a rational number at random and reduce it; what is the probability that the denominator is odd? I looked around and heard you can't define a uniform probability measure on the ...
Joseph Bendy's user avatar
6 votes
0 answers
117 views

How would one integrate over $SO(n)$?

Suppose you want to find the average of an $n\times n$ diagonal matrix $A$ over all possible rotations, $$ \langle A\rangle = \int\limits_\text{SO($n$)} Q^T A Q \; dQ. $$ It's easy enough to do this ...
Xander's user avatar
  • 61
2 votes
0 answers
23 views

Metropolis-Hastings Algorithm. How do we know that it converges to target distribution?

In the Metropolis-Hastings algorithm, we choose to accept our sample with probability: $$\rho =min\left\{1, \frac{p(x')g(x|x')}{p(x)g(x'|x)}\right\} $$ Where $x$ refers to the current state of the ...
Matheo Xenakis's user avatar
3 votes
1 answer
78 views

Analytical solution to marble toss experiment

I am interested in the following problem: Assume we have an infinitely large, homogeneous grid, where each grid point is connected to 8 neighboring grid points (top/bottom, left/right, diagonal). Now ...
FritzPeppone's user avatar
0 votes
0 answers
23 views

Calculate probability of Gaussian random variable exceeding threshold when sampled from different Gaussian distribution

I am wondering if there is a closed-form expression for the probability that a Gaussian random vector $\boldsymbol{X}$ falls in-between some bounds as specified by a different Gaussian random variable ...
Bart Wolleswinkel's user avatar
0 votes
1 answer
47 views

How does Monte Carlo deal with unbounded functions with finite integral?

Using Monte Carlo to evaluate the integral of a bounded function on a bounded interval is straightforward. I have the following integral that I want to evaluate using Monte Carlo: $$I = \int_{0}^{\pi/...
Ramzi Baaguigui's user avatar
1 vote
1 answer
27 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
0 votes
0 answers
21 views

Find covariance matrix at time t

A random state vector, $\mathbf{x}\left(t\right)$, evolves over time according to the following equation: \begin{equation} \dot{\mathbf{x}}\left(t\right) = \mathbf{f}\left(\mathbf{x}\left(t\right)\...
user146290's user avatar
0 votes
0 answers
19 views

MLMC Estimate, Implementation and expected value diverging

i'm having some doubts/problems implementing a Multi Level Monte Carlo method. The setting is the following, I have generated some samples (approximated solutions of a PDE) using various polynomial ...
DiegoFMarino's user avatar
3 votes
1 answer
46 views

Efficiently sampling over closed walks on a triangle; A078008

OEIS A078008, the coefficients of the generating function $\frac{1-x}{(1+x)(1-2x)}$, gives the number of walks of length $n$ on a triangle that return to the original vertex. For fixed $n$, is there ...
user19772's user avatar
3 votes
0 answers
42 views

Minimizaiton of $f\mapsto\int\frac12\|f\|^2+\nabla\cdot f\:{\rm d}\mu$, when $\mu$ is only given by i.i.d. samples

I know this question is quite vague, but I need some indication. I have a problem where I have a probability distribution $\mu$ on $\mathbb R^d$ and I want to find a differentiable function $f:\mathbb ...
0xbadf00d's user avatar
  • 13.4k
0 votes
0 answers
15 views

Prior BPN based on Multi Linear Regression Model Output and Monte Carlo Simulations

On page 286 in the Prediction of road accidents: A Bayesian hierarchical approach paper. The passage describes the construction and parameter learning of Bayesian Probability Networks (BPNs), ...
Mike's user avatar
  • 165
0 votes
0 answers
32 views

Bayesian Analysis: Why do MCMC instead of just calculating thousands of values at equally spaced increments for the numerator and then normalizing?

I've been reading a lot about Bayesian Analysis and there is something that is not quite clicking for me with respect to the motivation for using MCMC. Assume we are doing analysis of the form: P(...
S Canada's user avatar
0 votes
0 answers
26 views

Gaussian random sampling with a minimum distaince constraint

I am trying to sample a set of points with a given, e.g., a Gaussian distribution, while the points have a minimum distance, $d_{\text{min}}$. The most accurate (but slow) way I found is the following:...
Farid's user avatar
  • 93
0 votes
0 answers
19 views

Generic Metropolis-Hastings kernel in measure theory

I'm facing difficulties in formulating the Metropolis-Hastings kernel for a specific problem where I need to sample from a probability distribution involving both discrete and continuous degrees of ...
Iris Allevi's user avatar
2 votes
1 answer
64 views

Probabilistic interpretation of simulation

I read a post on https://stackoverflow.com/questions/59441973/systematic-error-in-python-stochastic-simulation, and there's a part in the code that I'm having trouble understanding. Within the code, ...
RKerr's user avatar
  • 332
1 vote
2 answers
153 views

Monte carlo estimation, but function value can only be estimated indirectly

I have the following setup. I want to Monte Carlo estimate a big sum $$F=\sum_x p(x) f(x)$$ by drawing $\\{ x_1,\dots, x_M \\}$ from the distribution $p(x)$ and averaging $f(x_i)$. However, in my case ...
Marsl's user avatar
  • 301
1 vote
0 answers
25 views

Quasi-Monte Carlo Integration of Probability Density With Light Tails

I want to integrate $$f(x) = (2\pi)^{-\frac{p}2}\operatorname{det}(\Sigma)^{-\frac 12}\exp\left(-\frac 12 (x-\mu)'\Sigma^{-1}(x-\mu)\right)$$ over the $p$-dimensional hypercube $[a,b]^p$. Since $p$ ...
Syd Amerikaner's user avatar
2 votes
0 answers
69 views

Why do we use the exponential in the Boltzmann distribution

Low effort question incoming. Given a set of states $x_i,i=1,\dots,n$ with energy $0\leq U(x_i)$, we define the probability of a state $x$ as $$ \pi(x)=\frac{1}{Z_T}e^{-\frac{1}{T} U(x)} $$ where $Z_T$...
Aner's user avatar
  • 308
1 vote
0 answers
52 views

Why is sampling in high dimensions generally intractable (in the context of monte-carlo sampling?

It's unclear to me why sampling from product measures is tractable while generally randomized sampling is not. This is in the context of MC rejection sampling. Suppose we want to sample from a ...
amy's user avatar
  • 23
0 votes
0 answers
13 views

Sampling in scattering; how to keep track of the coordinates

I'm working on a monte carlo simulation involving scattering. The challenge is that I'd like the initial direction of the particle to be isotropic. But collisions after are no longer isotropic, but ...
Stefan de WIt's user avatar
1 vote
0 answers
31 views

Transformation of initial distribution via repeated applications of diffusion kernels.

I am reading a paper on Markov Chain Monte Carlo sampling via diffusion type models: https://arxiv.org/abs/1503.03585 Herein, a claim is made (see section 2.1) - namely that we can convert any ("...
P.Jo's user avatar
  • 839
0 votes
0 answers
46 views

Monte Carlo Simulation

I am running a probabilistic analysis for civil engineering purposes(I am finding the failure probability of a structure). I am using three methods: FOSM, FORM and Monte Carlo. I get similar failure ...
Niramaya Adhikari's user avatar
1 vote
1 answer
93 views

Can I draw conclusion based on the following Monte Carlo estimate of entropy? [closed]

I would like to compare the entropies of two discrete distributions of tokens. Those two distributions of tokens $[x_1, x_2, ..., x_m]$ come from two different outputs of an autoregressive language ...
Sam's user avatar
  • 461
0 votes
0 answers
79 views

Is the Monte Carlo integration method(s) actually a viable way to accurately integrate functions?

Recently, I was playing around with some Monte Carlo simulations using Python to evaluate integrals of functions such as f(x) = x(1-x)sin²[200x(1-x)]. I am aware that Monte Carlo integration methods ...
KibalchishTheCoder's user avatar
0 votes
0 answers
13 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
0 votes
0 answers
34 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
11 views

Sample size estimation for networks

0 I have $n$ data points that run in hundreds of millions. Ideally, I want to connect them with each other (based on a condition), run random walks on this interaction network, and make some ...
user2167741's user avatar
0 votes
2 answers
79 views

Computing the average number of times that n non-overlapping heads occur

Considering a sequence of $100$ coin flips, how can I compute $z(n)$, the average number of times that $n$ non-overlapping heads occur? (For example, six consecutive heads count as exactly two ...
Tim's user avatar
  • 1
1 vote
0 answers
133 views

Proof-Check: Beta-distribution sample generation through variable transformation

Purpose of this thread: I want your feedback on my proof for the following problem and correct it where necessary. Problem: For $\alpha > 0$ and $\beta > 0$, consider the following accept–reject ...
TryingHardToBecomeAGoodPrSlvr's user avatar
0 votes
0 answers
51 views

How to find the inverse of integral function if use numerical integration?

currently I am doing some research on how to produce a time-dependent receiver operating characteristic (ROC) curve parametrically (means using parametric distribution). To construct a time-dependent ...
AHMAD FAIZ BIN MOHD AZHAR MSC2's user avatar
0 votes
1 answer
86 views

Can the Monte Carlo method be used to determine whether an integral exists? [closed]

Consider the functions $$ f_1(x) := \frac{1}{\sqrt{|x|}} $$ and $$ f_2(x) := \frac{1}{|x|}. $$ Over the interval $I := [-1,1]$, the function $f_1$ integrates to 4, whereas the integral of $f_2$ ...
Omega Tree's user avatar
0 votes
0 answers
68 views

Dealing with improper integrals for double integration using Monte Carlo method

I am trying to use Monte Carlo method to solve problems regarding double integrals. In particular, the integral to be solved is in the form of $$ \int_{b}^{\infty}\int_{a}^{\infty} f(t|x)g(x) dx dt. $$...
AHMAD FAIZ BIN MOHD AZHAR MSC2's user avatar
0 votes
0 answers
8 views

Does likelihood function of your choice impact the asymptotic posterior of MCMC?

The metropolis Hasting algorithm decides whether to jump based on posterior probability. Namely, likelihood x prior. Then it seems the density function that you choose (e.g., Poisson or Gaussian) can ...
some's user avatar
  • 23
0 votes
0 answers
72 views

Monte Carlo simulation of a dice

In MC simulation of a fair die the random numbers $x_n$ are generated between $0$ and $3$. Then which one denotes the event of obtaining $1$ in dice? $0<x_n<\dfrac 16$ $0<x_n<1$ $\dfrac ...
Manjoy Das's user avatar
  • 1,006
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
2 votes
1 answer
92 views

Minimizing $(q_1, q_2, \dots, q_K) \mapsto \left(\sum_{i=1}^K\frac{p_i^2\sigma_i^2}{q_i}\right)\left( \sum_{i=1}^Kq_i\tau_i\right)$ with a constraint

$$ \begin{array}{ll} \underset {q_1, q_2, \dots, q_K} {\text{minimize}} & \displaystyle \left( \sum\limits_{i=1}^K \frac{p_i^2\sigma_i^2}{q_i} \right) \left( \sum\limits_{i=1}^K q_i\tau_i\right) \\...
Vicky's user avatar
  • 901
0 votes
0 answers
76 views

Numerical Method for High-Dimensional Advection-Diffusion PDE

Let $\epsilon > 0$ be a (small) fixed constant, and let $v\colon \mathbb{R}^n \to \mathbb{R}^n$ be twice continuously differentiable and (spatially) nonconstant. I'm looking to approximate ...
brenderson's user avatar
  • 1,462

1
2 3 4 5
17