Histogram of overlaid standard normal draws
Show older comments
The code below overlays histograms of two sets of standard normal draws. I also attach the graph itself. These draws are based on two Halton sequences, but that is (probably) not relevant to my question. Both sets use the same number of draws (3573) from the Halton sequence. I am a bit puzzled with the overlaid histograms. It looks as if the frequency count of one set (dark blue) is almost everywhere larger than that for the other set (white). But this is impossible because both sets have the same number of draws. That is, I would either expect a very close overlay, or that if one set has more counts at some regions, the other should have more at other regions, so that the number of counts (of draws) are the same in total.
H = haltonset(2,'Skip',50+1);
H = net(H,3573*3);
H = reshape(H,3573,3,2);
S = norminv(H);
histogram(S(:,3,1),100,'FaceColor','blue','EdgeAlpha',0.5);
hold on
histogram(S(:,3,2),100,'FaceColor','white','EdgeAlpha',0.5);
legend('Standard normal draws for 1st dimension','Standard normal draws for 2nd dimension')
hold off
Accepted Answer
More Answers (0)
Categories
Find more on Histograms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
