python-docs-fr/library/statistics.po

918 lines
30 KiB
Plaintext
Raw Normal View History

2018-07-04 09:06:45 +00:00
# Copyright (C) 2001-2018, Python Software Foundation
2018-07-04 09:08:42 +00:00
# For licence information, see README file.
2016-10-30 09:46:26 +00:00
#
msgid ""
msgstr ""
2019-12-05 22:15:54 +00:00
"Project-Id-Version: Python 3\n"
2016-10-30 09:46:26 +00:00
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-11-15 18:54+0100\n"
2016-10-30 09:46:26 +00:00
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
2018-07-04 09:14:25 +00:00
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
2017-05-23 22:40:56 +00:00
"Language: fr\n"
2016-10-30 09:46:26 +00:00
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../Doc/library/statistics.rst:2
msgid ":mod:`statistics` --- Mathematical statistics functions"
msgstr ""
#: ../Doc/library/statistics.rst:12
msgid "**Source code:** :source:`Lib/statistics.py`"
msgstr "**Code source :** :source:`Lib/statistics.py`"
#: ../Doc/library/statistics.rst:21
msgid ""
"This module provides functions for calculating mathematical statistics of "
2019-09-06 11:34:57 +00:00
"numeric (:class:`~numbers.Real`-valued) data."
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:24
2016-10-30 09:46:26 +00:00
msgid ""
2019-09-06 11:34:57 +00:00
"The module is not intended to be a competitor to third-party libraries such "
"as `NumPy <https://numpy.org>`_, `SciPy <https://www.scipy.org/>`_, or "
"proprietary full-featured statistics packages aimed at professional "
"statisticians such as Minitab, SAS and Matlab. It is aimed at the level of "
"graphing and scientific calculators."
msgstr ""
#: ../Doc/library/statistics.rst:30
msgid ""
"Unless explicitly noted, these functions support :class:`int`, :class:"
"`float`, :class:`~decimal.Decimal` and :class:`~fractions.Fraction`. "
2016-10-30 09:46:26 +00:00
"Behaviour with other types (whether in the numeric tower or not) is "
2019-09-06 11:34:57 +00:00
"currently unsupported. Collections with a mix of types are also undefined "
"and implementation-dependent. If your input data consists of mixed types, "
"you may be able to use :func:`map` to ensure a consistent result, for "
"example: ``map(float, input_data)``."
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:39
2016-10-30 09:46:26 +00:00
msgid "Averages and measures of central location"
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:41
2016-10-30 09:46:26 +00:00
msgid ""
"These functions calculate an average or typical value from a population or "
"sample."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:45
2016-10-30 09:46:26 +00:00
msgid ":func:`mean`"
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:45
2016-10-30 09:46:26 +00:00
msgid "Arithmetic mean (\"average\") of data."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:46
2019-09-04 09:35:23 +00:00
msgid ":func:`fmean`"
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:46
2019-09-04 09:35:23 +00:00
msgid "Fast, floating point arithmetic mean."
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:47
2019-09-04 09:35:23 +00:00
msgid ":func:`geometric_mean`"
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:47
2019-09-04 09:35:23 +00:00
msgid "Geometric mean of data."
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:48
2019-09-04 09:35:23 +00:00
msgid ":func:`harmonic_mean`"
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:48
2019-09-04 09:35:23 +00:00
msgid "Harmonic mean of data."
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:49
2019-09-04 09:35:23 +00:00
msgid ":func:`median`"
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:49
2019-09-04 09:35:23 +00:00
msgid "Median (middle value) of data."
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:50
2019-09-04 09:35:23 +00:00
msgid ":func:`median_low`"
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:50
2019-09-04 09:35:23 +00:00
msgid "Low median of data."
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:51
2019-09-04 09:35:23 +00:00
msgid ":func:`median_high`"
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:51
2019-09-04 09:35:23 +00:00
msgid "High median of data."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:52
2019-09-04 09:35:23 +00:00
msgid ":func:`median_grouped`"
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:52
2019-09-04 09:35:23 +00:00
msgid "Median, or 50th percentile, of grouped data."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:53
2019-09-04 09:35:23 +00:00
msgid ":func:`mode`"
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:53
2019-09-04 09:35:23 +00:00
msgid "Single mode (most common value) of discrete or nominal data."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:54
2019-09-04 09:35:23 +00:00
msgid ":func:`multimode`"
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:54
2019-09-04 09:35:23 +00:00
msgid "List of modes (most common values) of discrete or nomimal data."
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:55
2019-09-04 09:35:23 +00:00
msgid ":func:`quantiles`"
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:55
2019-09-04 09:35:23 +00:00
msgid "Divide data into intervals with equal probability."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:59
2016-10-30 09:46:26 +00:00
msgid "Measures of spread"
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:61
2016-10-30 09:46:26 +00:00
msgid ""
"These functions calculate a measure of how much the population or sample "
"tends to deviate from the typical or average values."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:65
2016-10-30 09:46:26 +00:00
msgid ":func:`pstdev`"
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:65
2016-10-30 09:46:26 +00:00
msgid "Population standard deviation of data."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:66
2016-10-30 09:46:26 +00:00
msgid ":func:`pvariance`"
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:66
2016-10-30 09:46:26 +00:00
msgid "Population variance of data."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:67
2016-10-30 09:46:26 +00:00
msgid ":func:`stdev`"
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:67
2016-10-30 09:46:26 +00:00
msgid "Sample standard deviation of data."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:68
2016-10-30 09:46:26 +00:00
msgid ":func:`variance`"
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:68
2016-10-30 09:46:26 +00:00
msgid "Sample variance of data."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:73
2016-10-30 09:46:26 +00:00
msgid "Function details"
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:75
2016-10-30 09:46:26 +00:00
msgid ""
"Note: The functions do not require the data given to them to be sorted. "
"However, for reading convenience, most of the examples show sorted sequences."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:80
2016-10-30 09:46:26 +00:00
msgid ""
2017-04-02 20:14:06 +00:00
"Return the sample arithmetic mean of *data* which can be a sequence or "
"iterable."
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:82
2016-10-30 09:46:26 +00:00
msgid ""
"The arithmetic mean is the sum of the data divided by the number of data "
"points. It is commonly called \"the average\", although it is only one of "
"many different mathematical averages. It is a measure of the central "
"location of the data."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:87
2016-10-30 09:46:26 +00:00
msgid "If *data* is empty, :exc:`StatisticsError` will be raised."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:89
2016-10-30 09:46:26 +00:00
msgid "Some examples of use:"
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:108
2016-10-30 09:46:26 +00:00
msgid ""
"The mean is strongly affected by outliers and is not a robust estimator for "
"central location: the mean is not necessarily a typical example of the data "
2019-09-06 11:34:57 +00:00
"points. For more robust measures of central location, see :func:`median` "
"and :func:`mode`."
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:113
2016-10-30 09:46:26 +00:00
msgid ""
2019-09-06 11:34:57 +00:00
"The sample mean gives an unbiased estimate of the true population mean, so "
"that when taken on average over all the possible samples, ``mean(sample)`` "
"converges on the true mean of the entire population. If *data* represents "
"the entire population rather than a sample, then ``mean(data)`` is "
"equivalent to calculating the true population mean μ."
2016-10-30 09:46:26 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:122
2019-09-04 09:35:23 +00:00
msgid "Convert *data* to floats and compute the arithmetic mean."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:124
2019-09-04 09:35:23 +00:00
msgid ""
"This runs faster than the :func:`mean` function and it always returns a :"
"class:`float`. The *data* may be a sequence or iterable. If the input "
2019-09-06 11:34:57 +00:00
"dataset is empty, raises a :exc:`StatisticsError`."
2019-09-04 09:35:23 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:138
2019-09-04 09:35:23 +00:00
msgid "Convert *data* to floats and compute the geometric mean."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:140
msgid ""
"The geometric mean indicates the central tendency or typical value of the "
"*data* using the product of the values (as opposed to the arithmetic mean "
"which uses their sum)."
msgstr ""
#: ../Doc/library/statistics.rst:144
2019-09-04 09:35:23 +00:00
msgid ""
"Raises a :exc:`StatisticsError` if the input dataset is empty, if it "
2019-09-06 11:34:57 +00:00
"contains a zero, or if it contains a negative value. The *data* may be a "
"sequence or iterable."
2019-09-04 09:35:23 +00:00
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:148
2019-09-04 09:35:23 +00:00
msgid ""
"No special efforts are made to achieve exact results. (However, this may "
"change in the future.)"
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:161
2016-10-30 09:46:26 +00:00
msgid ""
"Return the harmonic mean of *data*, a sequence or iterable of real-valued "
2016-10-30 09:46:26 +00:00
"numbers."
msgstr ""
2019-09-06 11:34:57 +00:00
#: ../Doc/library/statistics.rst:164
2016-10-30 09:46:26 +00:00
msgid ""
"The harmonic mean, sometimes called the subcontrary mean, is the reciprocal "
"of the arithmetic :func:`mean` of the reciprocals of the data. For example, "
"the harmonic mean of three values *a*, *b* and *c* will be equivalent to ``3/"
"(1/a + 1/b + 1/c)``. If one of the values is zero, the result will be zero."
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:170
2016-10-30 09:46:26 +00:00
msgid ""
"The harmonic mean is a type of average, a measure of the central location of "
2019-09-06 11:34:57 +00:00
"the data. It is often appropriate when averaging rates or ratios, for "
"example speeds."
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:174
2016-10-30 09:46:26 +00:00
msgid ""
2019-09-06 11:34:57 +00:00
"Suppose a car travels 10 km at 40 km/hr, then another 10 km at 60 km/hr. "
"What is the average speed?"
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:182
2016-10-30 09:46:26 +00:00
msgid ""
2019-09-06 11:34:57 +00:00
"Suppose an investor purchases an equal value of shares in each of three "
"companies, with P/E (price/earning) ratios of 2.5, 3 and 10. What is the "
"average P/E ratio for the investor's portfolio?"
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:191
2016-10-30 09:46:26 +00:00
msgid ""
":exc:`StatisticsError` is raised if *data* is empty, or any element is less "
"than zero."
msgstr ""
#: ../Doc/library/statistics.rst:194
msgid ""
"The current algorithm has an early-out when it encounters a zero in the "
"input. This means that the subsequent inputs are not tested for validity. "
"(This behavior may change in the future.)"
msgstr ""
#: ../Doc/library/statistics.rst:203
2016-10-30 09:46:26 +00:00
msgid ""
"Return the median (middle value) of numeric data, using the common \"mean of "
2017-04-02 20:14:06 +00:00
"middle two\" method. If *data* is empty, :exc:`StatisticsError` is raised. "
"*data* can be a sequence or iterable."
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:207
2016-10-30 09:46:26 +00:00
msgid ""
2019-09-06 11:34:57 +00:00
"The median is a robust measure of central location and is less affected by "
"the presence of outliers. When the number of data points is odd, the middle "
"data point is returned:"
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:216
2016-10-30 09:46:26 +00:00
msgid ""
"When the number of data points is even, the median is interpolated by taking "
"the average of the two middle values:"
msgstr ""
#: ../Doc/library/statistics.rst:224
2016-10-30 09:46:26 +00:00
msgid ""
"This is suited for when your data is discrete, and you don't mind that the "
"median may not be an actual data point."
msgstr ""
#: ../Doc/library/statistics.rst:227
2018-06-28 13:32:56 +00:00
msgid ""
2019-09-06 11:34:57 +00:00
"If the data is ordinal (supports order operations) but not numeric (doesn't "
"support addition), consider using :func:`median_low` or :func:`median_high` "
2018-06-28 13:32:56 +00:00
"instead."
msgstr ""
#: ../Doc/library/statistics.rst:233
2016-10-30 09:46:26 +00:00
msgid ""
"Return the low median of numeric data. If *data* is empty, :exc:"
"`StatisticsError` is raised. *data* can be a sequence or iterable."
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:236
2016-10-30 09:46:26 +00:00
msgid ""
"The low median is always a member of the data set. 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."
msgstr ""
#: ../Doc/library/statistics.rst:247
2016-10-30 09:46:26 +00:00
msgid ""
"Use the low median when your data are discrete and you prefer the median to "
"be an actual data point rather than interpolated."
msgstr ""
#: ../Doc/library/statistics.rst:253
2016-10-30 09:46:26 +00:00
msgid ""
"Return the high median of data. If *data* is empty, :exc:`StatisticsError` "
"is raised. *data* can be a sequence or iterable."
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:256
2016-10-30 09:46:26 +00:00
msgid ""
"The high median is always a member of the data set. 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."
msgstr ""
#: ../Doc/library/statistics.rst:267
2016-10-30 09:46:26 +00:00
msgid ""
"Use the high median when your data are discrete and you prefer the median to "
"be an actual data point rather than interpolated."
msgstr ""
#: ../Doc/library/statistics.rst:273
2016-10-30 09:46:26 +00:00
msgid ""
"Return the median of grouped continuous data, calculated as the 50th "
"percentile, using interpolation. If *data* is empty, :exc:`StatisticsError` "
"is raised. *data* can be a sequence or iterable."
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:282
2016-10-30 09:46:26 +00:00
msgid ""
"In the following example, the data are rounded, so that each value "
"represents the midpoint of data classes, e.g. 1 is the midpoint of the class "
2017-04-02 20:14:06 +00:00
"0.5--1.5, 2 is the midpoint of 1.5--2.5, 3 is the midpoint of 2.5--3.5, "
"etc. With the data given, the middle value falls somewhere in the class "
"3.5--4.5, and interpolation is used to estimate it:"
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:293
2016-10-30 09:46:26 +00:00
msgid ""
"Optional argument *interval* represents the class interval, and defaults to "
"1. Changing the class interval naturally will change the interpolation:"
msgstr ""
#: ../Doc/library/statistics.rst:303
2016-10-30 09:46:26 +00:00
msgid ""
"This function does not check whether the data points are at least *interval* "
"apart."
msgstr ""
#: ../Doc/library/statistics.rst:308
2016-10-30 09:46:26 +00:00
msgid ""
"Under some circumstances, :func:`median_grouped` may coerce data points to "
"floats. This behaviour is likely to change in the future."
msgstr ""
#: ../Doc/library/statistics.rst:313
2016-10-30 09:46:26 +00:00
msgid ""
"\"Statistics for the Behavioral Sciences\", Frederick J Gravetter and Larry "
"B Wallnau (8th Edition)."
msgstr ""
#: ../Doc/library/statistics.rst:316
2016-10-30 09:46:26 +00:00
msgid ""
"The `SSMEDIAN <https://help.gnome.org/users/gnumeric/stable/gnumeric."
"html#gnumeric-function-SSMEDIAN>`_ function in the Gnome Gnumeric "
"spreadsheet, including `this discussion <https://mail.gnome.org/archives/"
"gnumeric-list/2011-April/msg00018.html>`_."
msgstr ""
#: ../Doc/library/statistics.rst:324
2016-10-30 09:46:26 +00:00
msgid ""
2019-09-04 09:35:23 +00:00
"Return the single most common data point from discrete or nominal *data*. "
"The mode (when it exists) is the most typical value and serves as a measure "
"of central location."
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:328
2016-10-30 09:46:26 +00:00
msgid ""
2019-09-06 11:34:57 +00:00
"If there are multiple modes with the same frequency, returns the first one "
"encountered in the *data*. If the smallest or largest of those is desired "
"instead, use ``min(multimode(data))`` or ``max(multimode(data))``. If the "
"input *data* is empty, :exc:`StatisticsError` is raised."
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:333
2016-10-30 09:46:26 +00:00
msgid ""
2019-09-06 11:34:57 +00:00
"``mode`` assumes discrete data and returns a single value. This is the "
2016-10-30 09:46:26 +00:00
"standard treatment of the mode as commonly taught in schools:"
msgstr ""
#: ../Doc/library/statistics.rst:341
2016-10-30 09:46:26 +00:00
msgid ""
2019-09-06 11:34:57 +00:00
"The mode is unique in that it is the only statistic in this package that "
"also applies to nominal (non-numeric) data:"
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:349
2019-09-04 09:35:23 +00:00
msgid ""
"Now handles multimodal datasets by returning the first mode encountered. "
"Formerly, it raised :exc:`StatisticsError` when more than one mode was found."
msgstr ""
#: ../Doc/library/statistics.rst:357
2019-09-04 09:35:23 +00:00
msgid ""
"Return a list of the most frequently occurring values in the order they were "
"first encountered in the *data*. Will return more than one result if there "
"are multiple modes or an empty list if the *data* is empty:"
msgstr ""
#: ../Doc/library/statistics.rst:373
2016-10-30 09:46:26 +00:00
msgid ""
"Return the population standard deviation (the square root of the population "
"variance). See :func:`pvariance` for arguments and other details."
msgstr ""
#: ../Doc/library/statistics.rst:384
2016-10-30 09:46:26 +00:00
msgid ""
"Return the population variance of *data*, a non-empty sequence or iterable "
2019-09-06 11:34:57 +00:00
"of real-valued numbers. Variance, or second moment about the mean, is a "
"measure of the variability (spread or dispersion) of data. A large variance "
"indicates that the data is spread out; a small variance indicates it is "
"clustered closely around the mean."
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:390
2016-10-30 09:46:26 +00:00
msgid ""
2019-09-06 11:34:57 +00:00
"If the optional second argument *mu* is given, it is typically the mean of "
"the *data*. It can also be used to compute the second moment around a point "
"that is not the mean. If it is missing or ``None`` (the default), the "
"arithmetic mean is automatically calculated."
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:395
2016-10-30 09:46:26 +00:00
msgid ""
"Use this function to calculate the variance from the entire population. To "
"estimate the variance from a sample, the :func:`variance` function is "
"usually a better choice."
msgstr ""
#: ../Doc/library/statistics.rst:399
2016-10-30 09:46:26 +00:00
msgid "Raises :exc:`StatisticsError` if *data* is empty."
msgstr ""
#: ../Doc/library/statistics.rst:401 ../Doc/library/statistics.rst:471
2016-10-30 09:46:26 +00:00
msgid "Examples:"
2019-03-09 22:39:59 +00:00
msgstr "Exemples :"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/statistics.rst:409
2016-10-30 09:46:26 +00:00
msgid ""
"If you have already calculated the mean of your data, you can pass it as the "
"optional second argument *mu* to avoid recalculation:"
msgstr ""
#: ../Doc/library/statistics.rst:418
2016-10-30 09:46:26 +00:00
msgid "Decimals and Fractions are supported:"
msgstr ""
#: ../Doc/library/statistics.rst:432
2016-10-30 09:46:26 +00:00
msgid ""
"When called with the entire population, this gives the population variance "
"σ². When called on a sample instead, this is the biased sample variance s², "
"also known as variance with N degrees of freedom."
msgstr ""
#: ../Doc/library/statistics.rst:436
2016-10-30 09:46:26 +00:00
msgid ""
"If you somehow know the true population mean μ, you may use this function to "
"calculate the variance of a sample, giving the known population mean as the "
2019-09-06 11:34:57 +00:00
"second argument. Provided the data points are a random sample of the "
"population, the result will be an unbiased estimate of the population "
"variance."
2016-10-30 09:46:26 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:445
2016-10-30 09:46:26 +00:00
msgid ""
"Return the sample standard deviation (the square root of the sample "
"variance). See :func:`variance` for arguments and other details."
msgstr ""
#: ../Doc/library/statistics.rst:456
2016-10-30 09:46:26 +00:00
msgid ""
"Return the sample variance of *data*, an iterable of at least two real-"
"valued numbers. Variance, or second moment about the mean, is a measure of "
"the variability (spread or dispersion) of data. A large variance indicates "
"that the data is spread out; a small variance indicates it is clustered "
"closely around the mean."
msgstr ""
#: ../Doc/library/statistics.rst:462
2016-10-30 09:46:26 +00:00
msgid ""
"If the optional second argument *xbar* is given, it should be the mean of "
"*data*. If it is missing or ``None`` (the default), the mean is "
"automatically calculated."
msgstr ""
#: ../Doc/library/statistics.rst:466
2016-10-30 09:46:26 +00:00
msgid ""
"Use this function when your data is a sample from a population. To calculate "
"the variance from the entire population, see :func:`pvariance`."
msgstr ""
#: ../Doc/library/statistics.rst:469
2016-10-30 09:46:26 +00:00
msgid "Raises :exc:`StatisticsError` if *data* has fewer than two values."
msgstr ""
#: ../Doc/library/statistics.rst:479
2016-10-30 09:46:26 +00:00
msgid ""
"If you have already calculated the mean of your data, you can pass it as the "
"optional second argument *xbar* to avoid recalculation:"
msgstr ""
#: ../Doc/library/statistics.rst:488
2016-10-30 09:46:26 +00:00
msgid ""
"This function does not attempt to verify that you have passed the actual "
"mean as *xbar*. Using arbitrary values for *xbar* can lead to invalid or "
"impossible results."
msgstr ""
#: ../Doc/library/statistics.rst:492
2016-10-30 09:46:26 +00:00
msgid "Decimal and Fraction values are supported:"
msgstr ""
#: ../Doc/library/statistics.rst:506
2016-10-30 09:46:26 +00:00
msgid ""
"This is the sample variance s² with Bessel's correction, also known as "
"variance with N-1 degrees of freedom. Provided that the data points are "
"representative (e.g. independent and identically distributed), the result "
"should be an unbiased estimate of the true population variance."
msgstr ""
#: ../Doc/library/statistics.rst:511
2016-10-30 09:46:26 +00:00
msgid ""
"If you somehow know the actual population mean μ you should pass it to the :"
"func:`pvariance` function as the *mu* parameter to get the variance of a "
"sample."
msgstr ""
#: ../Doc/library/statistics.rst:517
2019-09-04 09:35:23 +00:00
msgid ""
2019-09-06 11:34:57 +00:00
"Divide *data* into *n* continuous intervals with equal probability. Returns "
2019-09-04 09:35:23 +00:00
"a list of ``n - 1`` cut points separating the intervals."
msgstr ""
#: ../Doc/library/statistics.rst:520
2019-09-04 09:35:23 +00:00
msgid ""
"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 "
2019-10-09 16:10:12 +00:00
"*data* into 100 equal sized groups. Raises :exc:`StatisticsError` if *n* is "
"not least 1."
2019-09-04 09:35:23 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:525
2019-09-04 09:35:23 +00:00
msgid ""
2019-10-09 16:10:12 +00:00
"The *data* can be any iterable containing sample data. For meaningful "
2019-09-06 11:34:57 +00:00
"results, the number of data points in *data* should be larger than *n*. "
2019-09-04 09:35:23 +00:00
"Raises :exc:`StatisticsError` if there are not at least two data points."
msgstr ""
#: ../Doc/library/statistics.rst:529
2019-09-04 09:35:23 +00:00
msgid ""
2019-10-09 16:10:12 +00:00
"The cut points are linearly interpolated from the two nearest data points. "
"For example, if a cut point falls one-third of the distance between two "
"sample values, ``100`` and ``112``, the cut-point will evaluate to ``104``."
2019-09-04 09:35:23 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:534
2019-09-04 09:35:23 +00:00
msgid ""
"The *method* for computing quantiles can be varied depending on whether the "
2019-09-06 11:34:57 +00:00
"*data* includes or excludes the lowest and highest possible values from the "
"population."
2019-09-04 09:35:23 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:538
2019-09-04 09:35:23 +00:00
msgid ""
"The default *method* is \"exclusive\" and is used for data sampled from a "
"population that can have more extreme values than found in the samples. The "
"portion of the population falling below the *i-th* of *m* sorted data points "
"is computed as ``i / (m + 1)``. Given nine sample values, the method sorts "
"them and assigns the following percentiles: 10%, 20%, 30%, 40%, 50%, 60%, "
"70%, 80%, 90%."
msgstr ""
#: ../Doc/library/statistics.rst:545
2019-09-04 09:35:23 +00:00
msgid ""
"Setting the *method* to \"inclusive\" is used for describing population data "
"or for samples that are known to include the most extreme values from the "
2019-09-06 11:34:57 +00:00
"population. The minimum value in *data* is treated as the 0th percentile "
2019-09-04 09:35:23 +00:00
"and the maximum value is treated as the 100th percentile. The portion of the "
"population falling below the *i-th* of *m* sorted data points is computed as "
"``(i - 1) / (m - 1)``. Given 11 sample values, the method sorts them and "
"assigns the following percentiles: 0%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, "
"80%, 90%, 100%."
msgstr ""
#: ../Doc/library/statistics.rst:569
2016-10-30 09:46:26 +00:00
msgid "Exceptions"
msgstr "Exceptions"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/statistics.rst:571
2016-10-30 09:46:26 +00:00
msgid "A single exception is defined:"
msgstr ""
#: ../Doc/library/statistics.rst:575
2016-10-30 09:46:26 +00:00
msgid "Subclass of :exc:`ValueError` for statistics-related exceptions."
msgstr ""
2019-09-04 09:35:23 +00:00
#: ../Doc/library/statistics.rst:579
2019-09-04 09:35:23 +00:00
msgid ":class:`NormalDist` objects"
msgstr ""
#: ../Doc/library/statistics.rst:581
2019-09-04 09:35:23 +00:00
msgid ""
":class:`NormalDist` is a tool for creating and manipulating normal "
"distributions of a `random variable <http://www.stat.yale.edu/"
2019-09-06 11:34:57 +00:00
"Courses/1997-98/101/ranvar.htm>`_. It is a class that treats the mean and "
"standard deviation of data measurements as a single entity."
2019-09-04 09:35:23 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:587
2019-09-04 09:35:23 +00:00
msgid ""
"Normal distributions arise from the `Central Limit Theorem <https://en."
"wikipedia.org/wiki/Central_limit_theorem>`_ and have a wide range of "
"applications in statistics."
msgstr ""
#: ../Doc/library/statistics.rst:593
2019-09-04 09:35:23 +00:00
msgid ""
"Returns a new *NormalDist* object where *mu* represents the `arithmetic mean "
"<https://en.wikipedia.org/wiki/Arithmetic_mean>`_ and *sigma* represents the "
"`standard deviation <https://en.wikipedia.org/wiki/Standard_deviation>`_."
msgstr ""
#: ../Doc/library/statistics.rst:598
2019-09-04 09:35:23 +00:00
msgid "If *sigma* is negative, raises :exc:`StatisticsError`."
msgstr ""
#: ../Doc/library/statistics.rst:602
2019-09-04 09:35:23 +00:00
msgid ""
"A read-only property for the `arithmetic mean <https://en.wikipedia.org/wiki/"
"Arithmetic_mean>`_ of a normal distribution."
msgstr ""
#: ../Doc/library/statistics.rst:608
2019-10-09 16:10:12 +00:00
msgid ""
"A read-only property for the `median <https://en.wikipedia.org/wiki/"
"Median>`_ of a normal distribution."
msgstr ""
#: ../Doc/library/statistics.rst:614
2019-10-09 16:10:12 +00:00
msgid ""
"A read-only property for the `mode <https://en.wikipedia.org/wiki/"
"Mode_(statistics)>`_ of a normal distribution."
msgstr ""
#: ../Doc/library/statistics.rst:620
2019-09-04 09:35:23 +00:00
msgid ""
"A read-only property for the `standard deviation <https://en.wikipedia.org/"
"wiki/Standard_deviation>`_ of a normal distribution."
msgstr ""
#: ../Doc/library/statistics.rst:626
2019-09-04 09:35:23 +00:00
msgid ""
"A read-only property for the `variance <https://en.wikipedia.org/wiki/"
"Variance>`_ of a normal distribution. Equal to the square of the standard "
"deviation."
msgstr ""
#: ../Doc/library/statistics.rst:632
2019-09-04 09:35:23 +00:00
msgid ""
2019-09-06 11:34:57 +00:00
"Makes a normal distribution instance with *mu* and *sigma* parameters "
"estimated from the *data* using :func:`fmean` and :func:`stdev`."
2019-09-04 09:35:23 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:635
2019-09-04 09:35:23 +00:00
msgid ""
2019-09-06 11:34:57 +00:00
"The *data* can be any :term:`iterable` and should consist of values that can "
"be converted to type :class:`float`. If *data* does not contain at least "
"two elements, raises :exc:`StatisticsError` because it takes at least one "
"point to estimate a central value and at least two points to estimate "
"dispersion."
2019-09-04 09:35:23 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:643
2019-09-04 09:35:23 +00:00
msgid ""
"Generates *n* random samples for a given mean and standard deviation. "
"Returns a :class:`list` of :class:`float` values."
msgstr ""
#: ../Doc/library/statistics.rst:646
2019-09-04 09:35:23 +00:00
msgid ""
"If *seed* is given, creates a new instance of the underlying random number "
"generator. This is useful for creating reproducible results, even in a "
"multi-threading context."
msgstr ""
#: ../Doc/library/statistics.rst:652
2019-09-04 09:35:23 +00:00
msgid ""
"Using a `probability density function (pdf) <https://en.wikipedia.org/wiki/"
"Probability_density_function>`_, compute the relative likelihood that a "
"random variable *X* will be near the given value *x*. Mathematically, it is "
2019-09-06 11:34:57 +00:00
"the limit of the ratio ``P(x <= X < x+dx) / dx`` as *dx* approaches zero."
2019-09-04 09:35:23 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:658
2019-09-04 09:35:23 +00:00
msgid ""
"The relative likelihood is computed as the probability of a sample occurring "
"in a narrow range divided by the width of the range (hence the word \"density"
"\"). Since the likelihood is relative to other points, its value can be "
"greater than `1.0`."
msgstr ""
#: ../Doc/library/statistics.rst:665
2019-09-04 09:35:23 +00:00
msgid ""
"Using a `cumulative distribution function (cdf) <https://en.wikipedia.org/"
"wiki/Cumulative_distribution_function>`_, compute the probability that a "
"random variable *X* will be less than or equal to *x*. Mathematically, it "
"is written ``P(X <= x)``."
msgstr ""
#: ../Doc/library/statistics.rst:672
2019-09-04 09:35:23 +00:00
msgid ""
"Compute the inverse cumulative distribution function, also known as the "
"`quantile function <https://en.wikipedia.org/wiki/Quantile_function>`_ or "
"the `percent-point <https://www.statisticshowto.datasciencecentral.com/"
"inverse-distribution-function/>`_ function. Mathematically, it is written "
"``x : P(X <= x) = p``."
msgstr ""
#: ../Doc/library/statistics.rst:678
2019-09-04 09:35:23 +00:00
msgid ""
"Finds the value *x* of the random variable *X* such that the probability of "
"the variable being less than or equal to that value equals the given "
"probability *p*."
msgstr ""
#: ../Doc/library/statistics.rst:684
2019-09-04 09:35:23 +00:00
msgid ""
2019-09-06 11:34:57 +00:00
"Measures the agreement between two normal probability distributions. Returns "
"a value between 0.0 and 1.0 giving `the overlapping area for the two "
"probability density functions <https://www.rasch.org/rmt/rmt101r.htm>`_."
2019-09-04 09:35:23 +00:00
msgstr ""
#: ../Doc/library/statistics.rst:691
2019-10-09 16:10:12 +00:00
msgid ""
"Divide the normal distribution into *n* continuous intervals with equal "
"probability. Returns a list of (n - 1) cut points separating the intervals."
msgstr ""
#: ../Doc/library/statistics.rst:695
2019-10-09 16:10:12 +00:00
msgid ""
"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 into 100 equal sized groups."
msgstr ""
#: ../Doc/library/statistics.rst:699
2019-09-04 09:35:23 +00:00
msgid ""
"Instances of :class:`NormalDist` support addition, subtraction, "
"multiplication and division by a constant. These operations are used for "
"translation and scaling. For example:"
msgstr ""
#: ../Doc/library/statistics.rst:709
2019-09-04 09:35:23 +00:00
msgid ""
"Dividing a constant by an instance of :class:`NormalDist` is not supported "
"because the result wouldn't be normally distributed."
msgstr ""
#: ../Doc/library/statistics.rst:712
2019-09-04 09:35:23 +00:00
msgid ""
"Since normal distributions arise from additive effects of independent "
"variables, it is possible to `add and subtract two independent normally "
"distributed random variables <https://en.wikipedia.org/wiki/"
"Sum_of_normally_distributed_random_variables>`_ represented as instances of :"
"class:`NormalDist`. For example:"
msgstr ""
#: ../Doc/library/statistics.rst:732
2019-09-04 09:35:23 +00:00
msgid ":class:`NormalDist` Examples and Recipes"
msgstr ""
#: ../Doc/library/statistics.rst:734
2019-09-04 09:35:23 +00:00
msgid ":class:`NormalDist` readily solves classic probability problems."
msgstr ""
#: ../Doc/library/statistics.rst:736
2019-09-04 09:35:23 +00:00
msgid ""
"For example, given `historical data for SAT exams <https://blog.prepscholar."
"com/sat-standard-deviation>`_ showing that scores are normally distributed "
"with a mean of 1060 and a standard deviation of 192, determine the "
"percentage of students with test scores between 1100 and 1200, after "
"rounding to the nearest whole number:"
msgstr ""
#: ../Doc/library/statistics.rst:749
2019-09-04 09:35:23 +00:00
msgid ""
"Find the `quartiles <https://en.wikipedia.org/wiki/Quartile>`_ and `deciles "
"<https://en.wikipedia.org/wiki/Decile>`_ for the SAT scores:"
msgstr ""
#: ../Doc/library/statistics.rst:759
2019-09-04 09:35:23 +00:00
msgid ""
"To estimate the distribution for a model than isn't easy to solve "
"analytically, :class:`NormalDist` can generate input samples for a `Monte "
"Carlo simulation <https://en.wikipedia.org/wiki/Monte_Carlo_method>`_:"
msgstr ""
#: ../Doc/library/statistics.rst:775
2019-09-04 09:35:23 +00:00
msgid "Normal distributions commonly arise in machine learning problems."
msgstr ""
#: ../Doc/library/statistics.rst:777
2019-09-04 09:35:23 +00:00
msgid ""
"Wikipedia has a `nice example of a Naive Bayesian Classifier <https://en."
"wikipedia.org/wiki/Naive_Bayes_classifier#Sex_classification>`_. The "
"challenge is to predict a person's gender from measurements of normally "
"distributed features including height, weight, and foot size."
msgstr ""
#: ../Doc/library/statistics.rst:782
2019-09-04 09:35:23 +00:00
msgid ""
"We're given a training dataset with measurements for eight people. The "
"measurements are assumed to be normally distributed, so we summarize the "
"data with :class:`NormalDist`:"
msgstr ""
#: ../Doc/library/statistics.rst:795
2019-09-04 09:35:23 +00:00
msgid ""
"Next, we encounter a new person whose feature measurements are known but "
"whose gender is unknown:"
msgstr ""
#: ../Doc/library/statistics.rst:804
2019-09-04 09:35:23 +00:00
msgid ""
"Starting with a 50% `prior probability <https://en.wikipedia.org/wiki/"
"Prior_probability>`_ of being male or female, we compute the posterior as "
"the prior times the product of likelihoods for the feature measurements "
"given the gender:"
msgstr ""
#: ../Doc/library/statistics.rst:819
2019-09-04 09:35:23 +00:00
msgid ""
"The final prediction goes to the largest posterior. This is known as the "
"`maximum a posteriori <https://en.wikipedia.org/wiki/"
"Maximum_a_posteriori_estimation>`_ or MAP:"
msgstr ""