added ChiSquare

copied from web, need to add note