%% Normalized Bin Counts
% Distribute all of the prime numbers less than 100 into bins. Specify 'Normalization' as 'probability' to normalize the bin counts so that sum(N) is 1. That is, each bin count represents the probability that an observation falls within that bin.

X = primes(100);
[N,edges] = histcounts(X, 'Normalization', 'probability')

% Copyright 2015 The MathWorks, Inc.