gilbertchiao/statistics

Simple statistics library.

Installs: 195

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/gilbertchiao/statistics

v1.1.0 2023-11-02 13:59 UTC

This package is auto-updated.

Last update: 2025-12-29 03:53:31 UTC


README

Simple statistics library.

Installation

composer require gilbertchiao/statistics

Usage

<?php

require 'vendor/autoload.php';

use GilbertChiao\Utility\Statistics as Stat;

$array = [1, 2, 3, 4, 5];

// Mean / Average
echo Stat::Mean($array);
echo Stat::Average($array);

// Lower quartile
echo Stat::Q1($array);

// Q2 / Median
echo Stat::Q2($array);
echo Stat::Median($array);

// Upper quartile
echo Stat::Q3($array);

// SD / Standard Deviation
echo Stat::SD($array);
echo Stat::StandardDeviation($array);

Source

This package inspired by Bastians Tech Blog.

License

The MIT License (MIT). Please see License File for more information.