ABSTRACT

Chi-square values can also be calculated in many general purpose statistical programs. In R, this is done through the pchisq() and qchisq() functions. The chisq stands for ffl2 distribution while the p and q stand for probability and quantile functions, respectively. The probability function returns the cumulative probability of a value (i.e., the probability of a ffl2 value being less than a specified value). The quantile function returns the ffl2 value at which the cumulative probability is equal to the specified probability. The pchisq() function requires two arguments: the ffl2 value (q) and degrees of freedom (df ); likewise, the qchisq() function also requires two arguments: the probability (p) and df. As we want the complement of this cumulative probability (i.e., probability of being greater than or equal to this value), we also need to specify the lower.tail = FALSE argument for both functions.