Statistics

correlation (aX: Array<number>, aY: Array<number>): number

Calculates the correlation between the numbers in two arrays aX and aY.

Name Type Default Description
aX Array<number>    
aY Array<number>    

covariance (aX: Array<number>, aY: Array<number>): number

Calculates the covariance of the numbers in two arrays aX and aY.

Name Type Default Description
aX Array<number>    
aY Array<number>    

mean (values: Array<number>): number

Calculates the mean of an array of numbers.

Name Type Default Description
values Array<number>    

median (values: Array<number>): number

Calculates the median of an array of numbers.

Name Type Default Description
values Array<number>    

mode (values: Array<number>): undefined|number

Calculates the mode of an array of numbers. Returns undefined if no mode exists, i.e. there are multiple values with the same largest count.

Name Type Default Description
values Array<number>    

quantile (values: Array<number>, p: number): number

Finds the quantile of an array of numbers for the cumulative probability p.

Name Type Default Description
values Array<number>    
p number    

stdDev (values: Array<number>): number

Calculates the standard deviation of an array of numbers.

Name Type Default Description
values Array<number>    

variance (values: Array<number>): undefined|number

Calculates the variance of an array of numbers.

Name Type Default Description
values Array<number>    

Copyright © 2024 Mathigon.org