더북(TheBook)

5. 카이제곱 분포 만들고 히스토그램 그리기

>>> x=rchisq(100, 1)   # 자유도 1에서 난수 100개 생성
>>> hist(x, probability=TRUE)
>>> curve(dchisq(x, 1), add=T)