# How are p-values in fittings estimated?

I am trying to understand how p-values retrieved in a ParameterTable estimated but I couldn't find any specific information in the documentation about this. For instance, considering

data = {{0, 1}, {1, 0}, {3, 2}, {5, 4}};
lm = LinearModelFit[data, x, x];
lm["ParameterTable"]


How is the p-value of x computed? This answer explains why the p-value should be accepted/rejected and what it means. But my question is related with how it is actually computed?

2 (1 - CDF[StudentTDistribution[2], 0.268373])

The "2" in StudentTDistribution[2] is the degrees of freedom calculated from the sample size (4) minus the number of parameters estimated (2).