# 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 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: 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: 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

• (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. – Glen_b -Reinstate Monica Nov 3 '14 at 6:47