PHP Classes

File: statexample.php

Recommend this page to a friend!
  Classes of yuvarajv   Statistics - Percentile, Median   ???   Download  
File: ???
Role: Example script
Content type: text/plain
Description: Example file which shows the usage
Class: Statistics - Percentile, Median
Get the median and percentile of a set of values
Author: By
Last change:
Date: 17 years ago
Size: 460 bytes
 

 

Contents

Class file image Download
<html><body>
<Center>Test for Percentile</center><br />
<?
   
require_once("Stat.class.php");
   
$stat = new Stat();
   
$data = array(12,34,56);
    echo
"25th Percentile = ".$stat->percentile($data,25)."<br />";
    echo
"Median (50th percentile) = ".$stat->median($data)."<br />";
    echo
"95th Percentile = ".$stat->percentile($data,95)."<br />";
    echo
"quartile(25th, 50th, 75th percentile) = ".implode(", ", $stat->quartiles($data))."<br />";
?></body></html>