Root-mean-square goodness-of-fit test for simple null hypothesis