Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [monte-carlo]

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

0
votes
0answers
7 views

Simulation in Stata: instrumental variables with endogenous nonlinear regressor

I'm doing an exercise from Microeconometrics Using Stata, by Cameron and Trivedi, Exercise 11 of Chapter 6 (page 204). "When an endogenous variable enters the regression nonlinearly, the obvious IV ...
0
votes
1answer
12 views

Direct/indirect sampling of conditionals in Gibbs sampling

I have some problems understanding the definition of Gibbs sampling. Let us take into consideration a bivariate distribution \begin{equation} \pi(x_1,x_2): S \subset \mathcal{R^2} \rightarrow \...
0
votes
0answers
5 views

How to do such Monte-Carlo operation in SPSS? [on hold]

Say i have a set of 8 values (4.34, 4.32, 4.35, 4.45, 4.25, 4.09, 4.29, 4.46). Step 1: I would like SPSS to find the CV of two randomly sampled values . And then repeat this process for 10000 times ...
0
votes
0answers
18 views

Calculating empirical p-value for Anderson-Darling test

I have the data $x_1,\ldots,x_n$. First, I fit the stable distribution to this data and obtain a vector of estimated parameters $\hat{\theta}$. Now, I want to use Anderson-Darling test for stable ...
0
votes
0answers
6 views

Run a Monte Carlo simulation in R with violated exogeneity assumption

I want to showcase an OLS estimator in which the explanatory variable is correlated with the error term. Obviously, in this case the OLS estimator is biased. My goal is to simply proof this in R with ...
1
vote
0answers
21 views

Monte Carlo integration for Bayesian parameter estimation

I want to determine the credible interval of a quantity $\theta_1$. I want to make this estimate using observed data by assuming a certain model which depends on $\theta_1$ as well as about n=15 ...
0
votes
0answers
18 views

MCMC chains and Convergence

This may be a dumb question to ask, but I was doing MCMC sampling of my parameters $\alpha_1, \ \alpha_2 .... \alpha_{50}$, where $\alpha_i$ denotes for the same parameter $\alpha$ at the time i. I ...
0
votes
1answer
38 views

Monte Carlo Drawing Balls Probability Question in R [closed]

Disclaimer: I'm very new to functions in R and really to coding in general. I'm trying to answer the following question using a simple Monte Carlo sampling procedure in R: An urn contains 10 balls. ...
0
votes
1answer
17 views

Monte Carlo Sim for Coin Toss in R

I'm trying to answer the following simple probability question but using a monte carlo type simulation function in R: A fair coin is flipped 100 times. Find the probability that the number of times it ...
2
votes
1answer
25 views

likelihood of latent state space model

Im trying to calculate the likelihood function of my latent state space model. My model has Poisson observations $p(y_t|\beta_t;x_t) \sim \mathcal{Poiss}(z)$. where $z$ is the rate of the poisson ...
1
vote
1answer
12 views

How to simulate a Wilson-Score confidence interval for use in Monta Carlo simulations?

I would like to simulate sample proportions for use in a series of Monte Carlo simulations. The rbinom function produces biased results because sample proportion are sometimes near zero or actually ...
0
votes
0answers
6 views

Parallelizing Rollout/Simulation phase of Monte Carlo Tree Search

I have a Monte Carlo Tree Search implementation that I need to optimize. So I thought about parallelizing the rollout phase. How to do that? Are there any python modules etc that you would recommend?
1
vote
1answer
33 views

Books for self-learning about statistic Simulation?

Preferably an introductory book, i.e. for undergrad (or notes or something like that) that explains concepts with detail and with lots of examples, without losing the formality. That covers the ...
1
vote
0answers
39 views

Lottery with known EV and standard deviation. Probablity of positive ROI after x trials?

Lottery with the following payout table: **Payout** **Frequency** 0x 0.59992 1x 0.34992 5x 0.04982 1000x 0.00035 ...
0
votes
0answers
30 views

Feature Selection using Monte Carlo Tree Search

Trying to tackle the problem of feature selection as an RL problem inspired by this paper here: https://hal.inria.fr/inria-00484049/document So I used Monte-Carlo Tree search for this problem, where ...
0
votes
1answer
28 views

How to Show that a Distribution is a Stationary Distribution for Metropolis-Hastings? [closed]

For an Ising Model with a (2L+ 1) by (2L+ 1) square grid of magnetic particles, show that $$\pi(\xi)=\frac{1}{Z_\beta}e^{\beta\sum_{x,y=x}{\xi_x\xi_y}}$$ Is indeed a stationary distribution for the ...
0
votes
0answers
19 views

Creating a monte carlo simulation?

I am given two columns of data that are normally distributed with a mean of zero and I need two do a t-test for a random sample of 20 pairs. What I am confused about is where does the sample come from....
3
votes
1answer
320 views

Variance of Monte Carlo integration with importance sampling

I am following these lecture slides on Monte Carlo integration with importance sampling. I am just implementing a very simple example: $\int_{0}^{1} e^{x}dx$. For the importance sampling version, I ...
0
votes
2answers
74 views

Expected outcome of a process following a uniform distribution [closed]

A gambler is playing a game of roulette. There are $37$ possible outcomes, each numbered from $1$ to $37$. The probability of rolling any outcome is the same for each outcome. One game of this ...
0
votes
0answers
27 views

Use Monte Carlo methods to approximate the probability that a line joining 2 random points in a ring 1 < x 2 + y 2 < 4 does not cross the inner circle

My method so far is to fix one point (polar coordinates (r,0)) and then generate a large number of points (polar coordinates (r,a))) in the ring and accept these points if their angle 'a' satisfies ...
0
votes
0answers
28 views

Chi Square and Fisher’s exact test with Monte Carlo

SPSS can’t calculate Exact test for 4x7 table of my data so I did it with Monte Carlo. The output is given below. Considering the rules of Chi-square, I should use Fisher’s $p$-value for the result of ...
1
vote
1answer
40 views

MCMC - target distribution, proposal distribution and likelihood function?

i have just started out in MCMC and I am not sure if I fully understand the concepts of MCMC with respect to the above terms. Let me try to explain that in my own words and include some thoughts / ...
0
votes
0answers
12 views

Approximating a proxy to the mutual information with Monte-Carlo sampling and Restricted Boltzmann machines

I first asked this in the physics community, to no avail, so now I'm here! I've been reading through Koch-Janusz and Ringel's, "Mutual Information, Neural Networks, and the Renormalization Group" (...
1
vote
2answers
158 views

importance sampling from posterior distribution in R

Today I read that Importance Sampling can be used to draw posterior distribution samples just like Rejection Sampling. However, my understanding of Importance Sampling is that its main purpose is to ...
1
vote
1answer
164 views

Naive Monte Carlo, MCMC and their use in Bayesian Theory

So let's suppose I have a random variable X which follows a PDF fX(x) which is known. I can use the Naive Monte Carlo method (...
1
vote
0answers
27 views

Efficiently estimating the area of an unknown number of regions given that one sample is enough to compute the area of a region

(Apologies if the title may sound confusing - I'm not a native English speaker) This problem is a (very coarse) simplification of a research project I've been working on. I hope my attempt at ...
2
votes
1answer
38 views

What property must a RNG have to be used in Monte Carlo simulations?

For example, every cryptographically secure pseudo-random number generator (CSPRNG) is required to satisfy the next-bit test and withstand "state compromise extensions". This makes me wonder what ...
2
votes
1answer
63 views

How to approximately sample an unknown non-parametric joint distribution given a complete set of partial conditional distributions?

This question is related somewhat to Bayesian networks. In a BN, you have a DAG (directed acyclic graph). By supplying the root nodes with a sample, you can then follow the directed arcs to sample ...
1
vote
1answer
49 views

MCMC autocorrelation

I have a MCMC simulation that tries to fit a line to a linear set of data. The auto-correlation is very high for the slope parameter (~0.9), and low (~0.05) for the bias What does a high auto-...
0
votes
1answer
38 views

Relation between Uniform distribution, Metropolis Algorithm, and Symmetric Proposal Distribution

I am having some confusion over the Metropolis algorithm. Let $g(x|y)$ be our proposal distribution for the algorithm. For the Metropolis, $g$ must be symmetric (from Wikipedia). In the discrete case, ...
0
votes
0answers
7 views

two part regression confidence interval

I am trying to predict amounts of data that goes through a few stages, let's call them stages A,B,C. Now I have data on the amounts from A to B and from B to C, so i created two regression models for ...
2
votes
0answers
60 views

Numerical examples proving and disproving the optimal scaling heuristic by Roberts et al

Let $d\in\mathbb N$ with $d>1$ $\ell>0$ $\sigma_d^2:=\frac{\ell^2}{d-1}$ $f\in C^2(\mathbb R)$ be positive with $$\int f(x)\:{\rm d}x=1$$ and $g:=\ln f$ $Q_d$ be a Markov kernel on $(\mathbb R^...
1
vote
2answers
65 views

in reinforcement learning off policy mc may not work

I noticed off-policy mc prediction(or control) will not work, as being descripted by boxed algorithm in page 110 of the book "reinforcement learning an introduction". The weight W should before C's(...
0
votes
0answers
15 views

Confidence interval using Monte Carlo procedure for modelled data

In a project, I have to model volumes data using two parameters given by a dataset. I have a global results for it but I need to construct Confidence Interval around the value in order to give ...
2
votes
1answer
78 views

Symmetry group in posterior distribution/inference

Here's a scenario: Suppose I collect a dataset $\{x_i\}_{i=1}^k\subseteq\mathbb R$ of data points $x_i$, and I wish to explain it using a mixture of two Gaussians; assume the unknown parameters are ...
5
votes
0answers
85 views

How does the celebrated result about the diffusion limit of the Random Walk Metroplis-Hastings algorithm help us to find the optimal scaling

Let $d\in\mathbb N$ with $d>1$ $\ell>0$ $\sigma_d^2:=\frac{\ell^2}{d-1}$ $f\in C^2(\mathbb R)$ be positive with $$\int f(x)\:{\rm d}x=1$$ and $g:=\ln f$ $Q_d$ be a Markov kernel on $(\mathbb R^...
0
votes
0answers
27 views

Monte Carlo actor critic algorithm

Has anyone implemented Monte Carlo on policy actor-critic algorithm or know a codebase online and can share it? P.S: I am not sure if this is the right place to post this, sorry for that.
0
votes
0answers
22 views

Monte Carlo simulation from autocorrelated empirical distribution

So I'm trying to perform a Monte Carlo simulation an empirical distribution of log-return time series data. However, Ljung-Box test indicates that there is significant autocorrelation at multiple lags....
2
votes
0answers
11 views

Visualization of unbiasedness of high dimensional paramter estimates

Assume a statistical model $f_{\theta}(X)$ that allows to estimate a parameter vector $\hat{\theta}\in \mathbb{R}^p$ from data $X$ and assume that $p$ is high dimensional (you may assume something ...
5
votes
0answers
37 views

Advantages of using t-value as test statistic in permutation tests?

I'm working with some permutation tests where my main aim is to evaluate a treatment effect, and I have a question about choice of test statistic. I've seen that some use β for the variable of ...
0
votes
0answers
26 views

confidence limits on model parameters : Monte carlo vs chi-square

I performed a non-linear fitting on experimental datas to determine model parameters using least square methods ($\sigma$ is the same for all the experimental datas). And now, I want to determine ...
1
vote
0answers
25 views

sampling mechanism for correlated variables [closed]

Assuming Y=f(x1,..,Xn), while doing Monte Carlo simulation, I need to sample x1, ..xn based ...
1
vote
0answers
23 views

Intersecting a linear and exponential with uncertain parameterisations

I'm trying to forecast the point at which two trends will intersect. One is exponential, the other decreasing and linear. In particular, I want to do this with a distribution over the parameters of ...
2
votes
1answer
41 views

First passage time distribution via Monte Carlo simulation

The problem: I want to assess the first passage time distribution via Monte Carlo Simulation, where the first passage time is defined as: $$\tau=\inf\left\{t: X_t > l\right\}$$ where $l$ is the ...
0
votes
0answers
46 views

Sequential monte carlo : A simple example

I am attempting to understand how to implement the sequential monte carlo algorithm using this article. Here are the steps that the author proposes: Example problem: Say I have a self moving robot ...
0
votes
0answers
26 views

Approximation of the upper bound on the expectation of log sum of exponentials

I am having some trouble replicating the results in Guillaume Bouchard's paper, Efficient Bounds for the Softmax Function and Applications to Approximate Inference in Hybrid Models, where he discusses ...
3
votes
2answers
83 views

Unbiased Estimator for $\log\left[\int p(x\mid z)p(z) \, dz\right]$

The naive Monte Carlo estimator is an unbiased estimator for $\int p(x\mid z)p(z) \, dz$, is there a convenient unbiased estimator for $\log \left[\int p(x\mid z)p(z)\,dz \right]$
6
votes
1answer
154 views

Optimal scaling of the Random Walk Metroplis-Hastings algorithm and the speed measure of the limiting diffusion

Let $d\in\mathbb N$ with $d>1$ $\ell>0$ $\sigma_d^2:=\frac{\ell^2}{d-1}$ $f\in C^2(\mathbb R)$ be positive with $$\int f(x)\:{\rm d}x=1$$ and $g:=\ln f$ $Q_d$ be a Markov kernel on $(\mathbb R^...
1
vote
0answers
20 views

Assumptions on the target density in the RWM optimal scaling paper by Roberts, Gelman and Gilks

In the famous paper Weak Convergence and Optimal Scaling of Random Walk Metropolis Algorithms by Roberts, Gelman and Gilks, at the bottom of page 116, the supremum of the third derivative of $\ln f$ ...
1
vote
2answers
73 views

Variance of Rao Blackwellization for Monte Carlo Estimate of Expectation

from https://arxiv.org/pdf/1401.0118.pdf If we have a function $J(X,Y)$ of two random variables $X$ and $Y$ and we want to compute the expectation $\mathbb E_{p(X,Y)}[J(X,Y)]$. We define $\hat J(X)= ...