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
11 views

Sampling from sample (and not from population, and not from distribution)

Say I have a large model with input parameters that are themselves the result of large models that are long to run. I am interested in the uncertainty of the large model results, and want to estimate ...
1
vote
0answers
16 views

Convergence Proof of First Visit Monte Carlo Control

I am currently trying to find a formal proof of convergence for the Monte Carlo Reinforcement Learning Methods described in Sutton,Barto's Book "Reinforcement Learning - An Introduction" , Section 5. ...
1
vote
0answers
14 views

Stopping rule in a Monte Carlo simulation for a convergent sequence of unknown random variables

Given an unknown random variable $X: \Omega \mapsto [a,b] \subset \mathbb{R}$, let us imagine we want to estimate $\mathbb{E}(X)$. We can sample sequentially as many times as desired, let us say $m$ ...
2
votes
1answer
22 views

Proper way to generate random seeds for Montecarlo runs [closed]

I am running a SIMULINK model which has noise additions. At this moment we have a variable called seed which is initialized at zero. seed = 0; Then for every ...
0
votes
0answers
8 views

Determine confidence in estimate from past estimates

I have a population on the order of 10,000 samples. These samples represent individual estimates of a variable, and for each estimate I also have the actual value of the variable. For each sample I ...
0
votes
0answers
9 views

How to check if a sequence's subsequences (trigrams) are random using a Monte Carlo experiment?

Let's say I have a process that produces sequences. I might have another process (or processes) that will add their own output to the data sequences at random points. To check if a subsequence (any ...
3
votes
2answers
110 views

Importance sampling estimation of power function

Problem Suppose we are given $\text{Poisson}(\theta)$ model, and the null hypothesis is as follows: $$ H_0 : \theta = 0.1 \ \ \text{vs}. \ \ H_1 : \theta < 0.1 $$ Suppose we take sample of $n=...
0
votes
1answer
26 views

Deriving mu and sigma from the log normal distribution given the expected mean and variance?

I'm attempting to sample from the log normal distribution using numbers.js. Looking at Wikipedia it looks like I need to solve for mu and sigma. So if I want the mean of the samples to be 10 then I ...
1
vote
0answers
29 views

Symmetric decomposition of a covariance matrix that is not given explicitly

I am implementing a Monte-Carlo method that requires decomposition of a $k \times k$ covariance matrix $\Sigma=A^TA$ where the dimensionality of $A$ should also be $k\times k$. No further constraints ...
1
vote
1answer
78 views

Estimating When A Time Series with Random Spikes Crosses a Threshold for the First Time

tl;dr Is there a way to estimate when a random spike in a time series would cross a threshold for the first time? The following is data of my performance in the game Super Hexagon, whose goal is to ...
1
vote
0answers
24 views

Numerically calculating the integral of the discrepancy between the empirical and theoretical distribution functions

Having a sample of observations, $x_i, i=1,..,n$, to test the null hypothesis stating that the data follows a specific distribution $F_0 (x)$, the Cram\'{e}r-von-Mises goodness-of-fit test statistic ...
0
votes
1answer
17 views

Local Significance test for composite anomalies

Suppose I have the following 20 points: ...
2
votes
1answer
39 views

Monte Carlo test for statistical significance of typhoon passage frequency

This question is related to this post: https://stackoverflow.com/q/56288002/6638232 Basically, I am trying to perform a significance test using Monte Carlo simulation but I am having a problem in ...
1
vote
0answers
14 views

Computing slope of data with correlated errors using Monte Carlo method

I have $N$ pairs of $(x,y)$ measurements. I have the (estimated) uncertainty of each $y$ value as well as the correlations between each pair of $y$ values. I want to know whether there is a ...
1
vote
0answers
26 views

Literature on design of importance sampling distribution using MLE or point-estimates of highest modes

Suppose I have many distributions $p_i(\theta)$ I wish to take expectations over $$\mathbb{E}_{p_i}[\mathbf{f}_i(\theta)]$$ where the $\mathbf{f}_i$ are vector-valued. In my problem the $p_i$ share ...
1
vote
0answers
11 views

sample size to detect variability in a sample

I have a sample of continuous data which I use to build a random forest model. Now I want to determine, how many additional samples I would need to improve the prediction (reduce the RMSE by a certain ...
11
votes
2answers
142 views

How do Bayesians verify their methods using Monte Carlo simulation methods?

Background: I have a PhD in social psychology, where theoretical statistics and math were barely covered in my quantitative coursework. Through undergrad and grad school, I was taught (much like many ...
2
votes
1answer
50 views

Metropolis-Hastings - interpreting the transition kernel: alpha*proposal

I thought I had great intuition and mathematical understanding of the Metropolis-Hastings algorithm, until closer inspection... as I started compiling my notes, I realized I do not understand the ...
0
votes
0answers
5 views

Generate scenarios of multiple related parameters

Assume I have three industry datasets: interest rates, inflation and unemployment. Data contains information of last ten years and it's monthly. Now, I would like to create N possible scenarios of ...
0
votes
0answers
34 views

error of Monte Carlo estimate of root mean square speed (vrms) of ideal gas

I am trying to use Monte Carlo method to estimate the oot mean square speed (vrms) of an ideal gas, the speed of an ideal gas follows the Maxwell-Boltzmann distribution: $$p(v)= \frac{4}{\sqrt {\pi}}(...
2
votes
1answer
110 views

sequential Monte Carlo sampler, why the extended space and backward kernel?

Hello cross validated, I am currently studying sequential Monte Carlo samplers. My current understanding is as follows: We are interested in the marginal distribution of some sequence of joint ...
1
vote
1answer
39 views

Proving the Accepted Samples from Rejection Sampling follows our Posterior Distribution

I get confused how the author gets to line $(1)$ using the indicator functions. If someone can explain this to me or give me a hint that would be greatly appreciated. Thanks! Define the following: ...
0
votes
0answers
15 views

Cholesky decomposition in control variates method (Monte Carlo variance reduction technique)

The control variates method, used as a variance reduction technique for Monte Carlo simulations, takes one new variable $t$, correlated to the random variable $m$ to estimate (using the same notations ...
0
votes
0answers
16 views

True covariance matrix in Monte Carlo simulation?

In a linear model, such that Population model is $y_{it}=\ {\beta_{i1}f}_1+{\beta_{i2}f}_2+\cdots{\beta_{ik}f}_k\ +\ \varepsilon_{it} , i = 1,2,3...,p$ and $t=1,2,3,...T$ and $\mathrm{\Sigma_y}\ =\ ...
1
vote
2answers
57 views

How do we reuse and store the output of an MCMC?

For many Bayesian models, the posterior distribution is intractable... a solution is then to sample points from this unknow distribution with a Markov Chain Monte Carlo (MCMC). But at the end, how do ...
0
votes
0answers
11 views

Monte Carlo Simulation (or bootstrapping ) mutually exclusive events

Say event A probability of happening in a day is 1%; event B probability of happening in a day is 5%. Assuming they are independent, if I want to build a simulation model to simulate 1000 days, and ...
1
vote
0answers
41 views

Population Monte Carlo Algorithm using L2 Distance Measure/ Likelihood Distribution

I am currently struggling with some concepts of the Population Monte Carlo Framework. Initially, I came across this set of algorithms as I am currently trying to infer parameters from a 7D ...
0
votes
1answer
25 views

MCMC changing multiple parameters

What is the standard way of drawing multiple parameters for a MCMC run? Say I have 9 parameters, what is the most efficient method to get all parameters to explore their distributions properly?
1
vote
0answers
17 views

Error bars of Monte Carlo expectation with correlated samples

I will try to phrase the question in a general way, then give my specific case as an example. Suppose I want to evaluate $Q = \mathbb E \left[ f\left(X, Y \right) \right]$ where $X$ and $Y$ are ...
-1
votes
1answer
69 views

INAR(1) simulation in R [closed]

How do we simulate values of $Y_t$ for a maximum value of $t=60$ when we have an INAR(1) process as follows: $Y_t=ρ^*Y_{(t-1)}+R_t$ where $t$ takes values from 1 to 60, $ρ=0.3,0.8$, $ρ^*$ is ...
0
votes
0answers
25 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
14 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
32 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 ...
1
vote
0answers
24 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
23 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
40 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
62 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
30 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
33 views

How to simulate sample proportions near or at zero in a Monte Carlo simulation?

I am running a chain of Monte Carlo simulations to estimate uncertainty in some model estimates (which are derived from a series of estimates). An important variables used in one of the steps is a ...
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
43 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
44 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
35 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
30 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
20 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
372 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
76 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
29 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
57 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
70 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 / ...