chunk_id
stringlengths
36
36
source
stringclasses
35 values
source_url
stringlengths
0
290
upstream_license
stringclasses
1 value
document_id
stringlengths
36
36
chunk_index
int64
0
324k
retrieved_at
stringclasses
2 values
chunker_version
stringclasses
4 values
content_hash
stringlengths
15
64
content
stringlengths
50
44.7k
namespace
stringclasses
9 values
source_name
stringclasses
35 values
raw_text
stringlengths
50
44.7k
cleaned_text
stringlengths
50
44.7k
tags
stringclasses
49 values
collection_name
stringclasses
11 values
53cdfa76-2c89-4493-9012-7e354c96d7f0
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,769
supabase-export-v2
c0ca1662ad7afb13
ordinary least squares. Simple linear regression describes the relationship between an independent variable *x* and a dependent variable *y* in terms of this linear function: *y = slope \* x + intercept + noise*
trusted_official_docs
CPython Docs
ordinary least squares. Simple linear regression describes the relationship between an independent variable *x* and a dependent variable *y* in terms of this linear function: *y = slope \* x + intercept + noise*
ordinary least squares. Simple linear regression describes the relationship between an independent variable *x* and a dependent variable *y* in terms of this linear function: *y = slope \* x + intercept + noise*
python, official-docs, cpython, P0
Local_Trusted_Corpus
54892a2f-e3fc-402c-a4f3-7b5a2a6c411f
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,689
supabase-export-v2
59220215a057774e
.. function:: multimode(data) 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:
trusted_official_docs
CPython Docs
.. function:: multimode(data) 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:
.. function:: multimode(data) 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:
python, official-docs, cpython, P0
Local_Trusted_Corpus
549f9708-f10d-4c6a-812f-b58facfac49a
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,770
supabase-export-v2
4b3555dd7f3a436b
*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).
trusted_official_docs
CPython Docs
*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).
*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).
python, official-docs, cpython, P0
Local_Trusted_Corpus
554dce92-aedb-4fc8-9540-e582c1d5782b
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,586
supabase-export-v2
9d31a3fd23e5d8dc
>>> 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')
trusted_official_docs
CPython Docs
>>> 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')
>>> 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')
python, official-docs, cpython, P0
Local_Trusted_Corpus
59132730-6727-4bbb-81cf-ee9c083c70d7
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,866
supabase-export-v2
c9cb52cbb58eb554
>>> ht = 6.0 # height >>> wt = 130 # weight >>> fs = 8 # foot size 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:
trusted_official_docs
CPython Docs
>>> ht = 6.0 # height >>> wt = 130 # weight >>> fs = 8 # foot size 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:
>>> ht = 6.0 # height >>> wt = 130 # weight >>> fs = 8 # foot size 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:
python, official-docs, cpython, P0
Local_Trusted_Corpus
5dae2fb4-cc6d-4546-af29-9aadc4242819
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,721
supabase-export-v2
a1a2fc16ba5469d3
argument *xbar* is given, it should be the *sample* mean of *data*. If it is missing or ``None`` (the default), 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 :func:`pvariance`.
trusted_official_docs
CPython Docs
argument *xbar* is given, it should be the *sample* mean of *data*. If it is missing or ``None`` (the default), 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 :func:`pvariance`.
argument *xbar* is given, it should be the *sample* mean of *data*. If it is missing or ``None`` (the default), 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 :func:`pvariance`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
5e25ae7b-1558-450f-9033-6c6bfc2b61aa
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,671
supabase-export-v2
ea95c911fe25e008
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.
trusted_official_docs
CPython Docs
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.
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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
61f2437d-0bf5-465d-a591-d3bf6a69368e
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,672
supabase-export-v2
e35aeee8fd38848a
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 :func:`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 e...
trusted_official_docs
CPython Docs
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 :func:`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 e...
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 :func:`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 e...
python, official-docs, cpython, P0
Local_Trusted_Corpus
62651e63-5929-4562-8244-bc513e45b33a
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,616
supabase-export-v2
c092e1be90fa6436
>>> 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?
trusted_official_docs
CPython Docs
>>> 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]) 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?
python, official-docs, cpython, P0
Local_Trusted_Corpus
6347d89d-e505-4c2d-b086-e1c63babdd55
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,759
supabase-export-v2
b4cf557c46096580
Both inputs must be of the same length (no less than two), and need not to be constant, otherwise :exc:`StatisticsError` is raised. Example with `Kepler's laws of planetary motion <https://en.wikipedia.org/wiki/Kepler's_laws_of_planetary_motion>`_:
trusted_official_docs
CPython Docs
Both inputs must be of the same length (no less than two), and need not to be constant, otherwise :exc:`StatisticsError` is raised. Example with `Kepler's laws of planetary motion <https://en.wikipedia.org/wiki/Kepler's_laws_of_planetary_motion>`_:
Both inputs must be of the same length (no less than two), and need not to be constant, otherwise :exc:`StatisticsError` is raised. Example with `Kepler's laws of planetary motion <https://en.wikipedia.org/wiki/Kepler's_laws_of_planetary_motion>`_:
python, official-docs, cpython, P0
Local_Trusted_Corpus
64c10e6e-9707-4910-aa75-192dcd3e15f3
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,604
supabase-export-v2
51fbef15efa48820
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). Raises a :exc:`StatisticsError` if the input dataset is empty, if it contains a zero, or if it contains a negative value. The *data* may be a sequence or iterable.
trusted_official_docs
CPython Docs
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). Raises a :exc:`StatisticsError` if the input dataset is empty, if it contains a zero, or if it contains a negative value. The *data* may be a sequence or iterable.
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). Raises a :exc:`StatisticsError` if the input dataset is empty, if it contains a zero, or if it contains a negative value. The *data* may be a sequence or iterable.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6641ef4d-6634-42bd-a67c-fff8898ca0d8
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,834
supabase-export-v2
e10b5fa80bd6b062
.. doctest:: >>> birth_weights = NormalDist.from_samples([2.5, 3.1, 2.1, 2.4, 2.7, 3.5]) >>> drug_effects = NormalDist(0.4, 0.15) >>> combined = birth_weights + drug_effects >>> round(combined.mean, 1) 3.1 >>> round(combined.stdev, 1) 0.5
trusted_official_docs
CPython Docs
.. doctest:: >>> birth_weights = NormalDist.from_samples([2.5, 3.1, 2.1, 2.4, 2.7, 3.5]) >>> drug_effects = NormalDist(0.4, 0.15) >>> combined = birth_weights + drug_effects >>> round(combined.mean, 1) 3.1 >>> round(combined.stdev, 1) 0.5
.. doctest:: >>> birth_weights = NormalDist.from_samples([2.5, 3.1, 2.1, 2.4, 2.7, 3.5]) >>> drug_effects = NormalDist(0.4, 0.15) >>> combined = birth_weights + drug_effects >>> round(combined.mean, 1) 3.1 >>> round(combined.stdev, 1) 0.5
python, official-docs, cpython, P0
Local_Trusted_Corpus
69700588-3d73-4220-af03-375dfb70d685
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,576
supabase-export-v2
ef1fab99c922806b
These functions calculate statistics regarding relations between two inputs. ========================= ===================================================== :func:`covariance` Sample covariance for two variables. :func:`correlation` Pearson and Spearman's correlation coefficients. :func:`linear_regression` Slope and in...
trusted_official_docs
CPython Docs
These functions calculate statistics regarding relations between two inputs. ========================= ===================================================== :func:`covariance` Sample covariance for two variables. :func:`correlation` Pearson and Spearman's correlation coefficients. :func:`linear_regression` Slope and in...
These functions calculate statistics regarding relations between two inputs. ========================= ===================================================== :func:`covariance` Sample covariance for two variables. :func:`correlation` Pearson and Spearman's correlation coefficients. :func:`linear_regression` Slope and in...
python, official-docs, cpython, P0
Local_Trusted_Corpus
69be1017-cc67-4803-8284-78dc738a62b3
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,771
supabase-export-v2
fc92ee2239a871f3
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). Both inputs must be sequences of the same length (no less than two), and the independent variable *x* cannot be constant; otherwise a :exc:`StatisticsError` is raised...
trusted_official_docs
CPython Docs
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). Both inputs must be sequences of the same length (no less than two), and the independent variable *x* cannot be constant; otherwise a :exc:`StatisticsError` is raised...
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). Both inputs must be sequences of the same length (no less than two), and the independent variable *x* cannot be constant; otherwise a :exc:`StatisticsError` is raised...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6c7312b1-fc67-4900-afa4-86c36faf7f29
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,640
supabase-export-v2
b4c3f492c3dbdeff
Return a function that makes a random selection from the estimated probability density function produced by ``kde(data, h, kernel)``. Providing a *seed* allows reproducible selections. In the future, the values may change slightly as more accurate kernel inverse CDF estimates are implemented. The seed may be an integ...
trusted_official_docs
CPython Docs
Return a function that makes a random selection from the estimated probability density function produced by ``kde(data, h, kernel)``. Providing a *seed* allows reproducible selections. In the future, the values may change slightly as more accurate kernel inverse CDF estimates are implemented. The seed may be an integ...
Return a function that makes a random selection from the estimated probability density function produced by ``kde(data, h, kernel)``. Providing a *seed* allows reproducible selections. In the future, the values may change slightly as more accurate kernel inverse CDF estimates are implemented. The seed may be an integ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6cea2a96-3274-42f0-9e2f-4d24e95178a7
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,777
supabase-export-v2
520359efeefd0a69
*y = slope \* x + noise* Continuing the example from :func:`correlation`, we look to see how well a model based on major planets can predict the orbital distances for dwarf planets:
trusted_official_docs
CPython Docs
*y = slope \* x + noise* Continuing the example from :func:`correlation`, we look to see how well a model based on major planets can predict the orbital distances for dwarf planets:
*y = slope \* x + noise* Continuing the example from :func:`correlation`, we look to see how well a model based on major planets can predict the orbital distances for dwarf planets:
python, official-docs, cpython, P0
Local_Trusted_Corpus
6dd5e050-c57b-4510-8797-f02e8669ce3e
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,781
supabase-export-v2
a9cfffa7a018e6db
111_845, 103_410, 1_680] # days >>> predicted_dist = [math.cbrt(slope * (p * p)) for p in orbital_periods] >>> list(map(round, predicted_dist)) [5912, 10166, 6806, 6459, 414] >>> [5_906, 10_152, 6_796, 6_450, 414] # actual distance in million km [5906, 10152, 6796, 6450, 414]
trusted_official_docs
CPython Docs
111_845, 103_410, 1_680] # days >>> predicted_dist = [math.cbrt(slope * (p * p)) for p in orbital_periods] >>> list(map(round, predicted_dist)) [5912, 10166, 6806, 6459, 414] >>> [5_906, 10_152, 6_796, 6_450, 414] # actual distance in million km [5906, 10152, 6796, 6450, 414]
111_845, 103_410, 1_680] # days >>> predicted_dist = [math.cbrt(slope * (p * p)) for p in orbital_periods] >>> list(map(round, predicted_dist)) [5912, 10166, 6806, 6459, 414] >>> [5_906, 10_152, 6_796, 6_450, 414] # actual distance in million km [5906, 10152, 6796, 6450, 414]
python, official-docs, cpython, P0
Local_Trusted_Corpus
6ef5e3ea-caba-48ec-81db-3b5a0db08238
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,722
supabase-export-v2
ba71220242b1fa19
Use this function when your data is a sample from a population. To calculate the variance from the entire population, see :func:`pvariance`. Raises :exc:`StatisticsError` if *data* has fewer than two values.
trusted_official_docs
CPython Docs
Use this function when your data is a sample from a population. To calculate the variance from the entire population, see :func:`pvariance`. Raises :exc:`StatisticsError` if *data* has fewer than two values.
Use this function when your data is a sample from a population. To calculate the variance from the entire population, see :func:`pvariance`. Raises :exc:`StatisticsError` if *data* has fewer than two values.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6fbcc057-c612-4c95-aa0e-bf32c3eccb6d
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,627
supabase-export-v2
97184325b88676f9
of smoothing is controlled by the scaling parameter *h* which is called the bandwidth. Smaller values emphasize local features while larger values give smoother results. The *kernel* determines the relative weights of the sample data points. Generally, the choice of kernel shape does not matter as much as the more in...
trusted_official_docs
CPython Docs
of smoothing is controlled by the scaling parameter *h* which is called the bandwidth. Smaller values emphasize local features while larger values give smoother results. The *kernel* determines the relative weights of the sample data points. Generally, the choice of kernel shape does not matter as much as the more in...
of smoothing is controlled by the scaling parameter *h* which is called the bandwidth. Smaller values emphasize local features while larger values give smoother results. The *kernel* determines the relative weights of the sample data points. Generally, the choice of kernel shape does not matter as much as the more in...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7155574d-22e8-4d97-8f35-7cf05edac55e
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,581
supabase-export-v2
a67e482b113beaf2
Return the sample arithmetic mean of *data* which can be a sequence or iterable. 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.
trusted_official_docs
CPython Docs
Return the sample arithmetic mean of *data* which can be a sequence or iterable. 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.
Return the sample arithmetic mean of *data* which can be a sequence or iterable. 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
71a99560-f0cb-4d2a-a255-2af3b7641fd2
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,670
supabase-export-v2
85c4e9e7cf36dd27
.. doctest:: >>> from collections import Counter >>> 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 ... }) ...
trusted_official_docs
CPython Docs
.. doctest:: >>> from collections import Counter >>> 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 ... }) ...
.. doctest:: >>> from collections import Counter >>> 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 ... }) ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
72038e77-f130-4a63-a9a4-a800fc8b83e8
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,592
supabase-export-v2
42ad7fa31ed18c1b
Convert *data* to floats and compute the arithmetic mean. 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 dataset is empty, raises a :exc:`StatisticsError`.
trusted_official_docs
CPython Docs
Convert *data* to floats and compute the arithmetic mean. 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 dataset is empty, raises a :exc:`StatisticsError`.
Convert *data* to floats and compute the arithmetic mean. 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 dataset is empty, raises a :exc:`StatisticsError`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
74039060-0bb9-48c3-a5dd-b13926c952ba
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,870
supabase-export-v2
39cb9c33b47e1f0f
>>> posterior_female = (prior_female * height_female.pdf(ht) * ... weight_female.pdf(wt) * foot_size_female.pdf(fs)) 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:
trusted_official_docs
CPython Docs
>>> posterior_female = (prior_female * height_female.pdf(ht) * ... weight_female.pdf(wt) * foot_size_female.pdf(fs)) 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:
>>> posterior_female = (prior_female * height_female.pdf(ht) * ... weight_female.pdf(wt) * foot_size_female.pdf(fs)) 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:
python, official-docs, cpython, P0
Local_Trusted_Corpus
74868336-6233-4c5f-a571-419e6286da7f
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,710
supabase-export-v2
c7a3001143a13483
>>> 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)
trusted_official_docs
CPython Docs
>>> 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)
>>> 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)
python, official-docs, cpython, P0
Local_Trusted_Corpus
77c27ed8-6769-4d57-b891-afc47e09baeb
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,848
supabase-export-v2
d5ab7cac9859a0b0
.. doctest:: >>> def model(x, y, z): ... return (3*x + 7*x*y - 5*y) / (11 * z) ... >>> n = 100_000 >>> X = NormalDist(10, 2.5).samples(n, seed=3652260728) >>> Y = NormalDist(15, 1.75).samples(n, seed=4582495471) >>> Z = NormalDist(50, 1.25).samples(n, seed=6582483453) >>> quantiles(map(model, X, Y, Z)) # doctest:...
trusted_official_docs
CPython Docs
.. doctest:: >>> def model(x, y, z): ... return (3*x + 7*x*y - 5*y) / (11 * z) ... >>> n = 100_000 >>> X = NormalDist(10, 2.5).samples(n, seed=3652260728) >>> Y = NormalDist(15, 1.75).samples(n, seed=4582495471) >>> Z = NormalDist(50, 1.25).samples(n, seed=6582483453) >>> quantiles(map(model, X, Y, Z)) # doctest:...
.. doctest:: >>> def model(x, y, z): ... return (3*x + 7*x*y - 5*y) / (11 * z) ... >>> n = 100_000 >>> X = NormalDist(10, 2.5).samples(n, seed=3652260728) >>> Y = NormalDist(15, 1.75).samples(n, seed=4582495471) >>> Z = NormalDist(50, 1.25).samples(n, seed=6582483453) >>> quantiles(map(model, X, Y, Z)) # doctest:...
python, official-docs, cpython, P0
Local_Trusted_Corpus
79fbdfd1-0550-436f-8c37-f26572d5164d
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,687
supabase-export-v2
24e5608efaba775f
type :class:`list`, consider casting to :class:`tuple`. For mixed or nested inputs, consider using this slower quadratic algorithm that only depends on equality tests: ``max(data, key=data.count)``. .. versionchanged:: 3.8 Now handles multimodal datasets by returning the first mode encountered. Formerly, it raised :ex...
trusted_official_docs
CPython Docs
type :class:`list`, consider casting to :class:`tuple`. For mixed or nested inputs, consider using this slower quadratic algorithm that only depends on equality tests: ``max(data, key=data.count)``. .. versionchanged:: 3.8 Now handles multimodal datasets by returning the first mode encountered. Formerly, it raised :ex...
type :class:`list`, consider casting to :class:`tuple`. For mixed or nested inputs, consider using this slower quadratic algorithm that only depends on equality tests: ``max(data, key=data.count)``. .. versionchanged:: 3.8 Now handles multimodal datasets by returning the first mode encountered. Formerly, it raised :ex...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7c55a236-f666-4ee7-9650-39871484fb36
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,856
supabase-export-v2
85850e887b8dbc9d
solution using the cumulative binomial distribution >>> from math import comb, fsum >>> round(fsum(comb(n, r) * p**r * q**(n-r) for r in range(k+1)), 4) 0.8402 >>> # Approximation using a simulation >>> from random import seed, binomialvariate >>> seed(8675309) >>> mean(binomialvariate(n, p) <= k for i in range(10_0...
trusted_official_docs
CPython Docs
solution using the cumulative binomial distribution >>> from math import comb, fsum >>> round(fsum(comb(n, r) * p**r * q**(n-r) for r in range(k+1)), 4) 0.8402 >>> # Approximation using a simulation >>> from random import seed, binomialvariate >>> seed(8675309) >>> mean(binomialvariate(n, p) <= k for i in range(10_0...
solution using the cumulative binomial distribution >>> from math import comb, fsum >>> round(fsum(comb(n, r) * p**r * q**(n-r) for r in range(k+1)), 4) 0.8402 >>> # Approximation using a simulation >>> from random import seed, binomialvariate >>> seed(8675309) >>> mean(binomialvariate(n, p) <= k for i in range(10_0...
python, official-docs, cpython, P0
Local_Trusted_Corpus
805f817b-4b12-4a64-9736-1c8ed6d6a288
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,756
supabase-export-v2
2395ad1099850257
<https://en.wikipedia.org/wiki/Pearson_correlation_coefficient>`_ for two sequence inputs. Pearson's correlation coefficient *r* takes values between -1 and +1. It measures the strength and direction of a linear relationship. If *method* is "ranked", computes `Spearman's rank correlation coefficient <https://en.wikipe...
trusted_official_docs
CPython Docs
<https://en.wikipedia.org/wiki/Pearson_correlation_coefficient>`_ for two sequence inputs. Pearson's correlation coefficient *r* takes values between -1 and +1. It measures the strength and direction of a linear relationship. If *method* is "ranked", computes `Spearman's rank correlation coefficient <https://en.wikipe...
<https://en.wikipedia.org/wiki/Pearson_correlation_coefficient>`_ for two sequence inputs. Pearson's correlation coefficient *r* takes values between -1 and +1. It measures the strength and direction of a linear relationship. If *method* is "ranked", computes `Spearman's rank correlation coefficient <https://en.wikipe...
python, official-docs, cpython, P0
Local_Trusted_Corpus
80fe289e-4439-4442-9a9f-86008d535769
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,748
supabase-export-v2
f5b5889703dbe28d
data point. This allows quantile estimates to be built up one sample point at a time becoming gradually more refined with each new data point. .. function:: covariance(x, y, /)
trusted_official_docs
CPython Docs
data point. This allows quantile estimates to be built up one sample point at a time becoming gradually more refined with each new data point. .. function:: covariance(x, y, /)
data point. This allows quantile estimates to be built up one sample point at a time becoming gradually more refined with each new data point. .. function:: covariance(x, y, /)
python, official-docs, cpython, P0
Local_Trusted_Corpus
81589f91-7b9b-4aa9-ac7f-558a0d672a6d
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,824
supabase-export-v2
192836d185e84f19
Divide the normal distribution 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...
trusted_official_docs
CPython Docs
Divide the normal distribution 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...
Divide the normal distribution 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...
python, official-docs, cpython, P0
Local_Trusted_Corpus
835e2fc5-e742-4bc2-a39e-9e03fdba40e7
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,626
supabase-export-v2
a82ef8ca2d79bfd1
The basic idea is to smooth the data using `a kernel function <https://en.wikipedia.org/wiki/Kernel_(statistics)>`_. to help draw inferences about a population from a sample. The degree of smoothing is controlled by the scaling parameter *h* which is called the bandwidth. Smaller values emphasize local features while...
trusted_official_docs
CPython Docs
The basic idea is to smooth the data using `a kernel function <https://en.wikipedia.org/wiki/Kernel_(statistics)>`_. to help draw inferences about a population from a sample. The degree of smoothing is controlled by the scaling parameter *h* which is called the bandwidth. Smaller values emphasize local features while...
The basic idea is to smooth the data using `a kernel function <https://en.wikipedia.org/wiki/Kernel_(statistics)>`_. to help draw inferences about a population from a sample. The degree of smoothing is controlled by the scaling parameter *h* which is called the bandwidth. Smaller values emphasize local features while...
python, official-docs, cpython, P0
Local_Trusted_Corpus
847ab70d-e4ad-41e5-833d-add1a27ff163
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,642
supabase-export-v2
d5e1223c36348101
A :exc:`StatisticsError` will be raised if the *data* sequence is empty. Continuing the example for :func:`kde`, we can use :func:`kde_random` to generate new random selections from an estimated probability density function:
trusted_official_docs
CPython Docs
A :exc:`StatisticsError` will be raised if the *data* sequence is empty. Continuing the example for :func:`kde`, we can use :func:`kde_random` to generate new random selections from an estimated probability density function:
A :exc:`StatisticsError` will be raised if the *data* sequence is empty. Continuing the example for :func:`kde`, we can use :func:`kde_random` to generate new random selections from an estimated probability density function:
python, official-docs, cpython, P0
Local_Trusted_Corpus
84c598ac-5eab-48b7-99b2-1b891d4bd8ce
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,842
supabase-export-v2
792612b2f047d8f7
>>> sat = NormalDist(1060, 195) >>> fraction = sat.cdf(1200 + 0.5) - sat.cdf(1100 - 0.5) >>> round(fraction * 100.0, 1) 18.4 Find the `quartiles <https://en.wikipedia.org/wiki/Quartile>`_ and `deciles <https://en.wikipedia.org/wiki/Decile>`_ for the SAT scores:
trusted_official_docs
CPython Docs
>>> sat = NormalDist(1060, 195) >>> fraction = sat.cdf(1200 + 0.5) - sat.cdf(1100 - 0.5) >>> round(fraction * 100.0, 1) 18.4 Find the `quartiles <https://en.wikipedia.org/wiki/Quartile>`_ and `deciles <https://en.wikipedia.org/wiki/Decile>`_ for the SAT scores:
>>> sat = NormalDist(1060, 195) >>> fraction = sat.cdf(1200 + 0.5) - sat.cdf(1100 - 0.5) >>> round(fraction * 100.0, 1) 18.4 Find the `quartiles <https://en.wikipedia.org/wiki/Quartile>`_ and `deciles <https://en.wikipedia.org/wiki/Decile>`_ for the SAT scores:
python, official-docs, cpython, P0
Local_Trusted_Corpus
856a9e99-e062-42b7-b74a-648372771d1e
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,814
supabase-export-v2
e9120c119624f4b4
be near the given value *x*. Mathematically, it is the limit of the ratio ``P(x <= X < x+dx) / dx`` as *dx* approaches zero. 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 ...
trusted_official_docs
CPython Docs
be near the given value *x*. Mathematically, it is the limit of the ratio ``P(x <= X < x+dx) / dx`` as *dx* approaches zero. 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 ...
be near the given value *x*. Mathematically, it is the limit of the ratio ``P(x <= X < x+dx) / dx`` as *dx* approaches zero. 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 ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8748adce-f4ac-4786-a789-aa2291eb2173
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,699
supabase-export-v2
14b5f3ddc0512604
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. If the optional second argument *mu* is given, it should be the *population* mean of the *data*. It can also be used to compute the second moment around a point that is n...
trusted_official_docs
CPython Docs
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. If the optional second argument *mu* is given, it should be the *population* mean of the *data*. It can also be used to compute the second moment around a point that is n...
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. If the optional second argument *mu* is given, it should be the *population* mean of the *data*. It can also be used to compute the second moment around a point that is n...
python, official-docs, cpython, P0
Local_Trusted_Corpus
89dad6ba-bba8-4a50-b21e-93b1c6d6acb2
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,628
supabase-export-v2
82b5a8726ee950d2
relative weights of the sample data points. Generally, the choice of kernel shape does not matter as much as the more influential bandwidth smoothing parameter. Kernels that give some weight to every sample point include *normal* (*gauss*), *logistic*, and *sigmoid*.
trusted_official_docs
CPython Docs
relative weights of the sample data points. Generally, the choice of kernel shape does not matter as much as the more influential bandwidth smoothing parameter. Kernels that give some weight to every sample point include *normal* (*gauss*), *logistic*, and *sigmoid*.
relative weights of the sample data points. Generally, the choice of kernel shape does not matter as much as the more influential bandwidth smoothing parameter. Kernels that give some weight to every sample point include *normal* (*gauss*), *logistic*, and *sigmoid*.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8c724312-372d-4a93-9854-ca426267f46f
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,704
supabase-export-v2
ac206e205a1c3748
>>> 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 your data, you can pass it as the optional second argument *mu* to avoid recalculation:
trusted_official_docs
CPython Docs
>>> 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 your data, you can pass it as the optional second argument *mu* to avoid recalculation:
>>> 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 your data, you can pass it as the optional second argument *mu* to avoid recalculation:
python, official-docs, cpython, P0
Local_Trusted_Corpus
8efa07dd-5c28-4fc3-b19c-52ecb0961e60
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,676
supabase-export-v2
59099eaf72f4a2db
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.
trusted_official_docs
CPython Docs
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.
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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
92723e15-20ab-4e92-8bc8-8263f0184bfe
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,660
supabase-export-v2
2e54f21266d192a6
Return the high median of data. If *data* is empty, :exc:`StatisticsError` is raised. *data* can be a sequence or iterable. 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.
trusted_official_docs
CPython Docs
Return the high median of data. If *data* is empty, :exc:`StatisticsError` is raised. *data* can be a sequence or iterable. 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.
Return the high median of data. If *data* is empty, :exc:`StatisticsError` is raised. *data* can be a sequence or iterable. 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
95551557-8d92-43d8-a269-008893f2cf00
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,570
supabase-export-v2
c8d0428a55abed79
grouped data. :func:`mode` Single mode (most common value) of discrete or nominal data. :func:`multimode` List of modes (most common values) of discrete or nominal data. :func:`quantiles` Divide data into intervals with equal probability. ======================= =========================================================...
trusted_official_docs
CPython Docs
grouped data. :func:`mode` Single mode (most common value) of discrete or nominal data. :func:`multimode` List of modes (most common values) of discrete or nominal data. :func:`quantiles` Divide data into intervals with equal probability. ======================= =========================================================...
grouped data. :func:`mode` Single mode (most common value) of discrete or nominal data. :func:`multimode` List of modes (most common values) of discrete or nominal data. :func:`quantiles` Divide data into intervals with equal probability. ======================= =========================================================...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9579c066-33b7-453e-ad0f-9c0fca337988
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,851
supabase-export-v2
2e1fd2ba0d1a89f8
can be used to approximate `Binomial distributions <https://mathworld.wolfram.com/BinomialDistribution.html>`_ when the sample size is large and when the probability of a successful trial is near 50%. For example, an open source conference has 750 attendees and two rooms with a 500 person capacity. There is a talk abou...
trusted_official_docs
CPython Docs
can be used to approximate `Binomial distributions <https://mathworld.wolfram.com/BinomialDistribution.html>`_ when the sample size is large and when the probability of a successful trial is near 50%. For example, an open source conference has 750 attendees and two rooms with a 500 person capacity. There is a talk abou...
can be used to approximate `Binomial distributions <https://mathworld.wolfram.com/BinomialDistribution.html>`_ when the sample size is large and when the probability of a successful trial is near 50%. For example, an open source conference has 750 attendees and two rooms with a 500 person capacity. There is a talk abou...
python, official-docs, cpython, P0
Local_Trusted_Corpus
991f3139-3c8e-477a-9cc7-195cc09e3932
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,630
supabase-export-v2
3a0257d934a85950
Kernels that only give weight to sample points within the bandwidth include *rectangular* (*uniform*), *triangular*, *parabolic* (*epanechnikov*), *quartic* (*biweight*), *triweight*, and *cosine*. If *cumulative* is true, will return a cumulative distribution function.
trusted_official_docs
CPython Docs
Kernels that only give weight to sample points within the bandwidth include *rectangular* (*uniform*), *triangular*, *parabolic* (*epanechnikov*), *quartic* (*biweight*), *triweight*, and *cosine*. If *cumulative* is true, will return a cumulative distribution function.
Kernels that only give weight to sample points within the bandwidth include *rectangular* (*uniform*), *triangular*, *parabolic* (*epanechnikov*), *quartic* (*biweight*), *triweight*, and *cosine*. If *cumulative* is true, will return a cumulative distribution function.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9c2371dd-097c-4b05-b698-c5648e89ef70
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,620
supabase-export-v2
cdb47b2714da872a
:exc:`StatisticsError` is raised if *data* is empty, any element is less than zero, or if the weighted sum isn't positive. 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.)
trusted_official_docs
CPython Docs
:exc:`StatisticsError` is raised if *data* is empty, any element is less than zero, or if the weighted sum isn't positive. 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.)
:exc:`StatisticsError` is raised if *data* is empty, any element is less than zero, or if the weighted sum isn't positive. 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.)
python, official-docs, cpython, P0
Local_Trusted_Corpus
9da1c39d-1db0-40a4-8fdb-5cff4cb6bd7b
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,743
supabase-export-v2
95a82a64f058db13
(m + 1)``. Given nine sample values, the method sorts them and assigns the following percentiles: 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%. 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 population. The minimum va...
trusted_official_docs
CPython Docs
(m + 1)``. Given nine sample values, the method sorts them and assigns the following percentiles: 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%. 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 population. The minimum va...
(m + 1)``. Given nine sample values, the method sorts them and assigns the following percentiles: 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%. 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 population. The minimum va...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9f2b174e-985b-44f0-ba13-01f3ce9db842
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,750
supabase-export-v2
6cb231ce2e4184d7
Return the sample covariance of two sequence inputs *x* and *y*. Covariance is a measure of the joint variability of two inputs. Both inputs must be of the same length (no less than two), otherwise :exc:`StatisticsError` is raised.
trusted_official_docs
CPython Docs
Return the sample covariance of two sequence inputs *x* and *y*. Covariance is a measure of the joint variability of two inputs. Both inputs must be of the same length (no less than two), otherwise :exc:`StatisticsError` is raised.
Return the sample covariance of two sequence inputs *x* and *y*. Covariance is a measure of the joint variability of two inputs. Both inputs must be of the same length (no less than two), otherwise :exc:`StatisticsError` is raised.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a0944e99-8ea7-4c40-931a-718ec1511ba9
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,734
supabase-export-v2
1bcc012cf187f559
.. note:: 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.
trusted_official_docs
CPython Docs
.. note:: 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.
.. note:: 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a2122527-0a60-472f-8662-5297121e7768
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,566
supabase-export-v2
b266222299a7471d
float('NaN'),19.2, 18.3, float('NaN'), 14.4] >>> sorted(data) # This has surprising behavior [20.7, nan, 14.4, 18.3, 19.2, nan] >>> median(data) # This result is unexpected 16.35 >>> sum(map(isnan, data)) # Number of missing values 2 >>> clean = list(filterfalse(isnan, data)) # Strip NaN values >>> clean [20.7, 19....
trusted_official_docs
CPython Docs
float('NaN'),19.2, 18.3, float('NaN'), 14.4] >>> sorted(data) # This has surprising behavior [20.7, nan, 14.4, 18.3, 19.2, nan] >>> median(data) # This result is unexpected 16.35 >>> sum(map(isnan, data)) # Number of missing values 2 >>> clean = list(filterfalse(isnan, data)) # Strip NaN values >>> clean [20.7, 19....
float('NaN'),19.2, 18.3, float('NaN'), 14.4] >>> sorted(data) # This has surprising behavior [20.7, nan, 14.4, 18.3, 19.2, nan] >>> median(data) # This result is unexpected 16.35 >>> sum(map(isnan, data)) # Number of missing values 2 >>> clean = list(filterfalse(isnan, data)) # Strip NaN values >>> clean [20.7, 19....
python, official-docs, cpython, P0
Local_Trusted_Corpus
a6fad42d-a170-418e-9971-df3b4ae71d99
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,758
supabase-export-v2
e2e6216444ecdfac
Spearman's correlation coefficient is appropriate for ordinal data or for continuous data that doesn't meet the linear proportion requirement for Pearson's correlation coefficient. Both inputs must be of the same length (no less than two), and need not to be constant, otherwise :exc:`StatisticsError` is raised.
trusted_official_docs
CPython Docs
Spearman's correlation coefficient is appropriate for ordinal data or for continuous data that doesn't meet the linear proportion requirement for Pearson's correlation coefficient. Both inputs must be of the same length (no less than two), and need not to be constant, otherwise :exc:`StatisticsError` is raised.
Spearman's correlation coefficient is appropriate for ordinal data or for continuous data that doesn't meet the linear proportion requirement for Pearson's correlation coefficient. Both inputs must be of the same length (no less than two), and need not to be constant, otherwise :exc:`StatisticsError` is raised.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a7abff67-0fe3-40e3-8165-992cf2808046
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,789
supabase-export-v2
cb7a5651a41dd662
:class:`NormalDist` objects --------------------------- :class:`NormalDist` is a tool for creating and manipulating normal distributions of a `random variable <http://www.stat.yale.edu/Courses/1997-98/101/ranvar.htm>`_. It is a class that treats the mean and standard deviation of data measurements as a single entity.
trusted_official_docs
CPython Docs
:class:`NormalDist` objects --------------------------- :class:`NormalDist` is a tool for creating and manipulating normal distributions of a `random variable <http://www.stat.yale.edu/Courses/1997-98/101/ranvar.htm>`_. It is a class that treats the mean and standard deviation of data measurements as a single entity.
:class:`NormalDist` objects --------------------------- :class:`NormalDist` is a tool for creating and manipulating normal distributions of a `random variable <http://www.stat.yale.edu/Courses/1997-98/101/ranvar.htm>`_. It is a class that treats the mean and standard deviation of data measurements as a single entity.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a91429fd-6117-41c8-8773-9d9180f8c34d
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,629
supabase-export-v2
11643f22931e47ad
Kernels that give some weight to every sample point include *normal* (*gauss*), *logistic*, and *sigmoid*. Kernels that only give weight to sample points within the bandwidth include *rectangular* (*uniform*), *triangular*, *parabolic* (*epanechnikov*), *quartic* (*biweight*), *triweight*, and *cosine*.
trusted_official_docs
CPython Docs
Kernels that give some weight to every sample point include *normal* (*gauss*), *logistic*, and *sigmoid*. Kernels that only give weight to sample points within the bandwidth include *rectangular* (*uniform*), *triangular*, *parabolic* (*epanechnikov*), *quartic* (*biweight*), *triweight*, and *cosine*.
Kernels that give some weight to every sample point include *normal* (*gauss*), *logistic*, and *sigmoid*. Kernels that only give weight to sample points within the bandwidth include *rectangular* (*uniform*), *triangular*, *parabolic* (*epanechnikov*), *quartic* (*biweight*), *triweight*, and *cosine*.
python, official-docs, cpython, P0
Local_Trusted_Corpus
abfaf638-cb53-4864-8438-441c689573a4
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,859
supabase-export-v2
a9df1fe6aa354aeb
Normal distributions commonly arise in machine learning problems. Wikipedia has a `nice example of a Naive Bayesian Classifier <https://en.wikipedia.org/wiki/Naive_Bayes_classifier#Person_classification>`_. The challenge is to predict a person's gender from measurements of normally distributed features including height...
trusted_official_docs
CPython Docs
Normal distributions commonly arise in machine learning problems. Wikipedia has a `nice example of a Naive Bayesian Classifier <https://en.wikipedia.org/wiki/Naive_Bayes_classifier#Person_classification>`_. The challenge is to predict a person's gender from measurements of normally distributed features including height...
Normal distributions commonly arise in machine learning problems. Wikipedia has a `nice example of a Naive Bayesian Classifier <https://en.wikipedia.org/wiki/Naive_Bayes_classifier#Person_classification>`_. The challenge is to predict a person's gender from measurements of normally distributed features including height...
python, official-docs, cpython, P0
Local_Trusted_Corpus
acb99677-8460-4f9b-b610-90fec69b04d5
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,698
supabase-export-v2
472ac8b9adedd42b
.. function:: pvariance(data, mu=None) Return the population variance of *data*, a non-empty sequence or iterable 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...
trusted_official_docs
CPython Docs
.. function:: pvariance(data, mu=None) Return the population variance of *data*, a non-empty sequence or iterable 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...
.. function:: pvariance(data, mu=None) Return the population variance of *data*, a non-empty sequence or iterable 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...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ad148059-e801-4687-b5dd-64dcd49de076
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,826
supabase-export-v2
89f7fac363012dd6
.. method:: NormalDist.zscore(x) Compute the `Standard Score <https://www.statisticshowto.com/probability-and-statistics/z-score/>`_ describing *x* in terms of the number of standard deviations above or below the mean of the normal distribution: ``(x - mean) / stdev``.
trusted_official_docs
CPython Docs
.. method:: NormalDist.zscore(x) Compute the `Standard Score <https://www.statisticshowto.com/probability-and-statistics/z-score/>`_ describing *x* in terms of the number of standard deviations above or below the mean of the normal distribution: ``(x - mean) / stdev``.
.. method:: NormalDist.zscore(x) Compute the `Standard Score <https://www.statisticshowto.com/probability-and-statistics/z-score/>`_ describing *x* in terms of the number of standard deviations above or below the mean of the normal distribution: ``(x - mean) / stdev``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ad516550-b982-417f-9c7a-938da8d9cc71
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,562
supabase-export-v2
58fbed37580c993e
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. Unless explicitly noted, these functions support :class:`int`, :class:`float`, :class:`~decimal.Decimal` and :class:`~fractions.Fraction`. B...
trusted_official_docs
CPython Docs
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. Unless explicitly noted, these functions support :class:`int`, :class:`float`, :class:`~decimal.Decimal` and :class:`~fractions.Fraction`. B...
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. Unless explicitly noted, these functions support :class:`int`, :class:`float`, :class:`~decimal.Decimal` and :class:`~fractions.Fraction`. B...
python, official-docs, cpython, P0
Local_Trusted_Corpus
adce1df6-0a5b-4612-a787-5d56036c74d7
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,855
supabase-export-v2
86a7c79fbad0f503
>>> # Approximation using the cumulative normal distribution >>> from math import sqrt >>> round(NormalDist(mu=n*p, sigma=sqrt(n*p*q)).cdf(k + 0.5), 4) 0.8402 >>> # Exact solution using the cumulative binomial distribution >>> from math import comb, fsum >>> round(fsum(comb(n, r) * p**r * q**(n-r) for r in range(k+1)...
trusted_official_docs
CPython Docs
>>> # Approximation using the cumulative normal distribution >>> from math import sqrt >>> round(NormalDist(mu=n*p, sigma=sqrt(n*p*q)).cdf(k + 0.5), 4) 0.8402 >>> # Exact solution using the cumulative binomial distribution >>> from math import comb, fsum >>> round(fsum(comb(n, r) * p**r * q**(n-r) for r in range(k+1)...
>>> # Approximation using the cumulative normal distribution >>> from math import sqrt >>> round(NormalDist(mu=n*p, sigma=sqrt(n*p*q)).cdf(k + 0.5), 4) 0.8402 >>> # Exact solution using the cumulative binomial distribution >>> from math import comb, fsum >>> round(fsum(comb(n, r) * p**r * q**(n-r) for r in range(k+1)...
python, official-docs, cpython, P0
Local_Trusted_Corpus
af3b600f-563d-49cd-a972-0eb150838d98
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,739
supabase-export-v2
fa2e5f2b9ba5bc01
100 for percentiles which gives the 99 cuts points that separate *data* into 100 equal sized groups. Raises :exc:`StatisticsError` if *n* is not least 1. The *data* can be any iterable containing sample data. For meaningful results, the number of data points in *data* should be larger than *n*. Raises :exc:`Statistics...
trusted_official_docs
CPython Docs
100 for percentiles which gives the 99 cuts points that separate *data* into 100 equal sized groups. Raises :exc:`StatisticsError` if *n* is not least 1. The *data* can be any iterable containing sample data. For meaningful results, the number of data points in *data* should be larger than *n*. Raises :exc:`Statistics...
100 for percentiles which gives the 99 cuts points that separate *data* into 100 equal sized groups. Raises :exc:`StatisticsError` if *n* is not least 1. The *data* can be any iterable containing sample data. For meaningful results, the number of data points in *data* should be larger than *n*. Raises :exc:`Statistics...
python, official-docs, cpython, P0
Local_Trusted_Corpus
af65455c-4c30-482a-bbba-fcc59d2f32c2
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,813
supabase-export-v2
877d4377238189b2
.. method:: NormalDist.pdf(x) 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 the limit of the ratio ``P(x <= X < x+dx) / dx`` as *dx* approa...
trusted_official_docs
CPython Docs
.. method:: NormalDist.pdf(x) 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 the limit of the ratio ``P(x <= X < x+dx) / dx`` as *dx* approa...
.. method:: NormalDist.pdf(x) 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 the limit of the ratio ``P(x <= X < x+dx) / dx`` as *dx* approa...
python, official-docs, cpython, P0
Local_Trusted_Corpus
af90cee0-dfb1-44bd-a15e-8e26299b9b00
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,668
supabase-export-v2
8763e9f3f989d36b
The *interval* is the 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:
trusted_official_docs
CPython Docs
The *interval* is the 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:
The *interval* is the 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:
python, official-docs, cpython, P0
Local_Trusted_Corpus
aff0e014-4e90-4dd1-8365-5951d93bb850
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,657
supabase-export-v2
736d4ccb9117e200
>>> median_low([1, 3, 5]) 3 >>> median_low([1, 3, 5, 7]) 3 Use the low median when your data are discrete and you prefer the median to be an actual data point rather than interpolated.
trusted_official_docs
CPython Docs
>>> median_low([1, 3, 5]) 3 >>> median_low([1, 3, 5, 7]) 3 Use the low median when your data are discrete and you prefer the median to be an actual data point rather than interpolated.
>>> median_low([1, 3, 5]) 3 >>> median_low([1, 3, 5, 7]) 3 Use the low median when your data are discrete and you prefer the median to be an actual data point rather than interpolated.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b08ea6ae-99fb-48f5-886a-20f333c0138c
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,854
supabase-export-v2
257552a213a71d25
>>> p = 0.65 # Preference for Python >>> q = 1.0 - p # Preference for Ruby >>> k = 500 # Room capacity >>> # Approximation using the cumulative normal distribution >>> from math import sqrt >>> round(NormalDist(mu=n*p, sigma=sqrt(n*p*q)).cdf(k + 0.5), 4) 0.8402
trusted_official_docs
CPython Docs
>>> p = 0.65 # Preference for Python >>> q = 1.0 - p # Preference for Ruby >>> k = 500 # Room capacity >>> # Approximation using the cumulative normal distribution >>> from math import sqrt >>> round(NormalDist(mu=n*p, sigma=sqrt(n*p*q)).cdf(k + 0.5), 4) 0.8402
>>> p = 0.65 # Preference for Python >>> q = 1.0 - p # Preference for Ruby >>> k = 500 # Room capacity >>> # Approximation using the cumulative normal distribution >>> from math import sqrt >>> round(NormalDist(mu=n*p, sigma=sqrt(n*p*q)).cdf(k + 0.5), 4) 0.8402
python, official-docs, cpython, P0
Local_Trusted_Corpus
b1bed624-eaae-46fd-bee5-ff55b63affeb
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,565
supabase-export-v2
23762bd4e83e2c97
>>> from statistics import median >>> from math import isnan >>> from itertools import filterfalse >>> data = [20.7, float('NaN'),19.2, 18.3, float('NaN'), 14.4] >>> sorted(data) # This has surprising behavior [20.7, nan, 14.4, 18.3, 19.2, nan] >>> median(data) # This result is unexpected 16.35
trusted_official_docs
CPython Docs
>>> from statistics import median >>> from math import isnan >>> from itertools import filterfalse >>> data = [20.7, float('NaN'),19.2, 18.3, float('NaN'), 14.4] >>> sorted(data) # This has surprising behavior [20.7, nan, 14.4, 18.3, 19.2, nan] >>> median(data) # This result is unexpected 16.35
>>> from statistics import median >>> from math import isnan >>> from itertools import filterfalse >>> data = [20.7, float('NaN'),19.2, 18.3, float('NaN'), 14.4] >>> sorted(data) # This has surprising behavior [20.7, nan, 14.4, 18.3, 19.2, nan] >>> median(data) # This result is unexpected 16.35
python, official-docs, cpython, P0
Local_Trusted_Corpus
b202d887-16e7-45d4-ad5d-a0d276d9ae69
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,561
supabase-export-v2
5405996cefacbb47
This module provides functions for calculating mathematical statistics of numeric (:class:`~numbers.Real`-valued) data. The module is not intended to be a competitor to third-party libraries such as `NumPy <https://numpy.org>`_, `SciPy <https://scipy.org/>`_, or proprietary full-featured statistics packages aimed at pr...
trusted_official_docs
CPython Docs
This module provides functions for calculating mathematical statistics of numeric (:class:`~numbers.Real`-valued) data. The module is not intended to be a competitor to third-party libraries such as `NumPy <https://numpy.org>`_, `SciPy <https://scipy.org/>`_, or proprietary full-featured statistics packages aimed at pr...
This module provides functions for calculating mathematical statistics of numeric (:class:`~numbers.Real`-valued) data. The module is not intended to be a competitor to third-party libraries such as `NumPy <https://numpy.org>`_, `SciPy <https://scipy.org/>`_, or proprietary full-featured statistics packages aimed at pr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b2dd1f0a-87e6-47e2-8496-f7366755976d
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,741
supabase-export-v2
ed5f3ff23df1cab4
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``. The *method* for computing quantiles can be varied depending on whether the *data* includes or excludes the lowest and highest possible values from the population...
trusted_official_docs
CPython Docs
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``. The *method* for computing quantiles can be varied depending on whether the *data* includes or excludes the lowest and highest possible values from the population...
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``. The *method* for computing quantiles can be varied depending on whether the *data* includes or excludes the lowest and highest possible values from the population...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b3cd3ab2-13af-4fca-96a7-9013e18b39ad
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,598
supabase-export-v2
fe987616ff0b38b9
>>> grades = [85, 92, 83, 91] >>> weights = [0.20, 0.20, 0.30, 0.30] >>> fmean(grades, weights) 87.6 If *weights* is supplied, it must be the same length as the *data* or a :exc:`ValueError` will be raised.
trusted_official_docs
CPython Docs
>>> grades = [85, 92, 83, 91] >>> weights = [0.20, 0.20, 0.30, 0.30] >>> fmean(grades, weights) 87.6 If *weights* is supplied, it must be the same length as the *data* or a :exc:`ValueError` will be raised.
>>> grades = [85, 92, 83, 91] >>> weights = [0.20, 0.20, 0.30, 0.30] >>> fmean(grades, weights) 87.6 If *weights* is supplied, it must be the same length as the *data* or a :exc:`ValueError` will be raised.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b4ddd0d2-bc70-416d-b7f1-27b285691702
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,678
supabase-export-v2
79a62abe1d1e3f1d
.. function:: mode(data) 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.
trusted_official_docs
CPython Docs
.. function:: mode(data) 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.
.. function:: mode(data) 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b8acf733-c82a-495d-a795-1b2bce776b5e
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,780
supabase-export-v2
a15bff62026428ce
>>> model = linear_regression(period_squared, dist_cubed, proportional=True) >>> slope = model.slope >>> # Dwarf planets: Pluto, Eris, Makemake, Haumea, Ceres >>> orbital_periods = [90_560, 204_199, 111_845, 103_410, 1_680] # days >>> predicted_dist = [math.cbrt(slope * (p * p)) for p in orbital_periods] >>> list(ma...
trusted_official_docs
CPython Docs
>>> model = linear_regression(period_squared, dist_cubed, proportional=True) >>> slope = model.slope >>> # Dwarf planets: Pluto, Eris, Makemake, Haumea, Ceres >>> orbital_periods = [90_560, 204_199, 111_845, 103_410, 1_680] # days >>> predicted_dist = [math.cbrt(slope * (p * p)) for p in orbital_periods] >>> list(ma...
>>> model = linear_regression(period_squared, dist_cubed, proportional=True) >>> slope = model.slope >>> # Dwarf planets: Pluto, Eris, Makemake, Haumea, Ceres >>> orbital_periods = [90_560, 204_199, 111_845, 103_410, 1_680] # days >>> predicted_dist = [math.cbrt(slope * (p * p)) for p in orbital_periods] >>> list(ma...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bbcbdeff-61d9-4f42-8687-bf1dd7063554
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,603
supabase-export-v2
c7e0f5c76a4bcf9e
Convert *data* to floats and compute the geometric mean. 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).
trusted_official_docs
CPython Docs
Convert *data* to floats and compute the geometric mean. 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).
Convert *data* to floats and compute the geometric mean. 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).
python, official-docs, cpython, P0
Local_Trusted_Corpus
bf1ac80f-002f-428e-a150-d8db9a2098c3
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,790
supabase-export-v2
25af5519dd322521
normal distributions of a `random variable <http://www.stat.yale.edu/Courses/1997-98/101/ranvar.htm>`_. It is a class that treats the mean and standard deviation of data measurements as a single entity. Normal distributions arise from the `Central Limit Theorem <https://en.wikipedia.org/wiki/Central_limit_theorem>`_ an...
trusted_official_docs
CPython Docs
normal distributions of a `random variable <http://www.stat.yale.edu/Courses/1997-98/101/ranvar.htm>`_. It is a class that treats the mean and standard deviation of data measurements as a single entity. Normal distributions arise from the `Central Limit Theorem <https://en.wikipedia.org/wiki/Central_limit_theorem>`_ an...
normal distributions of a `random variable <http://www.stat.yale.edu/Courses/1997-98/101/ranvar.htm>`_. It is a class that treats the mean and standard deviation of data measurements as a single entity. Normal distributions arise from the `Central Limit Theorem <https://en.wikipedia.org/wiki/Central_limit_theorem>`_ an...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c0e9358d-4326-4a29-ab98-a1462614ccb8
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,573
supabase-export-v2
09cdf1dfecbccb3b
These functions calculate a measure of how much the population or sample tends to deviate from the typical or average values. ======================= ============================================= :func:`pstdev` Population standard deviation of data. :func:`pvariance` Population variance of data. :func:`stdev` Sample st...
trusted_official_docs
CPython Docs
These functions calculate a measure of how much the population or sample tends to deviate from the typical or average values. ======================= ============================================= :func:`pstdev` Population standard deviation of data. :func:`pvariance` Population variance of data. :func:`stdev` Sample st...
These functions calculate a measure of how much the population or sample tends to deviate from the typical or average values. ======================= ============================================= :func:`pstdev` Population standard deviation of data. :func:`pvariance` Population variance of data. :func:`stdev` Sample st...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c12422e4-741e-4e72-89f3-9bf92285827b
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,762
supabase-export-v2
11050192afe8e953
= [88, 225, 365, 687, 4331, 10_756, 30_687, 60_190] # days >>> dist_from_sun = [58, 108, 150, 228, 778, 1_400, 2_900, 4_500] # million km >>> # Show that a perfect monotonic relationship exists >>> correlation(orbital_period, dist_from_sun, method='ranked') 1.0
trusted_official_docs
CPython Docs
= [88, 225, 365, 687, 4331, 10_756, 30_687, 60_190] # days >>> dist_from_sun = [58, 108, 150, 228, 778, 1_400, 2_900, 4_500] # million km >>> # Show that a perfect monotonic relationship exists >>> correlation(orbital_period, dist_from_sun, method='ranked') 1.0
= [88, 225, 365, 687, 4331, 10_756, 30_687, 60_190] # days >>> dist_from_sun = [58, 108, 150, 228, 778, 1_400, 2_900, 4_500] # million km >>> # Show that a perfect monotonic relationship exists >>> correlation(orbital_period, dist_from_sun, method='ranked') 1.0
python, official-docs, cpython, P0
Local_Trusted_Corpus
c24e3759-d1c2-45f8-a88d-55d1e6590b93
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,869
supabase-export-v2
10af6625df996547
>>> prior_male = 0.5 >>> prior_female = 0.5 >>> posterior_male = (prior_male * height_male.pdf(ht) * ... weight_male.pdf(wt) * foot_size_male.pdf(fs)) >>> posterior_female = (prior_female * height_female.pdf(ht) * ... weight_female.pdf(wt) * foot_size_female.pdf(fs))
trusted_official_docs
CPython Docs
>>> prior_male = 0.5 >>> prior_female = 0.5 >>> posterior_male = (prior_male * height_male.pdf(ht) * ... weight_male.pdf(wt) * foot_size_male.pdf(fs)) >>> posterior_female = (prior_female * height_female.pdf(ht) * ... weight_female.pdf(wt) * foot_size_female.pdf(fs))
>>> prior_male = 0.5 >>> prior_female = 0.5 >>> posterior_male = (prior_male * height_male.pdf(ht) * ... weight_male.pdf(wt) * foot_size_male.pdf(fs)) >>> posterior_female = (prior_female * height_female.pdf(ht) * ... weight_female.pdf(wt) * foot_size_female.pdf(fs))
python, official-docs, cpython, P0
Local_Trusted_Corpus
c38a27f5-1476-4bc3-93ff-9982127b8407
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,679
supabase-export-v2
9ed0b8fbc29de52f
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. 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...
trusted_official_docs
CPython Docs
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. 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 point from discrete or nominal *data*. The mode (when it exists) is the most typical value and serves as a measure of central location. 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...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c4930477-9afe-4a1d-b8fa-939cfb7dbb7b
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,700
supabase-export-v2
97186af7153c72fb
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. 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.
trusted_official_docs
CPython Docs
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. 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.
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. 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c647a909-96c0-4754-b524-c3bdae018714
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,686
supabase-export-v2
fb3faed03ea0f6a9
>>> mode(["red", "blue", "blue", "red", "green", "red", "red"]) 'red' Only hashable inputs are supported. To handle type :class:`set`, consider casting to :class:`frozenset`. To handle type :class:`list`, consider casting to :class:`tuple`. For mixed or nested inputs, consider using this slower quadratic algorithm t...
trusted_official_docs
CPython Docs
>>> mode(["red", "blue", "blue", "red", "green", "red", "red"]) 'red' Only hashable inputs are supported. To handle type :class:`set`, consider casting to :class:`frozenset`. To handle type :class:`list`, consider casting to :class:`tuple`. For mixed or nested inputs, consider using this slower quadratic algorithm t...
>>> mode(["red", "blue", "blue", "red", "green", "red", "red"]) 'red' Only hashable inputs are supported. To handle type :class:`set`, consider casting to :class:`frozenset`. To handle type :class:`list`, consider casting to :class:`tuple`. For mixed or nested inputs, consider using this slower quadratic algorithm t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c64c20d7-a090-4cf3-9362-37aa3bb1c54b
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,742
supabase-export-v2
07a6cd3d4f3ded1a
The *method* for computing quantiles can be varied depending on whether the *data* includes or excludes the lowest and highest possible values from the population. 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 portio...
trusted_official_docs
CPython Docs
The *method* for computing quantiles can be varied depending on whether the *data* includes or excludes the lowest and highest possible values from the population. 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 portio...
The *method* for computing quantiles can be varied depending on whether the *data* includes or excludes the lowest and highest possible values from the population. 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 portio...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c66bbd9f-2ec9-425d-acfe-8db4fd47a228
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,747
supabase-export-v2
8579c71fee84c0fb
.. versionadded:: 3.8 .. versionchanged:: 3.13 No longer raises an exception for an input with only a single data point. This allows quantile estimates to be built up one sample point at a time becoming gradually more refined with each new data point.
trusted_official_docs
CPython Docs
.. versionadded:: 3.8 .. versionchanged:: 3.13 No longer raises an exception for an input with only a single data point. This allows quantile estimates to be built up one sample point at a time becoming gradually more refined with each new data point.
.. versionadded:: 3.8 .. versionchanged:: 3.13 No longer raises an exception for an input with only a single data point. This allows quantile estimates to be built up one sample point at a time becoming gradually more refined with each new data point.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c884d1ac-faaf-496b-8bfd-51f5c732a168
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,862
supabase-export-v2
8bd70484dcfa6ece
.. doctest:: >>> height_male = NormalDist.from_samples([6, 5.92, 5.58, 5.92]) >>> height_female = NormalDist.from_samples([5, 5.5, 5.42, 5.75]) >>> weight_male = NormalDist.from_samples([180, 190, 170, 165]) >>> weight_female = NormalDist.from_samples([100, 150, 130, 150]) >>> foot_size_male = NormalDist.from_sampl...
trusted_official_docs
CPython Docs
.. doctest:: >>> height_male = NormalDist.from_samples([6, 5.92, 5.58, 5.92]) >>> height_female = NormalDist.from_samples([5, 5.5, 5.42, 5.75]) >>> weight_male = NormalDist.from_samples([180, 190, 170, 165]) >>> weight_female = NormalDist.from_samples([100, 150, 130, 150]) >>> foot_size_male = NormalDist.from_sampl...
.. doctest:: >>> height_male = NormalDist.from_samples([6, 5.92, 5.58, 5.92]) >>> height_female = NormalDist.from_samples([5, 5.5, 5.42, 5.75]) >>> weight_male = NormalDist.from_samples([180, 190, 170, 165]) >>> weight_female = NormalDist.from_samples([100, 150, 130, 150]) >>> foot_size_male = NormalDist.from_sampl...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cd54364b-4c38-4982-955d-18754131bb56
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,595
supabase-export-v2
60bf8b230cf5a21c
>>> fmean([3.5, 4.0, 5.25]) 4.25 Optional weighting is supported. For example, a professor assigns a grade for a course by weighting quizzes at 20%, homework at 20%, a midterm exam at 30%, and a final exam at 30%:
trusted_official_docs
CPython Docs
>>> fmean([3.5, 4.0, 5.25]) 4.25 Optional weighting is supported. For example, a professor assigns a grade for a course by weighting quizzes at 20%, homework at 20%, a midterm exam at 30%, and a final exam at 30%:
>>> fmean([3.5, 4.0, 5.25]) 4.25 Optional weighting is supported. For example, a professor assigns a grade for a course by weighting quizzes at 20%, homework at 20%, a midterm exam at 30%, and a final exam at 30%:
python, official-docs, cpython, P0
Local_Trusted_Corpus
d027875e-f8fc-4f17-8f5d-cf3746e4534c
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,634
supabase-export-v2
5f08424de0321643
.. doctest:: >>> sample = [-2.1, -1.3, -0.4, 1.9, 5.1, 6.2] >>> f_hat = kde(sample, h=1.5) >>> xarr = [i/100 for i in range(-750, 1100)] >>> yarr = [f_hat(x) for x in xarr]
trusted_official_docs
CPython Docs
.. doctest:: >>> sample = [-2.1, -1.3, -0.4, 1.9, 5.1, 6.2] >>> f_hat = kde(sample, h=1.5) >>> xarr = [i/100 for i in range(-750, 1100)] >>> yarr = [f_hat(x) for x in xarr]
.. doctest:: >>> sample = [-2.1, -1.3, -0.4, 1.9, 5.1, 6.2] >>> f_hat = kde(sample, h=1.5) >>> xarr = [i/100 for i in range(-750, 1100)] >>> yarr = [f_hat(x) for x in xarr]
python, official-docs, cpython, P0
Local_Trusted_Corpus
d5bad3f0-9ebd-4eed-a372-d7ff3c3e9237
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,816
supabase-export-v2
633d9307a48f5508
.. method:: NormalDist.cdf(x) 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)``.
trusted_official_docs
CPython Docs
.. method:: NormalDist.cdf(x) 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)``.
.. method:: NormalDist.cdf(x) 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)``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d829c606-165d-453b-b18e-399da7153283
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,761
supabase-export-v2
2e82e84543eccebb
.. doctest:: >>> # Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, and Neptune >>> orbital_period = [88, 225, 365, 687, 4331, 10_756, 30_687, 60_190] # days >>> dist_from_sun = [58, 108, 150, 228, 778, 1_400, 2_900, 4_500] # million km
trusted_official_docs
CPython Docs
.. doctest:: >>> # Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, and Neptune >>> orbital_period = [88, 225, 365, 687, 4331, 10_756, 30_687, 60_190] # days >>> dist_from_sun = [58, 108, 150, 228, 778, 1_400, 2_900, 4_500] # million km
.. doctest:: >>> # Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, and Neptune >>> orbital_period = [88, 225, 365, 687, 4331, 10_756, 30_687, 60_190] # days >>> dist_from_sun = [58, 108, 150, 228, 778, 1_400, 2_900, 4_500] # million km
python, official-docs, cpython, P0
Local_Trusted_Corpus
d99409ff-44e4-482d-a0e0-0d43fc142171
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,569
supabase-export-v2
cce6d622154f04af
These functions calculate an average or typical value from a population or sample. ======================= =============================================================== :func:`mean` Arithmetic mean ("average") of data. :func:`fmean` Fast, floating-point arithmetic mean, with optional weighting. :func:`geometric_mean`...
trusted_official_docs
CPython Docs
These functions calculate an average or typical value from a population or sample. ======================= =============================================================== :func:`mean` Arithmetic mean ("average") of data. :func:`fmean` Fast, floating-point arithmetic mean, with optional weighting. :func:`geometric_mean`...
These functions calculate an average or typical value from a population or sample. ======================= =============================================================== :func:`mean` Arithmetic mean ("average") of data. :func:`fmean` Fast, floating-point arithmetic mean, with optional weighting. :func:`geometric_mean`...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d99fae86-59c1-44ac-a82b-81f466794d28
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,735
supabase-export-v2
2022e6eaceb1535f
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. If you somehow know the actual population mean μ you should pass it to the :func:`pvariance` function as the *mu* parameter to get the var...
trusted_official_docs
CPython Docs
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. If you somehow know the actual population mean μ you should pass it to the :func:`pvariance` function as the *mu* parameter to get the var...
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. If you somehow know the actual population mean μ you should pass it to the :func:`pvariance` function as the *mu* parameter to get the var...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d9b6d7bb-bd42-4e43-b620-98215d0f9ae5
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,772
supabase-export-v2
14bdfee6aa1485cb
inputs must be sequences of the same length (no less than two), and the independent variable *x* cannot be constant; otherwise a :exc:`StatisticsError` is raised. For example, we can use the `release dates of the Monty Python films <https://en.wikipedia.org/wiki/Monty_Python#Films>`_ to predict the cumulative number ...
trusted_official_docs
CPython Docs
inputs must be sequences of the same length (no less than two), and the independent variable *x* cannot be constant; otherwise a :exc:`StatisticsError` is raised. For example, we can use the `release dates of the Monty Python films <https://en.wikipedia.org/wiki/Monty_Python#Films>`_ to predict the cumulative number ...
inputs must be sequences of the same length (no less than two), and the independent variable *x* cannot be constant; otherwise a :exc:`StatisticsError` is raised. For example, we can use the `release dates of the Monty Python films <https://en.wikipedia.org/wiki/Monty_Python#Films>`_ to predict the cumulative number ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
da987e6c-9d14-4f45-8cc2-0ba54f1de907
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,654
supabase-export-v2
f8fd946e004f562f
Return the low median of numeric data. If *data* is empty, :exc:`StatisticsError` is raised. *data* can be a sequence or iterable. 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.
trusted_official_docs
CPython Docs
Return the low median of numeric data. If *data* is empty, :exc:`StatisticsError` is raised. *data* can be a sequence or iterable. 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.
Return the low median of numeric data. If *data* is empty, :exc:`StatisticsError` is raised. *data* can be a sequence or iterable. 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
dc566256-8e41-4624-be54-3360df00c8c5
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,643
supabase-export-v2
2590cd5996c19213
Continuing the example for :func:`kde`, we can use :func:`kde_random` to generate new random selections from an estimated probability density function: >>> data = [-2.1, -1.3, -0.4, 1.9, 5.1, 6.2] >>> rand = kde_random(data, h=1.5, seed=8675309) >>> new_selections = [rand() for i in range(10)] >>> [round(x, 1) for x...
trusted_official_docs
CPython Docs
Continuing the example for :func:`kde`, we can use :func:`kde_random` to generate new random selections from an estimated probability density function: >>> data = [-2.1, -1.3, -0.4, 1.9, 5.1, 6.2] >>> rand = kde_random(data, h=1.5, seed=8675309) >>> new_selections = [rand() for i in range(10)] >>> [round(x, 1) for x...
Continuing the example for :func:`kde`, we can use :func:`kde_random` to generate new random selections from an estimated probability density function: >>> data = [-2.1, -1.3, -0.4, 1.9, 5.1, 6.2] >>> rand = kde_random(data, h=1.5, seed=8675309) >>> new_selections = [rand() for i in range(10)] >>> [round(x, 1) for x...
python, official-docs, cpython, P0
Local_Trusted_Corpus
dea472ad-82a1-4b19-8832-0a0cbd5b8049
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,574
supabase-export-v2
dde4074704312dee
============================================= :func:`pstdev` Population standard deviation of data. :func:`pvariance` Population variance of data. :func:`stdev` Sample standard deviation of data. :func:`variance` Sample variance of data. ======================= ============================================= Statistics f...
trusted_official_docs
CPython Docs
============================================= :func:`pstdev` Population standard deviation of data. :func:`pvariance` Population variance of data. :func:`stdev` Sample standard deviation of data. :func:`variance` Sample variance of data. ======================= ============================================= Statistics f...
============================================= :func:`pstdev` Population standard deviation of data. :func:`pvariance` Population variance of data. :func:`stdev` Sample standard deviation of data. :func:`variance` Sample variance of data. ======================= ============================================= Statistics f...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e1343c73-9909-4d20-bd49-28dd57090311
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,818
supabase-export-v2
8477ae5c5b66c7b1
.. method:: NormalDist.inv_cdf(p) Compute the inverse cumulative distribution function, also known as the `quantile function <https://en.wikipedia.org/wiki/Quantile_function>`_ or the `percent-point <https://web.archive.org/web/20190203145224/https://www.statisticshowto.datasciencecentral.com/inverse-distribution-fu...
trusted_official_docs
CPython Docs
.. method:: NormalDist.inv_cdf(p) Compute the inverse cumulative distribution function, also known as the `quantile function <https://en.wikipedia.org/wiki/Quantile_function>`_ or the `percent-point <https://web.archive.org/web/20190203145224/https://www.statisticshowto.datasciencecentral.com/inverse-distribution-fu...
.. method:: NormalDist.inv_cdf(p) Compute the inverse cumulative distribution function, also known as the `quantile function <https://en.wikipedia.org/wiki/Quantile_function>`_ or the `percent-point <https://web.archive.org/web/20190203145224/https://www.statisticshowto.datasciencecentral.com/inverse-distribution-fu...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e15282ee-f1a4-46b3-a31d-c8082bf0a4aa
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,612
supabase-export-v2
8d0f476ed632b279
*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. The harmonic mean is a type of average, a measure of the central location of the data. It is often appropriate when averaging ratios or rates, for example speeds.
trusted_official_docs
CPython Docs
*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. The harmonic mean is a type of average, a measure of the central location of the data. It is often appropriate when averaging ratios or rates, for example speeds.
*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. The harmonic mean is a type of average, a measure of the central location of the data. It is often appropriate when averaging ratios or rates, for example speeds.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e3b71493-6ae6-4250-b3ee-e8158efe82dd
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,675
supabase-export-v2
d31ed76a185e2a44
>>> 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.
trusted_official_docs
CPython Docs
>>> 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.
>>> 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e3f39898-49e1-4902-8c79-7f5761be9864
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,651
supabase-export-v2
8bde8cb740c1effd
This is suited for when your data is discrete, and you don't mind that the median may not be an actual data point. If the data is ordinal (supports order operations) but not numeric (doesn't support addition), consider using :func:`median_low` or :func:`median_high` instead.
trusted_official_docs
CPython Docs
This is suited for when your data is discrete, and you don't mind that the median may not be an actual data point. If the data is ordinal (supports order operations) but not numeric (doesn't support addition), consider using :func:`median_low` or :func:`median_high` instead.
This is suited for when your data is discrete, and you don't mind that the median may not be an actual data point. If the data is ordinal (supports order operations) but not numeric (doesn't support addition), consider using :func:`median_low` or :func:`median_high` instead.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e450a7d4-02f1-4554-ac5a-3c275248d5e4
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,567
supabase-export-v2
0f8221e462b8827f
19.2, 18.3, 14.4] >>> sorted(clean) # Sorting now works as expected [14.4, 18.3, 19.2, 20.7] >>> median(clean) # This result is now well defined 18.75 Averages and measures of central location -----------------------------------------
trusted_official_docs
CPython Docs
19.2, 18.3, 14.4] >>> sorted(clean) # Sorting now works as expected [14.4, 18.3, 19.2, 20.7] >>> median(clean) # This result is now well defined 18.75 Averages and measures of central location -----------------------------------------
19.2, 18.3, 14.4] >>> sorted(clean) # Sorting now works as expected [14.4, 18.3, 19.2, 20.7] >>> median(clean) # This result is now well defined 18.75 Averages and measures of central location -----------------------------------------
python, official-docs, cpython, P0
Local_Trusted_Corpus
e7162a70-2eb5-4df0-a6ed-e8bff6b6dab1
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,832
supabase-export-v2
6dac2a408d6805fd
Dividing a constant by an instance of :class:`NormalDist` is not supported because the result wouldn't be normally distributed. 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.wikipe...
trusted_official_docs
CPython Docs
Dividing a constant by an instance of :class:`NormalDist` is not supported because the result wouldn't be normally distributed. 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.wikipe...
Dividing a constant by an instance of :class:`NormalDist` is not supported because the result wouldn't be normally distributed. 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.wikipe...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ebd87902-969c-47fa-8ff0-37a262753344
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,729
supabase-export-v2
90d707b5331d66da
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. Decimal and Fraction values are supported:
trusted_official_docs
CPython Docs
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. Decimal and Fraction values are supported:
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. Decimal and Fraction values are supported:
python, official-docs, cpython, P0
Local_Trusted_Corpus
ecc56f86-8bdc-4894-a8c3-f585294dfdf7
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,663
supabase-export-v2
7b1b46a051a5c74b
>>> median_high([1, 3, 5]) 3 >>> median_high([1, 3, 5, 7]) 5 Use the high median when your data are discrete and you prefer the median to be an actual data point rather than interpolated.
trusted_official_docs
CPython Docs
>>> median_high([1, 3, 5]) 3 >>> median_high([1, 3, 5, 7]) 5 Use the high median when your data are discrete and you prefer the median to be an actual data point rather than interpolated.
>>> median_high([1, 3, 5]) 3 >>> median_high([1, 3, 5, 7]) 5 Use the high median when your data are discrete and you prefer the median to be an actual data point rather than interpolated.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ef016839-484b-4baa-a82f-f4e62973eb25
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,582
supabase-export-v2
6fd367b0f52d02e3
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. If *data* is empty, :exc:`StatisticsError` will be raised.
trusted_official_docs
CPython Docs
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. If *data* is empty, :exc:`StatisticsError` will be raised.
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. If *data* is empty, :exc:`StatisticsError` will be raised.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ef03d6d9-a692-4610-be8a-0d53fde28d85
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,863
supabase-export-v2
312ef49db060c067
NormalDist.from_samples([180, 190, 170, 165]) >>> weight_female = NormalDist.from_samples([100, 150, 130, 150]) >>> foot_size_male = NormalDist.from_samples([12, 11, 12, 10]) >>> foot_size_female = NormalDist.from_samples([6, 8, 7, 9]) Next, we encounter a new person whose feature measurements are known but whose gende...
trusted_official_docs
CPython Docs
NormalDist.from_samples([180, 190, 170, 165]) >>> weight_female = NormalDist.from_samples([100, 150, 130, 150]) >>> foot_size_male = NormalDist.from_samples([12, 11, 12, 10]) >>> foot_size_female = NormalDist.from_samples([6, 8, 7, 9]) Next, we encounter a new person whose feature measurements are known but whose gende...
NormalDist.from_samples([180, 190, 170, 165]) >>> weight_female = NormalDist.from_samples([100, 150, 130, 150]) >>> foot_size_male = NormalDist.from_samples([12, 11, 12, 10]) >>> foot_size_female = NormalDist.from_samples([6, 8, 7, 9]) Next, we encounter a new person whose feature measurements are known but whose gende...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f0e41534-9803-419a-8df5-3506218bc281
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,850
supabase-export-v2
ae447330bd33b707
Approximating binomial distributions ************************************ Normal distributions can be used to approximate `Binomial distributions <https://mathworld.wolfram.com/BinomialDistribution.html>`_ when the sample size is large and when the probability of a successful trial is near 50%.
trusted_official_docs
CPython Docs
Approximating binomial distributions ************************************ Normal distributions can be used to approximate `Binomial distributions <https://mathworld.wolfram.com/BinomialDistribution.html>`_ when the sample size is large and when the probability of a successful trial is near 50%.
Approximating binomial distributions ************************************ Normal distributions can be used to approximate `Binomial distributions <https://mathworld.wolfram.com/BinomialDistribution.html>`_ when the sample size is large and when the probability of a successful trial is near 50%.
python, official-docs, cpython, P0
Local_Trusted_Corpus
f287481d-fb52-469d-b2ec-971cf545f3b1
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,755
supabase-export-v2
da8cd93f049aa9cb
.. function:: correlation(x, y, /, *, method='linear') Return the `Pearson's correlation coefficient <https://en.wikipedia.org/wiki/Pearson_correlation_coefficient>`_ for two sequence inputs. Pearson's correlation coefficient *r* takes values between -1 and +1. It measures the strength and direction of a linear rel...
trusted_official_docs
CPython Docs
.. function:: correlation(x, y, /, *, method='linear') Return the `Pearson's correlation coefficient <https://en.wikipedia.org/wiki/Pearson_correlation_coefficient>`_ for two sequence inputs. Pearson's correlation coefficient *r* takes values between -1 and +1. It measures the strength and direction of a linear rel...
.. function:: correlation(x, y, /, *, method='linear') Return the `Pearson's correlation coefficient <https://en.wikipedia.org/wiki/Pearson_correlation_coefficient>`_ for two sequence inputs. Pearson's correlation coefficient *r* takes values between -1 and +1. It measures the strength and direction of a linear rel...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f7f0f977-dcd5-4fbc-a213-dd882b5afa38
CPython Docs
file://datasets/cpython/Doc/library/statistics.rst
unknown
2728187e-f963-4035-be91-c4d7c16028dc
40,641
supabase-export-v2
eca45436b6307c22
future, the values may change slightly as more accurate kernel inverse CDF estimates are implemented. The seed may be an integer, float, str, or bytes. A :exc:`StatisticsError` will be raised if the *data* sequence is empty.
trusted_official_docs
CPython Docs
future, the values may change slightly as more accurate kernel inverse CDF estimates are implemented. The seed may be an integer, float, str, or bytes. A :exc:`StatisticsError` will be raised if the *data* sequence is empty.
future, the values may change slightly as more accurate kernel inverse CDF estimates are implemented. The seed may be an integer, float, str, or bytes. A :exc:`StatisticsError` will be raised if the *data* sequence is empty.
python, official-docs, cpython, P0
Local_Trusted_Corpus