Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Issue Descriptive::sd() #242

Closed
gente002 opened this issue Aug 20, 2017 · 2 comments
Closed

Documentation Issue Descriptive::sd() #242

gente002 opened this issue Aug 20, 2017 · 2 comments

Comments

@gente002
Copy link

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
@markrogoyski
Copy link
Owner

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

@gente002
Copy link
Author

Great! Thanks for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants