# 3.5.2 Statistics

## Contents

### Basic

Name Brief Example
Count Counts elements in a vector. Example
Cov Returns the covariance between two datasets.
Forecast Performs linear regression on the known XY coordinates to calculate or predict y coordinate at given coordinate x. Example
Intercept Calculates the intercept of the linear regression of the given curve. Example
Max This function returns the maximum value from a set of values. Example
Maxifs Returns the maximum value from a given dataset vd that satisfies a specified condition con. Example
Mean Returns the average of a vector. Example
Median This function is used to return median of vdData with n Interpolation. Example
Min This function is used to return the minimum value from a set of values. Example
Minifs Returns the minimum value from a given dataset vd that satisfies a specified condition con. Example
Rms This function is used to return the root mean square of a vector. Example
Sem Calculates the standard error of a vector. Example
Slope Calculates the slope of the linear regression of the given curve. Example
Ss Assumes the mean of the data as the reference value. Example
StdDev Calculates the standard deviation based on a sample. Example
StdDevP Return the standard deviation based on the entire population given as arguments. Example
Total Returns the sum of a vector. Example

### Conditional Statistics

Name Brief Example
Averageif Calculate the mean of values that satisfies a specified condition. Example
Countif Counts the number of values that satisfies a specified condition. Example
Sumif Calculate the sum of a (sub-)range of a vector that satisfies a specified condition. Example

### Data Manipulation

Name Brief Example
Ave Breaks dataset into groups of size size, finds the average for each group, and returns a range containing these values. Example
Diff Returns a dataset that contains the difference between adjacent elements in dataset.
Sum Returns a range whose i th element is the sum of the first i elements of the dataset dataset. Example

### Estimation

Name Brief
Kernelwidth Returns the estimated optimal kernel bandwidth for a given vector vX.
Kernel2width Returns the 2D kernel density bandwidths (wx, wy) of X scale and Y scale for dataset (vx, vy) using two different methods.
Gamfit Use Newton-Raphson method to calculate Maximum Likelihood Estimates (MLE) of $\alpha$ (shape) and $\sigma$ (scale) for Gamma distributed dataset.
Wblfit Uses Newton-Raphson method to calculate Maximum Likelihood Estimates (MLE) of $\alpha$ (scale) and $\beta$ (shape) for Weibull distributed dataset $vx$.

### Time Series

Name Brief Example
Emovavg This function returns exponential moving averages. Example
Mmovavg This function returns modified moving averages. Example
Movavg This function returns the average of adjacent ranges. Example
Movslope This function returns a vector to calculate the moving slope at each point with a window width of nPt. Example
Movrms This function returns a vector to calculate the root mean square(rms) of adjacent ranges. Example
Tmovavg This function returns triangular moving averages. Example
Wmovavg This function returns weighted moving averages. Example
MovCoef This function returns a vector of moving correlation coefficients. Example

Name Brief Example
Confidence Returns the confidence interval for a population mean. Example
Geomean Geometric Mean Example
Geosd Geometric SD Example
Harmean Harmonic Mean Example
Histogram The histogram(dataset, inc, min, max) function generates data bins from dataset in the specified range from min to max.
Kurt Returns the kurtosis of the specified dataset. Example
lcl Returns the lower confidence limit. level is 0.95 by default. Example