Questions tagged [accept-reject]

Use this tag for accept-reject sampling methods. These are also known as rejection sampling methods. These methods sample a random variable from a dominating measure (h) and accepts the draw if an auxiliary random variable (a uniform) is less than the desired measure (g), so accept the draw if u<g. Otherwise draw another pair. You can think of this as sampling on a space with 1 additional dimension where the additional dimension is uniform under g.

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

Is this a correct way of resampling the MCMC chain?

Please understand I am not familiar to the statistical languages. All I want is to resample a probability distribution from an existing sample drawn from another distribution using MCMC, without ...
Hojin Cho's user avatar
  • 131
1 vote
0 answers
109 views

Tightness of rejection sampling

Hello. I'm studying the Monte Carlo Statistical Method textbook by Robert and Casella. I have a question about exercise problem 30 in Chapter 2. I've already solved parts (a)-(c), but I'm having ...
Kim Gwang Woo's user avatar
8 votes
3 answers
260 views

Sampling from $P(x) \propto \cosh^{m}(a x) e^{-x^{2}/2}$

Is there an efficient algorithm to draw samples $x \sim P(x)$ from the PDF: $$ P(x) \propto \cosh^{m}(a x) e^{-x^{2}/2} $$ where $a\ge0$ is a real parameter, and $m$ a positive integer? Since this is ...
a06e's user avatar
  • 4,420
1 vote
0 answers
42 views

The lower bound of acceptance rate for independent Metropolis–Hastings algorithm

In comparison with rejection sampling, for independent M-H algorithm, if there is a constant C such that$$f(x)=\frac{p(x)}{\int p(x)dx} \leqslant Cg(x)$$ for all x, then the acceptance rate is at ...
向洋杉's user avatar
3 votes
0 answers
117 views

Random correlation matrices

Suppose that we simulate random $n\times n$ correlation matrices by assigning iid $U(-1,1)$ random variables to all off-diagonal entries and accept matrices $\boldsymbol\Sigma$ that are positive ...
Jarle Tufto's user avatar
  • 10.9k
2 votes
1 answer
100 views

Proof of Rejection Sampling: Flawed reasoning about continuous random variables

I recently studied Rejection Sampling as part of one of my University courses. When justifying why Rejection Sampling makes sense (to "prove", so to speak, that samples drawn using Rejection ...
aren't eistert's user avatar
1 vote
0 answers
19 views

Accept Rejection Mante carlo simulation and simulation mean [closed]

I read that in Monte Carlo simulation results, the larger the sampling, the mean sample results from the simulation close to normal distribution, but does this also apply to Monte Carlo accept ...
Bun's user avatar
  • 11
1 vote
1 answer
47 views

Rejection Sampling Proposal vs Target Confusion

My understanding is that rejection sampling for some target distribution $p_{X}(x)$ and proposal distribution $\tilde p_{\tilde X} (x)$ follows the process below: If there is some scaler $c$ such ...
Ator's user avatar
  • 33
12 votes
4 answers
2k views

The lack of evidence to reject the H0 is OK in the case of my research - how to 'defend' this in the discussion of a scientific paper?

It is probably best if I give an example because I would like to be well-understood, and I do not know how to deal with the following situation: I analysed, using the Kruskal-Wallis test (post hoc ...
crtnnn's user avatar
  • 103
1 vote
1 answer
242 views

Is Metropolis-Hastings ever more efficient than rejection sampling in 2 dimensions?

I know that Metropolis-Hastings is an MCMC (Markov Chain Monte Carlo) method that is very useful in higher dimensions. The advantages it has over something like simple rejection sampling are that ...
Aditya S's user avatar
0 votes
1 answer
87 views

Acceptance-Reject to generate a distribution proportionate to Inverse Gamma and truncate Cauchy distribution

Assume $Y_{ij} \sim N(\mu_i,\sigma^2)$, $\mu_i \sim N(\eta,\tau^2)$ for $i=1,2$ $j=1,\cdots,n_i$ and prior $\pi(\eta,\tau^2,\sigma^2) \propto Ca^+(\tau^2,0,b_{\tau}) \times Ca^+(\sigma^2,0,b_{\sigma})$...
Justin 's user avatar
1 vote
1 answer
25 views

Drawing samples from a joint distribution defined by limits?

Assume that I want to efficiently draw samples from a (for simplicity bivariate) joint distribution $p(x,y)$, with $x \in \mathbb{R}$ and $y \in \mathbb{R}$. I don't have a closed-form expression for $...
J.Galt's user avatar
  • 555
1 vote
1 answer
42 views

Rejection ABC: Connection with Rejection Sampling?

I am trying to understand the link between (rejection) ABC and rejection sampling. For example, this paper states: Approximate Bayesian Computation (ABC, Sisson et al., 2018) is centered around the ...
Hermi's user avatar
  • 135
0 votes
0 answers
40 views

Acceptance-rejection problem confusion

My professor has given me a random variable $X$ with a probability density function: $$f(x) = cos(x), 0 ≤ x ≤ π/2.$$ I have to write an acceptance-rejection algorithm to simulate values of $X$ based ...
kitty123's user avatar
0 votes
1 answer
92 views

Estimating the integral $\int_{0}^\infty x^4 e^{-2x}\,dx$

We have been given a random variable having a Gamma distribution as shown below: Using the accept-reject algorithm, we are supposed to sample from the Gamma distribution using exponential as the ...
Aswath Gopinath's user avatar
0 votes
1 answer
281 views

How to found the bound $M$ in rejection sampling when the differentiation of the ratio of target and proposal density is not possible?

Suppose we have the following PDF of X: $f(x)=\frac{1}{4}(2-x)\;;-1\leq x\leq 1$ We want to use $g(x)\sim\mathrm{Unif}(-1,1)$ as a proposal density to generate samples from $f(x)$ using a rejection ...
DevD's user avatar
  • 115
1 vote
1 answer
191 views

Perfect sampling and inverse transform sampling

Firstly, looking at the discussion https://math.stackexchange.com/questions/241315/three-ideas-of-perfect-sampling, the term "perfect sampling" does not seem adequate, since there are ...
Ludwig's user avatar
  • 63
0 votes
0 answers
62 views

Rejection Sampling Kurtosis and Number of Iterations

I tried to implement a rejection sampling method in python based on something explained during class. The target distribution is the normal distribution and the proposal is the exponential ...
STU273's user avatar
  • 1
1 vote
0 answers
22 views

How to validate rejection sampling?

What is a principled approach to validating samples generated from rejection sampling actually follow the target function? I am looking for some thing more than a simple histogram + density plot. ...
Toke Faurby's user avatar
1 vote
1 answer
53 views

Choosing a proposal density g(x) for $ f(x)= {\Large \frac{e^{x}}{(e-1)} }$ [closed]

In finding an proposal distribution function $g(x)$ for the following function: $ f(x)= {\Large \frac{e^{x}}{(e-1)} }$ where $0 \leq x \leq 1$ Tested with $$x^2+1, 1/x+1$$ and other variations, but ...
user895583's user avatar
16 votes
2 answers
1k 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)$...
arcancor's user avatar
  • 163
1 vote
0 answers
61 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 ...
kykim's user avatar
  • 11
2 votes
0 answers
35 views

Sampling order of rejection sampling

Consider a target density $f(y) \leq C \, g(y)$, where it is easy to make samples from density $g$. We can draw samples from $f$ by repeating the following routine: Draw $Y \sim g$ Draw $U \sim \...
null's user avatar
  • 420
0 votes
0 answers
59 views

How to identify the distribution being sampled by this algorithm?

I've been studying a piece of code lately that uses the Monte Carlo acceptance-rejection method to draw random samples from a distribution I'm struggling to identify. Here's a Python implementation: <...
Connor Hainje's user avatar
0 votes
0 answers
26 views

Capital Y vs small y

I want to use the acceptance-rejection method to generate a sample from the following target probability density function: $$f\left(x\right)=1.25x^4+2x^3+0.25,\:0<x<1$$ Let the trial probability ...
pelly pen's user avatar
  • 113
0 votes
0 answers
34 views

Can I get "fail to reject the null" when testing with test statistic, and "reject the null" when testing with P-value at the same time? [duplicate]

Can I get "fail to reject the null" when testing with test statistic, and "reject the null" when testing with P-value at the same time in a same nonlinear regression model?
David's user avatar
  • 1
4 votes
1 answer
708 views

Rejection sampling ineffectiveness in high dimensions

I guess I really have two questions. First, iv'e seen quoted in a couple of places that the probability of accepting a given sample in a rejection sampling algorithm (sampling from a density $f$ with ...
Student's user avatar
  • 43
0 votes
1 answer
200 views

Finding a proposal distribution in acceptance-rejection method

I'm learning the Acceptance-Rejection method but I am having a hard time finding a g(x) except using uniform distribution to simulate the f(x). How could we find a g(x) that has a simple pdf and is ...
Isaac Lou's user avatar
0 votes
0 answers
52 views

Monte Carlo sampling ( accept/reject) for geographic dataset

I have a dataset consisting of latitude and longitude and I'm confused on which approach to use to determine the distribution of points so I can apply the monte Carlo accept/reject for sampling. this ...
LazyBrain's user avatar
-1 votes
0 answers
50 views

how to generate data from a distribution whose cdf is not in closed form? [duplicate]

I am working on a distribution whose pdf and cdf is $$f(x,\alpha,\beta)=\frac{(\frac{\beta}{\alpha})(\frac{x}{\alpha})^{\beta}}{(1+(\frac{x}{\alpha})^{\beta})^{2}}\frac{\sin(\frac{\pi}{\beta})}{(\frac{...
Pulkit Srivastava's user avatar
1 vote
1 answer
125 views

Rejection region and two sided test. Absolute value of mean

Given following problem: I've solved this problem assuming two sided test and rejection region $R=\{|\bar{X_n}| > c\}$ but it seems to be incorrect because correct answer assumed (I've checked it)...
Sharov's user avatar
  • 251
4 votes
0 answers
49 views

Escape unsuccessful accept-reject step in MCMC

I have an MCMC procedure that samples latent variables $h_1, \dots, h_T$. It is based on Shephard and Pitt (1997), https://doi.org/10.1093/biomet/84.3.653. Let $f$ be the true conditional posterior ...
hejseb's user avatar
  • 2,478
1 vote
1 answer
225 views

Does the accepted sample based on the acceptance-rejection algorithm has the same distribution as X~$f(x)$? [duplicate]

In Bayes Statistics, does the accepted sample based on the acceptance-rejection algorithm has the same distribution as X~$f(x)$? Intuitionally it does, but how to prove it under the discrete and ...
CuteCat's user avatar
  • 221
1 vote
2 answers
538 views

Accept-Reject algorithm from binomial or other non-uniform distribution

I'm currently researching monte carlo simulations and the different methods. What I'm finding is that methods such as accept-reject typically sample from a uniform distribution and then compare that ...
seve's user avatar
  • 35
1 vote
1 answer
162 views

Rejection sampling - total probability of acceptance [closed]

I am given the following pdf $$f(x)=3 x^{2}, \quad 0 \leq x \leq 1$$ which i need to simulate by using rejection sampling. I have used the following code below in R. ...
Thanos Pantos's user avatar
0 votes
1 answer
752 views

Rejection Sampling when the proposal is a mixture of two distributions

Given a density $f(x; \alpha, 1) = x^{\alpha-1}\exp(-x)/\Gamma(\alpha)$ and a proposal density $q(x) = \alpha_1.q_1(x) + \alpha_2.q_2(x)$ I want to generate random samples using Rejection Sampling ...
Md Siyam Sajeeb Khan's user avatar
1 vote
1 answer
854 views

Integration with accept reject sampling Monte Carlo

I've got a quick question with regards to accept-reject Monte Carlo integration that I can't solve. Suppose I want to integrate some function, $f(x,y)$, with samples of $x, y$ from $p(x,y)$. Now, ...
AlphaBetaGamma96's user avatar
1 vote
1 answer
135 views

generating process of acceptance-rejection algorithm

The acceptance-rejection algorithm is described as follows: suppose you have RVs $X$ and $Y$ with densities $f_X$ and $f_Y$, respectively, and there exists a constant $c$ such that $\frac{f_X(t)}{f_Y(...
user6703592's user avatar
  • 1,325
4 votes
1 answer
261 views

Understanding the Rejection Sampling for a vector

I am thinking about this classical problem in statistical simulations. We want to apply the Rejection sampling to simulate a random vector $Y=(Y_1, Y_2)$ of a uniform distribution from a unit disc $D =...
Sophie Allan's user avatar
0 votes
1 answer
44 views

Confused about the sampling method

I want to sample from a density using the rejection method. The density is defined as $$ f(x) = \frac{e^x}{e-1},~~~ 0\leq x \leq 1.$$ Following the definition of the rejection method, we can find ...
user008's user avatar
1 vote
1 answer
3k views

Sampling from Gamma Distribution using the Rejection Method

I'm having some issues working through this practice problem. I have worked through the first portion of it, and I have the solution, but I don't understand how/why the solution does two things at the ...
mdawgig's user avatar
  • 43
1 vote
0 answers
72 views

Devising an acceptance sampling plan for False Negative Rate

I need to evaluate a binary classifier that classifies inputs in positives and negatives. Since all predicted positives (PP) are assessed, I have complete data on the true positives (TP) and the false ...
st1led's user avatar
  • 242
0 votes
0 answers
326 views

How the conditional probability is being calculated in Rejection sampling

In a class lecture, the "Acceptance-rejection algorithm" was presented as follows: To generate $𝑋 \sim 𝑓(𝑥)$, Find density $g$ satisfying $\frac{f(t)}{g(t)}<=c$ for some constant $c$ for ...
user26264's user avatar
  • 101
3 votes
1 answer
2k 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 ...
fool's user avatar
  • 2,440
4 votes
1 answer
399 views

Interpretation of the region of rejection in hypothesis testing in binomial distribution

The pharmacy company Life Co. has developed a new drug against insomnia. To check the effectiveness, this drug was tested with n = 10 patients. At present, the standard medication can cure 30% of the ...
ecjb's user avatar
  • 593
4 votes
1 answer
259 views

How does the Metropolis Algorithm "get off the ground"?

I'm thoroughly confused by the Metropolis Algorithm as defined in Casella and Berger's Statistical Inference. Namely, here's the definition (p.254): Let $Y \sim f_Y(y)$ and $V \sim f_V(v)$, where $...
Ryker's user avatar
  • 201
1 vote
0 answers
58 views

Acceptance-Rejection using Functional

Setup Let $X\in L^1(\Omega,\mathcal{F},\mathbb{P})$. As far as I've seen, Monte-Carlo methods generate $x_1,\dots,x_n$ from the distribution of $X$ and uses the Glivenko-Cantelli theorem to conclude ...
ABIM's user avatar
  • 544
1 vote
2 answers
1k views

Posterior of $\text{Normal}(\theta,1)$ with a Cauchy prior distribution

If $X \sim N(\theta,1)$ with Cauchy as robust prior $$\pi(\theta) = \frac{1}{\pi(1+\theta^2)} \qquad -\infty < \theta < \infty$$ What will be the posterior distribution when Cauchy is $(-2 <...
shuvam agrawal's user avatar
1 vote
1 answer
218 views

Understanding the Delayed Rejection Metropolis algorithm (Mira, 2001a)

I'm having trouble understanding the algorithm as briefly described here, and I can't find the original paper by Mira since it seems to be from some obscure print journal (Metron Volume 59). The ...
letslearnmath's user avatar
1 vote
1 answer
2k views

Metropolis-Hastings acceptance ratio for truncated proposal

I have a proposal distribution for one parameter theta_guess theta_guess = guessleft(theta_accept(1,r-1), 0.01,0) which is a ...
user469216's user avatar