The answer to your question can be found in any basic regression textbook. There are some fairly simple calculations that can be performed by hand if you happen to have only a single factor. Otherwise the calculations will involve matrix algebra.

You might want to consider enrolling in the free online statistics course titled "Statistical Thinking for Industrial Problem Solving". Based on the questions you have been asking, you might want to concentrate on the hypothesis testing, regression, and design of experiments portions of that course.

Dan Obermiller