Borrar filtros
Borrar filtros

FInd the distribution of some random numbers

3 visualizaciones (últimos 30 días)
abc abc
abc abc el 17 de Abr. de 2016
Respondida: Image Analyst el 17 de Abr. de 2016
Hi everybody, i have some random numbers and i would like to know what is the distribution associated with it ? Is it possible to represent it to know the density of probabilities of it ?
thanks :)

Respuestas (2)

Jos (10584)
Jos (10584) el 17 de Abr. de 2016
There are so many distributions that you have to make some choices. First, look at the distribution of your numbers and, by sheer logic, select a few candidates (beta, poisson, normal, ...). Then try to fit them.
  2 comentarios
abc abc
abc abc el 17 de Abr. de 2016
Yeah you're right but actually i generated my random numbers by C++. How can i look at the distribution of my number with Matlab ?
Jos (10584)
Jos (10584) el 17 de Abr. de 2016
make a histogram

Iniciar sesión para comentar.


Image Analyst
Image Analyst el 17 de Abr. de 2016
For the actual distribution, use histogram():
histObject = histogram(yourData(:));
You can also use hist(), histc(), histcounts(), or imhist() depending on exactly what you want to do.
For a theoretical fit, use fitdist(), if you have the Statistics and Machine Learning Toolbox and you know the distribution you want to fit your data to. From the help:
pd = fitdist(x,distname) creates a probability distribution object by fitting the distribution specified by distname to the data in column vector x.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by