density.chiSquare Function (GPL)
Syntax
density.chiSquare(<algebra>, degreesOfFreedom(<integer>), <function>)
or
density.chiSquare(<binning function>, degreesOfFreedom(<integer>), <function>)
<algebra>. Graph algebra, such as x*y
.
Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra
is optional.
<binning function>. A binning function. The binning function is optional.
<integer>. degreesOfFreedom
defines
the parameter for the distribution. This takes a positive integer
and is required.
<function>. A valid function. Use scaledToData("false")
when
comparing densities with very different same sizes.
Description
Calculates the probability density of the chi-square distribution. This is often used to add a distribution curve. If you don't see the graphic element for the distribution, check the parameter for the distribution and the range for the x axis scale.
Because this function does not estimate parameters from the data, it can be used only for comparison and not for fitting.
Examples
ELEMENT: line(position(density.chiSquare(x, degreesoffreedom(5))))