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

learn more… | top users | synonyms

3
votes
1answer
175 views

How to create a toy survival (time to event) data with right censoring

I wish to create a toy survival (time to event) data which is right censored and follows some distribution with proportional hazards and constant baseline hazard. I created the data as follows, but I ...
3
votes
1answer
47 views

Residual based bootstrap autoregressive series in MATLAB

I have defined the model as follows. Let $$y_1 = 0$$ and $$ y_i = \alpha + \beta y_{i-1} + \epsilon_i $$ for $i_2\ldots i_T$, where $\alpha$ and $\beta$ are the estimated coefficients and ...
0
votes
0answers
32 views

MonteCarlo simulations to test light curve variability

I have an average orbital light curve for a source, that is, binned count rate vs orbital phase, where the count rate are averaged over a number of orbit. I want to run MonteCarlo simulations to find ...
2
votes
2answers
318 views

Metropolis-Hastings Algorithm within Gibbs Sampling

I have this $f$ function below. $$ f(x_1,x_2)\propto \left(\dfrac{x_1}{x_2}\right)\left(\dfrac{\alpha}{x_2}\right)^{x_1-1}exp\left\{-\left(\dfrac{\alpha}{x_2}\right)^{x_1} \right\}I_{R^+}(x) $$ where ...
0
votes
0answers
6 views

How to keep a simulation from crashing when one application of the lrm function in rms cannot be fit? [migrated]

I am running a Monte Carlo simulation with 1000 iterations. Within each iteration, I am fitting a weighted logistic regression model using the lrm function from the Harrell's rms package. The model is ...
8
votes
2answers
399 views

Is Markov chain based sampling the “best” for Monte Carlo sampling? Are there alternative schemes available?

Markov Chain Monte Carlo is a method based on Markov chains that allows us to obtain samples (in a Monte Carlo setting) from non-standard distributions from which we cannot draw samples directly. My ...
0
votes
0answers
26 views

Marginal distribution MLE or MCMC

I'm a bit confused about how to maximise the following likelihood: $\mathcal{L}(k, \lambda, p) \sim \mathrm{Binomial}(n, k, p)\mathrm{Poisson}(\lambda, n)$ i.e. my probability is relatd to a number ...
10
votes
2answers
171 views

What is this trick with adding 1 here?

I was looking at this page on Lillefors test's Monte Carlo implementation. I don't understand this sentence: There is random error in this calculation from the simulation. However, because of ...
0
votes
0answers
20 views

cumulative uncertainty with time series predictive model

So I have a time-series with a set of variables a, b, c... and another measured variable y. What I do is using the initial state of a,b,c and y (at t0), I predict what y "should" be at the next time ...
4
votes
1answer
120 views

Monte carlo simulation in R

I am trying to solve the following exercise but I actually have no clue on how to start doing this. I've found some code in my book that looks like it but it's a completely different exercise and I ...
2
votes
1answer
61 views

Information theory without normalization

I'd like to know if there is a way anyone knows of for doing information theory with unnormalized densities. Specifically, I hav two log likelihoods $\phi(x), \psi(x)$ and so I can write: $p(x) = ...
0
votes
0answers
14 views

What sort of data would be appropriate to analyze under an MCMC method?

MCMC methods describe stochastic sampling but I'm not entirely sure the contexts in real datasets one would wish to apply MCMC methods. What kind of data could I gain insight into with MCMC methods?
2
votes
0answers
18 views

Comparison of MCMC methods? [closed]

Where can I find a good comparison of Gibbs, Metropolis, and Hybrid MCMC in R or Python? I have thus far found this ...
5
votes
1answer
71 views

Error bars on log of big numbers

I am calculating a quantity of the following form: $\mu = \log( \frac{1}{n} \sum_{i=1}^{n} e^{\phi(X_i)} )$ via MC. $X_i$ are iid and I can sample them. I want to give error bars\ confidence ...
1
vote
1answer
38 views

Where should randomness come from in the Monte Carlo simulations?

Suppose that I want to check how good OLS works in some specific environment using Monte Carlo. I can simulate $Y=X\beta+\epsilon$. What should I do in Monte Carlo simulations, do I simulate the whole ...
18
votes
6answers
2k views

Are all simulation methods some form of Monte Carlo?

Is there a simulation method that is not Monte Carlo? All simulation methods involve substituting random numbers into the function to find a range of values for the function. So are all simulation ...
4
votes
1answer
30 views

Sampling Order Statistics for Numerical Integration

This may be a stupid question. I want to do Monte Carlo integration over a region $$ {\int}_{D_{1} \geq D_{2} \geq ... \geq D_{m} \geq 0} g(d_1,\ldots,d_m) f(d_1) f(d_2) \cdots f(d_m) ...
2
votes
0answers
87 views

Simulation of Monte Carlo test

Using R, I am trying to simulate how the power of a Monte Carlo two-sample test for central tendency changes with sample size. However, my simulation results does not show power increasing with sample ...
1
vote
0answers
76 views

Combine several different sets of Linear Square Monte Carlo (LSMC) or Model Average

I am doing a project similar to LSMC (Linear Square Monte Carlo) for prediction. A Monte Carlo simulation engine is used to produce results, and a linear model is built on the same inputs and ...
1
vote
0answers
40 views

Monte-Carlo Simulations with multiple random variables

I have the following observation model : $y_i=x_i+a_i$, where $a_i$ is a Gaussian random variable whose mean is function of a uniform random variable $b_i$. I have designed, $\hat{x}_i$, an estimator ...
4
votes
1answer
44 views

What to do when rejecting a proposed point in MCMC?

I'm writing a simple Metropolis-Hastings MCMC algorithm. Every time a move gets accepted, the point is added to a list of accepted points. I wonder what exactly I should do when a proposed move has ...
0
votes
1answer
39 views

On approximating the MSE of an estimator

I'm trying to approximate the MSE of an estimator through simulation, in particular estimators of the form $$ \hat{\theta} = \sum_{i=1}^N w_i X_i $$ Where $X = \{X_1,...,X_N\}$ are i.i.d. samples ...
0
votes
1answer
27 views

Does Accept - Reject Algorithm Monte Carlo help fit a distribution to the data?

As far as I understand the Accept - Rejection Algorithm is used to help us simulate hard to simulate densities or unknown densities by first simulating an easy density and then accepting or rejecting ...
0
votes
0answers
19 views

Simulation of CI of amount of values in different intervals by adding noise to original data

I am having a hard time trying to solve this problem, so maybe some of you guys can sort it out. I have a large data set containing a value describing the thermal comfort in buildings called PMV. The ...
2
votes
0answers
26 views

Convergence of Monte Carlo sample average for arrays of random variables

Suppose $X_1$, $X_2$ are two independent real-valued random variables. Let $F$ be a continuous (unbounded) function from $\mathbb{R^2}$ to $\mathbb{R}$. Assume that the necessary measurability and ...
0
votes
0answers
184 views

How to interpret the results of bootstrapping and Monte Carlo simulation utilised to test lasso logistic regression results?

My situation: sample size: 116 binary outcome (32 events) number predictors: 42 (both continuous and categorical) predictors did not come from the top of my head; their choice was based on the ...
1
vote
1answer
39 views

Big Data Regression Coefficient Estimation

I am working on a very large data set (n = 6.5 million) and I am trying to come up with a simple linear regression between two variables. I am working in R and using a monte carlo style simulation to ...
0
votes
0answers
16 views

Need help with importance sampling over HUGE sample space

My underlying problem is fairly simple, but the sheer size is what is causing issues. I would like to use importance sampling, but am unsure about its implementation. Problem statement: We have $N$ ...
0
votes
0answers
34 views

Monte Carlo test for spatio-temporal randomness

I have a collection of discrete spatio-temporal observations $d(x,y,z,t)$ on the surface of a sphere. The data is sparse and is in the order of ~100 points, but there is a bimodal clustering of these ...
0
votes
0answers
29 views

How many models I need?

I am doing an estimation using a bunch of sparse data. Suppose that I have a 100x100 grid and 20 data is available on this 2D grid. One solution is to use a determiastic method and estimate the other ...
0
votes
0answers
36 views

Selection of failed fitting results in MC Simuation

I recorded a set of experimental rates $r = r(c,T,P)$ at 2 values of $c$ and >15 values of $T$. $r(c,T,P)$ obeys the following functional form: $$ r(c,T,P) = ...
2
votes
1answer
35 views

Run Many Small or a Few Big Simulations to Estimate the Mean?

I was just running some simulations on tossing a coin given certain conditions, to test out some ideas I had. I was trying to find the ratio $\frac{\mathtt{successful\ tosses}}{\mathtt{total\ ...
0
votes
2answers
105 views

Normal Distribution with random mean and standard deviation

When trying to code this in R, I'm getting very confused about what to do. Apologies if my terminology is incorrect but I would be grateful for any advice. The Problem: I have been given two normal ...
6
votes
3answers
209 views

Simulation involving conditioning on sum of random variables

I was reading this question, and thought about simulating the required quantity. The problem is as follows: If $A$ and $B$ are iid standard normal, what is $E(A^2|A+B)$? So I want to simulate ...
2
votes
0answers
30 views

Testing if points on a line are over/under dispersed

I have a series of about 1000 points on a chromosome and I want to know if they are clumped, over-dispersed, or neither. The chromosome can be viewed as a 1-dimensional. I've looked over some ...
0
votes
0answers
17 views

significant differences between time series - Monte Carlo simulation

I would like to test if there are significant differences between 3 time series. First, I thought to run a simple chi square test, then a Monte Carlo simulation. Comparing the two methods: P-values ...
0
votes
0answers
13 views

Restricted Boltzman Machine Non-Hidden Layer Approach

An RBM is defined by the joint probability distribution $$p({\bf x},{\bf h})=\exp(-E({\bf x},{\bf h}))/Z$$ where $$E({\bf x},{\bf h})=-{\bf h}^TW{\bf x} - {\bf c}^T{\bf x} - {\bf b}^T{\bf h}$$ ...
2
votes
0answers
197 views

Forward Filtering Backwards Sampling (FFBS) and Look-Ahead Bias

Assumptions / Context: Let's assume that I have data that can be modeled as a dynamic linear model. To estimate the parameters (e.g., covariance matrix of the state/system equation), I use a Gibbs ...
2
votes
1answer
36 views

Refining Monte Carlo predictions using observed measurements

I'm trying to build a monte-carlo simulation that can revise it's distribution of outcomes of a project based on observed measurements after the project has started. I have a few questions about the ...
2
votes
0answers
38 views

Monte Carlo simulation of investment account

I'm trying to estimate performance of an investment account over 20 years. The question is, have I set up the Monte Carlo simulation correctly? I've used Excel. I've assumed 8% average return and 13% ...
1
vote
1answer
47 views

Monte Carlo computation of expectation when there is dirac delta

Let $Z \sim N(0,1)$ and let $Y=Z$. Suppose I wish to perform the following weird computation: $f(z)=\int f(z|y)f(y)dy=E_Y[f(z|y)]$ and then use Monte Carlo to estimate $E_Y[f(z|y)]$. The problem is ...
0
votes
1answer
145 views

Particle filter (sequential Monte Carlo) for a non-Gaussian hierarchical model

I have the following, which I am attempting to model with a particle filter. \begin{align*} y_{i,t}&\sim\mathrm{Poisson}\left(\lambda_{i,j,t}\right)\\ ...
6
votes
2answers
89 views

Seeking a continuous, parametric, bimodal sampling distribution for proportions

I am seeking a parametric probability model whose pdf has the following characteristics: (1) it is supported on a variate axis that is bounded between 0 and 1; (2) it is continuous; and (3) it is ...
0
votes
0answers
56 views

Demand Forecasting : Montecarlo Simulation

I am trying to build a demand forecasting model for human resource team. I have thought of using monte carlo simulation method to do it. Is it the right technique for it? Has anyone used it to ...
5
votes
1answer
52 views

Advantage of multiple simulations in old-fashioned Monte Carlo?

The spirit of this question comes from "Ordinary Monte Carlo", also known as "good old-fashioned Monte Carlo" Suppose I have a random variable $X$, with $$\mu := E[X]\\ \sigma^2:=Var[X] $$ Both are ...
1
vote
0answers
26 views

Simultaneous multiple perturbations in Markov chain Monte Carlo

I'm coding a McMC algorithm for geophysical applications. Using the Metropolis–Hastings scheme to accept/reject the proposed models is something that I thought I understood completely, but I don't. ...
1
vote
0answers
33 views

pairing algorithm in R

I have two sets of elements M and N, and a scalar-valued distance/similarity function between one element from M and one from N. The problem is to generate a set of pairs (one item from M and one ...
0
votes
0answers
23 views

Is Monte Carlo simulation more appropriate than parametric tests for constructing confidence intervals for weighted means?

A colleague suggested that Monte Carlo simulation should be preferred for constructing confidence intervals for weighted means calculated from a sample. How and why exactly might Monte Carlo perform ...
0
votes
1answer
14 views

Uncertainty analysis

Here is my situation. I am trying to predict the 'entire' distribution of the dependent variable, not just the mean( or conditional mean). Does it then make sense to seprateley predict quantiles of ...
1
vote
0answers
30 views

Question about Hybrid Monte Carlo

In a Hamiltonian system, the Hamiltonian is always preserved, but in HMC algorithm, new state is accepted by probability $\min(1,\frac{\exp(-H_{new})}{\exp(-H)})$, I think increase or decrease in ...