# Questions tagged [monte-carlo]

Using (pseudo-)random numbers and the Law of Large Numbers to simulate the random behavior of a real system.

1,012 questions
Filter by
Sorted by
Tagged with
15 views

### Gibbs Sampler Conditional Marginal Computation

I have the following question regarding the Gibbs sampler, although it might be considered a simple question on conditional probability. For sake of simplicity, let us say we are trying to sample ...
10 views

### LRT and Manually Finding Significance when Wilks Theorem isn't Valid

Hello and thank you for taking the time. I'm performing an LRT for a likelihood distribution which violates the regularity conditions for Wilks theorem and wald intervals. I'm running a monte-carlo ...
71 views

### Importance sampling - approximation of an integral in R

So I am given this integral $$\mathrm{I}=\int_{38}^{\infty} \mathrm{f}(\mathrm{x}) \mathrm{d} \mathrm{x}=\int_{38}^{\infty} \mathrm{e}^{-\mathrm{x}} \mathrm{x}^{2} \mathrm{dx}$$ and i am also given ...
23 views

### Importance Sampling - By Hand Calculation and Example

To understand Importance sampling, I did a little experiment as described here. Since I'm getting high deviations when proposal distribution is not uniform, I would like to know if my steps are ...
10 views

### What is the inference behind the momentum variable and the Kinetic energy for a weakly non-linear inverse problems in the HMC method?

We generate an auxiliary momentum variable in the HMC method to provide gradient for the propagation of trajectory (m, p) (model or position, momentum) in the phase space. If we look into Newton's ...
53 views

### Weighted Least Squares vs Monte Carlo comparison

This is a copy of a question originally posted on stackoverflow I have an experimental dataset of the following values (y, x1, x2, w), where y is the measured quantity, x1 and x2 are the two ...
20 views

### Randomized Algorithms- Monte Carlo vs Las Vegas?

Monte Carlo and Las Vegas algorithms are Randomized Algorithms. They both produce correct or optimum results. As far I know: any Las Vegas algorithm could be made Monte Carlo (and vice versa in the ...
14 views

### Is there a statistically robust stock market history generator?

I want to use some numerical and Monte Carlo techniques in computer code to estimate probabilities of various complex stock index price movements. I want to do this with randomly generated price ...
24 views

### Quantiles from Lognormal distribution

Is there a closed form solution for the quantiles of the lognormal distribution. And if so can they also be interpreted as Value at Risk measures? F.e. is the 5% quantile of a lognormal PDF equivalent ...
6 views

### Minimum variance hedge ratio - returns or differences for Monte Carlo

So If I want to simulate for two stocks a monte carlo simulation since I want to show that in the end a portfolio with the minimum variance hedge ratio has the lowest standard deviation do I use as ...
34 views

### Estimator of $\log \mathbb{E}[X]$

In many fields of statistic we are faced with quantities of type $\log \mathbb{E}[X]$ where $X$ is a generic random variable. However, I never came across any good estimator for this quantity. The ...
42 views

### Randomly sampling parameters for model selection

Suppose I'm fitting a complicated (e.g. neural network) model's parameters $\theta$ to some data $D$, and I'm trying to tune hyperparameters (e.g. number of layers, size of layers) $\eta$. Normally I ...
59 views

### Increasing the convergence rate of nested monte carlo

I'm interested in estimating the following expectation $\mathbb{E}[\mathbb{E}[X|Y] \log \mathbb{E}[X|Y]]$, where only the distribution of $X$ and $Y|x$ is known. To be more specific, let's say both $X$...
23 views

### Markov Chain Monte Carlo integration and infinite while loop [migrated]

I'm implementing a Markov Chain Monte Carlo with both Metropolis and Barker's $\alpha$s for numerical integration. I've created a class called MCMCIntegrator(). ...
6 views

### Local sensitivity analysis with exponential and uniform distributions as input

For my thesis I need to run a sensitivity analysis on the input factors for a supply chain model. I am supposed to change the mean and the standard deviation (sd) of all input factors respectively by ...
36 views

### Square of Normal Distribution [duplicate]

I have a normal distribution $X$~$N(\mu,\sigma^2)$. Is there an exact value for the mean and standard deviation of $X^2$? Thanks
34 views

### How do I propagate correlated errors numerically?

I'm facing an error propagation problem in fitting some experimental data. I have measured several quantities, $m_i$, and I know from theory that $\sum_{i=0}^{n} m_i = 1$. Each of the $m_i$ has its ...
24 views

### Integration with accept reject sampling Monte Carlo

I've got a quick question with regards to accept-reject Monte Carlo integration that I can't solve. Suppose I want to integrate some function, $f(x,y)$, with samples of $x, y$ from $p(x,y)$. Now, ...
10 views

### Surprising nonlinear variance-based scale est (bias adj) for Laplace Distribution competes with MLE?

Background: Using the quantile function (inverse cumulative distribution) for the Laplace distribution supplied with uniform random deviates (per the RAND() spreadsheet function), I examined an ...
26 views

### Combining importance sampling with optimization - does this yield an unbiased estimate?

I'm wondering if it is OK to combine importance sampling with optimization to choose the parameters for the substitute distribution. I have a non-negative random variable $X$ on $\mathbb{R}^d$ with ...
26 views

### is off-policy Monte Carlo control really off-policy?

I'm reading the "Reinforcement learning: An introduction" by Sutton and Burto (http://incompleteideas.net/book/bookdraft2017nov5.pdf) The off-policy MC control algorithm puzzles me, please if anyone ...
15 views

### Impact of correlation bounds for Monte Carlo simulations

As the lognormal distribution imposes bounds of attainable correlations as discussed in Attainable correlations for lognormal random variables my question would be what happens if say we want to do a ...
29 views

### When to use Monte Carlo test type in ctree?

I'm a user of ctree function from partykit package in R. I always wondered for which purpose we want to use Monte Carlo to compute the distribution of test statistics? The literature suggest that it ...
10 views

### Lognormal distribution correlation bounds on monte carlo simulations of the minimum variance hedge ratio

As the lognormal distribution imposes bounds of attainable correlations as discussed in Attainable correlations for lognormal random variables my question would be what happens if say we want to do a ...
30 views

### How to calculate individual moments of a 2-dimensional distribution via Monte Carlo Integration

I've recently been using Monte Carlo integration to calculate a particular integrals which I can do fine but I've hit a problem where I can't calculate the individual moments of my distribution for ...
16 views

### Monte Carlo Error for Minimum Variance Hedge Simulation

So I was running a monte carlo simulation for two assets and a portfolio consisting of 1 quantity of the first asset and short a fraction x of the second asset to hedge, where the fraction is ...
89 views

### Monte Carlo Integration and pdfs?

Let's say I have an un-normalized probability density function $f(x)$, which is related to $\xi$ via $\xi = \frac{f}{c}$ I also have a sample set $S = \{x_i\}_{i=1}^n \sim \xi$ which is sampled from ...
41 views

### Inverse transform method on MCMC generated uniform draws

I understand that it sounds like why would anyone do this, but are there any references that use the inverse transform method to draw correlated samples from a distribution $F$ using MCMC samples from ...
56 views

### Comparing Variances of two Hit-or-Miss methods for estimating volume

My question is on Exercise 1.4 of Neal Madras' "Lectures on Monte Carlo Methods" (problem pictured below). My current work is as follows: Method 1: Let $X_1,X_2,\ldots,X_N$ be i.i.d. uniform on the ...
19 views

### Probability for the Quotient of two lognormal distributions (Analytical vs Monte Carlo)

I am struggling on a problem for some time now and any help would be highly appreciated. From an "easy" problem, known to have a closed-form solution, I find strange the existence of such a huge ...
45 views

### Help on a simple Monte-Carlo Significance test (probability of occurrence)

I would like to perform a statistical significance based on Monte Carlo simulation in R but I don't know how to formulate this correctly. I have the following data set: [Link to data] (https://www....
36 views

### Probability of reaching goal in n steps?

Consider a simple grid-like setup where an agent starts at the first state (s0) and has to reach the absorbing state (G): | s0 | s1 | G | Also, when it tries to ...
34 views

### Time series simulation based on a given time series

I’m looking for some procedures to simulate time series based on another time series as an input. The objective is that it may provide me with more training datasets that are similar to the given ...
21 views

### How to compare the results of Monte Carlo simulations with different sample sizes?

I'm simulating the Monopoly game and trying to find out the most frequent squares in the board. For further details, it is Project Euler problem 84. The solution will not be spoiled. To illustrate ...
24 views

### Estimate a Mean using Monte Carlo Integration

Suppose $\hat f(x)$ is the KDE $$\hat f(x) = \frac{1}{nh}\sum_{i=1}^nK\left(\frac{x - X_i}{h}\right).$$ Now I want to estimate the KL divergence to the true density $f$ using an MC approach: KL = \...
17 views

### Unanchored discrepancies of uniform point sets with a fixed volume

When computing a discrepancy measure of a point set $X$, I find that the measures that I encounter are not always intuitive. Especially when two different point sets $X_1$ and $X_2$ 'span' the same ...
31 views

### Best RL methods for environments with short episodes

I have a game where the length of an episode is fixed and small - 26 steps. The reward is assigned only once, at the end of the episode. State size has around 350 features; there are at maximum 52 ...
11 views

### Self Study: Monte Carlo Integration, Confidence Intervals, Python Code

I implemented a simple procedure that (should) calculate a specified confidence interval for a normal distributed variable using Monte Carlo Integration. The key issue is wheater or not the CI is ...
33 views

### Compare two Monte Carlo simulations

I have a statistic that I know was found with a Monte Carlo simulation. I also have other data associated such as standard deviation and number of simulations run. I want to verify the statistic with ...
28 views

### Calculate fifth and sixth polynomials for Headrick (2002) method for non-normal multivariate distribution

I am trying to perform a 3-variable correlated multivariate Monte Carlo simulation. As the asset class returns are non-normal, I found the following function ...
28 views

### Running a Monte carlo simulation of a probit model on Stata

I am trying to run a MC simulation for a probit model on Stata using existing variables. In all the examples I saw, the authors generate the regressors (generally only one) as well as y* and y=(y*>0) ...
103 views

### Monte Carlo uncertainty analysis of actual and predicted data in R?

I am a need of Monte Carlo uncertainty analysis of actual and predicted data in R I used a regression AI model to predict and now I would like to conduct Monte Carlo uncertainty analysis of actual and ...