Set of statistical tools. More...
Functions | |
void | julian::stats::descriptiveStatistics (const std::vector< double > &data) |
Procedure prints the basic statistical measures. More... | |
double | julian::stats::mean (const std::vector< double > &data) |
Function calculates mean. More... | |
double | julian::stats::variance (const std::vector< double > &data) |
Function calculates variance. More... | |
double | julian::stats::variance (const std::vector< double > &data, const double mean) |
Function calculates variance using the provided mean. More... | |
double | julian::stats::stdDev (const std::vector< double > &data) |
Function calculates standard deviation. More... | |
double | julian::stats::stdDev (const std::vector< double > &data, const double mean) |
Function calculates standard deviation using the provided mean. More... | |
double | julian::stats::absDev (const std::vector< double > &data) |
Function calculates absolute deviation. More... | |
double | julian::stats::absDev (const std::vector< double > &data, const double mean) |
Function calculates absolute deviation using the provided mean. More... | |
double | julian::stats::skew (const std::vector< double > &data) |
Function calculates skew. More... | |
double | julian::stats::kurtosis (const std::vector< double > &data) |
Function calculates normalized kurtosis. More... | |
double | julian::stats::pearsonCorr (const std::vector< double > &data1, const std::vector< double > &data2) |
Function calculates Pearson correlation. More... | |
double | julian::stats::spearmanCorr (const std::vector< double > &data1, const std::vector< double > &data2) |
Function calculates Spearman correlation. More... | |
double | julian::stats::max (const std::vector< double > &data) |
Function returns the maximum value. More... | |
double | julian::stats::min (const std::vector< double > &data) |
Function returns the minimum value. More... | |
double | julian::stats::median (const std::vector< double > data) |
Function returns median. More... | |
double | julian::stats::percentile (const std::vector< double > data, const double &q) |
Function returns a quantile. More... | |
double | julian::stats::IQR (const std::vector< double > &data) |
Returns interquartile range. More... | |
Detailed Description
Set of statistical tools.
The basic statistical functions include routines to compute the mean, variance and standard deviation. More advanced functions allow you to calculate absolute deviations, skewness, and kurtosis as well as the median and arbitrary percentiles. The algorithms use recurrence relations to compute average quantities in a stable way, without large intermediate values that might overflow.
Function Documentation
|
inline |
Function calculates absolute deviation.
Function calculates absolute deviation :
where
- Parameters
-
data Vector of doubles representing data.
- Returns
- Absolute deviation
|
inline |
Function calculates absolute deviation using the provided mean.
Function calculates absolute deviation :
- Parameters
-
data Vector of doubles representing data. mean Mean of the population
- Returns
- Absolute deviation
void julian::stats::descriptiveStatistics | ( | const std::vector< double > & | data | ) |
Procedure prints the basic statistical measures.
- Parameters
-
data Vector of doubles representing data.
|
inline |
Returns interquartile range.
Function calculates the interquartile range (IQR) which is a measure of statistical dispersion, being equal to the difference between 75th and 25th percentiles,
- Parameters
-
data Vector of doubles representing data.
- Returns
- Returns interquartile range
|
inline |
Function calculates normalized kurtosis.
Function calculates normalized kurtosis (kurtosis that of normal distribution is 0):
- Parameters
-
data Vector of doubles representing data.
- Returns
- kurtosis
|
inline |
Function returns the maximum value.
- Parameters
-
data Vector of doubles representing data.
- Returns
- Maximum value of numbers in data vector
|
inline |
Function calculates mean.
Function calculates mean:
- Parameters
-
data Vector of doubles representing data.
- Returns
- mean
|
inline |
Function returns median.
When the dataset has an odd number of elements the median is the value of element (n-1)/2. When the dataset has an even number of elements the median is the mean of the two nearest middle values, elements (n-1)/2 and n/2. Since the algorithm for computing the median involves interpolation this function always returns a floating-point number, even for integer data types.
- Parameters
-
data Vector of doubles representing data.
- Returns
- returns median
|
inline |
Function returns the minimum value.
- Parameters
-
data Vector of doubles representing data.
- Returns
- Minimum value of numbers in data vector
|
inline |
Function calculates Pearson correlation.
Function calculates Pearson correlation
- Parameters
-
data1 Vector of doubles representing first data. data2 Vector of doubles representing second data.
- Returns
- Pearson correlation
|
inline |
Function returns a quantile.
The quantile is found by interpolation, using the formula
where i is and .
- Parameters
-
data Vector of doubles representing data. q quantile
- Returns
- returns a q-th quantile
|
inline |
Function calculates skew.
Function calculates skew :
- Parameters
-
data Vector of doubles representing data.
- Returns
- Skew
|
inline |
Function calculates Spearman correlation.
Function calculates Spearman correlation
where: is the difference between the two ranks of each observation.
- Parameters
-
data1 Vector of doubles representing first data. data2 Vector of doubles representing second data.
- Returns
- Spearman correlation
|
inline |
Function calculates standard deviation.
Function calculates standard deviation :
where
- Parameters
-
data Vector of doubles representing data.
- Returns
- Standard deviation
|
inline |
Function calculates standard deviation using the provided mean.
Function calculates standard deviation using the provided mean:
- Parameters
-
data Vector of doubles representing data. mean Mean of the population
- Returns
- Standard deviation
|
inline |
Function calculates variance.
Function calculates :
where
- Parameters
-
data Vector of doubles representing data.
- Returns
- variance
|
inline |
Function calculates variance using the provided mean.
Function calculates variance using the provided mean:
- Parameters
-
data Vector of doubles representing data. mean Mean of the population
- Returns
- variance