Does p value depend on distribution of null hypothesis?

Based on the same random sample and same test statistic, will the p value remain the same even when the distribution of test statistic under null hypothesis is changed. Or is this scenario true only in case of a distribution and it's asymptotic distribution say t and normal?

• What do you mean by "distribution of null hypothesis is changed"? Are you asking if testing different hypothesis could lead to different p-values? The answer is pretty obvious... – Tim Oct 31 '19 at 18:29
• I meant distribution of test statistic under null hypothesis – Harry Nov 1 '19 at 3:41

Your question has a lot to do with the subtle nature of what a p-value actually is and how it is interpreted. It's not exactly correct to say that the null hypothesis has a distribution at all; as @Noah correctly points out, the p-value relies on the sampling distribution of the test statistic: in frequentist inference, the sampling distribution is constructed partly from a hypothetical, user-supplied "null hypothesis" (such as 'the true mean $$\mu=2$$' in a one-sample test or '$$\mu_1 - \mu_2 = 0$$' in a two-sample test) that involves a statement concerning one or more of the parameters of a probability distribution. Other parameters needed to fully specify the distribution (such as the variance $$\sigma^2$$ in a model where normality is assumed) might also be hypothesized by the investigator, or they may be estimated using the observed data. Most likely, a technique such as maximum likelihood estimation is used to fix the distributional parameters at their "most likely" values.