mò ?Ec@s¸dkZdkZdkZdkZd„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z d „Zd „Zd „Zd„Zd„Zd„ZdS(NcCsOdGHdGHdGHdGHdGHdGHdGHdGHd GHd GHd GHd GHd GHdGHdGHdS(NsWelcome to Help s)Functions included in this distribution: sDisNumeric(val) -> bool (Determines whether the argument is numeric) samean(list) -> float (Takes the mean of all numeric items in the list. Ignores non-numeric items) sfmedian(list) -> float (Finds the median of all numeric items in the list. Ignores non-numeric items.) shistDict(list) -> dict (Returns a dictionary object where the keys are the elements in the list and the values are the number of times that element appears) sbmode(list) -> float (Finds the mode of all numeric items in the list. Ignores non-numeric items.) sTvariance(list) -> float (Finds the variance of a list, ignoring non-numeric items.) sNoneStrSubst(List, string, value) -> List (replaces string with value in list) sQallStrSubst(List, value) -> List (replaces all strings with given value in list) s>zeroSubst(List) -> List (replaces all strings in list with 0) s[meanSubst(List) -> List (replaces all strings in list with mean of numeric values in list) s^stddev(List) -> float (Finds the standard deviation of the list, ignoring non-numeric items.) sTpearsonCorrelation(List1, List2) -> float (Finds the correlation between two lists) s5pairwiseDelete(List1, List2) -> Tuple of (List, List)((((tMC:\Documents and Settings\Administrator\Desktop\Statistical\src\Controller.pythelp scCs(d}yt|ƒWn d}nX|S(Nii(tbtfloattval(RR((Rt isNumerics  cCsJtt|ƒ}|gjodSnttt|ƒƒtt|ƒƒƒS(Nf0.0(tfilterRtL2tLRtsumtlen(RR((Rtmean"s cCsqtt|ƒ}t|ƒ}|iƒ|ddjot||dƒSn"t||dd|dd!ƒSdS(Nii( RRRRR tatsortRR (RR R((Rtmedian(s   cCsft|ƒdjohSnt|dƒ}|d|jo||dcd7~scCs t|ƒS(N(RR%(R%((RR&sf0.0iisNon-Numeric Data(R tX2tY2RtntmaptXtYtsum_sq_xtsum_sq_yt sum_coproducttmean_xtmean_ytsweeptdelta_xtdelta_ytpop_sd_xtpop_sd_ytcov_x_ytrangetinttiR"R#(R'R(R2R.R-R0R1R3R4R7R/R,R+R:R)R5R6((RtPearsonCorrelationysB  "cCsr|}|iƒg}xT|D]L}|||djo||||}n|||}|i|ƒqW|S(Nf2.0(tAtCR tBtnumtsteptappend(R<R@R>R?R=((Rtquantizešs cCsxM|D]E}t|ƒdjo,g}x|D]}|igƒq-W|SqqWg}x|D]}|i|dƒq]Wt|ƒ}d}x)|D]!}t |dƒp d}q‘q‘W|djo@x=t dt|ƒƒD]"}||i d||dƒqÙWn|S(Nii(R<titemR Rtitem2RAR>tpairwiseDeleteR=tflagRR8R:R(R<R=R>R:RDRRCRF((RRE°s.   $cCsÛdGHx)tdt|ƒdƒD]}|GdGqWx£tdt|ƒdƒD]ˆ}dGH|Gxtd|ƒD] }dGqjWxXt|t|ƒƒD]A}tt||dƒt||dƒƒ}t|ƒd GdGqŽWqKWdS(Ns is tii( R8R R<R:tjR;RttmpR(R<RIR:RH((Rt pearsonMatrixÄs )(tsyststringR"toperatorRRR RRRRRRR R!R$R;RBRERJ(RRLRBR!RERRKRR RR$RRMRRJR RR;R"R((Rt?s $        !