Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

(no description)

File Size: 311 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ChiSquared:: (11 methods):
  distributionRightTail()
  distributionLeftTail()
  inverseRightTail()
  inverseLeftTail()
  test()
  degrees()
  inverseLeftTailCalculation()
  pchisq()
  gammp()
  gser()
  gcf()


Class: ChiSquared  - X-Ref

distributionRightTail($value, $degrees)   X-Ref
CHIDIST.

Returns the one-tailed probability of the chi-squared distribution.

return: float|string
param: mixed $value Float value for which we want the probability
param: mixed $degrees Integer degrees of freedom

distributionLeftTail($value, $degrees, $cumulative)   X-Ref
CHIDIST.

Returns the one-tailed probability of the chi-squared distribution.

return: float|string
param: mixed $value Float value for which we want the probability
param: mixed $degrees Integer degrees of freedom
param: mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)

inverseRightTail($probability, $degrees)   X-Ref
CHIINV.

Returns the inverse of the right-tailed probability of the chi-squared distribution.

return: float|string
param: mixed $probability Float probability at which you want to evaluate the distribution
param: mixed $degrees Integer degrees of freedom

inverseLeftTail($probability, $degrees)   X-Ref
CHIINV.

Returns the inverse of the left-tailed probability of the chi-squared distribution.

return: float|string
param: mixed $probability Float probability at which you want to evaluate the distribution
param: mixed $degrees Integer degrees of freedom

test($actual, $expected)   X-Ref
CHITEST.

Uses the chi-square test to calculate the probability that the differences between two supplied data sets
(of observed and expected frequencies), are likely to be simply due to sampling error,
or if they are likely to be real.

return: float|string
param: mixed $actual an array of observed frequencies
param: mixed $expected an array of expected frequencies

degrees(int $rows, int $columns)   X-Ref
No description

inverseLeftTailCalculation(float $probability, int $degrees)   X-Ref
No description

pchisq($chi2, $degrees)   X-Ref
No description

gammp($n, $x)   X-Ref
No description

gser($n, $x)   X-Ref
No description

gcf($n, $x)   X-Ref
No description