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.
758
questions
0
votes
0
answers
4
views
How to calculate the varinace of MCMC estimator (updated)
I am trying to calcualte the variance of the MCMC estimator shown below (assuming unbiased estimator $E[\theta] = \mu$):
$$\theta = \frac{1}{N}\sum_{1}^{n}f(X^{n})$$
However, it is assumed that the ...
2
votes
1
answer
19
views
How to calculate the varinace of MCMC estimator
I am trying to calcualte the variance of the MCMC estimator shown below (assuming unbiased estimator $E[\theta] = \mu$):
$$\theta = \frac{1}{N}\sum_{1}^{n}f(X^{n})$$
However, it is assumed that the ...
0
votes
0
answers
11
views
How do i compute the important sampling hence obtaining the mean and variance of the importance density. Is there a book with these type of questions?
Suppose it is desired to sample from a Student-t3 with 3 degrees of freedom given by a function $$ \frac{4\sqrt3}{\pi}(1+\frac{x^2}{3})^{-2} $$ Importance sampling is used with an importance density ...
1
vote
1
answer
33
views
Monte Carlo simulation for economic growth
internet. For the institution I work for, I need to investigate economic data. What I was asked for is that based on any historical economic data of the country, I need to build "base","...
1
vote
0
answers
61
views
How to combine antithetic variable and control variate methods in mote carlo integration?
I want to use R to estimate the integral $\theta=\int_{0}^{1} e^{x^2 }\,dx$ by monte carlo integration with variance reduction. The variance reduction I want to use is combining the antithetic ...
1
vote
0
answers
35
views
Sampling Spin Configurations in Ising Models
Consider an instance of the Ising model, with $N$ number of spins on a 2D square lattice (or any other 2D structure) wrapped into a torus to avoid boundary conditions (in other words, periodic ...
4
votes
1
answer
121
views
How to fit the Expectation?
Imagine I have the following approximation to the expectation of a random variable $Y$
$$
E[Y]\simeq \alpha x^{-\beta}
$$
for $x,\alpha>0$ and $0<\beta<1$. Now, imagine I have some average ...
0
votes
0
answers
50
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 ...
1
vote
0
answers
37
views
Convergence of Monte Carlo estimation of two-variable function's expectation $\mathbb{E}[f(X, Y)]$
I'd like to estimate the expectation value estimation of two-variable function $\mathbb{E}[f(X, Y)]$ by using "nested" Monte Carlo integration, where $X$ and $Y$ are independent and could ...
1
vote
0
answers
29
views
Variance of Variance -> Confidence Interval?
let's consider some random variables collected in the vector $X$ following the distribution $f_X(X)$. We want to compute the probability that:
$$
p = \textrm{Pr} [G(X) < 0]
$$
where $G(X)$ is some ...
0
votes
1
answer
46
views
Are Monte Carlo methods considered Bayesian or Frequentist? [closed]
I went down the Frequentist vs Bayesian rabbit hole. I was searching for specific examples and I came across this question. Is sampling with Monte Carlo techniques a Bayesian or a Frequentist approach ...
0
votes
1
answer
24
views
Metropolis - Hasting sampling: sampled from target distribution but shapes of histogram (accepted samples) is off
The target distribution is of the form:
$ p(x) = x^{-6}.e^{\frac{-2.475}{x}}$ with a support in the interval $[0.0, 2.0]$.
This gives a plot like
Now, to choose a proposal kernel, I think a lognormal ...
0
votes
0
answers
23
views
Wolfram Mathematica Monte Carlo for integrals approximation
I wanted to implement the Monte Carlo method for multiple integrals approximation in Wolfram Mathematica. Namely I wanted to let the user insert as input the dimension of the integral and the number ...
1
vote
1
answer
91
views
Why the Markov chain transition matrix doesn't have an eigenvalue $\lambda=1$?
Given an instance of the transverse Ising model, I am trying to sample from the Boltzmann probability distribution $\mu(s)=\frac{e^{-E(s)/T}}{Z}$ ($Z$ is the partition function, $s$ is a spin ...
0
votes
1
answer
59
views
Metropolis-Hastings not clearly understood
I am trying to understand how the Metropolis-Hastings algorithm works and, if possible, to build a small example myself (to be sure that I have understood correctly).
Unfortunately, there are still a ...
0
votes
0
answers
39
views
How to find a lognormal distribution which mimics the shape of a given normal distribution?
Question:
If I give you the mean vector and the covariance matrix of a multivariate gaussian distribution (call it G1),
is there a way to find a lognormal distribution which mimics the shape of G1?
I ...
1
vote
0
answers
34
views
Monte Carlo integral over infinite discrete set
In many articles (e.g. in Wikipedia https://en.wikipedia.org/wiki/Monte_Carlo_integration ), Monte Carlo integration is introduced as an numerical approximation of an integration over $n$ dimensional ...
0
votes
0
answers
15
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
1
answer
19
views
Help with formula on linear nested conditioned expectations
I am working on a nested integration problem and want to develop an efficient estimator for said problem.
The problem has the form:
$\mathbb{E}_x\left[F(x,\mathbb{E}_y\left[G(y, x))\right]\right] $ ,
...
0
votes
0
answers
37
views
Under what assumption 0/0 =1 (Monte Carlo)
The following is taken from some lecture notes on Monte Carlo methods:
I have never seen in anywhere else that we can treat $0/0=1$. Why it is okay to do it here?
1
vote
0
answers
45
views
What is the point density of a point sampling pattern in this context?
I'm trying to understand the following assertion which is made in this paper on p. 3:
In $d$-dimensional space the point density, defined as the number of points per unit volume, is inversely ...
0
votes
0
answers
49
views
Theorems Supporting the Monte Carlo Method
Let $X$ and $Y$ be random variables and $Y=g(X)$. I then drawn $n$ random samples X to get the set $\{x_1, x_2, ..., x_n\}$ according to the CDF of $X$ called $F_X(x)$. I process each sample as $y_i=...
0
votes
0
answers
28
views
How to solve this airplane puzzle, where we must calculate the probability of the $n$'th passenger finding their seat.? [duplicate]
Can you help me solve this puzzle I received in an online quiz as part of a job application? I only had about 4 minutes to solve it.
There are 2016 passengers about to board a plane, numbered 1 ...
0
votes
0
answers
23
views
MCMC Method - Simplified Monopoly (Coin flip) example
I would like to know, analytically, why the convergence rate of Monte Carlo's is 1/sqrt(N), where N is the number of Monte Carlo runs. I've been playing around with MCMC, and it is very clear from the ...
3
votes
1
answer
62
views
Use Monte Carlo algorithm to approximately compute E(X).
I'm okay with (a), but I got stuck in trying to solve (b)
My idea was to change the integration $$ \int_0^1 \int_{0}^1 x g(x,y) \ dxdy $$ to be the expectation for a function of $X, Y$
Similarly, I ...
1
vote
0
answers
25
views
What is the random variable with pdf proportional n-root of normal pdf
I am working on some statistic project and trying to sort out the properties and n-root of Normal pdf. Here is my question and thought process.
Suppose the pdf $p$ of $\beta$ is
$ p_\beta(\beta) = \...
1
vote
0
answers
12
views
Volume of a sample in stratified sampling
Let $(X_n)_{n\in\mathbb N}$ be a time-homogeneous Markov chain with stationary distribution $\mu$. Assume $\mu$ has a density with respect to some reference measure $p$ and let $f$ be an $\mu$-...
0
votes
1
answer
40
views
Does the integer-part of a continuous random variable still admit a density?
Let
$\lambda$ denote the Lebesgue measure on $\mathcal B(\mathbb R)$
$p:[0,1)\to[0,\infty)$ be Borel measurable with $$\int_{[0,\:1)}p\:{\rm d}\lambda=1\tag1$$ and $$\mu:=p\left.\lambda\right|_{[0,\:...
1
vote
1
answer
60
views
Numerical Integration for discontinuous functions
$$
\mbox{One has}\quad\int_{0}^{1}\operatorname{f}\left(\,{x}\,\right)\,{\rm d}x = \lim_{n \to \infty}\ \frac{2}{n^{2}}
\sum_{i\ =\ 1}^{n}\ \sum_{j\ =\ 0}^{i}
\operatorname{f}\left(\,{j \over i}\,\...
4
votes
1
answer
155
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:
...
1
vote
1
answer
47
views
Can we construct a sequence of random variables $(X_i)$ on a metric space with a given distribution such that $d(X_i,X_j)\ge\varepsilon$?
Let $E$ be a metric space, $\lambda$ be a measure on $\mathcal B(E)$ (in my application $E=[0,1)^2$ and $\lambda$ is the Lebesgue measure on $\mathcal B(\mathbb R^2)$ restricted to $E$), $p:E\to[0,\...
0
votes
0
answers
24
views
Monte Carlo Integration - Measurability of the function
The below question is from Durrett's book on Probability theory. I wanted to ask why we need $f$ to be a measurable function fo part (i) of the question. My proof is as follows:
Since $ U_i $ are i.i....
1
vote
1
answer
35
views
If $\frac1n\sum_{i=1}^n1_{[0,\:a)}(x_i)\to a$ for all $a$, can we conclude $\frac1n\sum_{i=1}^nf(x_i)\to\int_{[0,\:1)}f$
Let $(x_n)_{n\in\mathbb N}\subseteq[0,1)$ with $$\frac1n\sum_{i=1}^n1_{[0,\:a)}(x_i)\xrightarrow{n\to\infty}a\;\;\;\text{for all }a\in[0,1]\tag1$$ and $f:[0,1)\to\mathbb R$ be bounded and Borel ...
0
votes
0
answers
29
views
If $(u_i)$ is uniformly distributed, then $\frac1n\sum_{i=1}^nf(u_i)\xrightarrow{n\to\infty}\int_{[0,\:1)^d}f\:{\rm d}\lambda^{\otimes d}$
Let $d\in\mathbb N$. Say that $(u_i)_{i\in\mathbb N}\subseteq[0,1)^d$ is uniformly distributed if $$\sup_{a\in[0,\:1)^d}\left|\frac1n\sum_{i=1}^n1_{[0,\:a)}(u_i)-\prod_{i=1}^da_i\right|\xrightarrow{n\...
0
votes
0
answers
25
views
Monte Carlo Simulation Error Calculation for Particle Tracking
I am running a direct monte carlo simulation, where random particles ($N_{simulation}$) in a uniform distribution are generated at a certain position with coordinates ($x_0$, $y_0$, $z_0$). These ...
0
votes
1
answer
34
views
How many Monte Carlo simulations must I run to get a $95\%$ confidence interval for some error E
Suppose I want to use Monte Carlo to compute some probability $p$. A single MC simulation will run for $R$ iterations and calculate $p$ as the fraction of 'successes' (each iteration gives failure and ...
0
votes
1
answer
33
views
How are Importance Sampling and likelihood calculation done in Particle Filters (SIR)
In the section on Sequential Importance Sampling of the book Bayesian Filtering and Smoothing by Simo Sarkka, the author states that for each step we
draw samples from the importance distribution
$$
...
0
votes
0
answers
29
views
Integration to calculate expected value for a distribution
I am currently learning Monte Carlo integration, I am completely lost on how to calculate the expected value of the following, before I simulate it using Monte Carlo.
$R0 = px + (1-p)exp(\epsilon +x)$
...
1
vote
0
answers
24
views
Mathematical notation for output distribution of Monte Carlo simulation
I want to propagate the uncertainty from a set of input variables $X$ with distribution $P_X$ through some function $Y=f(X)$, and obtain the output distribution $P_Y$. Doing this practically is quite ...
0
votes
0
answers
31
views
Van der Pol system, Master equation
everyone.
Can me help in this problem. Consider vnder Pol system
\begin{equation}\label{Eq1}
\left\{
\begin{array}{c}
\frac{dx}{dt} = y \\
\frac{dy}{dt} = -x + \gamma (1-x^2)...
0
votes
0
answers
27
views
"American Monte-Carlo"
I heard this name in a discussion on market modeling. As I understood from the context, this is an optimization of the classical Monte Carlo method.
Unfortunately, Google does not know such a name. ...
2
votes
1
answer
27
views
Sampling from a chain of log-normal random variables
This problem is a variation on my previously asked question.
Consider a sequence of random variables $x_1, x_2, \ldots, x_N$ defined as follows:
$$x_0 = \alpha, \qquad x_n \sim \mathcal{LogN}(\log x_{...
0
votes
0
answers
27
views
Demonstration of the Acceptance-Rejection method in the case of a beta distribution
The goal is to simulate the realization of the density of probability of the beta law $\beta(2,2)$ using the algorithm of Accept-Reject Methods
Show that if we give ourselves an i.i.d. sequence $(Y_i,...
1
vote
1
answer
39
views
Probability of sum of random variables exceed a certain theshold
I have a minor technical issue. Let's say $Y = \sum^{n}_{i=1} X_{i}$. Now I want to find $P(Y > \gamma)$ by Monte Carlo. Let's assume the $X_{i}$ are i.i.d. Gamma distributed. How I see the ...
2
votes
1
answer
126
views
Generate random variables from some PDF
My problem is the following. I am given a PDF, say $p(x) = x \cdot \mathrm{e}^{-x}$ for $x > 0$. I want to generate $n$, say $n = 1000$, random variables given this density, such that I can ...
0
votes
0
answers
9
views
Monte Carlo - Why is the density of $\hat\beta$ the same regardless of interval size?
I am trying to obtain the estimated density $\hat\beta$ given a large number of sample size from intervals [0, 1] of a normal distribution. I was able to get the correct $\hat\beta$ using the interval....
1
vote
1
answer
111
views
Expected value of a norm
I am currently studying the Monte Carlo methods for solving PDEs with random coefficients. My problem here is basically just doing with some algebraic properties of the expected value function which I ...
1
vote
1
answer
71
views
Scaling and translating function so that we may assume that it is defined on the unit interval [0,1] with values in [0,1].
For a introductory course in statistics with python, i'm supposed to approximate the integral $\int\limits_{-1}^{1}f(x)dx$, where $f(x) = x^4$. But before I can start with the practical work in python,...
0
votes
0
answers
11
views
The gradient vector in Hamiltonian Monte Carlo (leapfrog method)
Let $x_{t}, \omega_{t} \in \mathbb{R^{d}}$
The Hamiltonian Monte Carlo says this:
Deterministic: it relies on the Hamiltonian dynamics so given an initial state, at any time $t$, specified by the ...
0
votes
0
answers
116
views
What is a separable distribution?
In a text I am using, there is a constant echo of separable distribution. I haven't been able to find more information of this on any resources.
Would someone kindly explain to me its intuitive idea ...