public double GetCorrelation(IEnumerable <IEnumerable <double> > matrix) { var x = possibilityService.GetRowP(matrix); var y = possibilityService.GetColumnP(matrix); return(GetCovariance(matrix) / Math.Sqrt(GetDispersion(x) * GetDispersion(y))); }
public double GetDispersionForY(IEnumerable<IEnumerable<double>> matrix) { return GetDispersion(possibilityService.GetColumnP(matrix)); }