pvalue_internal function

P value function for one and two arguments.