The formula is put in to matrices.

To Calculate the factors the following formula is used

To calculate the correlation coefficient the following formulas are used.

df | SS | MS | |

Total | n-1 | ||

Regression | k | ||

Error | n-k-1 |

= inverse matrix

= y value predicted by the formula

= Average y value

= error

= multiple correlation coefficient