Calculates the correlation between two sets of values, arr1 and arr2.
Parameters |
arr1 : Array First set of values.
arr2 : Array Second set of values.
|
---|---|
Returns |
cor : Number The correlation between arr1, arr2.
|
Errors |
An error is thrown if:
|
Calculates the correlation between two sets of values, arr1 and arr2.
Parameters |
arr1 : Array First set of values.
arr2 : Array Second set of values.
|
---|---|
Returns |
covar : Number The covariance of arr1, arr2
|
Errors |
An error is thrown if:
|
Creates a function to calculate the exponential regression of a set of values, arrY.
Parameters |
arrY : Array A set of values.
|
---|---|
Returns |
expReg : Function A function that takes a value or an array of values and calculates the corresponding exponential regression values.
|
Errors |
This function does not raise any errors. |
Creates a function to calculate the linear regression of a dataset, corresponding to x-values (arrX) and y-values (arrY).
Parameters |
arrX : Array A set of x-values.
arrY : Array A set of y-values.
|
---|---|
Returns |
linReg : Function A function that takes a value or an array of values and calculates the corresponding linear regression values.
|
Errors |
This function does not raise any errors. |
Calculates the mean of a set of values, arr.
Parameters |
arr : Array A set of values.
|
---|---|
Returns |
num : Number The mean of arr.
|
Errors |
This function does not raise any errors. |
Calculates the median of a set of values, arr.
Parameters |
arr : Array A set of values.
|
---|---|
Returns |
num : Number The median of arr.
|
Errors |
This function does not raise any errors. |
Calculates the mode of a set of values, arr.
Parameters |
arr : Array A set of values.
|
---|---|
Returns |
num : Number The mode of arr.
|
Errors |
This function does not raise any errors. |
Calculates the kth q-quantile of a set of values, arr.
Parameters |
arr : Array A set of values.
k : Number Index of quantile.
q : Number Number of quantiles.
|
---|---|
Returns |
num : Number The median of arr.
|
Errors |
This function does not raise any errors. |
Creates a set of summary statistics of a set of values, arr. Calculates the mean, first quartile (mode), median, third quartile, and standard deviation.
Parameters |
arr : Array A set of values.
|
---|---|
Returns |
obj : Object An object containing the mean ('mean'), first quartile ('firstQuartile'), median ('median'), third quartile ('thirdQuartile'), and standard deviation ('standardDev') of arr.
|
Errors |
This function does not raise any errors. |
Calculates the coefficient of determination of a dataset, source, and a regression line, regression.
Parameters |
source : Array Data points.
regression : Array Fitted points.
|
---|---|
Returns |
rSq : Number The r-squared value of source, regression.arr.
|
Errors |
This function does not raise any errors. |
Calculates the standard deviation of a set of values, arr.
Parameters |
arr : Array A set of values.
|
---|---|
Returns |
stddev : Number The standard deviation of arr.
|
Errors |
This function does not raise any errors. |