To calculate the chisquared distribution, the user should give two vectors of numbers. The result is a sum of the squares of k independent standard normal random variables. We can saw the chisquared distribution formule in the chisquared_ help document.