/** * Useful matrix operations for multivariate samples. * * @since 1.0.0 */ import * as RNEA from 'fp-ts/ReadonlyNonEmptyArray'; import * as V from './Vector'; import * as M from './Matrix'; /** * An observation is a (free) collection of data vectors, where N is the number of * variables associated with the observation * * @since 1.0.0 * @category Model * @example * // Given three subjects whose measurements are height, weight, shoe size, we can construct a correlation matrix as follows: * * import * as V from '@jacob-alford/matrix-ts/Vector' * import * as MStat from '@jacob-alford/matrix-ts/Multivariate' * * const obs1 = V.fromTuple([167, 63, 8]) * const obs2 = V.fromTuple([200, 94, 12]) * const obs3 = V.fromTuple([160, 65, 9]) * const observations: MStat.MultivariateSample<3> = [obs1, obs2, obs3] * * // This determines how mutually correlated the different variables are * MStat.correlation(observations) */ export declare type MultivariateSample = RNEA.ReadonlyNonEmptyArray>; /** * The average value over different variables * * @since 1.0.0 * @category Multivariate Statistics */ export declare const mean: (s: MultivariateSample) => V.Vec; /** * The difference in observation from a mean of MultivariateSample * * @since 1.0.0 * @category Multivariate Statistics */ export declare const deviation: (s: MultivariateSample) => MultivariateSample; /** * The covariance matrix where each index: i, j represent the variance between each random * variable of the Multivariatesample * * @since 1.0.0 * @category Multivariate Statistics */ export declare const covariance: (s: MultivariateSample) => M.Mat; /** * The correlation matrix where each index: i, j represent the correlation between those * two random variables * * @since 1.0.0 * @category Multivariate Statistics */ export declare const correlation: (s: MultivariateSample) => M.Mat; //# sourceMappingURL=Multivariate.d.ts.map