summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_statistics.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-108416: Mark slow test methods with @requires_resource('cpu') ↵Miss Islington (bot)2023-09-021-0/+2
| | | | | | | | | | | | (GH-108421) (#108798) gh-108416: Mark slow test methods with @requires_resource('cpu') (GH-108421) Only mark tests which spend significant system or user time, by itself or in subprocesses. (cherry picked from commit f3ba0a74cd50274acdcd592d4ce8395b92492b7c) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* GH-102670: Use sumprod() to simplify, speed up, and improve accuracy of ↵Raymond Hettinger2023-03-141-1/+11
| | | | statistics functions (GH-102649)
* GH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH99156)Nikita Sobolev2022-11-071-3/+8
|
* GH-95861: Add support for Spearman's rank correlation coefficient (GH-95863)Raymond Hettinger2022-08-181-0/+16
|
* Statistics inv_cdf sync with corresponding random module normal ↵Raymond Hettinger2022-07-261-3/+4
| | | | distributions (#95265)
* Fix inconsistent return type for statistics median_grouped() gh-92531 (#92533)Raymond Hettinger2022-05-091-0/+6
|
* Clean-up and simplify median_grouped(). Vastly improve its docstring. (#92324)Raymond Hettinger2022-05-051-44/+0
|
* bpo-45876: Correctly rounded stdev() and pstdev() for the Decimal case ↵Raymond Hettinger2021-12-011-9/+46
| | | | (GH-29828)
* bpo-45876: Improve accuracy for stdev() and pstdev() in statistics (GH-29736)Raymond Hettinger2021-11-271-2/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-0/+6
| | | | | | | | | | | | | | | | | * 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-45852: Fix the Counter/iter test for statistics.mode() (GH-29667)Raymond Hettinger2021-11-201-4/+7
| | | Suggested by Stefan Pochmann.
* bpo-20499: Rounding error in statistics.pvariance (GH-28230)Raymond Hettinger2021-09-091-14/+14
|
* bpo-39218: Improve accuracy of variance calculation (GH-27960)Raymond Hettinger2021-08-311-0/+3
|
* bpo-44960: add regression test for geometric_mean with mixed int/floa… ↵Irit Katriel2021-08-201-0/+16
| | | | | | (#27856) Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* bpo-44151: linear_regression() minor API improvements (GH-26199)Zack Kneupper2021-05-251-1/+1
|
* bpo-44150: Support optional weights parameter for fmean() (GH-26175)Raymond Hettinger2021-05-211-0/+21
|
* bpo-38490: statistics: Add covariance, Pearson's correlation, and simple ↵Tymoteusz Wołodźko2021-04-251-0/+78
| | | | | linear regression (#16813) Co-authored-by: Tymoteusz Wołodźko <twolodzko+gitkraken@gmail.com
* bpo-38308: Add optional weighting to statistics.harmonic_mean() (GH-23914)Raymond Hettinger2020-12-241-0/+21
|
* bpo-40275: Use new test.support helper submodules in tests (GH-21743)Hai Shi2020-08-061-3/+5
|
* bpo-40855: Fix ignored mu and xbar parameters (GH-20835)Raymond Hettinger2020-06-131-0/+12
|
* bpo-40331: Increase test coverage for the statistics module (GH-19608)Tzanetos Balitsaris2020-05-131-0/+60
|
* bpo-40290: Add zscore() to statistics.NormalDist. (GH-19547)Raymond Hettinger2020-04-161-0/+15
|
* bpo-39002: Fix simple typo: tranlation -> translation (GH-17517)Tim Gates2019-12-091-2/+2
|
* bpo-38521: Fix error in NormalDist.__eq__() (GH-16840)Raymond Hettinger2019-10-181-0/+4
|
* bpo-36018: Address more reviewer feedback (GH-15733)Raymond Hettinger2019-09-081-20/+15
|
* Fix typos mostly in comments, docs and test names (GH-15209)Min ho Kim2019-08-301-2/+2
|
* bpo-37798: Test both Python and C versions in test_statistics.py (GH-15453)Dong-hee Na2019-08-241-33/+73
|
* bpo-37707: Exclude expensive unit tests from PGO task (GH-15009)Neil Schemenauer2019-07-301-0/+2
| | | | | Mark some individual tests to skip when --pgo is used. The tests marked increase the PGO task time significantly and likely don't help improve optimization of the final executable.
* bpo-36324: Make internal attributes for statistics.NormalDist() private. ↵Raymond Hettinger2019-07-211-15/+17
| | | | | | | | | | | | (GH-14871) * Make internals private * Finish making mu and sigma private * Add missing __hash__() method * Add blurb
* bpo-36546: Add more tests and expand docs (#13406)Raymond Hettinger2019-05-181-11/+27
|
* Fix typo: quaatile to quantile (GH=13001)Xtreak2019-05-021-1/+1
|
* bpo-36018: Test idempotence. Test two methods against one-another. (GH-13021)Raymond Hettinger2019-04-301-0/+23
|
* bpo-36546: More tests: type preservation and equal inputs (#13000)Raymond Hettinger2019-04-291-12/+18
|
* bpo-36546: Add statistics.quantiles() (#12710)Raymond Hettinger2019-04-231-0/+142
|
* bpo-27181: Add statistics.geometric_mean() (GH-12638)Raymond Hettinger2019-04-071-0/+88
|
* bpo-36326: Let inspect.getdoc() find docstrings for __slots__ (GH-12498)Raymond Hettinger2019-03-251-1/+1
|
* bpo-36324: NormalDist() add more tests and update comments (GH-12476)Raymond Hettinger2019-03-201-24/+44
| | | | | | | * Improve coverage. * Note inherent limitations of the accuracy tests https://bugs.python.org/issue36324
* bpo-36324: Add inv_cdf() to statistics.NormalDist() (GH-12377)Raymond Hettinger2019-03-191-0/+63
|
* bpo-35892: Fix mode() and add multimode() (#12089)Raymond Hettinger2019-03-121-8/+19
|
* Refine statistics.NormalDist documentation and improve test coverage (GH-12208)Raymond Hettinger2019-03-071-1/+2
|
* bpo-36169 : Add overlap() method to statistics.NormalDist (GH-12149)Raymond Hettinger2019-03-071-0/+62
|
* Add more tests for pdf() and cdf() (GH-12190)Raymond Hettinger2019-03-061-3/+29
|
* bpo-36018: Add special value tests and make minor tweaks to the docs (GH-12096)Raymond Hettinger2019-02-281-0/+8
| | | https://bugs.python.org/issue36018
* bpo-36018: Add properties for mean and stdev (GH-12022)Raymond Hettinger2019-02-241-0/+6
| | | | | | | | | | | | Responding to suggestions on the tracker and some off-line suggestions. Davin suggested that english named accessors instead of greek letters would result in more intelligible user code. Steven suggested that the parameters still need to be *mu* and *theta* which are used elsewhere (and I noted those parameter names are used in linked-to resources). Michael suggested proving-out the API by seeing whether it generalized to *Lognormal*. I did so and found that Lognormal distribution parameters *mu* and *sigma* do not represent the mean and standard deviation of the lognormal distribution (instead, they are for the underlying regular normal distribution). Putting these ideas together, we have NormalDist parameterized by *mu* and *sigma* but offering English named properties for accessors. That gives lets us match other API that access mu and sigma, it matches the external resources on the topic, gives us clear english names in user code. The API extends nicely to LogNormal where the parameters and the summary statistic accessors are not the same. https://bugs.python.org/issue36018
* bpo-36018: Make __pos__ return a distinct instance of NormDist (GH-12009)Raymond Hettinger2019-02-241-0/+12
| | | https://bugs.python.org/issue36018
* bpo-36018: Add the NormalDist class to the statistics module (GH-11973)Raymond Hettinger2019-02-231-0/+177
|
* bpo-35904: Add statistics.fmean() (GH-11892)Raymond Hettinger2019-02-211-0/+45
|
* bpo-30144: Import collections ABC from collections.abc rather than ↵Serhiy Storchaka2017-04-241-2/+3
| | | | collections. (#1263)
* Issue #27181 remove geometric_mean and defer for 3.7.Steven D'Aprano2016-10-041-267/+0
|
* Remove expected failure from test of _product internal function.Steven D'Aprano2016-08-241-2/+2
|