Testing signficance of correlation I have been trying to study on how to test significance for a correlation coefficient. So far I have seen that we calculate a value t and then either use p-value or critical value from the t-table to determine its significance.
Now I confused regarding these t-table and p-value. Most of the t-tables I find online have values up to 30 and then there are large jumps, so what if I have a sample size of n=33, so how do I find the critical value at df=31. As for p-value I have found online calculators that do the calculation, but I can't seem to find the formula used to calculate it. How is this p-value calculated? 
Also I am not clear with what exactly df is? why am I subtracting 2 from n? why not n?
Moving on, why are the alternative hypothesis always p not equal 0, why can't it be a one tailed test, with say p > 0, trying to prove that it is a positive correlation ? If I can do that, then how exactly do my steps change? Do I just halve the p-value ? What are the changes in steps if I use the critical value method ?
There are other places where I have seen the same questions were asked, but I am sorry I couldn't get myself clear with this topic from those, and as they were fairly old, I thought it will be best if I create a new question.
 A: In order of your questions:


*

*Tabled statistics are hold-overs from an era when electronic computers were not ubiquitous, and limited page space meant a limited selection of parameter values were included in printed tables. Today we generally ask our software to calculate p-values to arbitrary precision for specific parameter values (including df = 33 :). See for, example the pt() function in R.

*The p-value for a t statistic is calculated by integrating over the probability function for the range one cares about. In testing Pearson's r, one frequently sees a two-tailed test of the null hypothesis $\rho = 0$ (the sample Pearson's correlation coefficient is $r$, and the corresponding population statistic about which you want to make an inference is $\rho$), against an alternative hypothesis of $\rho \ne 0$, which implies positive or negative values of $t$, so $p = P(|T_{\text{df}}| \ge |t|) = 2\int_{- \infty}^{|t|}{f(x)\frac{d}{dx}}$ (where $f(x)$ is Student's t probability distribution function). Statistical software may evaluate closed form analytic expressions of such integrals, integrate by quantitative methods, use some kind of iterative algorithm, etc. depending on the specific probability distribution function.

*The degrees of freedom for this specific t test is $n-2$ because you lose a degree of freedom for each variable used to calculate Pearson's r.

*You can perform two-sided tests of null hypotheses other than $\rho = 0$ (e.g., $\rho = 0.2$), but they become considerably more complex mathematically. You could test $H_{0}: \rho \le 0$, with $H_{A}: \rho > 0$ (or vice versa), but then instead $p = P(T_{\text{df}} > t) = 1 - \int_{-\infty}^{t}{f(x)\frac{d}{dx}}$ (alternately $p = P(T_{\text{df}} < t) = \int_{-\infty}^{t}{f(x)\frac{d}{dx}}$ when testing $H_{0}: \rho \ge 0$). 
