hi,
since it seems there are no readily integrated libs in PHP for statistical analysis, one might take following approach,
use python/Perl to write a simple script that does statistical data analysis, there are many statistical analysis modules for python, see python.org modules section. There are probably Perl packages also around.
use PHP to build your webapp and channel data stream to your script for fast computation and get back results.
This way you might be able to build the app quickly without worrying about writing a dynamic module for PHP in C which has custom made functions.
HTH,
Rajesh