Function ADS::chiSquare

Function Documentation

inline double ADS::chiSquare(const std::vector<long> &Y, const std::vector<double> &p)

the chi-square statistic V of the counts Y against the probabilities p over n samples

Pre:

Y and p of the same size, each n p_s > 0