lundi 7 décembre 2015

R - Computing a p-value from a Test Statistic

I am trying to compute the p-value for a Test Statistic T(X)=sum(xi^2) on R where i can generate the individual xi's but the distribution of T(X) is unknown.

Is the best way to proceed to run the Test Statistic a large number of times (say 10000) and see how many are less than my quantile q that I am interested in and then create a probability? Or is there a more precise way?

Thanks to anyone that can help

Aucun commentaire:

Enregistrer un commentaire