note 91522 added to function.stats-stat-correlation

From: Date: Mon, 15 Jun 2009 04:58:44 +0000
Subject: note 91522 added to function.stats-stat-correlation
Groups: php.notes 
Request: Send a blank email to php-notes+get-156866@lists.php.net to get a copy of this message
Please note that this function is reserved for two arrays with continued numbers inside (just integers). I tested this function and found that it calculate the Pearson's Correlation Coefficient of two arrays. --- Here's suggested documentation: stats_stat_correlation — Calculate the Pearson's Correlation Coefficient of two arrays of continued numbers. Parameters: arr1 = array (integer1a, interger2a ...) arr2 = array (integer1b, interger2b ...)) (Note that the count of elements in two arrays must be equal) Return value: Pearson's Correlation Coefficient in decimal format (ex. 0.934399822094) Code examples: <?php // Provided by admin@maychu.net $array_x = array(5,3,6,7,4,2,9,5); $array_y = array(4,3,4,8,3,2,10,5); $pearson = stats_stat_correlation($array_x,$array_y); echo $pearson; ?> ---- Server IP: 210.245.120.83 Probable Submitter: 216.14.112.146 ---- Manual Page -- http://www.php.net/manual/en/function.stats-stat-correlation.php Edit -- https://master.php.net/note/edit/91522 Del: integrated -- https://master.php.net/note/delete/91522/integrated Del: useless -- https://master.php.net/note/delete/91522/useless Del: bad code -- https://master.php.net/note/delete/91522/bad+code Del: spam -- https://master.php.net/note/delete/91522/spam Del: non-english -- https://master.php.net/note/delete/91522/non-english Del: in docs -- https://master.php.net/note/delete/91522/in+docs Del: other reasons-- https://master.php.net/note/delete/91522 Reject -- https://master.php.net/note/reject/91522 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#156866) next »