Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

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

(no description)

File Size: 335 lines (11 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.

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

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

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

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)
return: array|float|string

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

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

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

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

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

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

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.

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

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

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

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

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

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

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