Questions tagged [monte-carlo]

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

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

Confidence interval for evaluating an integral via Monte-Carlo sampling

I am trying to evaluate the following integral using Monte-Carlo: $$ \langle f \rangle = \int \mathrm{d}x~ \rho(x) f(x) $$ where $\rho(x)$ is a normalized positive function. The integration is ...
0 votes
0 answers
6 views

Robustness analysis using Monte Carlo

Using a mathematical model, I have estimated some system parameters using Kalman filter. Now I have to verify whether the proposed system is robust against uncertainties. I have estimated data and ...
2 votes
1 answer
37 views

Uncertainty/Standard Deviation of Monte Carlo methods

I am using a Monte Carlo method to estimate the expected value of the results of certain simulations. Consider this simplified case: $X, Y$ are independent random variables and $g(X,Y)$ is a nonlinear ...
0 votes
0 answers
7 views

Computing significance using permutation test in nested cross-validated SVR model

I am running an SVR on multi-dimensional input data (X) to predict an outcome variable (Y). I am using a nested cross-validation approach, with the inner loop using a GridSearch CV to find the optimal ...
  • 127
0 votes
0 answers
3 views

off-policy Monte Carlo learning: Why is Probability of Sampling a Trajectory the same as Having a return?

In Sutton and Barto's RL book, in the section for off-policy learning, we would like to find the expected value of the random variable $G_t$, given $S_t = s$ under our target policy: $$E_{\pi}[G_t|S_t ...
0 votes
0 answers
33 views

Monte Carlo simulation to obtain confidence intervals for non linear regression of data with different standard deviations

Could you, please, help. I have pretty standard experimental data taken from scientific paper which is set of N points $x_{i},y_{i}$ on $y(x)$ graph with each $y_{i}$ having standard error $\sigma_{i}$...
  • 1
0 votes
0 answers
19 views

How to set up a monte carlo simulation for time-series, cross-sectional / panel data in R

I am looking for tips, pointers, explainers, blog posts, and the like, on how to set up a monte carlo simulation for a time-series, cross-sectional / panel data generating process in R. I would like ...
  • 407
1 vote
1 answer
18 views

Why do we use the limiting distribution under the null hypothesis when computing power in Monte Carlo simulation?

I'm computing the power of a statistical test using Monte Carlo simulation. My test statistic is asymptotically $\chi^2$ under the null hypothesis. When I am computing the power for a given iteration ...
  • 143
1 vote
1 answer
89 views

What does it mean to have a "transient state" or a "transient phase" in an Ising model?

I downloaded a simple implementation of the Ising model in C# from this link. I have understood more or less the entire code except the following routine: ...
  • 1,528
10 votes
5 answers
1k views

Expectation of random sum of non-random numbers

I have a continuous random variable $\tau$ and I want to evaluate $$ E\left(\sum_{i=1}^{\lfloor \tau \rfloor} Y_i\right), $$ where $Y_i$ are known, non-random, and $\lfloor . \rfloor$ is the floor ...
0 votes
1 answer
34 views

How does one test the efficiency and completeness of an estimator using monte-carlo simulation?

How does one test the efficiency and completeness of an estimator using monte-carlo simulation? In particular, I want to use-montecarlo simuation to answer. Maybe the better question is how does one ...
16 votes
2 answers
928 views

Why does this algorithm generate a standard normal distribution?

I have this algorithm which I encountered: (1) Generate $U_1$, $U_2$ independently from Uniform(0,1) (2) Set $Y_1 = -\log{U_1}, Y_2 = -\log{U_2}$. If $Y_2 > \frac{(1-Y_1)^2}{2}$, accept $(Y_1, Y_2)$...
  • 163
1 vote
0 answers
30 views

Monte Carlo method for confidence intervals

I would like to attempt a Monte Carlo procedure to filter composite anomalies at 90% confidence level from the rest of the composite anomalies. My data is a NetCDF of hourly surface temperature that I'...
  • 23
1 vote
1 answer
43 views

how to sample two random variables from different distributions and requiring one is always larger than the other

I know one way is to sample A and B independently and then reject the samples where A<B. But I wonder if there is an easier method?
1 vote
1 answer
34 views

How to use MC simulation to calculate Supremum ADF test critical values

I am replicating some techniques from Advances in Financial Machine Learning by Marcos López de Prado. In Chap 17, I am doing the Supremum ADF test and Quantile ADF test. It seems that they do not ...
0 votes
0 answers
14 views

Assessing Validity of Surrogate Loss Function

Consider a loss function to be minimized: $$ l(y, f(x)) $$ where $y$ is the true outcome, $\hat{y} = f(x)$ is the estimated outcome from a model $f$ given inputs $x$. This loss function is non-...
  • 281
0 votes
0 answers
61 views

Racing price estimation issue with Conditional Logistic Regression and Monte Carlo Simulation

Using a Machine Learning method - using conditional logistic regression, for an 8 runner greyhound dog race I have defined two ways to create a list of prices: A list of 8 exponentials, which is ...
1 vote
0 answers
23 views

Huge bias in IV during Monte Carlo Simulations

I am trying to see how IV performs with Monte Carlo Simulations. My model is: $y = X \beta + p \alpha + \xi + \epsilon $. In this model $ \xi $ is not observed and $p$ is correlated with $\xi$. So I ...
1 vote
0 answers
30 views

Using p-values as an effect size measure

In the following circumstance, I believe it is valid to use p-values as a measure of effect size: am I wrong? I have a set of objects which have a single 'observed distance' from a given spatial ...
0 votes
3 answers
73 views

Why not just run a Markov chain to get stationary probabilities?

I'm reading Performance Modeling and Design of Computer Systems which contains some analysis of Markov chains. In particular, it emphasises various analytical methods for finding the stationary ...
  • 759
1 vote
1 answer
76 views

How to ge the Monte Carlo standard deviation of the empirical standard deviation?

The authors get the Monte Carlo standard deviation of the empirical standard deviation as follows. My question is how to get the MCSE of the EmpSE? For bias, the MCSE of $\frac{1}{n}\sum \hat{\theta}...
  • 432
2 votes
1 answer
43 views

Why does the Monte Carlo estimate not depend on the dimension

The Monte Carlo Estimator for some event probability (e.g., for the "failure probability") is defined as follows: $$ \hat\mu = 1/N \sum_{i=1}^N I(\boldsymbol{x}_i), $$ where $\boldsymbol{x}...
2 votes
1 answer
53 views

How to verify the convergence rate in Monte Carlo simulation?

Given a iid random samples $X\sim N(\theta,1)$, we have a unknown parameter $\theta$ and its estimator $T_n=T_n(X_1,\dots,X_n)$. If we have strictly proved that the convergence rate is $$ |T_n-\theta|...
  • 432
2 votes
1 answer
31 views

No Variance in Monte Carlo Simulation

I wanted to do a Monte Carlo simulation for some of the electoral districts in my state in the upcoming US midterms. My methodology essentially was as follows: I have a list of populations and vote ...
  • 123
0 votes
1 answer
62 views

Metropolis - Hastings algorithm on a set of countable sequences

I want to simulate $\sigma$ from a measure $\pi(\sigma)$ through the Metropolis-Hastings algorithm, where $\sigma$ is a sequence of 0's and 1's on $S = \{0, 1\}^n$, the set of all sequences of 0's ...
  • 119
1 vote
0 answers
16 views

Standard errors of Monte Carlo plus linear combination

I'm using Monte Carlo to estimate some quantity $V(x)$. To get an approximation of $V'(x)$ I would use the following $$ V'(x)\approx\frac{V(x+h)-V(x-h)}{2h} $$ so I can simply evaluate it with two ...
0 votes
0 answers
14 views

In stochastic maximum likelihood and contrastive divergence, why do we sample from model distribution for partition function?

I have been reading the "Deep Learning" book from Ian Goodfellow. In a topic on Restricted Boltzmann Machines and how to train them, techniques like Stochastic Maximum Likelihood and ...
2 votes
2 answers
110 views

Monte-carlo simulation and extrapolation

I am reviewing some work and the proposed solution seems to me not to be reliable. But I fail to find any references or even consistently formulate why I think this approach does not work. Assume you ...
  • 174
1 vote
0 answers
33 views

Sampling according to a product of a known density and a probability function

Given a known density $p(x)$, I'd like to generate samples according to $q(x) \propto p(x) f(x)$, where $f(x)$ is some probability function, $\forall x f(x) \in [0, 1]$, e.g., a sigmoid function. One ...
  • 11
0 votes
1 answer
47 views

Monte Carlo Simulation of AR(1) in R but Demeaned

Suppose that I want to run $i=100$ simulations of the following AR(1) model over 10 time periods: $ X_{t,i} = 0.5(X_{t-1,i}-\bar{X}_{t-1})+e_{t,i} $ Here $ \bar{X}_t$ refers to the mean across the $i=...
1 vote
1 answer
46 views

Comparison of frequentist methods (say, averaged over Monte Carlo simulations) and Bayesian method

I have read a lot of questions with answers like this one, How do Bayesians verify their methods using Monte Carlo simulation methods?, which stated that Monte Carlo methods are not suitable for ...
  • 11
1 vote
1 answer
39 views

What is the probability of acceptance for this algorithm?

What is the distribution of $Y$ from using the Rejection Sampling algorithm? Repeat Sample $X$ with distribution function $F_X = (1-(1+x^\alpha)^{-1})1_{x\ge 0}(x)$ Until $X>x_0$, where $x_0$ is a ...
  • 284
0 votes
0 answers
29 views

How to calculate the accuracy of a yes/no Monte Carlo simulation such as "throwing stones in a pond"? [duplicate]

I have a simulation that returns "yes" or "no" for each iteration, and I measure the average number of "hits" over many iterations to estimate the likelihood of "yes&...
  • 556
0 votes
0 answers
39 views

Monte Carlo simulation or Bootstrap for determining sample L-moments estimates

I'm trying to estimate the sample L-moments of stations from the Annual Maximum Series of precipitation. The book by Hosking (1986a, 1990) recommend using Monte Carlo simulation in generating ...
  • 1
1 vote
1 answer
38 views

Estimate at which point a linear model hits a certain value (including probabilities)

I have a simple 1D set of datapoints with a trend, I want to estimate at which point $X_t$ (i.e., at which point in the future) the model will hit a certain threshold $Y_t$: I can fit a trendline to ...
1 vote
1 answer
83 views

How could proving the result of variance of estimator in Latin Hypercube Sampling

Ok i almost freak out of this!!!! i've to doing some presented about this paper (M.D.MCKAY,J.BECKMAN, W.J.CONOVER (1979). It's about comparing methods for selecting values (Random Sampling, Stratifed ...
0 votes
0 answers
15 views

Is there any Bayesian posterior sampling method where each draw is the solution of a random optimization problem?

Many (maybe all?) sampling methods could be phrased as the solution to a random optimization problem, but are there situations where that's the only way to express the method, or where the method ...
2 votes
0 answers
60 views

Bootstrap-based robustness of a test checking. Is resampling from sample distribution a good procedure?

I aim to check the robustness of 2 groups t-test when samples come from lightly skewed distributions. To approach the problem I though about performing a Montecarlo based robustness analysis using ...
1 vote
1 answer
33 views

Monte Carlo Gradient Estimation in Auto-encoding Variational Bayes

I am currently reading paper Auto-encoding Variational Bayes and I am not being able to understand the highlighted part in the screenshot below: I am not understanding why there is f(z) and what is ...
  • 161
1 vote
1 answer
74 views

How to simulate non-gaussian stochastic paths

(Edited to be clearer) I am trying to replicate simulating Geometric Brownian Motion (GBM) but instead of the stochastic increment following a normal distribution, I would like it to follow a ...
  • 13
8 votes
1 answer
147 views

Sample uniformly from unit square conditioned on sum and product

Consider the following conditional distributions: \begin{align} X, Y \stackrel{\text{iid}}{\sim} U(0, 1) &\mid X + Y = a & a \in [0, 2] \\ X, Y \stackrel{\text{iid}}{\sim} U(0, 1) &\mid X ...
  • 933
4 votes
1 answer
123 views

Markov Chain Monte Carlo with known normalisation

I would like to compute the expectation value $\langle O \rangle = \sum_x P(x) O(x)$ of some random variable over an extremely large sample space that I cannot simply exhaustively go through. Usually ...
  • 141
0 votes
0 answers
72 views

Metric to quantify randomness

I have an $L \times L$ matrix representing a $2D$ region. Each entry of this matrix is a real number lying in the closed interval [0,1]. I want to quantify how different is this from a similar $L \...
  • 1
5 votes
2 answers
573 views

Antithetic method for monte carlo when bounds of the integral are infinite

I wanted to apply Monte Carlo with antithetic variables to estimate $\int_{0}^{\infty} e^{-x} \,dx$ (equal to 1). I used this R code. ...
  • 53
0 votes
0 answers
202 views

Alternative to SimPy for continuous event simulation?

The python library, SimPy, is pretty explicit that it only handles discrete event simulation. Though it is theoretically possible to do continuous simulations with SimPy, it has no features that help ...
  • 1,728
-2 votes
1 answer
41 views

Can you give an example of Metropolis and Metropolis-Hastings algorithm?

I have studied many books and tried to understand both the Metropolis and Metropolis-Hastings algorithm. Everywhere it is written in the context of the Ising model or Lenard-Jones Energy. I am having ...
  • 1,528
2 votes
0 answers
54 views

Monte Carlo and function minimization (simulated annealing)

I posted this question on math.stackexchange, but did not get an answer and a limited amount of views, so I removed the question there and post it here. Recently I was asking myself some basic ...
  • 703
2 votes
2 answers
238 views

Markov Chain Monte Carlo doesn't converge

I have a synthetic measurement model that looks like this, $$ x(t) = e^{j u t \frac{4}{\lambda}}, $$ $\lambda$ is a constant. $$ z(t) = x(t) + n(t) $$ The quantity $j = \sqrt{-1}$, the imaginary unit. ...
  • 111
2 votes
1 answer
53 views

power analysis via Monte Carlo when effect size, means, and std unknown

Say you want to execute an experiment to see whether a treatment is better than a control and want to properly power your experiment. However, you have no beliefs a prior regarding the treatment's ...
  • 1,728
2 votes
0 answers
212 views

Hamiltonian Monte Carlo vs. "Metropolis-Hastings with a Hamiltonian step"

In Hamiltonian Monte Carlo the proposal is accepted with probability: $$ \alpha\left(\mathbf{x}_n(0),\mathbf{x}_n(L\Delta t)\right) = \min\left(1, \frac{\exp\left[-H\left(\mathbf{x}_n(L\Delta t),\...
  • 1,804

1
2 3 4 5
25