Just to clarify... Let's suggest we have this sample data in the X array.
X=[1 1 1 2 2 3 3 3 4 4 ];
h=histogram(X,4,'Normalization','probability');
If we build a histogram for the probabilities of the entries in the array we get this histogram:
Then I want to say what is the probability of getting 2 and I want the function to result in 0.2, or might ask what is the probability of getting a 5 and the function will give me a result of 0. Mind that I don't know the distribution or want to do fitting.