math-php
|
Student's t-distribution https://en.wikipedia.org/wiki/Student%27s_t-distribution. More...
Public Member Functions | |
__construct (float $ν) | |
Constructor. More... | |
pdf (float $t) | |
Probability density function. More... | |
cdf (float $t) | |
Cumulative distribution function Calculate the cumulative t value up to a point, left tail. More... | |
inverse2Tails (float $p) | |
Inverse 2 tails Find t such that the area greater than t and the area beneath -t is p. More... | |
mean () | |
Mean of the distribution. More... | |
median () | |
Median of the distribution. More... | |
mode () | |
Mode of the distribution. More... | |
variance () | |
Variance of the distribution. More... | |
![]() | |
inverse (float $target) | |
The Inverse CDF of the distribution. More... | |
between (float $x₁, float $x₂) | |
CDF between - probability of being between two points, x₁ and x₂ The area under a continuous distribution, that lies between two specified points. More... | |
outside (float $x₁, float $x₂) | |
CDF outside - Probability of being below x₁ and above x₂. More... | |
above (float $x) | |
CDF above - Probability of being above x to ∞ Area under a continuous distribution, that lies above a specified point. More... | |
rand () | |
Produce a random number with a particular distribution. More... | |
![]() | |
__construct (... $params) | |
Constructor. More... | |
Public Attributes | |
const | PARAMETER_LIMITS |
const | SUPPORT_LIMITS |
![]() | |
const | GUESS_THRESHOLD = 10 |
const | GUESS_ALLOWANCE = 8 |
Protected Attributes | |
$ν | |
Student's t-distribution https://en.wikipedia.org/wiki/Student%27s_t-distribution.
MathPHP\Probability\Distribution\Continuous\StudentT::__construct | ( | float | $ν | ) |
Constructor.
float | $ν | degrees of freedom ν > 0 |
MathPHP\Probability\Distribution\Continuous\StudentT::cdf | ( | float | $t | ) |
Cumulative distribution function Calculate the cumulative t value up to a point, left tail.
cdf = 1 - ½Iₓ₍t₎(ν/2, ½)
ν
where x(t) = ---— t² + ν
Iₓ₍t₎(ν/2, ½) is the regularized incomplete beta function
float | $t | t score |
Implements MathPHP\Probability\Distribution\Continuous\ContinuousDistribution.
MathPHP\Probability\Distribution\Continuous\StudentT::inverse2Tails | ( | float | $p | ) |
Inverse 2 tails Find t such that the area greater than t and the area beneath -t is p.
float | $p | Proportion of area |
MathPHP\Probability\Distribution\Continuous\StudentT::mean | ( | ) |
Mean of the distribution.
μ = 0 if ν > 1 otherwise undefined
Implements MathPHP\Probability\Distribution\Continuous\ContinuousDistribution.
MathPHP\Probability\Distribution\Continuous\StudentT::median | ( | ) |
Median of the distribution.
μ = 0
MathPHP\Probability\Distribution\Continuous\StudentT::mode | ( | ) |
Mode of the distribution.
μ = 0
MathPHP\Probability\Distribution\Continuous\StudentT::pdf | ( | float | $t | ) |
Probability density function.
/ ν + 1 \ Γ | --— | \ 2 / / x² \ ⁻⁽ᵛ⁺¹⁾/² ----------— | 1 + – | __ / ν \ \ ν / √νπ Γ | - | \ 2 /
float | $t | t score |
Implements MathPHP\Probability\Distribution\Continuous\ContinuousDistribution.
MathPHP\Probability\Distribution\Continuous\StudentT::variance | ( | ) |
Variance of the distribution.
ν σ² = --— ν > 2 ν - 2
σ² = ∞ 1 < ν ≤ 2
σ² is undefined otherwise
const MathPHP\Probability\Distribution\Continuous\StudentT::PARAMETER_LIMITS |
const MathPHP\Probability\Distribution\Continuous\StudentT::SUPPORT_LIMITS |