/* Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ if(!dojo._hasResource["dojox.math.stats"]){dojo._hasResource["dojox.math.stats"]=true;dojo.provide("dojox.math.stats");(function(){var st=dojox.math.stats;dojo.mixin(st,{sd:function(a){return Math.sqrt(st.variance(a));},variance:function(a){var _1=0,_2=0;dojo.forEach(a,function(_3){_1+=_3;_2+=Math.pow(_3,2);});return (_2/a.length)-Math.pow(_1/a.length,2);},bestFit:function(a,_4,_5){_4=_4||"x",_5=_5||"y";if(a[0]!==undefined&&typeof (a[0])=="number"){a=dojo.map(a,function(_6,_7){return {x:_7,y:_6};});}var sx=0,sy=0,_8=0,_9=0,_a=0,_b=0,_c=0,n=a.length,t;for(var i=0;i=a.length){return a[a.length-1];}return a[f]*(t-p)+a[t]*(p-f);},summary:function(a,_10){if(!_10){a=a.slice(0);a.sort(function(a,b){return a-b;});}var l=st.approxLin,_11={min:a[0],p25:l(a,0.25),med:l(a,0.5),p75:l(a,0.75),max:a[a.length-1],p10:l(a,0.1),p90:l(a,0.9)};return _11;}});})();}