inverse($𝛼 / $n) : $studentT->inverse($𝛼 / (2 * $n)); return (($n - 1) / \sqrt($n)) * \sqrt($T ** 2 / ($n - 2 + $T ** 2)); } /* ********************** * * PRIVATE HELPER METHODS * ********************** */ /** * Validate the type of test is two sided, or one sided lower or upper * * @param string $typeOfTest * * @throws Exception\BadParameterException */ private static function validateGrubbsCriticalValueTestType(string $typeOfTest): void { if (!\in_array($typeOfTest, [self::ONE_SIDED, self::TWO_SIDED])) { throw new Exception\BadParameterException("{$typeOfTest} is not a valid Grubbs' test"); } } }