I need to plot the empirical pdf of the data:
X = [8.13010235400000,13.6713071300000,14.0362434700000,18.4349488200000,26.5650511800000,30.9637565300000,34.3803447200000,40.6012946500000,45,49.3987053500000,58.6713071300000,59.0362434700000,59.0362434700000,59.0362434700000,61.9275130600000,61.9275130600000,63.4349488200000,63.4349488200000,63.4349488200000,63.4349488200000,63.4349488200000,64.4400348300000,71.5650511800000,71.5650511800000,71.5650511800000,71.5650511800000,75.9637565300000,75.9637565300000,75.9637565300000,75.9637565300000,75.9637565300000,75.9637565300000,75.9637565300000,75.9637565300000,75.9637565300000,75.9637565300000,77.4711922900000,77.4711922900000,77.4711922900000,77.4711922900000,77.4711922900000,77.4711922900000,77.4711922900000,77.4711922900000,77.4711922900000,78.6900675300000,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,93.1798301200000,97.1250163500000,97.7651660200000,102.528807700000,102.528807700000,102.528807700000,102.528807700000,102.528807700000,104.036243500000,104.036243500000,104.036243500000,104.036243500000,104.036243500000,104.036243500000,104.036243500000,105.255118700000,108.434948800000,108.434948800000,108.434948800000,108.434948800000,109.440034800000,116.565051200000,118.072486900000,120.963756500000,127.746805400000,130.601294600000,135,137.489552900000,139.398705400000,139.398705400000,149.036243500000,153.434948800000,159.227745300000,161.565051200000,179.999998800000,180];
I do this in Matlab as follows:
[count, bins] = hist(X, 6);
normcount = count/sum(count);
figure, scatter(bins, normcount)
hold on;
plot(bins, normcount)
I notice the appearance of the plot changes with manual selection of bins.
My question then is: Is there any such thing as an ‘optimum’ bin size... and if there is, how do I determine it?