# How would I fit a distribution to this image noise?

I have collected some noise data from a dimly lit CMOS image sensor. The distribution of pixel values is tallied below:-

I'd like to be able to simulate this sensor noise. How would I fit a statistical distribution to this bell curvish graph? And which distribution? Bear in mind that the distribution is discrete. From the raw samples, I get mean = 18 and standard deviation = 7 (both approximations).

• You can always find a distribution that fits. But you'd risk overfitting. You'd typically start with things like "I assume this is normal" or "$\chi^2$ with $M$ degrees of freedom, $M$ small. Commented Aug 5, 2018 at 0:57
• In physics, normal is often a very reasonable assumption. In your case, I'd presume you'd see a normal distribution (representing your noise) added to another distribution (representing your signal) Commented Aug 5, 2018 at 0:59
• @MarcusMüller But normal distributions are continuous, whilst pixel values are discrete integers. That's my problem. Commented Aug 5, 2018 at 1:13
• Define a sampled normal distribution function as discrete normal. Done. Commented Aug 5, 2018 at 1:46
• Noise in such condition is likely Poisson distributed noise (photon noise, thermal noise) + normally distributed noise (some electronics) + quantization noise. Commented Nov 3, 2018 at 20:27

Since you say your distribution is discrete, if your samples are independent, you could try a multinomial distribution as a model.

You can use either maximum likelihood or a Bayesian estimator.

You could also take the mean and standard deviation and use a Gaussian model with rounding. A goodness of fit test would tell you how good the model is.

If your samples are independent noise generation is straightforward . A Bayesian model is different because you use another (prior) noise generator as an input to the fixed parameter noise generator.

If your samples are correlated you can use a Gibbs sampler.

You should perform an independence test on your data, of which a Google search will provide a number of candidates

You also might consider boot-strapping.

It is also very likely that a physics based noise model exists for your device.