MATLAB: Obtaining the P values for the t stat

MATLAB

I have both the tstat and the degrees of freedom, is there a quick way to find the P value of a two tailed hypothesis at a significance of 0.05

Best Answer

p = 1-tcdf(t,n-1) % Probability of larger t-statistic
requires Statistics Toolbox...