PHP Classes
elePHPant
Icontem

File: TestStat1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of alain samoun  >  Stat1  >  TestStat1.php  >  Download  
File: TestStat1.php
Role: ???
Content type: text/plain
Description: Sample test code for the Statistic and the Linear Least square regression class: Stat1
Class: Stat1
Statistic class for arays of data
Author: By
Last change:
Date: 15 years ago
Size: 855 bytes
 

Contents

Class file image Download
<?
/* 
 * Sample test code for the Statistic and the Linear Least square regression class: Stat1
 * Alain M. Samoun 3/12/00
 */

echo "
<HTML>
<BODY BGCOLOR=\"white\">
<PRE>
";

require("Stat1.php");


/* create two arrays for testing*/


$X= array( 110, 116, 124, 129, 131, 138, 142, 150, 153, 155, 156, 159, 164, 168, 174);

$Y= array( 44, 31,  43,  45,  56,  79,  57,  56,  58,  92,  78,  64,  88,  112, 101);


/* create an instance w/o initialization */
$h = new Stat1;

/* do the calculation and print the results */
$h->create($X,$Y,"Test Stat1");

$h->printStats();


/* access the result arrays directly*/
$result = $h->getStats();
echo "\n\nresult is of type: ".gettype($result)."\n";
while (list($key,$val) = each($result)) {
        echo $key."\t".$val."\n";
}

echo"
</PRE>
</BODY></HTML>"

?>