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 simulated points based on the criteria.

What I would like to know is, can this method build a distribution from a series of data points?

My example. I was curious so I have dug up some old data samples on dissolved gasses in liquids from my chemistry class. The data points look like this:

enter image description here

This is dissolved gas readings from one test tube. It was tested 15 times. In total the whole class's data put together looks like:

enter image description here

Which looks sort of like an exponential distribution. I have no idea how to fit distributions to data. So my question is, how would you fit distributions to my sample and the classes total samples? And is the accept - reject method an appropriate method to simulate these distributions?

The reason I ask is I am doing a course in Bayesian analysis and so far every question I have encountered using any of the techniques has all been on easy to simulate data in R. Never once have we tried applying Bayesian techniques to real world data

| cite | improve this question | | | | |
  • $\begingroup$ (1) Re title: Accept-reject is for simulation, not fitting. _ (2) If each person repeats their measurements 15 times and you combine different people's measurements, you'd expect the 15 results for one person to be typically more alike than results for 15 different people. _ (3) Why are you trying to fit a distribution? _ (4) "Which looks sort of like an exponential distribution." -- it looks far more skew and heavy-tailed than exponential to me, and from the look of it, maybe has a big spike at 0. I'd consider something heavier tailed than exponential, perhaps a mixture distribution. $\endgroup$ – Glen_b -Reinstate Monica Nov 3 '14 at 6:47

There's no way to "hack" rejection sampling to help fit an unknown distribution. The criterion you mention involves explicitly computing the density you would like to estimate.

The Wikipedia page on the topic is fairly lucid on this point.

| cite | improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.