python-stats 1.0.0__py3-none-any.whl → 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- py_stats/__init__.py +183 -181
- py_stats/multivariate.py +925 -689
- py_stats/univariate.py +1377 -1212
- {python_stats-1.0.0.dist-info → python_stats-2.0.0.dist-info}/METADATA +594 -391
- python_stats-2.0.0.dist-info/RECORD +8 -0
- {python_stats-1.0.0.dist-info → python_stats-2.0.0.dist-info}/WHEEL +1 -1
- {python_stats-1.0.0.dist-info → python_stats-2.0.0.dist-info}/licenses/LICENSE +20 -20
- python_stats-1.0.0.dist-info/RECORD +0 -8
- {python_stats-1.0.0.dist-info → python_stats-2.0.0.dist-info}/top_level.txt +0 -0
py_stats/__init__.py
CHANGED
|
@@ -1,182 +1,184 @@
|
|
|
1
|
-
"""
|
|
2
|
-
py-stats: A comprehensive Python statistics package
|
|
3
|
-
|
|
4
|
-
This package provides over 60 statistical functions for both univariate
|
|
5
|
-
and multivariate analysis, similar to those found on scientific calculators.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from .univariate import (
|
|
9
|
-
# Means
|
|
10
|
-
arithmetic_mean,
|
|
11
|
-
harmonic_mean,
|
|
12
|
-
geometric_mean,
|
|
13
|
-
quadratic_mean,
|
|
14
|
-
|
|
15
|
-
# Central tendency
|
|
16
|
-
median,
|
|
17
|
-
mode,
|
|
18
|
-
midrange,
|
|
19
|
-
trimean,
|
|
20
|
-
|
|
21
|
-
# Quantiles
|
|
22
|
-
quartiles,
|
|
23
|
-
hinges,
|
|
24
|
-
quantile,
|
|
25
|
-
|
|
26
|
-
# Dispersion
|
|
27
|
-
variance,
|
|
28
|
-
standard_deviation,
|
|
29
|
-
average_deviation,
|
|
30
|
-
median_absolute_deviation,
|
|
31
|
-
|
|
32
|
-
# Shape
|
|
33
|
-
skewness,
|
|
34
|
-
kurtosis,
|
|
35
|
-
|
|
36
|
-
# Specialized
|
|
37
|
-
angular_mean,
|
|
38
|
-
running_average,
|
|
39
|
-
weighted_average,
|
|
40
|
-
standard_error_mean,
|
|
41
|
-
|
|
42
|
-
# Robust statistics
|
|
43
|
-
winsorized_mean,
|
|
44
|
-
trimmed_mean,
|
|
45
|
-
interquartile_range,
|
|
46
|
-
range_value,
|
|
47
|
-
coefficient_of_variation,
|
|
48
|
-
|
|
49
|
-
# Order statistics
|
|
50
|
-
percentile_rank,
|
|
51
|
-
deciles,
|
|
52
|
-
percentile,
|
|
53
|
-
|
|
54
|
-
# Shape and distribution
|
|
55
|
-
coefficient_of_skewness,
|
|
56
|
-
coefficient_of_kurtosis,
|
|
57
|
-
simple_normality_test,
|
|
58
|
-
|
|
59
|
-
# Central tendency alternatives
|
|
60
|
-
winsorized_median,
|
|
61
|
-
midhinge,
|
|
62
|
-
|
|
63
|
-
# Probability and distribution
|
|
64
|
-
z_score,
|
|
65
|
-
t_score,
|
|
66
|
-
percentile_from_z_score,
|
|
67
|
-
confidence_interval_mean,
|
|
68
|
-
confidence_interval_proportion,
|
|
69
|
-
|
|
70
|
-
# Time series
|
|
71
|
-
moving_average,
|
|
72
|
-
exponential_smoothing,
|
|
73
|
-
seasonal_decomposition_simple,
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
from .multivariate import (
|
|
77
|
-
# Correlation
|
|
78
|
-
pearson_correlation,
|
|
79
|
-
q_correlation,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
"
|
|
176
|
-
"
|
|
177
|
-
"
|
|
178
|
-
"
|
|
179
|
-
"
|
|
180
|
-
"
|
|
181
|
-
"
|
|
1
|
+
"""
|
|
2
|
+
py-stats: A comprehensive Python statistics package
|
|
3
|
+
|
|
4
|
+
This package provides over 60 statistical functions for both univariate
|
|
5
|
+
and multivariate analysis, similar to those found on scientific calculators.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from .univariate import (
|
|
9
|
+
# Means
|
|
10
|
+
arithmetic_mean,
|
|
11
|
+
harmonic_mean,
|
|
12
|
+
geometric_mean,
|
|
13
|
+
quadratic_mean,
|
|
14
|
+
|
|
15
|
+
# Central tendency
|
|
16
|
+
median,
|
|
17
|
+
mode,
|
|
18
|
+
midrange,
|
|
19
|
+
trimean,
|
|
20
|
+
|
|
21
|
+
# Quantiles
|
|
22
|
+
quartiles,
|
|
23
|
+
hinges,
|
|
24
|
+
quantile,
|
|
25
|
+
|
|
26
|
+
# Dispersion
|
|
27
|
+
variance,
|
|
28
|
+
standard_deviation,
|
|
29
|
+
average_deviation,
|
|
30
|
+
median_absolute_deviation,
|
|
31
|
+
|
|
32
|
+
# Shape
|
|
33
|
+
skewness,
|
|
34
|
+
kurtosis,
|
|
35
|
+
|
|
36
|
+
# Specialized
|
|
37
|
+
angular_mean,
|
|
38
|
+
running_average,
|
|
39
|
+
weighted_average,
|
|
40
|
+
standard_error_mean,
|
|
41
|
+
|
|
42
|
+
# Robust statistics
|
|
43
|
+
winsorized_mean,
|
|
44
|
+
trimmed_mean,
|
|
45
|
+
interquartile_range,
|
|
46
|
+
range_value,
|
|
47
|
+
coefficient_of_variation,
|
|
48
|
+
|
|
49
|
+
# Order statistics
|
|
50
|
+
percentile_rank,
|
|
51
|
+
deciles,
|
|
52
|
+
percentile,
|
|
53
|
+
|
|
54
|
+
# Shape and distribution
|
|
55
|
+
coefficient_of_skewness,
|
|
56
|
+
coefficient_of_kurtosis,
|
|
57
|
+
simple_normality_test,
|
|
58
|
+
|
|
59
|
+
# Central tendency alternatives
|
|
60
|
+
winsorized_median,
|
|
61
|
+
midhinge,
|
|
62
|
+
|
|
63
|
+
# Probability and distribution
|
|
64
|
+
z_score,
|
|
65
|
+
t_score,
|
|
66
|
+
percentile_from_z_score,
|
|
67
|
+
confidence_interval_mean,
|
|
68
|
+
confidence_interval_proportion,
|
|
69
|
+
|
|
70
|
+
# Time series
|
|
71
|
+
moving_average,
|
|
72
|
+
exponential_smoothing,
|
|
73
|
+
seasonal_decomposition_simple,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
from .multivariate import (
|
|
77
|
+
# Correlation
|
|
78
|
+
pearson_correlation,
|
|
79
|
+
q_correlation,
|
|
80
|
+
product_concentration_ratio,
|
|
81
|
+
spearman_correlation,
|
|
82
|
+
kendall_tau,
|
|
83
|
+
point_biserial_correlation,
|
|
84
|
+
|
|
85
|
+
# Covariance
|
|
86
|
+
covariance,
|
|
87
|
+
|
|
88
|
+
# Regression
|
|
89
|
+
linear_regression,
|
|
90
|
+
multiple_linear_regression,
|
|
91
|
+
polynomial_regression,
|
|
92
|
+
residual_analysis,
|
|
93
|
+
|
|
94
|
+
# Sums
|
|
95
|
+
sum_xx,
|
|
96
|
+
sum_yy,
|
|
97
|
+
sum_xy,
|
|
98
|
+
|
|
99
|
+
# Association measures
|
|
100
|
+
chi_square_test,
|
|
101
|
+
cramers_v,
|
|
102
|
+
contingency_coefficient,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
__version__ = "2.0.0"
|
|
106
|
+
__author__ = "Rana Ehtasham Ali"
|
|
107
|
+
__email__ = "ranaehtashamali1@gmail.com"
|
|
108
|
+
|
|
109
|
+
__all__ = [
|
|
110
|
+
# Univariate functions
|
|
111
|
+
"arithmetic_mean",
|
|
112
|
+
"harmonic_mean",
|
|
113
|
+
"geometric_mean",
|
|
114
|
+
"quadratic_mean",
|
|
115
|
+
"median",
|
|
116
|
+
"mode",
|
|
117
|
+
"midrange",
|
|
118
|
+
"trimean",
|
|
119
|
+
"quartiles",
|
|
120
|
+
"hinges",
|
|
121
|
+
"quantile",
|
|
122
|
+
"variance",
|
|
123
|
+
"standard_deviation",
|
|
124
|
+
"average_deviation",
|
|
125
|
+
"median_absolute_deviation",
|
|
126
|
+
"skewness",
|
|
127
|
+
"kurtosis",
|
|
128
|
+
"angular_mean",
|
|
129
|
+
"running_average",
|
|
130
|
+
"weighted_average",
|
|
131
|
+
"standard_error_mean",
|
|
132
|
+
|
|
133
|
+
# Robust statistics
|
|
134
|
+
"winsorized_mean",
|
|
135
|
+
"trimmed_mean",
|
|
136
|
+
"interquartile_range",
|
|
137
|
+
"range_value",
|
|
138
|
+
"coefficient_of_variation",
|
|
139
|
+
|
|
140
|
+
# Order statistics
|
|
141
|
+
"percentile_rank",
|
|
142
|
+
"deciles",
|
|
143
|
+
"percentile",
|
|
144
|
+
|
|
145
|
+
# Shape and distribution
|
|
146
|
+
"coefficient_of_skewness",
|
|
147
|
+
"coefficient_of_kurtosis",
|
|
148
|
+
"simple_normality_test",
|
|
149
|
+
|
|
150
|
+
# Central tendency alternatives
|
|
151
|
+
"winsorized_median",
|
|
152
|
+
"midhinge",
|
|
153
|
+
|
|
154
|
+
# Probability and distribution
|
|
155
|
+
"z_score",
|
|
156
|
+
"t_score",
|
|
157
|
+
"percentile_from_z_score",
|
|
158
|
+
"confidence_interval_mean",
|
|
159
|
+
"confidence_interval_proportion",
|
|
160
|
+
|
|
161
|
+
# Time series
|
|
162
|
+
"moving_average",
|
|
163
|
+
"exponential_smoothing",
|
|
164
|
+
"seasonal_decomposition_simple",
|
|
165
|
+
|
|
166
|
+
# Multivariate functions
|
|
167
|
+
"pearson_correlation",
|
|
168
|
+
"q_correlation",
|
|
169
|
+
"product_concentration_ratio",
|
|
170
|
+
"spearman_correlation",
|
|
171
|
+
"kendall_tau",
|
|
172
|
+
"point_biserial_correlation",
|
|
173
|
+
"covariance",
|
|
174
|
+
"linear_regression",
|
|
175
|
+
"multiple_linear_regression",
|
|
176
|
+
"polynomial_regression",
|
|
177
|
+
"residual_analysis",
|
|
178
|
+
"sum_xx",
|
|
179
|
+
"sum_yy",
|
|
180
|
+
"sum_xy",
|
|
181
|
+
"chi_square_test",
|
|
182
|
+
"cramers_v",
|
|
183
|
+
"contingency_coefficient",
|
|
182
184
|
]
|