Chi Sqaured distribution 생성하는 방법은 다음과 같다. Z∼N(0,1) 에 대해 X=∑i=1kZi2 이때 X가 따르는 확률분포를 자유도(degree of freedom)가 k인 카이제곱 분포라고 하며, χ2(k)로 표기함.