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
0answers
24 views

mixture of exponential and gamma distribution

I'm not particularly good at statistics and whatever elementary statistics I have had exposure to are now rusty. However, I am working on a problem that I am hoping to gain some insights into: My goal ...
1
vote
0answers
21 views

Comparing two types of confidence intervals in R using Monte Carlo: trouble understanding what's going on

In a course I'm taking, my professor includes the following code in his slides. I'm trying to understand what this code does, but perhaps more importantly I'm also trying to understand the ...
2
votes
1answer
49 views

Finding a right way of sampling 1/X knowing X follows the Moschopoulos distribution (sum of Gamma distribution with different (shape/rate parameters)

I can generate, with COGA R library (with rcoga function), a sample from a random variable ...
0
votes
1answer
14 views

Why set factor means to 0? Monte Carlo simulation

I am using structural equation modeling (SEM). My model is a simple mediation model with latent variables (each latent variable has 3 indicators). I want to run a Monte Carlo simulation to estimate if ...
0
votes
0answers
18 views

SVM random sampling permutation for imbalanced data: class & score weighted vs non weighted

I have been running the dataset of 2 classes with imbalanced numbers with python. Class one is 61, and class two is 66. When I built up the SVM model and did the random sampling permutation (monte-...
0
votes
1answer
38 views

Stochastic simulation, what to do after generate the initial random sample

I don't have a background in statistics but currently learning the basics. I want to do a stochastic simulation, which I assume here I should iterate my simulation multiple times. And I am stuck now ...
0
votes
0answers
12 views

A method to retrieve data from multivariate multiple time series

Hopefully someone can point me in the right direction. I am not experienced with Machine Learning and Monte Carlo, which I think I could/should use to solve this problem. I have some simulations, $N\...
0
votes
0answers
7 views

Jensen-Shannon Distance between two Stratified Sampled Tabular Datasets

I have 100 unique joint probability mass functions with a dataset noting the prevalence of instances from each joint pmf, like this: The total amount of instances in this case would be 16,073. Each ...
0
votes
0answers
16 views

Issues with sampling distribution over bootstrapped monte carlo simulations

Facebook posed an interview question (see ~49 min mark), how many days would it take (in days) to sample every user from a population of 1000, given that you sample 10 users/day each day? Analytically,...
0
votes
1answer
59 views

Monte Carlo approximation to find expected value of gradient square

I need to to calculate this term: $ \mathbb{E}\left[S(Y, L,\theta)S(Y,L,\theta)^\prime\right] $ Where $ S(Y,L,\theta) =\frac{\partial}{\partial\theta} l(Y,L,\theta) $ With $\theta$ = maximum ...
1
vote
1answer
76 views

Bayesian A/B testing and decision metrics

Say I need to test two different product features ({existing/control: blue} vs {new/treatment: red} font on webpage, for example), and need to boil my analysis down a to a single go/don't go criteria ...
7
votes
1answer
83 views

How can you combine control variates with antithetic variates

Is there a benefit of combining control variates with antithetic variates and if so how should it be done ? In my specific case I would like to add control variates to the formulation in this paper : ...
0
votes
0answers
59 views

Understanding the probability distributions behind a Monte Carlo experiment

A colleague and I are trying to model the expected maintenance cost/h (E[C/h]) of a component A on an aircraft over its life based on its reliability distribution. As the component fail, it's replaced ...
0
votes
1answer
27 views

comparing odds of two gaussians

I am trying to compare the odds of two events happening (what are the odds of one happening first). I know that the first one occurs in an average of 10 months with a sigma of 3 months. The second ...
1
vote
1answer
44 views

How to generate random points from a custom curve? [closed]

my question is how to generate random points ($\theta_1,\phi_1$) on a curve determined by : $ \arccos\left(\cos(\theta_1)cos(\dfrac{\pi}{6})+\sin(\theta_1)\sin(\dfrac{\pi}{6})\cos(\phi_1)\right) = \...
1
vote
0answers
26 views

Importance sampling vs acceptance-rejection [duplicate]

In both importance sampling as well as acceptance-rejection, we sample from some alternate distribution to simulate some expression from an original distribution of which we know the PDF. The ...
1
vote
0answers
17 views

Could I apply Spatial or simple Dropout before or after Adaptive Average Pooling or Global Average Pooling?

I'm working on a 1D CNN and I want to apply a Monte Carlo Dropout in order to get the mean of the predictions for each instance (as well as the variance, and entropy later on). The network topology ...
3
votes
0answers
26 views

Computationally + Statistically Efficient Unbiased Estimation of Chebyshev Polynomials of Expectations

Let $T_n$ denote the $n^\text{th}$ Chebyshev polynomial, defined by the recursion \begin{align} T_0(x) &= 1,\\ T_1(x) &= x,\\ T_n(x) &= 2x \cdot T_{n-1} (x) - T_{n-2} (x). \end{align} Now, ...
0
votes
0answers
8 views

Why does Off-Policy Monte Carlo Control exit when At != pi(St)

I am reading the second edition of Sutton and Barto's "Reinforcement Learning: An Introduction" and confused about the off-policy Monte Carlo part. The MC prediction and control algorithms ...
1
vote
1answer
28 views

Sampling from bivariate joint cumulative distribution function

Given two variable $x,y$, they are subjected to a joint probability density function: $ f(x,y) = \dfrac{1}{3}(3x^2 + 4xy + 3y^2)\\ 0\leq x \leq 1;0\leq y \leq 1 $ Obviously, its corresponding ...
2
votes
0answers
75 views

Distribution of sample p-values with a known true p-value

N. Taleb in his book Statistical Consequences of Fat Tails: Real World Preasymptotics, Epistemology, and Applications (Technical Incerto), page 349 (chapter 19: Meta-distribution of p-values and p-...
0
votes
0answers
22 views

How to generate uniformly distributed random numbers between 1 and 26 with a dice [duplicate]

I want to generate uniformly distributed random numbers between 1 and 26 with a dice: Is this correct: I have assembled the following algorithm using the Monte Carlo Method: {1, 2, 3, 4, 5, 6} {7, 8, ...
4
votes
3answers
177 views

Where did I go wrong in computing $P\left(Y-X < \frac{1}{8}\right)$ where $X \sim \mathcal{U}[0,1]$, $Y|X \sim \mathcal{U}[X,1]$?

I'm interested in an adaptation of Problem 1.3 from Mathematical Statistics by S.S. Wilks (second edition, 1962). I've added the self-study tag, however this is for ...
3
votes
2answers
93 views

How to calculate Quasi-Monte Carlo integration error when sampling with Sobol's sequence?

My understanding is that QMC integration using random sampling will converge with $O(\frac{1}{\sqrt{n}})$, while using Sobol's sampling will converge with $O(\frac{(\log{n})^d}{n})$. However I'm ...
0
votes
0answers
20 views

Combining importance sampling with enumeration for estimating expected value

I have a Monte Carlo simulation which, given an initial state, does some random stuff and outputs a scalar. Let this output be the random variable $Y$. The simulation takes place on an $K$x$K$ grid, ...
3
votes
0answers
46 views

Rao-Blackwellization in Black Box VI

In the paper, "Black Box Variational Inference," by Ranganath et al. (2013), the authors derive a Rao-Blackwellized estimator of the gradient of the evidence lower bound with respect to a ...
0
votes
0answers
21 views

How can I choose the best set of numbers between 1,000 different scenarios?

I run a Monte Carlo simulation that generates more than 1000 different scenarios. For each scenario, I run an optimization algorithm and get the switches' status. The status of switches is 0 (close) ...
2
votes
1answer
20 views

Notation in Bayesian hierachical models: what does * indicate [closed]

I am new to Bayesian Statistics and have a question about the notation *. What does it indicate in the context of hierarchical models ? Cheers
0
votes
0answers
19 views

Calculating Monte Carlo Standard Error (MCSE) with Effective Sample size

I want to calculate the Monte Carlo Standard Error of the mean and found this page: https://jrnold.github.io/bayesian_notes/mcmc-diagnostics.html. where naive MCSE is given by: $MCSE(\mu_{naive}) = \...
0
votes
1answer
24 views

Calculate the probability $P(S^2_{n-1}<s^2_{n-1})$ by Monte-Carlo simulation of the population distribution

i am struggling with the following problem, i have posted my attempt below, i am apparently supposed to get an answer of 0.632 with a random seed of 25 however i get a 1 as the answer. Please help i ...
0
votes
1answer
19 views

Particle Filter Derivation based on Forward Algorithm

I have been studying the particle filter, sequential monte carlo methods, and sequential importance sampling. I am interested in apply the particle filter equations to the standard forward algorithm: $...
10
votes
5answers
633 views

Estimate the Euler–Mascheroni constant ($\gamma$) by Monte Carlo simulations

The Euler–Mascheroni constant is defined simply as the limiting difference between harmonic series and the natural logarithm. $$\gamma =\lim_{n\to \infty}\left(\sum _{k=1}^{n}{\frac {1}{k}}-\ln n\...
1
vote
0answers
16 views

best loss function to fit model if observations contain montecarlo noise?

I have observations on the sphere and I'm trying to fit spherical-harmonic coefficients to best approximate and interpolate the observations. I'm using a solver library for non-linear least squares ...
2
votes
1answer
125 views

Monte Carlo or other general sampling approaches for conditional distributions?

Suppose we have a sampler – eg a Monte Carlo sampler – for the posterior probability distribution $p(x \vert D)$ of a quantity $x=(y,z)$ consisting of a pair of continuous and multidimensional ...
0
votes
0answers
33 views

What test to use in order to conclude that a number of seeds/experiments is enough?

When performing a series of replicas for an experiment with a stochastic component (e.g. a Monte Carlo experiment, training a machine learning model, etc.) and averaging the results - how can I ...
0
votes
0answers
18 views

Probabilistic Bethe Lattice Growth: Bayesian or Markov?

Is the growth of a probabilistic Bethe lattice considered a Markov process or a Bayesian network? Consider a Bethe lattice where the coordination number, z, where z is probabilistic and has maximum ...
0
votes
2answers
73 views

Monte Carlo simulation for generating random numbers from a distribution [closed]

Describe Monte Carlo simulation technique and mention its different steps. Also describe how would you generate random numbers from Weibull distribution with parameters (θ, β) . In this question, I ...
1
vote
1answer
49 views

Generating random variable from no closed-form marginal density [closed]

Suppose $u\sim N(0,I_p)$ and $Y|U\sim N(x(t),\sigma_e^2I_m)$, and the marginal distribution of $y$ is $f(y)=\int_u f(y|u)f(u)du$. $x(t)$ is composite function of $u$, basically $x(t)$ is a function of ...
1
vote
0answers
25 views

Generating random variable from mixture representation [duplicate]

Suppose $u\sim N(0,I_p)$ and $Y|U\sim N(x(t),\sigma_e^2I_m)$, and the marginal distribution of $y$ is $f(y)=\int f(y|u)f(u)du$. $x(t)$ is composite function of $u$. The problem is I need to generate ...
1
vote
1answer
36 views

Von Neumann acceptance-rejection technique for 2 or more variables

I need to generate random numbers that follows a given distribution f(x). Consider the following acceptance-rejection method: I generate two random numbers, $r_1$ and $r_2$, both from 0 to 1 that ...
1
vote
0answers
52 views

How does Particle Filters work?

I'm trying to figure out how particle filter works. Assume that I have selected propability function called $a \sim Gauss(\mu, \sigma)$. We call it proposial (Gaussian) Distribution. Then we have ...
0
votes
0answers
23 views

Do I need to know the distribution of the noise before I'm using Monte Carlo Sampling?

I'm going to use Particle Filter, which is a Monte Carlo Sampling. My simple question is: Do I need to know the distribution of the noise before I'm using Monte Carlo Sampling? Or can I just use a ...
0
votes
0answers
17 views

Integrating Monte Carlo Error Out of Likelihood Function

I am calculating the likelihood for a multivariate normal process in which the conditional mean in computed with Monte Carlo integration. I'm trying to account for the Monte Carlo error within the ...
6
votes
1answer
82 views

Estimate $E[X_1 | X_1>X_2>\cdots>X_k]$ with simulation

Suppose Random variables $(X_1,X_2,\cdots,X_k)$ are mutually independent, but not identically distributed. I want to estimate $E[X_1|X_1>X_2>\cdots>X_k]$ with simulation. I am wondering if ...
4
votes
1answer
73 views

How to reproduce the distribution of p-values in a Monte Carlo?

In whichever program (R preferred, but pseudo-code would do), could I get an idea of how Nassim Taleb simulated the distribution of p-values - I guess under the alternative hypothesis - on this MOOC? ...
1
vote
0answers
43 views

Calculation of Variance from a 2 order Taylor expansion - Expecting a better estimation than with 1st order Taylor expansion

I tried to compute the variance of a squared ratio of 2 Gaussians random variables (not the same means and standard deviations between both). I generate the samples by Monte-Carlo method. I expect ...
0
votes
0answers
15 views

Why do I get different values for MCSE and SD while I have good estimates in a simulation?

I am a newbie to this concept so I am not sure what exactly is causing this: I am doing a simulation study: 300 samples each which the size of 13000 to compare two estimators for the mean of the ...
3
votes
1answer
260 views

Trying to calculate confidence intervals for a Monte-Carlo estimate of Pi. What am I doing wrong?

I trying to implement the classic Monte-Carlo simulation of $\pi$ to better understand how confidence intervals (CI) decrease with more trials. There are a lot of examples of how to do the former, but ...
1
vote
0answers
80 views

What are some methods to choose a $n$ for Quasi Monte Carlo Integrations?

When studying "simple" Monte Carlo integration methods, such as Hit or Miss, Crude , Importance Sampling, etc. A common problem for first time learners is to choose a number $n$ of points ...
0
votes
1answer
25 views

Correct methodology using $g$-computation to estimate Average Treatment Effect on the Treated ($ATT$)?

I have a question about the $g$-computation methodology for estimating the Average Treatment Effect on the Treated ($ATT$) in the following article. The authors recommend estimating the $ATT$ by first ...

1
2 3 4 5
24