"The code is exactly
how I would like to write code and the algorithms used are very
efficient and well-documented."
Van T. Dinh, Microsoft MVP
|
|
|
Category:
|
General VBA/VB6 : Math
|
|
Description:
|
General math and routines for area and volume, statistics, and trigonometry
|
Module: modMathStatistics
Mathematical functions covering the areas of statistics and probability. This category contains various math routines covering the areas of statistics and probability.
VBA has built-in functions for various mathematical operations. Search online help for "Math Functions" and "Derived Math Functions" for more information
|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the modMathStatistics module
|
|
Factorial
|
Procedure
|
Returns the factorial of a given number.
This function only considers input values in that are greater than 0 and less than 170. 170 is used as the cut-off point because the factorial of any number greater than 170 is beyond the numeric range of VBA.
|
|
FactorialRecursive
|
Procedure
|
Returns the recursive factorial of a given number.
This function only considers input values in that are greater than 0 and less than 170. 170 is used as the cut-off point because the factorial of any number greater than 170 is beyond the numeric range of VBA.
|
|
GetArrayMean
|
Procedure
|
Returns the mean of the elements in the supplied array
|
|
GetArrayMedian
|
Procedure
|
Returns the median of the elements in the supplied array.
fSort should be set to True if you are not concerned with the order of the numbers in your array. If you do not want the array you pass to be sorted, set fSort to False.
|
|
GetArrayMode
|
Procedure
|
Returns the mode (most common value) of the supplied array. If there is a tie, the smallest number is the mode.
This function also includes information on calculating standard error and coefficient of variance.
|
|
GetArrayStatistics
|
Procedure
|
Calculates descriptive statistics of an array using N-1 method.
Also includes information on calculating standard error and coefficient of variance.
|
|
GetArrayStdDev
|
Procedure
|
Returns the standard deviation of the supplied array using N-1 method
|
|
GetNumberCombinations
|
Procedure
|
Returns the number of combinations of items that can be derived from a population (order does not matter).
Combinations are different from permutations, because permutations count the number of ways (orders) items can be selected from the pool. For instance, with playing cards, there is only one combination of 4 Aces (all four cards), but there are many permutations depending on the order the Aces appear (diamond first, spade next, etc.). All the permutations result in the same combination.
|
|
GetNumberPermutations
|
Procedure
|
Returns the number of combinations of intItems that can occur from intPool (order matters).
Unlike combinations, permutations count the number of way (orders) items can be selected from the pool. For instance, with playing cards, there is only one combination of 4 Aces (all four cards), but there are many permutations depending on the order the Aces appear (diamond first, spade next, etc.). All the permutations result in the same combination.
|
|
GetTableMedianADO
|
Procedure
|
Returns the median of a table's field using ADO.
The median is the 50th percentile. Half the data is greater than this value and less than this value.
|
|
GetTableMedianDAO
|
Procedure
|
Returns the median of a table's field using DAO
The median is the 50th percentile. Half the data is greater than this value and less than this value.
|
|
GetTableModeADO
|
Procedure
|
Returns the mode (most common value) of the named field in the specified Jet database. This function uses a SQL string to calculate the mode by counting by group.
|
|
GetTableModeDAO
|
Procedure
|
Returns the mode (most common value) of the named field in the specified Jet database. This function uses a SQL string to calculate the mode by counting by group.
|
|
QuickSortStatArray
|
Procedure
|
Recursively sorts the passed array of doubles (quicksort algorithm)
|
Overview of Total Visual SourceBook
The source code in Total Visual
SourceBook includes modules and classes for Microsoft Access, Visual
Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily
add this professionally written, tested, and documented royalty-free code
into your applications to simplify your application development efforts.
Additional Resources
|
|