{"id":21400204,"url":"https://github.com/oefenweb/php-statistics","last_synced_at":"2025-07-13T21:30:54.404Z","repository":{"id":57030304,"uuid":"36615391","full_name":"Oefenweb/php-statistics","owner":"Oefenweb","description":"Statistics library for PHP","archived":false,"fork":false,"pushed_at":"2022-03-23T10:43:40.000Z","size":46,"stargazers_count":32,"open_issues_count":2,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-06T20:50:28.542Z","etag":null,"topics":["php","statistics"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Oefenweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-31T18:06:12.000Z","updated_at":"2022-08-23T18:06:38.000Z","dependencies_parsed_at":"2022-08-23T18:50:31.789Z","dependency_job_id":null,"html_url":"https://github.com/Oefenweb/php-statistics","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fphp-statistics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fphp-statistics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fphp-statistics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fphp-statistics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oefenweb","download_url":"https://codeload.github.com/Oefenweb/php-statistics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225917528,"owners_count":17544906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","statistics"],"created_at":"2024-11-22T15:19:35.802Z","updated_at":"2024-11-22T15:19:36.603Z","avatar_url":"https://github.com/Oefenweb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-statistics\n\n[![Build Status](https://travis-ci.org/Oefenweb/php-statistics.svg?branch=master)](https://travis-ci.org/Oefenweb/php-statistics)\n[![PHP 7 ready](http://php7ready.timesplinter.ch/Oefenweb/php-statistics/badge.svg)](https://travis-ci.org/Oefenweb/php-statistics)\n[![codecov](https://codecov.io/gh/Oefenweb/php-statistics/branch/master/graph/badge.svg)](https://codecov.io/gh/Oefenweb/php-statistics)\n[![Packagist downloads](http://img.shields.io/packagist/dt/Oefenweb/statistics.svg)](https://packagist.org/packages/oefenweb/statistics)\n[![Code Climate](https://codeclimate.com/github/Oefenweb/php-statistics/badges/gpa.svg)](https://codeclimate.com/github/Oefenweb/php-statistics)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Oefenweb/php-statistics/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Oefenweb/php-statistics/?branch=master)\n\nStatistics library for PHP.\n\n## Requirements\n\n* PHP 7.2.0 or greater.\n\n## Usage\n\n### Sum\n```php\nuse Oefenweb\\Statistics\\Statistics;\n\nStatistics::sum([1, 2, 3]); // 6\n```\n\n### Minimum\n```php\nuse Oefenweb\\Statistics\\Statistics;\n\nStatistics::min([1, 2, 3]); // 1\n```\n\n### Maximum\n```php\nuse Oefenweb\\Statistics\\Statistics;\n\nStatistics::max([1, 2, 3]); // 3\n```\n\n### Mean\n```php\nuse Oefenweb\\Statistics\\Statistics;\n\nStatistics::mean([1, 2, 3]); // 2\n```\n\n### Frequency\n```php\nuse Oefenweb\\Statistics\\Statistics;\n\nStatistics::frequency([1, 2, 3, 3, 3]); // [1 =\u003e 1, 2 =\u003e 1, 3 =\u003e 3]\n```\n\n### Mode\n```php\nuse Oefenweb\\Statistics\\Statistics;\n\nStatistics::mode([1, 2, 2, 3]); // 2\n```\n\n### Variance (sample and population)\n```php\nuse Oefenweb\\Statistics\\Statistics;\n\nStatistics::variance([1, 2, 3]); // 1\nStatistics::variance([1, 2, 3], false); // 0.66666666666667\n```\n\n### Standard deviation (sample and population)\n```php\nuse Oefenweb\\Statistics\\Statistics;\n\nStatistics::standardDeviation([1, 2, 3]); // 1.0\nStatistics::standardDeviation([1, 2, 3], false); // 0.81649658092773\n```\n\n### Range\n```php\nuse Oefenweb\\Statistics\\Statistics;\n\nStatistics::range([4, 6, 10, 15, 18]); // 14\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fphp-statistics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foefenweb%2Fphp-statistics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fphp-statistics/lists"}