You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In your documentation it states that Descriptive::sd($numbers,False) uses the population variance and that Descriptive::sd($numbers,True) uses the sample variance. I think that this is switched. I believe setting the boolean parameter to True actually uses the population variance. Can you confirm I am correct? Below is an example.
public function test() {
$myArray = array(100,200,300,400,500);
echo 'Population: ' . Descriptive::sd($myArray,false); //population according to documentation.
echo '</br>';
echo 'Sample: ' . Descriptive::sd($myArray,true); //sample according to documentation.
}
Result:
--------
Population: 158.11388300842
Sample: 141.42135623731
The text was updated successfully, but these errors were encountered:
Thank you. You are correct. The internal documentation was correct, but the README documentation which displays on the main Github page was incorrect. This has been fixed in the latest release: v0.35.0
In your documentation it states that Descriptive::sd($numbers,False) uses the population variance and that Descriptive::sd($numbers,True) uses the sample variance. I think that this is switched. I believe setting the boolean parameter to True actually uses the population variance. Can you confirm I am correct? Below is an example.
The text was updated successfully, but these errors were encountered: