ヒストグラムを作成する
Histogramを使って,確率密度尺度についてのデータ集合のヒストグラムを生成することができる.
RandomVariateでガンマ分布からサンプルのデータ集合を生成し,ヒストグラムを構築する:
data = RandomVariate[GammaDistribution[4, 12.5], 10 ^ 4];
hist = Histogram[data, Automatic, "ProbabilityDensity"]pl = Plot[PDF[GammaDistribution[4, 12.5], x], {x, 0, 200}]Show[hist, pl]