How to calculate real probability of data
Ältere Kommentare anzeigen
Hello, I have a slight question which maybe really simple but am getting stack somehow. Suppose we have a measured data say A=5*rand(1000,1). Suppose am to find the probability distribution of the data, I assume I would easily do this via histogram plot as the one inserted below. Which woul give probabilty distribution of the data in an histogram plot. My question is, is there a way I can get the probability values in a matrix of the same dimenions as A. I mean the vallues that were used to plot the histogram, is there a way I can extract this information?
histogram(A,'Normalization','probability')
Akzeptierte Antwort
Weitere Antworten (1)
Usually, one assumes that the underlying distribution for the realizations in A is continuous. This implies that each element in A has probability 0. You could extract probabilities for an element to be in a certain interval, e.g. In the following example, if you take as interval [x(i),x(i+1)], then the probability that the random variable gets a value within this interval is approximately f(i+1)-f(i).
A = 5*rand(1000,1);
[f,x] = ecdf(A);
plot(x,f)
Kategorien
Mehr zu Graphics Performance finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

