summaryrefslogtreecommitdiffstats
path: root/Lib/statistics.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-108322: Optimize statistics.NormalDist.samples() (gh-108324)Raymond Hettinger2023-08-271-5/+7
|
* Extend _sqrtprod() to cover the full range of inputs. Add tests. (GH-107855)Raymond Hettinger2023-08-111-6/+18
|
* Future-proof helper function with zero handling. (GH-107798)Raymond Hettinger2023-08-091-0/+2
|
* Minor accuracy improvement for statistics.correlation() (GH-107781)Raymond Hettinger2023-08-081-1/+9
|
* GH-102670: Use sumprod() to simplify, speed up, and improve accuracy of ↵Raymond Hettinger2023-03-141-12/+14
| | | | statistics functions (GH-102649)
* Optimize fmean() weighted average (#102626)Raymond Hettinger2023-03-121-18/+16
|
* GH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH99156)Nikita Sobolev2022-11-071-0/+6
|
* Improve accuracy for Spearman's rank correlation coefficient. (#96392)Raymond Hettinger2022-08-291-3/+4
|
* Prepare private _rank() function to be made public. (#96372)Raymond Hettinger2022-08-291-5/+15
|
* GH-95861: Add support for Spearman's rank correlation coefficient (GH-95863)Raymond Hettinger2022-08-181-7/+62
|
* Statistics inv_cdf sync with corresponding random module normal ↵Raymond Hettinger2022-07-261-2/+0
| | | | distributions (#95265)
* Fix typo in _exact_ratio comment. (GH-94789)Benjamin Peterson2022-07-121-1/+1
|
* Small speed-up for NormalDist.samples (GH-94730)Raymond Hettinger2022-07-111-1/+1
|
* Fix inconsistent return type for statistics median_grouped() gh-92531 (#92533)Raymond Hettinger2022-05-091-14/+13
|
* Clean-up and simplify median_grouped(). Vastly improve its docstring. (#92324)Raymond Hettinger2022-05-051-52/+54
|
* Fix renamed "total" variable (#92287)Raymond Hettinger2022-05-041-2/+6
| | | | * Fix renamed "total" variable * Keep nan/inf handling consistent between versions
* Compute from_sample() in a single pass over the data (#92284)Raymond Hettinger2022-05-041-18/+27
|
* The stdev calculation is more accurate computing its own mean (#92220)Raymond Hettinger2022-05-031-2/+1
|
* Statistics internals: Make fewer calls to _coerce() when data types are ↵Raymond Hettinger2022-02-281-4/+9
| | | | mixed (GH-31619)
* bpo-46257: Convert statistics._ss() to a single pass algorithm (GH-30403)Raymond Hettinger2022-01-051-57/+43
|
* Fix double-space in exception message (GH-29955)Ned Batchelder2021-12-081-1/+1
|
* bpo-45876: Have stdev() also use decimal specific square root. (GH-29869)Raymond Hettinger2021-12-011-3/+2
|
* bpo-45876: Correctly rounded stdev() and pstdev() for the Decimal case ↵Raymond Hettinger2021-12-011-13/+66
| | | | (GH-29828)
* bpo-45876: Improve accuracy for stdev() and pstdev() in statistics (GH-29736)Raymond Hettinger2021-11-271-14/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Inlined code from variance functions * Added helper functions for the float square root of a fraction * Call helper functions * Add blurb * Fix over-specified test * Add a test for the _sqrt_frac() helper function * Increase the tested range * Add type hints to the internal function. * Fix test for correct rounding * Simplify ⌊√(n/m)⌋ calculation Co-authored-by: Mark Dickinson <dickinsm@gmail.com> * Add comment and beef-up tests * Test for zero denominator * Add algorithmic references * Add test for the _isqrt_frac_rto() helper function. * Compute the 109 instead of hard-wiring it * Stronger test for _isqrt_frac_rto() * Bigger range * Bigger range * Replace float() call with int/int division to be parallel with the other code path. * Factor out division. Update proof link. Remove internal type declaration Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* bpo-45766: Add direct proportion option to linear_regression(). (#29490)Raymond Hettinger2021-11-211-7/+24
| | | | | | | | | | | | | | | | | * bpo-45766: Add direct proportion option to linear_regression(). * Update 2021-11-09-09-18-06.bpo-45766.dvbcMf.rst * Use ellipsis to avoid round-off issues. * Update Misc/NEWS.d/next/Library/2021-11-09-09-18-06.bpo-45766.dvbcMf.rst Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> * Update signature in main docs * Fix missing comma Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-45851: Avoid full sort in statistics.multimode() (#29662)Raymond Hettinger2021-11-201-3/+5
| | | Suggested by Stefan Pochmann.
* Factor-out constant calculation. (GH-29491)Raymond Hettinger2021-11-091-2/+4
|
* bpo-20499: Rounding error in statistics.pvariance (GH-28230)Raymond Hettinger2021-09-091-42/+36
|
* bpo-39218: Improve accuracy of variance calculation (GH-27960)Raymond Hettinger2021-08-311-14/+19
|
* Update nonstandard variable names (GH-26540)Raymond Hettinger2021-06-041-5/+5
|
* bpo-44151: Various grammar, word order, and markup fixes (GH-26344)Raymond Hettinger2021-05-251-8/+8
|
* bpo-44151: linear_regression() minor API improvements (GH-26199)Zack Kneupper2021-05-251-15/+14
|
* bpo-44150: Support optional weights parameter for fmean() (GH-26175)Raymond Hettinger2021-05-211-7/+18
|
* Apply edits from Allen Downey's review of the linear_regression docs. (GH-26176)Raymond Hettinger2021-05-171-6/+6
|
* Improve speed and accuracy for correlation() (GH-26135)Raymond Hettinger2021-05-151-12/+14
|
* Eliminate duplicated calculations and unnecessary work for linear regression ↵Raymond Hettinger2021-05-061-2/+7
| | | | (GH-25922)
* Fix inconsistent fsum vs sum and fmean vs mean (GH-25898)Raymond Hettinger2021-05-041-3/+3
|
* bpo-38490: statistics: Add covariance, Pearson's correlation, and simple ↵Tymoteusz Wołodźko2021-04-251-1/+135
| | | | | linear regression (#16813) Co-authored-by: Tymoteusz Wołodźko <twolodzko+gitkraken@gmail.com
* bpo-43147: Remove archaic terminology. (GH-24462)Raymond Hettinger2021-02-081-4/+3
|
* bpo-38308: Add optional weighting to statistics.harmonic_mean() (GH-23914)Raymond Hettinger2020-12-241-18/+28
|
* Some reformatting (suggested by Black) and minor factoring. (GH-20865)Raymond Hettinger2020-06-141-31/+29
|
* bpo-40855: Fix ignored mu and xbar parameters (GH-20835)Raymond Hettinger2020-06-131-2/+4
|
* Minor code cleanups for statistics (GH-19873)Raymond Hettinger2020-05-031-76/+7
| | | | | * Minor cleanups: Removed unused code. Move C import near its Python version. * Clean-up whitespace
* bpo-40290: Add zscore() to statistics.NormalDist. (GH-19547)Raymond Hettinger2020-04-161-0/+11
|
* bpo-38385: Fix iterator/iterable terminology in statistics docs (GH-17111)Raymond Hettinger2019-11-121-1/+1
|
* bpo-38521: Fix error in NormalDist.__eq__() (GH-16840)Raymond Hettinger2019-10-181-1/+1
|
* Minor code and comment cleanup (GH-16315)Raymond Hettinger2019-09-211-1/+3
|
* bpo-36546: No longer a need to make "data" positional only (GH-16252)Raymond Hettinger2019-09-181-1/+1
|
* bpo-36018: Address more reviewer feedback (GH-15733)Raymond Hettinger2019-09-081-5/+27
|
* bpo-36324: Apply review comments from Allen Downey (GH-15693)Raymond Hettinger2019-09-051-21/+17
|