# How is the correlation matrix in table 3.5 in the book ISLR calculated? What does jt signify?

I was reading the book Introduction to statistical learning by Hastie and Tibshirani and there was this relationship between newspaper, radio & tv ads and their effect on sales in multiple linear regression. So how was this correlation matrix calculated and what does it tell? Thanks

• www-bcf.usc.edu/~gareth/ISL/ISLR%20Seventh%20Printing.pdf: This table on page 75 just shows Pearson correlation coefficients showing the strength of linear dependence between every pair of these variables. For example, the correlation coefficient for TV and radio is 0.0548. Does this help or you need more information? – AlexK May 27 at 4:57
• Thanks for the reply. So this correlation tell us about the score of the strength of the dependence on each other? If so, then how was it calculated? It would great if you can explain it. Thanks. – quantumbiker May 27 at 5:50
• It is a measure of association for two variables. It measures both the strength and the direction of a linear relationship. If one variable X is an exact linear function of another variable Y, the correlation is 1 if the relationship is positive and -1 if the relationship is negative. If there is no linear predictability between the two variables, the correlation is 0. Otherwise, values range between -1 and +1. You can look up the formula for Pearson correlation. It is calculated by dividing the covariance of the two variables by the product of their standard deviations. – AlexK May 27 at 6:03
• Thanks. I understand it a bit now. I'll take a look at Pearson correlation as well. – quantumbiker May 27 at 6:07