Mercurial > repos > deepakjadmin > mayatool3_test3
comparison mayachemtools/docs/modules/man3/StatisticsUtil.3 @ 0:73ae111cf86f draft
Uploaded
author | deepakjadmin |
---|---|
date | Wed, 20 Jan 2016 11:55:01 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:73ae111cf86f |
---|---|
1 .\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.22) | |
2 .\" | |
3 .\" Standard preamble: | |
4 .\" ======================================================================== | |
5 .de Sp \" Vertical space (when we can't use .PP) | |
6 .if t .sp .5v | |
7 .if n .sp | |
8 .. | |
9 .de Vb \" Begin verbatim text | |
10 .ft CW | |
11 .nf | |
12 .ne \\$1 | |
13 .. | |
14 .de Ve \" End verbatim text | |
15 .ft R | |
16 .fi | |
17 .. | |
18 .\" Set up some character translations and predefined strings. \*(-- will | |
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will | |
21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and | |
22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, | |
23 .\" nothing in troff, for use with C<>. | |
24 .tr \(*W- | |
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
26 .ie n \{\ | |
27 . ds -- \(*W- | |
28 . ds PI pi | |
29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
31 . ds L" "" | |
32 . ds R" "" | |
33 . ds C` "" | |
34 . ds C' "" | |
35 'br\} | |
36 .el\{\ | |
37 . ds -- \|\(em\| | |
38 . ds PI \(*p | |
39 . ds L" `` | |
40 . ds R" '' | |
41 'br\} | |
42 .\" | |
43 .\" Escape single quotes in literal strings from groff's Unicode transform. | |
44 .ie \n(.g .ds Aq \(aq | |
45 .el .ds Aq ' | |
46 .\" | |
47 .\" If the F register is turned on, we'll generate index entries on stderr for | |
48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index | |
49 .\" entries marked with X<> in POD. Of course, you'll have to process the | |
50 .\" output yourself in some meaningful fashion. | |
51 .ie \nF \{\ | |
52 . de IX | |
53 . tm Index:\\$1\t\\n%\t"\\$2" | |
54 .. | |
55 . nr % 0 | |
56 . rr F | |
57 .\} | |
58 .el \{\ | |
59 . de IX | |
60 .. | |
61 .\} | |
62 .\" | |
63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
64 .\" Fear. Run. Save yourself. No user-serviceable parts. | |
65 . \" fudge factors for nroff and troff | |
66 .if n \{\ | |
67 . ds #H 0 | |
68 . ds #V .8m | |
69 . ds #F .3m | |
70 . ds #[ \f1 | |
71 . ds #] \fP | |
72 .\} | |
73 .if t \{\ | |
74 . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
75 . ds #V .6m | |
76 . ds #F 0 | |
77 . ds #[ \& | |
78 . ds #] \& | |
79 .\} | |
80 . \" simple accents for nroff and troff | |
81 .if n \{\ | |
82 . ds ' \& | |
83 . ds ` \& | |
84 . ds ^ \& | |
85 . ds , \& | |
86 . ds ~ ~ | |
87 . ds / | |
88 .\} | |
89 .if t \{\ | |
90 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
91 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
92 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
93 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
94 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
95 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
96 .\} | |
97 . \" troff and (daisy-wheel) nroff accents | |
98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
105 .ds ae a\h'-(\w'a'u*4/10)'e | |
106 .ds Ae A\h'-(\w'A'u*4/10)'E | |
107 . \" corrections for vroff | |
108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
110 . \" for low resolution devices (crt and lpr) | |
111 .if \n(.H>23 .if \n(.V>19 \ | |
112 \{\ | |
113 . ds : e | |
114 . ds 8 ss | |
115 . ds o a | |
116 . ds d- d\h'-1'\(ga | |
117 . ds D- D\h'-1'\(hy | |
118 . ds th \o'bp' | |
119 . ds Th \o'LP' | |
120 . ds ae ae | |
121 . ds Ae AE | |
122 .\} | |
123 .rm #[ #] #H #V #F C | |
124 .\" ======================================================================== | |
125 .\" | |
126 .IX Title "STATISTICSUTIL 1" | |
127 .TH STATISTICSUTIL 1 "2015-03-29" "perl v5.14.2" "MayaChemTools" | |
128 .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
129 .\" way too many mistakes in technical documents. | |
130 .if n .ad l | |
131 .nh | |
132 .SH "NAME" | |
133 StatisticsUtil | |
134 .SH "SYNOPSIS" | |
135 .IX Header "SYNOPSIS" | |
136 use StatisticsUtil; | |
137 .PP | |
138 use Statistics qw(:all); | |
139 .SH "DESCRIPTION" | |
140 .IX Header "DESCRIPTION" | |
141 \&\fBStatisticsUtil\fR module provides the following functions: | |
142 .PP | |
143 Average, AverageDeviation, Correlation, Covariance, Euclidean, Factorial, | |
144 FactorialDivison, Frequency, GeometricMean, HarmonicMean, KLargest, KSmallest, | |
145 Kurtosis, Maximum, Mean, Median, Minimum, Mode, PearsonCorrelation, Permutations, | |
146 Product, RSquare, Range, Skewness, StandardDeviation, StandardDeviationN, | |
147 StandardError, StandardScores, StandardScoresN, Standardize, Sum, SumOfSquares, | |
148 TrimMean, Variance, VarianceN | |
149 .SS "\s-1METHODS\s0" | |
150 .IX Subsection "METHODS" | |
151 .IP "\fBAverage\fR" 4 | |
152 .IX Item "Average" | |
153 .Vb 1 | |
154 \& $Value = Average(\e@DataArray); | |
155 .Ve | |
156 .Sp | |
157 Computes the mean of an array of numbers: \s-1SUM\s0( x[i] ) / n | |
158 .IP "\fBAverageDeviation\fR" 4 | |
159 .IX Item "AverageDeviation" | |
160 .Vb 1 | |
161 \& $Value = AverageDeviation(\e@DataArray); | |
162 .Ve | |
163 .Sp | |
164 Computes the average of the absolute deviation of an array of numbers: \s-1SUM\s0( \s-1ABS\s0(x[i] \- Xmean) ) / n | |
165 .IP "\fBCorrelation\fR" 4 | |
166 .IX Item "Correlation" | |
167 .Vb 1 | |
168 \& $Value = Correlation(\e@XDataArray, \e@YDataArray); | |
169 .Ve | |
170 .Sp | |
171 Computes the Pearson correlation coefficient between two arrays of numbers: | |
172 \&\s-1SUM\s0( (x[i] \- Xmean)(y[i] \- Ymean) ) / \s-1SQRT\s0( \s-1SUM\s0( (x[i] \- Xmean)^2 )(\s-1SUM\s0( (y[i] \- Ymean)^2 )) ) | |
173 .IP "\fBEuclidean\fR" 4 | |
174 .IX Item "Euclidean" | |
175 .Vb 1 | |
176 \& $Return = Euclidean(\e@DataArray); | |
177 .Ve | |
178 .Sp | |
179 Computes the euclidean distance of an array of numbers: \s-1SQRT\s0( \s-1SUM\s0( x[i] ** 2) ) | |
180 .IP "\fBCovariance\fR" 4 | |
181 .IX Item "Covariance" | |
182 .Vb 1 | |
183 \& $Value = Covariance(\e@XDataArray, \e@YDataArray); | |
184 .Ve | |
185 .Sp | |
186 Computes the covariance between two arrays of numbers: \s-1SUM\s0( (x[i] \- Xmean) (y[i] \- Ymean) ) / n | |
187 .IP "\fBFactorial\fR" 4 | |
188 .IX Item "Factorial" | |
189 .Vb 1 | |
190 \& $Value = Factorial($Num); | |
191 .Ve | |
192 .Sp | |
193 Computes the factorial of a positive integer. | |
194 .IP "\fBFactorialDivison\fR" 4 | |
195 .IX Item "FactorialDivison" | |
196 .Vb 1 | |
197 \& $Value = FactorialDivision($Numerator, $Denominator); | |
198 .Ve | |
199 .Sp | |
200 Compute the factorial divison of two positive integers. | |
201 .IP "\fBFrequency\fR" 4 | |
202 .IX Item "Frequency" | |
203 .Vb 2 | |
204 \& %FrequencyValues = Frequency(\e@DataArray, [$NumOfBins]); | |
205 \& %FrequencyValues = Frequency(\e@DataArray, [\e@BinRange]); | |
206 .Ve | |
207 .Sp | |
208 A hash array is returned with keys and values representing range and frequency values, respectively. | |
209 The frequency value for a specific key corresponds to all the values which are greater than | |
210 the previous key and less than or equal to the current key. A key value representing maximum value is | |
211 added for generating frequency distribution for specific number of bins, and whenever the maximum | |
212 array value is greater than the maximum specified in bin range, it is also added to bin range. | |
213 .IP "\fBGeometricMean\fR" 4 | |
214 .IX Item "GeometricMean" | |
215 .Vb 1 | |
216 \& $Value = GeometricMean(\e@DataArray); | |
217 .Ve | |
218 .Sp | |
219 Computes the geometric mean of an array of numbers: NthROOT( \s-1PRODUCT\s0(x[i]) ) | |
220 .IP "\fBHarmonicMean\fR" 4 | |
221 .IX Item "HarmonicMean" | |
222 .Vb 1 | |
223 \& $Value = HarmonicMean(\e@DataArray); | |
224 .Ve | |
225 .Sp | |
226 Computes the harmonic mean of an array of numbers: 1 / ( \s-1SUM\s0(1/x[i]) / n ) | |
227 .IP "\fBKLargest\fR" 4 | |
228 .IX Item "KLargest" | |
229 .Vb 1 | |
230 \& $Value = KLargest(\e@DataArray, $KthNumber); | |
231 .Ve | |
232 .Sp | |
233 Returns the k\-largest value from an array of numbers. | |
234 .IP "\fBKSmallest\fR" 4 | |
235 .IX Item "KSmallest" | |
236 .Vb 1 | |
237 \& $Value = KSmallest(\e@DataArray, $KthNumber); | |
238 .Ve | |
239 .Sp | |
240 Returns the k\-smallest value from an array of numbers. | |
241 .IP "\fBKurtosis\fR" 4 | |
242 .IX Item "Kurtosis" | |
243 .Vb 1 | |
244 \& $Value = Kurtosis(\e@DataArray); | |
245 .Ve | |
246 .Sp | |
247 Computes the kurtosis of an array of numbers: | |
248 [ {n(n + 1)/(n \- 1)(n \- 2)(n \- 3)} SUM{ ((x[i] \- Xmean)/STDDEV)^4 } ] \- {3((n \- 1)^2)}/{(n \- 2)(n\-3)} | |
249 .IP "\fBMaximum\fR" 4 | |
250 .IX Item "Maximum" | |
251 .Vb 1 | |
252 \& $Value = Maximum(\e@DataArray); | |
253 .Ve | |
254 .Sp | |
255 Returns the largest value from an array of numbers. | |
256 .IP "\fBMinimum\fR" 4 | |
257 .IX Item "Minimum" | |
258 .Vb 1 | |
259 \& $Value = Minimum(\e@DataArray); | |
260 .Ve | |
261 .Sp | |
262 Returns the smallest value from an array of numbers. | |
263 .IP "\fBMean\fR" 4 | |
264 .IX Item "Mean" | |
265 .Vb 1 | |
266 \& $Value = Mean(\e@DataArray); | |
267 .Ve | |
268 .Sp | |
269 Computes the mean of an array of numbers: \s-1SUM\s0( x[i] ) / n | |
270 .IP "\fBMedian\fR" 4 | |
271 .IX Item "Median" | |
272 .Vb 1 | |
273 \& $Value = Median(\e@DataArray); | |
274 .Ve | |
275 .Sp | |
276 Computes the median value of an array of numbers. For an even number array, it's | |
277 the average of two middle values. | |
278 .Sp | |
279 For even values of n: Xsorted[(n \- 1)/2 + 1] | |
280 For odd values of n: (Xsorted[n/2] + Xsorted[n/2 + 1])/2 | |
281 .IP "\fBMode\fR" 4 | |
282 .IX Item "Mode" | |
283 .Vb 1 | |
284 \& $Value = Mode(\e@DataArray); | |
285 .Ve | |
286 .Sp | |
287 Returns the most frequently occuring value in an array of numbers. | |
288 .IP "\fBPearsonCorrelation\fR" 4 | |
289 .IX Item "PearsonCorrelation" | |
290 .Vb 1 | |
291 \& $Value = Correlation(\e@XDataArray, \e@YDataArray); | |
292 .Ve | |
293 .Sp | |
294 Computes the Pearson correlation coefficient between two arrays of numbers: | |
295 \&\s-1SUM\s0( (x[i] \- Xmean)(y[i] \- Ymean) ) / \s-1SQRT\s0( \s-1SUM\s0( (x[i] \- Xmean)^2 )(\s-1SUM\s0( (y[i] \- Ymean)^2 )) ) | |
296 .IP "\fBPermutations\fR" 4 | |
297 .IX Item "Permutations" | |
298 .Vb 1 | |
299 \& $PermutationsRef = Permutations(@DataToPermute); | |
300 .Ve | |
301 .Sp | |
302 Generate all possible permuations or a specific permutations of items in an array | |
303 and return a reference to an array containing array references to generated permuations. | |
304 .Sp | |
305 This alogrithm is based on the example provided by Mark Jason-Dominus, and is available | |
306 at \s-1CPAN\s0 as mjd_permute standalone script. | |
307 .IP "\fBProduct\fR" 4 | |
308 .IX Item "Product" | |
309 .Vb 1 | |
310 \& $Value = Product(\e@DataArray); | |
311 .Ve | |
312 .Sp | |
313 Compute the product of an array of numbers. | |
314 .IP "\fBRange\fR" 4 | |
315 .IX Item "Range" | |
316 .Vb 1 | |
317 \& ($Smallest, $Largest) = Range(\e@DataArray); | |
318 .Ve | |
319 .Sp | |
320 Return the smallest and largest values from an array of numbers. | |
321 .IP "\fBRSquare\fR" 4 | |
322 .IX Item "RSquare" | |
323 .Vb 1 | |
324 \& $Value = RSquare(\e@XDataArray, \e@YDataArray); | |
325 .Ve | |
326 .Sp | |
327 Computes square of the Pearson correlation coefficient between two arrays of numbers. | |
328 .IP "\fBSkewness\fR" 4 | |
329 .IX Item "Skewness" | |
330 .Vb 1 | |
331 \& $Value = Skewness(\e@DataArray); | |
332 .Ve | |
333 .Sp | |
334 Computes the skewness of an array of numbers: | |
335 {n/(n \- 1)(n \- 2)} SUM{ ((x[i] \- Xmean)/STDDEV)^3 } | |
336 .IP "\fBStandardDeviation\fR" 4 | |
337 .IX Item "StandardDeviation" | |
338 .Vb 1 | |
339 \& $Value = StandardDeviation(\e@DataArray); | |
340 .Ve | |
341 .Sp | |
342 Computes the standard deviation of an array of numbers. | |
343 \&\s-1SQRT\s0 ( \s-1SUM\s0( (x[i] \- mean)^2 ) / (n \- 1) ) | |
344 .IP "\fBStandardDeviationN\fR" 4 | |
345 .IX Item "StandardDeviationN" | |
346 .Vb 1 | |
347 \& $Value = StandardDeviationN(\e@DataArray); | |
348 .Ve | |
349 .Sp | |
350 Computes the standard deviation of an array of numbers representing entire population: | |
351 \&\s-1SQRT\s0 ( \s-1SUM\s0( (x[i] \- mean)^2 ) / n ) | |
352 .IP "\fBStandardError\fR" 4 | |
353 .IX Item "StandardError" | |
354 .Vb 1 | |
355 \& $Value = StandardError($StandardDeviation, $Count); | |
356 .Ve | |
357 .Sp | |
358 Computes the standard error using standard deviation and sample size. | |
359 .IP "\fBStandardize\fR" 4 | |
360 .IX Item "Standardize" | |
361 .Vb 1 | |
362 \& $Value = Standardize($Value, $Mean, $StandardDeviation); | |
363 .Ve | |
364 .Sp | |
365 Standardizes the value using mean and standard deviation. | |
366 .IP "\fBStandardScores\fR" 4 | |
367 .IX Item "StandardScores" | |
368 .Vb 1 | |
369 \& @Values = StandardScores(\e@DataArray); | |
370 .Ve | |
371 .Sp | |
372 Computes the standard deviation above the mean for an array of numbers: | |
373 (x[i] \- mean) / (n \- 1) | |
374 .IP "\fBStandardScoresN\fR" 4 | |
375 .IX Item "StandardScoresN" | |
376 .Vb 1 | |
377 \& @Values = StandardScoresN(\e@DataArray); | |
378 .Ve | |
379 .Sp | |
380 Computes the standard deviation above the mean for an array of numbers representing entire population: | |
381 (x[i] \- mean) / n | |
382 .IP "\fBSum\fR" 4 | |
383 .IX Item "Sum" | |
384 .Vb 1 | |
385 \& $Value = Sum(\e@DataArray); | |
386 .Ve | |
387 .Sp | |
388 Compute the sum of an array of numbers. | |
389 .IP "\fBSumOfSquares\fR" 4 | |
390 .IX Item "SumOfSquares" | |
391 .Vb 1 | |
392 \& $Value = SumOfSquares(\e@DataArray); | |
393 .Ve | |
394 .Sp | |
395 Computes the sum of an array of numbers. | |
396 .IP "\fBTrimMean\fR" 4 | |
397 .IX Item "TrimMean" | |
398 .Vb 1 | |
399 \& $Value = TrimMean(\e@DataArray, $FractionToExclude)); | |
400 .Ve | |
401 .Sp | |
402 Computes the mean of an array of numbers by excluding a fraction of | |
403 numbers from the top and bottom of the data set. | |
404 .IP "\fBVariance\fR" 4 | |
405 .IX Item "Variance" | |
406 .Vb 1 | |
407 \& $Value = Variance(\e@DataArray); | |
408 .Ve | |
409 .Sp | |
410 Computes the variance of an array of numbers: \s-1SUM\s0( (x[i] \- Xmean)^2 / (n \- 1) ) | |
411 .IP "\fBVarianceN\fR" 4 | |
412 .IX Item "VarianceN" | |
413 .Vb 1 | |
414 \& $Value = Variance(\e@DataArray); | |
415 .Ve | |
416 .Sp | |
417 Compute the variance of an array of numbers representing entire population: | |
418 \&\s-1SUM\s0( (x[i] \- Xmean)^2 / n ) | |
419 .SH "AUTHOR" | |
420 .IX Header "AUTHOR" | |
421 Manish Sud <msud@san.rr.com> | |
422 .SH "SEE ALSO" | |
423 .IX Header "SEE ALSO" | |
424 Constants.pm, ConversionsUtil.pm, MathUtil.pm | |
425 .SH "COPYRIGHT" | |
426 .IX Header "COPYRIGHT" | |
427 Copyright (C) 2015 Manish Sud. All rights reserved. | |
428 .PP | |
429 This file is part of MayaChemTools. | |
430 .PP | |
431 MayaChemTools is free software; you can redistribute it and/or modify it under | |
432 the terms of the \s-1GNU\s0 Lesser General Public License as published by the Free | |
433 Software Foundation; either version 3 of the License, or (at your option) | |
434 any later version. |