Link Search Menu Expand Document

Statistics

statistics.ts#L91

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>    
statistics.ts#L84

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>    
statistics.ts#L11

mean (values: Array<number>): number

Calculates the mean of an array of numbers.

Name Type Default Description
values Array<number>    
statistics.ts#L36

median (values: Array<number>): number

Calculates the median of an array of numbers.

Name Type Default Description
values Array<number>    
statistics.ts#L44

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>    
statistics.ts#L20

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

Calculates the quantile of an array of numbers for the cumulative probability p. This method excludes the median in calculation, i.e. quantile((1, 2, 3, 4, 5), 0.25) === 2

Name Type Default Description
values Array<number>    
p number    
statistics.ts#L78

stdDev (values: Array<number>): number

Calculates the standard deviation of an array of numbers.

Name Type Default Description
values Array<number>    
statistics.ts#L69

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

Calculates the variance of an array of numbers.

Name Type Default Description
values Array<number>    

Copyright © 2022 Mathigon.org