## What Is the Coefficient of Determination?

The coefficient of determination is a statistical measurement that examines how differences in one variable can be explained by the difference in a second variable when predicting the outcome of a given event. In other words, this coefficient, more commonly known as r-squared (or r^{2}), assesses how strong the linear relationship is between two variables and is heavily relied on by investors when conducting trend analysis.

This coefficient generally answers the following question: If a stock is listed on an index and experiences price movements, what percentage of its price movement is attributed to the index's price movement?

### Key Takeaways

- The coefficient of determination is a complex idea centered on statistical analysis of data and financial modeling.
- The coefficient of determination is used to explain the relationship between an independent and dependent variable.
- The coefficient of determination is commonly called r-squared (or r
^{2}) for the statistical value it represents. - This measure is represented as a value between 0.0 and 1.0, where a value of 1.0 indicates a perfect correlation. Thus, it is a reliable model for future forecasts, while a value of 0.0 suggests that asset prices are not a function of dependency on the index.

#### R-Squared

## Understanding the Coefficient of Determination

The coefficient of determination is a measurement used to explain how much the variability of one factor is caused by its relationship to another factor. This correlation is represented as a value between 0.0 and 1.0 (0% to 100%).

A value of 1.0 indicates a 100% price correlation and is thus a reliable model for future forecasts. A value of 0.0 suggests that the model shows that prices are not a function of dependency on the index.

So, a value of 0.20 suggests that 20% of an asset's price movement can be explained by the index, while a value of 0.50 indicates that 50% of its price movement can be explained by it, and so on.

The coefficient of determination is the square of the correlation coefficient, also known as "r" in statistics. The value "r" can result in a negative number, but because r-squared is the result of "r" multiplied by itself (or squared), r^{2} cannot result in a negative number—regardless of what is found on the internet—the square of a negative number is always a positive value.

## Calculating the Coefficient of Determination

To calculate the coefficient of determination. This is done by creating a scatter plot of the data and a trend line.

For instance, if you were to plot the closing prices for the S&P 500 and Apple stock (Apple is listed on the S&P 500) for trading days from Dec. 21, 2022, to Jan. 20, 2023, you'd collect the prices as shown in the table below.

S&P Daily Close | APPL Daily Close | |
---|---|---|

Jan. 20 | $3,972.61 | $137.87 |

19 | $3,898.85 | $135.27 |

18 | $3,928.86 | $135.21 |

17 | $3,990.97 | $135.94 |

13 | $3,999.09 | $134.76 |

12 | $3,983.17 | $133.41 |

11 | $3,969.61 | $133.49 |

10 | $3,919.25 | $130.73 |

9 | $3,892.09 | $130.15 |

6 | $3,895.08 | $129.62 |

5 | $3,808.10 | $125.02 |

4 | $3,852.97 | $126.36 |

3 | $3,824.14 | $125.07 |

Dec. 30 | $3,839.50 | $139.93 |

29 | $3,849.28 | $129.61 |

28 | $3,783.22 | $126.04 |

27 | $3,829.25 | $130.03 |

23 | $3,844.82 | $131.86 |

22 | $3,822.39 | $132.23 |

21 | $3,878.44 | $135.45 |

Then, you'd create a scatter plot. On a graph, how well the data fits the regression model is called the *goodness of fit, *which measures the distance between a trend line and all of the data points that are scattered throughout the diagram.

### Spreadsheets

Most spreadsheets use the same formula to calculate the r^{2} of a dataset. So, if the data reside in columns A and B on your sheet:

= RSQ ( A1 : A10 , B1 : B10 )

Using this formula and highlighting the corresponding cells for the S&P 500 and Apple prices, you get an r^{2} of 0.347, suggesting that the two prices are less correlated than if the r^{2} was between 0.5 and 1.0.

### Manual Calculation

Calculating the coefficient of determination by hand involves several steps. First, you gather the data as in the previous table. Second, you need to calculate all the values you need, as shown in this table, where:

- x= S&P 500 daily close
- y = APPL daily close

x | x2 | y | y2 | xy | |
---|---|---|---|---|---|

Jan. 20 | $3,972.61 | $15,781,630.21 | $137.87 | $19,008.14 | $547,703.74 |

19 | $3,898.85 | $15,201,031.32 | $135.27 | $18,297.97 | $527,397.44 |

18 | $3,928.86 | $15,435,940.90 | $135.21 | $18,281.74 | $531,221.16 |

17 | $3,990.97 | $15,927,841.54 | $135.94 | $18,479.68 | $542,532.46 |

13 | $3,999.09 | $15,992,720.83 | $134.76 | $18,160.26 | $538,917.37 |

12 | $3,983.17 | $15,865,643.25 | $133.41 | $17,798.23 | $531,394.71 |

11 | $3,969.61 | $15,757,803.55 | $133.49 | $17,819.58 | $529,903.24 |

10 | $3,919.25 | $15,360,520.56 | $130.73 | $17,090.33 | $512,363.55 |

9 | $3,892.09 | $15,148,364.57 | $130.15 | $16,939.02 | $506,555.51 |

6 | $3,895.08 | $15,171,648.21 | $129.62 | $16,801.34 | $504,880.27 |

5 | $3,808.10 | $14,501,625.61 | $125.02 | $15,630.00 | $476,088.66 |

4 | $3,852.97 | $14,845,377.82 | $126.36 | $15,966.85 | $486,861.29 |

3 | $3,824.14 | $14,624,046.74 | $125.07 | $15,642.50 | $478,285.19 |

Dec. 30 | $3,839.50 | $14,741,760.25 | $139.93 | $19,580.40 | $537,261.24 |

29 | $3,849.28 | $14,816,956.52 | $129.61 | $16,798.75 | $498,905.18 |

28 | $3,783.22 | $14,312,753.57 | $126.04 | $15,886.08 | $476,837.05 |

27 | $3,829.25 | $14,663,155.56 | $130.03 | $16,907.80 | $497,917.38 |

23 | $3,844.82 | $14,782,640.83 | $131.86 | $17,387.06 | $506,977.97 |

22 | $3,822.39 | $14,610,665.31 | $132.23 | $17,484.77 | $505,434.63 |

21 | $3,878.44 | $15,042,296.83 | $135.45 | $18,346.70 | $525,334.70 |

Sum (Σ) |
$77,781.69 | $302,584,424.00 | $2,638.05 | $348,307.23 | $10,262,772.73 |

Next, use this formula and substitute the values for each row of the table, where *n* equals the number of samples taken, in this case, 20:

$\begin{aligned}&r ^ 2 = \Big ( \frac {n ( \sum xy) - ( \sum x )( \sum y ) }{ \sqrt { [ n \sum x ^ 2 - ( \sum x ) ^ 2 ] } \times \sqrt { [ n \sum y ^ 2 - ( \sum y ) ^ 2 ] } } \Big ) ^ 2 \\\end{aligned}$

Where √ represents the square root of the product in the brackets that follow it.

$\begin{aligned}&r ^ 2 = \Big ( \tiny { \frac {20 ( 10,262,772.73) - ( 77,781.69 )( 2,638.05 ) }{ \sqrt { [ 20 ( 302,584,424 ) - ( 77,781.69 ) ^ 2 ] } \times \sqrt { [ 20 ( 348,307.23 ) - ( 2,638.05 ) ^ 2 ] } } } \Big ) ^ 2 \\\end{aligned}$

So you now have:

$\begin{aligned}&1. \tiny { ( 20 \times 10,262,772.73 ) - ( 77,781.69 \times 2,638.05 ) = 63,467.32 } \\&2. \tiny { (\sqrt { ( 20 \times 302,584,424 ) - ( 77,781.69 ) ^ 2 } = \sqrt { 1,697,180.74 } = 1,302.76 } \\&3. \tiny { (\sqrt { ( 20 \times 10,262,772.73 ) - ( 2,638.05 ) ^ 2 } = \sqrt { 6,836.85 } = 82.69 }\\\end{aligned}$

Then, multiply steps two and three, divide step one by the result, and square it:

$\begin{aligned}&\Big ( \frac { 63,467.32 }{ 1,302.76 \times 82.69 } \Big ) ^ 2 = 0.347\end{aligned}$

You can see how this can become very tedious with lots of room for error, especially, if you're using more than a few weeks of trading data.## Interpreting the Coefficient of Determination

Once you have the coefficient of determination, you use it to evaluate how closely the price movements of the asset you're evaluating correspond to the price movements of an index or benchmark. In the Apple and S&P 500 example, the coefficient of determination for the period was 0.347.

Because 1.0 demonstrates a high correlation and 0.0 shows no correlation, 0.357 shows that Apple stock price movements are somewhat correlated to the index.

Apple is listed on many indexes, so you can calculate the r

^{2}to determine if it corresponds to any other indexes' price movements.One aspect to consider is that r-squared doesn't tell analysts whether the coefficient of determination value is intrinsically good or bad. It is their discretion to evaluate the meaning of this correlation and how it may be applied in future trend analyses.

## How Do You Interpret a Coefficient of Determination?

The coefficient of determination shows how correlated one dependent and one independent variable are. Also called r

^{2}(r-squared), the value should be between 0.0 and 1.0. The closer to 0.0, the less correlated the dependent value is. The closer to 1.0, the more correlated the value is.## What Does R-Squared Tell You in Regression?

It tells you whether there is a dependency between two values and how much dependency one value has on the other.

## What If the Coefficient of Determination Is Greater Than 1?

The coefficient of determination cannot be more than one because the formula always results in a number between 0.0 and 1.0. If it is greater or less than these numbers, something is not correct.

## The Bottom Line

The coefficient of determination is a ratio that shows how dependent one variable is on another variable. Investors use it to determine how correlated an asset's price movements are with its listed index.

When an asset's r

^{2}is closer to zero, it does not demonstrate dependency on the index; if its r^{2}is closer to 1.0, it is more dependent on the price moves the index makes.