Location: PHPKode > scripts > Statistics - Percentile, Median > statexample.php
<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>
Return current item: Statistics - Percentile, Median