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

learn more… | top users | synonyms

1
vote
3answers
3k views

Using loop to approximate pi (Monte Carlo, MATLAB)

I've written the following code, based on a for loop to approximate the number pi using the Monte-Carlo-method for 100, 1000, 10000 and 100000 random points. ...
1
vote
1answer
112 views

Monte Carlo estimations of e

I need to estimate $e$ with a monte carlo method. We only learned the crude monte carlo integration, so I can't use any robust monte carlo simulations. I know that $\displaystyle \int\limits_1^x ...
1
vote
1answer
204 views

Do random numbers have an “error”? If so, how can I calculate it?

In numerical mathematics, we have to approximate the value of $\pi$ using three different methods. One of the three methods is the Monte-Carlo method, i.e. I let Matlab produce $n$ random numbers ...
1
vote
2answers
198 views

Stochastic/finance monte carlo question

When pricing a european option by monte carlo over 30 days for instance, what's the difference between one big 30 day jump vs 30 one day steps?
1
vote
1answer
103 views

How to Find a Probability with Monte Carlo Simulation [closed]

$$ f(x) = \begin{cases} C\exp(-\frac{1}{2}x^3), & \quad x >-1,\\ 0, & \text{othewise}. \\ \end{cases} $$ Here, $C=1/2.2702.$ I want to find the probability ...
1
vote
1answer
88 views

Resolve integral with importance sample Monte Carlo

I'm trying to compute the integral $$\int_{a}^{b}(\sin( 1 + x ) + \cos( 1 + x ))e^{-x}\ dx$$ using importance sample Monte Carlo method. The exercise ask to use Cauchy Distribution to resolve the ...
1
vote
1answer
40 views

Question about the Monte Carlo Algortihm

I was reading the Monte Carlo algorithm for finding the area under a curve, say $y=f(x)$. The algorithm considers, $0\le f(x)\le M$ over the closed interval $a\le x\le b$. My question is,that why is ...
1
vote
1answer
172 views

Alternatives to Monte-Carlo simulation

Imagine I have a model of economy of a region, which consists of several companies, importers and population. Let's assume that all local companies in question produce food and agricultural ...
1
vote
1answer
168 views

Three ideas of perfect sampling

From David J.C. MacKay's Information Theory, Inference, and Learning Algorithms 32.2 Exact sampling concepts Propp and Wilson's exact sampling method (also known as "perfect simulation" or ...
1
vote
1answer
544 views

Exponential Probability Monte Carlo simulation

I need to write a Matlab program to estimate the quantity $\theta = \mathrm{Pr}(X < 1)$, where $X$ is an exponential random variable with mean $1$. I am doing this for multiple monte carlo ...
1
vote
1answer
21 views

Why does this MCMC algorithm to estimate parameters of a linear equation not converge to the posterior distribution?

As a kind of proof of principle I'm trying to estimate the parameters of a linear equation (before moving on to ODEs) using Markov Chain Monte Carlo sampling. The post that I am following can be found ...
1
vote
1answer
28 views

Mistake in generating random numbers - no irrational ones

Hi I just wondered if the probability densities have to be corrected when using them on a PC since the number representation is not at all continuous. So we cant simulate any irrational numbers and ...
1
vote
1answer
18 views

Efficient methods for drawing random numbers and Monte Carlo for Tsallis q-Gaussians

I would like to draw random numbers from the q-Gaussian used in "Tsallis statistics." This is specifically the distribution $$ f(x) = {\sqrt{\beta} \over C_q} e_q(-\beta x^2) $$ where $$ e_q(x) = ...
1
vote
1answer
35 views

Equivalence of Probability spaces. Monte carlo integration

Pondering about the independence of dimension of Monte Carlo Integration, I came up with the following explanation: An integral over a square is not harder, thus has the same rate of convergence, ...
1
vote
2answers
127 views

Approximating an integral using Monte Carlo Method

I wrote a solution for Calculate the value of the integral I = $\int_0^\pi sin^2(x)dx$ using the Monte Carlo Method (by generating $ 10^4 $ uniform random numbers within domain [0, π] × [0, ...
1
vote
3answers
736 views

Evaluating Difficult Monte Carlo Integration in R

I recently posted a simple version here (Simple Monte Carlo Integration). I was able to verify that the answer was indeed close to 1/3 when I wrote the following R code, and got a mean of X of ~1/3: ...
1
vote
3answers
685 views

Random directions on hemisphere oriented by an arbitrary vector

Hy, i'm writing a raytracer, and for that I need to generate n random vectors that are inside an hemisphere oriented by the surface normal. Ideally, I would also like being able to restrict the rays ...
1
vote
1answer
73 views

Compute the Std. Deviation of Multiple Monte Carlo Estimation of $\pi$

For a school programming assignment, I am trying to compute the value of $\pi$ via the classic Monte Carlo estimation of $\pi$. In the experiment, we throw a variable number of darts at a circle that ...
1
vote
1answer
83 views

Numerical CDF estimation for complicated random variable

Given a combination $U$ of several random variables $X,Y,Z...$ with known distributions, what is an efficient numerical algorithm to estimate PDF or CDF of $U$, if its CDF, PDF, characteristic ...
1
vote
1answer
39 views

Generating two $-1$ correlated Poisson random variables with parameter $5$

Is it possible to generate two random variables $X$ and $Y$ that are both $Poisson(5)$ with $Corr(X,Y)=-1$? Why? I was thinking about generating $3$ independent Poisson random variables $Z_1,Z_2, and ...
1
vote
1answer
121 views

How to mathematically prove that we are sampling from same distributions?

The content of this question is about rigorously proving something which is otherwise considered easily correct intuitively. Let's assume we have a multivariate distribution $g(x_1,x_2,...,x_n)$ over ...
1
vote
1answer
37 views

Bias Method in monte carlo integration

This is from a proof in my monte carlo course. let $h$ be a smooth function, $T_n = h(\bar{X})$ $\mu = E(X)$ then by taylor expansion $E(T_n -\tau) = E[h(\bar{X} -h(\mu)] = E[\bar{X} - \mu]h'(\mu)+ ...
1
vote
1answer
136 views

Monte carlo estimation of maximum likelihood estimators

I'm interested in numerically finding the maximum likelihood estimator of a parameter $\theta$, as well as the confidence interval of this estimator. First I'll describe the method I've been trying, ...
1
vote
1answer
307 views

What is the typical method for sampling uniformly in a convex polytope

The polytope in my case is the intersection of the k-plane $Ax=b$ and $\{x>0\}$ where $A$ is the constraint matrix and $b$ is some solution. I'd like to find a method that is fast and efficient for ...
1
vote
2answers
183 views

Monte Carlo Integration - determining if a random x,y coordinate falls within the circle or square

My textbook says you can take any random (x,y )coordinate between -1 and 1 like (-.3, .5) or (.4, -.7) and determine if the given coordinate falls within the circle if you calculate $\sqrt(x^2+y^2)$ ...
1
vote
1answer
34 views

Condition for Law of Large Numbers, Monte Carlo

In some lecture notes I am reading, there is the following; Consider $X_{1},...,X_{n}$, each with pdf $g$ (the instrumental distribution). Our aim is to estimate $E_{f}[h(X)]$ where $h(X)$ is some ...
1
vote
1answer
74 views

Question on Joint Posterior

Likelihood: $f(x^T, n^T|\theta^T) = \prod_{i=1}^{30} \binom{n^T_i}{x^T_i}{\theta^T}^{x^T_i}{(1-\theta^T)}^{n^T_i-x^T_i}$ Prior: $ log(\frac{\theta^T}{1-\theta^T})\sim N(\mu_T,\sigma_T^2) $ I am ...
1
vote
1answer
147 views

Quasi-random sequence on the unit $2$-sphere for Monte-Carlo based method

Please forgive my possible misuse of the appropriate definitions. I'm looking for a quasi-random sequence of directions in the unit $2$-sphere, to be used in a Monte-Carlo method to calculate an ...
1
vote
1answer
108 views

Use of this condition on the instrumental density in importance sampling?

From Rubinstein's Simulation Monte Carlo Method, assume r.v. $X$ has density function $f$, $H$ is a measurable function, and $g$ is another density function. If $g$ dominates $Hf$ in the sense that ...
1
vote
2answers
954 views

Monte Carlo simulation on sphere: unbiased random steps

Im doing a Metropolis Monte Carlo simulation with particles on a sphere and have a question concerning the random movement in a given time step. I understand that to obtain a uniform distribution of ...
1
vote
1answer
77 views

Should I ignore $0$ when do inverse transform sampling?

Generic method Generate $U \sim \mathrm{Uniform}(0,1)$. Return $F^{-1}(U)$. So, in step 1, $U$ has domain/support as $[0,1]$, so it is possible that $U=0$ or $U=1$, but $F^{-1}(0)=-\infty$. ...
1
vote
1answer
188 views

Help me with Monte Carlo method : Importance Sampling

I have a little problem with applying a Monte Carlo method: Importance Sampling. I need to calculate: $$ \int_0^\infty \int_0^\infty \frac{dx\;dy}{2 \pi (1 + x^2 + y^2)^{3/2}} $$ Can somebody help ...
1
vote
1answer
176 views

A problem of inversion method for sampling

I am reading the book Stochastic Simulation, Algorithms and Analysis by Asmussen. On page 39, when talking about inversion method for sampling a distribution, he gave an example: an r.v. ...
1
vote
1answer
6 views

Geomtric Brownian motion with exponential of sum of iid's

Glasserman's "Monte Carlo Methods in Financial Engineering" on p. 265 states that the geometric Brownian motion can be modelled with $S(t_n)=S(0) \exp(\sum_{i=1}^n X_i)$ where $X_i$ are iid. I ...
1
vote
0answers
20 views

Reducing sequential correlations in Metropolis Algorithm

In our last lab, we use MCMC method to simulate a walker walking in the phase space. Using the Metropolis method, a walker at its currect position will sample another point inside a cube (centered at ...
1
vote
0answers
10 views

How to determine the transition probability in Sequential Importance Sampling (SIS) for Particle Filter

Given a state-space model \begin{align} x_k &= f_k(x_{k-1}, v_{k-1}),\\ z_k &= h_k(x_k, w_k), \end{align} where $x_k \in {\mathbb R}^{n}$ and $y_k \in {\mathbb R}^{m}$ are the system state ...
1
vote
0answers
48 views

$\theta=\int_{0}^{2}3e^{-3x}dx$ Compute theta using Monte-Carlo Method

$\theta=\int_{0}^{2}3e^{-3x}dx$ Using Monte-Carlo method estimate the confidence intervals for the integral above. Use a distribution different from the uniform distribution to minimize the ...
1
vote
1answer
36 views

Quasi Monte Carlo or Gaussian Hermite quadrature for a statistical model with random effect

In my likelihood function, I need to integrate a random effect out as follows $$\int g(x,c)\exp(-c^2/2)dc .$$ Since the likelihood function is really complicated, I need the approximation to be fast ...
1
vote
0answers
26 views

Integrating a function containing a conditional Gaussian mixture

I wonder if the following integral has an analytical solution. $$ \int_{-\infty}^{\infty}\frac{w_1 N_1(x)}{\sum_{i=1}^{n} w_i N_i(x)} N_0(x) dx $$ where $w_1, \ldots, w_n$ are positive constants, ...
1
vote
0answers
30 views

Biggest rectangle inside a random geometric shape

I'm looking for the most efficient algorithm to find the rectangle with the greatest area inside a random geometric shape. The rectangle can be also rotated of course. I am sure that there exists a ...
1
vote
1answer
57 views

How does the Metropolis Algorithm work? (for idiots)

I have the mathematical skills of a house brick and I am desperately trying to learn this algorithm from a computer science perspective. Below is my knowledge of the algorithm. Can someone please ...
1
vote
0answers
22 views

Parameter Values From Asymmetric Probability Distributions

I am performing a Multipole Decomposition Analysis on some experimental data, essentially fitting a set of experimental data with a linear combination of functions. Annoyingly these functions are not ...
1
vote
0answers
54 views

Monte Carlo Integration via Ray Casting

Let's suppose we have a 2D line segment $S$ at $y=0$ and extending from $x=-h$ to $x=+h$. We define a function $f(x)=1$ for every point $x$ of $S$. We wish to integrate $f$ over $S$ with Monte Carlo ...
1
vote
0answers
37 views

How do I solve a under-determined quadratic multi-variate system?

I have the following equation: $$ Y = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \beta_3 X_3 + \beta_{11} X_{1}^2 + \beta_{22} X_{2}^2 + \beta_{33} X_{3}^2 + \beta_{12} X_{1} X_{2} + \beta_{23} X_{2} ...
1
vote
0answers
23 views

How to compute transition probabilities?

I have a stationary process $(X_t)_{t \geq 0}$ with distribution $$\mathbb{P}[X_t \in A ] = \int_A f(x) \, dx$$ for any measurable set $A$ and any $t \geq 0$. I want to compute $$ \mathbb{P}[X_\tau ...
1
vote
0answers
29 views

Markov-Chain Monte-Carlo: Are transformations on the inputs valid?

The problem: I am trying to solve a high dimensional (up to ~50) class of data fitting & modelling problems. The user specifies the problem, so I would like to make the configuration as easy as ...
1
vote
1answer
32 views

Would like some help formulating an optimization problem

I have a function $f$ that takes $n \geq 1$ positive real-valued arguments $\mathbf{a} \in R^n_+$. This function is defined for all amounts of inputs (e.g. $f(1)$ and $f(3, \pi, 17)$ are both valid) ...
1
vote
0answers
38 views

Gibbs sampling truncation for contrastive divergence

I am following Yoshua Bengio's Learning Deep Architectures for AI and at page 31 there is a phrase that confuses me. Starting by lemma 7.1 in the same page: Lemma 7.1. Consider the Gibbs chain ...
1
vote
3answers
150 views

Exact concept of Monte Carlo Method [closed]

I am a programmer and just came across the section where in Monte Carlo was discussed. I would like to know the exact concept of Monte Carlo simulation. In net i have read about it that it is the ...
1
vote
0answers
38 views

computing the area of a region using Monte Carlo integration

Suppose that I am interested in estimating the area of $\Gamma \in \mathbb{R}^2$. I do not know the exact shape of $\Gamma$ but I have a sufficiently large number of sample points $(X,Y) \in \Gamma$ ...