5 Some small symbol mistakes edit approved May 25 '18 at 22:44 Shookie 1837 Let's start with the intuition. There's nothing wrong with using $$y_i$$ to predict $$\hat{y}_i$$. In fact, not using it would mean we are throwing away valuable information. However the more we depend on the information contained in $$y_i$$ to come up with our prediction, the more overly optimistic our estimator will be. On one extreme, if $$\hat{y}_i$$ is just $$y_i$$, you'll have perfect in sample prediction ($$R^2 = 1$$), but we're pretty sure the out-of-sample prediction is gonna be bad. In this case (it's easy to check by yourself), the degrees of freedom will be $$df(\hat{y}) = n$$. On the other extreme, if you use the sample mean of $$y$$: $$y_i = \hat{y_i} = \bar{y}$$ for all $$i$$, then your degrees of freedom will just be 1. Check this nice handout by Ryan Tibshirani for more details on this intuition Now a similar proof to the other answer, but with a bit more explanation Remember that, by definition, the average optimism is: $$\omega = E_y (Err_{in} - \overline{err})$$ $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ L(Y_i^0, \hat{f} (x_i) \; |\; T) \right] - {1 \over N} \sum_{i=1}^N L(y_i, \hat{f} (x_i) ) \right)$$ Now use a quadratic loss function and expand the squared terms: $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ (Y_i^0 - \hat{y}_i)^2 \right] - {1 \over N} \sum_{i=1}^N (y_i - \hat{y}_i)^2 ) \right)$$ $$= {1 \over N} \sum_{i=1}^N\left( E_y E_{Y^0}[(Y_i^0)^2] + E_y E_{Y^0} [(\hat{y}_i^2] -2 E_y E_{Y^0} [Y_i^0 \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$$$= {1 \over N} \sum_{i=1}^N\left( E_y E_{Y^0}[(Y_i^0)^2] + E_y E_{Y^0} [\hat{y}_i^2] -2 E_y E_{Y^0} [Y_i^0 \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ use $$E_y E_{Y^0}[(Y_i^0)^2] = E_y[y_i^2]$$ to replace: $$= {1 \over N}\sum_{i=1}^N \left( E_y[y_i^2] + E_y[y_i^2] -2 E_y [y_i] E_y[ \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$$$= {1 \over N}\sum_{i=1}^N \left( E_y[y_i^2] + E_y[\hat{y_i}^2] -2 E_y [y_i] E_y[ \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ $$= {2 \over N} \sum_{i=1}^N \left( E[y_i \hat{y}_i] - E_y [y_i] E_y[ \hat{y}_i] \right)$$ To finish, note that $$Cov(x, w) = E[xw] - E[x]E[w]$$, which yields: $$= {2 \over N} \sum_{i=1}^N Cov(y_i, \hat{y}_i)$$ Let's start with the intuition. There's nothing wrong with using $$y_i$$ to predict $$\hat{y}_i$$. In fact, not using it would mean we are throwing away valuable information. However the more we depend on the information contained in $$y_i$$ to come up with our prediction, the more overly optimistic our estimator will be. On one extreme, if $$\hat{y}_i$$ is just $$y_i$$, you'll have perfect in sample prediction ($$R^2 = 1$$), but we're pretty sure the out-of-sample prediction is gonna be bad. In this case (it's easy to check by yourself), the degrees of freedom will be $$df(\hat{y}) = n$$. On the other extreme, if you use the sample mean of $$y$$: $$y_i = \hat{y_i} = \bar{y}$$ for all $$i$$, then your degrees of freedom will just be 1. Check this nice handout by Ryan Tibshirani for more details on this intuition Now a similar proof to the other answer, but with a bit more explanation Remember that, by definition, the average optimism is: $$\omega = E_y (Err_{in} - \overline{err})$$ $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ L(Y_i^0, \hat{f} (x_i) \; |\; T) \right] - {1 \over N} \sum_{i=1}^N L(y_i, \hat{f} (x_i) ) \right)$$ Now use a quadratic loss function and expand the squared terms: $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ (Y_i^0 - \hat{y}_i)^2 \right] - {1 \over N} \sum_{i=1}^N (y_i - \hat{y}_i)^2 ) \right)$$ $$= {1 \over N} \sum_{i=1}^N\left( E_y E_{Y^0}[(Y_i^0)^2] + E_y E_{Y^0} [(\hat{y}_i^2] -2 E_y E_{Y^0} [Y_i^0 \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ use $$E_y E_{Y^0}[(Y_i^0)^2] = E_y[y_i^2]$$ to replace: $$= {1 \over N}\sum_{i=1}^N \left( E_y[y_i^2] + E_y[y_i^2] -2 E_y [y_i] E_y[ \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ $$= {2 \over N} \sum_{i=1}^N \left( E[y_i \hat{y}_i] - E_y [y_i] E_y[ \hat{y}_i] \right)$$ To finish, note that $$Cov(x, w) = E[xw] - E[x]E[w]$$, which yields: $$= {2 \over N} \sum_{i=1}^N Cov(y_i, \hat{y}_i)$$ Let's start with the intuition. There's nothing wrong with using $$y_i$$ to predict $$\hat{y}_i$$. In fact, not using it would mean we are throwing away valuable information. However the more we depend on the information contained in $$y_i$$ to come up with our prediction, the more overly optimistic our estimator will be. On one extreme, if $$\hat{y}_i$$ is just $$y_i$$, you'll have perfect in sample prediction ($$R^2 = 1$$), but we're pretty sure the out-of-sample prediction is gonna be bad. In this case (it's easy to check by yourself), the degrees of freedom will be $$df(\hat{y}) = n$$. On the other extreme, if you use the sample mean of $$y$$: $$y_i = \hat{y_i} = \bar{y}$$ for all $$i$$, then your degrees of freedom will just be 1. Check this nice handout by Ryan Tibshirani for more details on this intuition Now a similar proof to the other answer, but with a bit more explanation Remember that, by definition, the average optimism is: $$\omega = E_y (Err_{in} - \overline{err})$$ $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ L(Y_i^0, \hat{f} (x_i) \; |\; T) \right] - {1 \over N} \sum_{i=1}^N L(y_i, \hat{f} (x_i) ) \right)$$ Now use a quadratic loss function and expand the squared terms: $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ (Y_i^0 - \hat{y}_i)^2 \right] - {1 \over N} \sum_{i=1}^N (y_i - \hat{y}_i)^2 ) \right)$$ $$= {1 \over N} \sum_{i=1}^N\left( E_y E_{Y^0}[(Y_i^0)^2] + E_y E_{Y^0} [\hat{y}_i^2] -2 E_y E_{Y^0} [Y_i^0 \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ use $$E_y E_{Y^0}[(Y_i^0)^2] = E_y[y_i^2]$$ to replace: $$= {1 \over N}\sum_{i=1}^N \left( E_y[y_i^2] + E_y[\hat{y_i}^2] -2 E_y [y_i] E_y[ \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ $$= {2 \over N} \sum_{i=1}^N \left( E[y_i \hat{y}_i] - E_y [y_i] E_y[ \hat{y}_i] \right)$$ To finish, note that $$Cov(x, w) = E[xw] - E[x]E[w]$$, which yields: $$= {2 \over N} \sum_{i=1}^N Cov(y_i, \hat{y}_i)$$ 4 edited body edited Feb 14 '17 at 18:23 whuber♦ 211k34462842 Let's start with the intuition. There's nothing wrong with using $$y_i$$ to predict $$\hat{y}_i$$. In fact, not using it would mean we are throwing away valuable information. However the more we depend on the information contained in $$y_i$$ to come up with our prediction, the more overly optimistic our estimator will be. On one extreme, if $$\hat{y}_i$$ is just $$y_i$$, you'll have perfect in sample prediction ($$R^2 = 1$$), but we're pretty sure the out-of-sample prediction is gonna be bad. In this case (it's easy to check by yourself), the degrees of freedom will be $$df(\hat{y}) = n$$. On the other extreme, if you use the sample mean of $$y$$: $$y_i = \hat{y_i} = \bar{y}$$ for all $$i$$, then your degrees of freedom will just be 1. Check this nice handout by Ryan TishbiraniTibshirani for more details on this intuition Now a similar proof to the other answer, but with a bit more explanation Remember that, by definition, the average optimism is: $$\omega = E_y (Err_{in} - \overline{err})$$ $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ L(Y_i^0, \hat{f} (x_i) \; |\; T) \right] - {1 \over N} \sum_{i=1}^N L(y_i, \hat{f} (x_i) ) \right)$$ Now use a quadratic loss function and expand the squared terms: $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ (Y_i^0 - \hat{y}_i)^2 \right] - {1 \over N} \sum_{i=1}^N (y_i - \hat{y}_i)^2 ) \right)$$ $$= {1 \over N} \sum_{i=1}^N\left( E_y E_{Y^0}[(Y_i^0)^2] + E_y E_{Y^0} [(\hat{y}_i^2] -2 E_y E_{Y^0} [Y_i^0 \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ use $$E_y E_{Y^0}[(Y_i^0)^2] = E_y[y_i^2]$$ to replace: $$= {1 \over N}\sum_{i=1}^N \left( E_y[y_i^2] + E_y[y_i^2] -2 E_y [y_i] E_y[ \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ $$= {2 \over N} \sum_{i=1}^N \left( E[y_i \hat{y}_i] - E_y [y_i] E_y[ \hat{y}_i] \right)$$ To finish, note that $$Cov(x, w) = E[xw] - E[x]E[w]$$, which yields: $$= {2 \over N} \sum_{i=1}^N Cov(y_i, \hat{y}_i)$$ Let's start with the intuition. There's nothing wrong with using $$y_i$$ to predict $$\hat{y}_i$$. In fact, not using it would mean we are throwing away valuable information. However the more we depend on the information contained in $$y_i$$ to come up with our prediction, the more overly optimistic our estimator will be. On one extreme, if $$\hat{y}_i$$ is just $$y_i$$, you'll have perfect in sample prediction ($$R^2 = 1$$), but we're pretty sure the out-of-sample prediction is gonna be bad. In this case (it's easy to check by yourself), the degrees of freedom will be $$df(\hat{y}) = n$$. On the other extreme, if you use the sample mean of $$y$$: $$y_i = \hat{y_i} = \bar{y}$$ for all $$i$$, then your degrees of freedom will just be 1. Check this nice handout by Ryan Tishbirani for more details on this intuition Now a similar proof to the other answer, but with a bit more explanation Remember that, by definition, the average optimism is: $$\omega = E_y (Err_{in} - \overline{err})$$ $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ L(Y_i^0, \hat{f} (x_i) \; |\; T) \right] - {1 \over N} \sum_{i=1}^N L(y_i, \hat{f} (x_i) ) \right)$$ Now use a quadratic loss function and expand the squared terms: $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ (Y_i^0 - \hat{y}_i)^2 \right] - {1 \over N} \sum_{i=1}^N (y_i - \hat{y}_i)^2 ) \right)$$ $$= {1 \over N} \sum_{i=1}^N\left( E_y E_{Y^0}[(Y_i^0)^2] + E_y E_{Y^0} [(\hat{y}_i^2] -2 E_y E_{Y^0} [Y_i^0 \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ use $$E_y E_{Y^0}[(Y_i^0)^2] = E_y[y_i^2]$$ to replace: $$= {1 \over N}\sum_{i=1}^N \left( E_y[y_i^2] + E_y[y_i^2] -2 E_y [y_i] E_y[ \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ $$= {2 \over N} \sum_{i=1}^N \left( E[y_i \hat{y}_i] - E_y [y_i] E_y[ \hat{y}_i] \right)$$ To finish, note that $$Cov(x, w) = E[xw] - E[x]E[w]$$, which yields: $$= {2 \over N} \sum_{i=1}^N Cov(y_i, \hat{y}_i)$$ Let's start with the intuition. There's nothing wrong with using $$y_i$$ to predict $$\hat{y}_i$$. In fact, not using it would mean we are throwing away valuable information. However the more we depend on the information contained in $$y_i$$ to come up with our prediction, the more overly optimistic our estimator will be. On one extreme, if $$\hat{y}_i$$ is just $$y_i$$, you'll have perfect in sample prediction ($$R^2 = 1$$), but we're pretty sure the out-of-sample prediction is gonna be bad. In this case (it's easy to check by yourself), the degrees of freedom will be $$df(\hat{y}) = n$$. On the other extreme, if you use the sample mean of $$y$$: $$y_i = \hat{y_i} = \bar{y}$$ for all $$i$$, then your degrees of freedom will just be 1. Check this nice handout by Ryan Tibshirani for more details on this intuition Now a similar proof to the other answer, but with a bit more explanation Remember that, by definition, the average optimism is: $$\omega = E_y (Err_{in} - \overline{err})$$ $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ L(Y_i^0, \hat{f} (x_i) \; |\; T) \right] - {1 \over N} \sum_{i=1}^N L(y_i, \hat{f} (x_i) ) \right)$$ Now use a quadratic loss function and expand the squared terms: $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ (Y_i^0 - \hat{y}_i)^2 \right] - {1 \over N} \sum_{i=1}^N (y_i - \hat{y}_i)^2 ) \right)$$ $$= {1 \over N} \sum_{i=1}^N\left( E_y E_{Y^0}[(Y_i^0)^2] + E_y E_{Y^0} [(\hat{y}_i^2] -2 E_y E_{Y^0} [Y_i^0 \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ use $$E_y E_{Y^0}[(Y_i^0)^2] = E_y[y_i^2]$$ to replace: $$= {1 \over N}\sum_{i=1}^N \left( E_y[y_i^2] + E_y[y_i^2] -2 E_y [y_i] E_y[ \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ $$= {2 \over N} \sum_{i=1}^N \left( E[y_i \hat{y}_i] - E_y [y_i] E_y[ \hat{y}_i] \right)$$ To finish, note that $$Cov(x, w) = E[xw] - E[x]E[w]$$, which yields: $$= {2 \over N} \sum_{i=1}^N Cov(y_i, \hat{y}_i)$$ 3 corrected the covariance formula at the end (after "To finish,") edit approved Dec 27 '16 at 15:20 D-Bo 31 Let's start with the intuition. There's nothing wrong with using $$y_i$$ to predict $$\hat{y}_i$$. In fact, not using it would mean we are throwing away valuable information. However the more we depend on the information contained in $$y_i$$ to come up with our prediction, the more overly optimistic our estimator will be. On one extreme, if $$\hat{y}_i$$ is just $$y_i$$, you'll have perfect in sample prediction ($$R^2 = 1$$), but we're pretty sure the out-of-sample prediction is gonna be bad. In this case (it's easy to check by yourself), the degrees of freedom will be $$df(\hat{y}) = n$$. On the other extreme, if you use the sample mean of $$y$$: $$y_i = \hat{y_i} = \bar{y}$$ for all $$i$$, then your degrees of freedom will just be 1. Check this nice handout by Ryan Tishbirani for more details on this intuition Now a similar proof to the other answer, but with a bit more explanation Remember that, by definition, the average optimism is: $$\omega = E_y (Err_{in} - \overline{err})$$ $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ L(Y_i^0, \hat{f} (x_i) \; |\; T) \right] - {1 \over N} \sum_{i=1}^N L(y_i, \hat{f} (x_i) ) \right)$$ Now use a quadratic loss function and expand the squared terms: $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ (Y_i^0 - \hat{y}_i)^2 \right] - {1 \over N} \sum_{i=1}^N (y_i - \hat{y}_i)^2 ) \right)$$ $$= {1 \over N} \sum_{i=1}^N\left( E_y E_{Y^0}[(Y_i^0)^2] + E_y E_{Y^0} [(\hat{y}_i^2] -2 E_y E_{Y^0} [Y_i^0 \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ use $$E_y E_{Y^0}[(Y_i^0)^2] = E_y[y_i^2]$$ to replace: $$= {1 \over N}\sum_{i=1}^N \left( E_y[y_i^2] + E_y[y_i^2] -2 E_y [y_i] E_y[ \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ $$= {2 \over N} \sum_{i=1}^N \left( E[y_i \hat{y}_i] - E_y [y_i] E_y[ \hat{y}_i] \right)$$ To finish, note that $$Cov(x, w) = E[xw] - E[x w]$$$$Cov(x, w) = E[xw] - E[x]E[w]$$, so thatwhich yields: $$= {2 \over N} \sum_{i=1}^N Cov(y_i, \hat{y}_i)$$ Let's start with the intuition. There's nothing wrong with using $$y_i$$ to predict $$\hat{y}_i$$. In fact, not using it would mean we are throwing away valuable information. However the more we depend on the information contained in $$y_i$$ to come up with our prediction, the more overly optimistic our estimator will be. On one extreme, if $$\hat{y}_i$$ is just $$y_i$$, you'll have perfect in sample prediction ($$R^2 = 1$$), but we're pretty sure the out-of-sample prediction is gonna be bad. In this case (it's easy to check by yourself), the degrees of freedom will be $$df(\hat{y}) = n$$. On the other extreme, if you use the sample mean of $$y$$: $$y_i = \hat{y_i} = \bar{y}$$ for all $$i$$, then your degrees of freedom will just be 1. Check this nice handout by Ryan Tishbirani for more details on this intuition Now a similar proof to the other answer, but with a bit more explanation Remember that, by definition, the average optimism is: $$\omega = E_y (Err_{in} - \overline{err})$$ $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ L(Y_i^0, \hat{f} (x_i) \; |\; T) \right] - {1 \over N} \sum_{i=1}^N L(y_i, \hat{f} (x_i) ) \right)$$ Now use a quadratic loss function and expand the squared terms: $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ (Y_i^0 - \hat{y}_i)^2 \right] - {1 \over N} \sum_{i=1}^N (y_i - \hat{y}_i)^2 ) \right)$$ $$= {1 \over N} \sum_{i=1}^N\left( E_y E_{Y^0}[(Y_i^0)^2] + E_y E_{Y^0} [(\hat{y}_i^2] -2 E_y E_{Y^0} [Y_i^0 \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ use $$E_y E_{Y^0}[(Y_i^0)^2] = E_y[y_i^2]$$ to replace: $$= {1 \over N}\sum_{i=1}^N \left( E_y[y_i^2] + E_y[y_i^2] -2 E_y [y_i] E_y[ \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ $$= {2 \over N} \sum_{i=1}^N \left( E[y_i \hat{y}_i] - E_y [y_i] E_y[ \hat{y}_i] \right)$$ To finish, note that $$Cov(x, w) = E[xw] - E[x w]$$, so that: $$= {2 \over N} \sum_{i=1}^N Cov(y_i, \hat{y}_i)$$ Let's start with the intuition. There's nothing wrong with using $$y_i$$ to predict $$\hat{y}_i$$. In fact, not using it would mean we are throwing away valuable information. However the more we depend on the information contained in $$y_i$$ to come up with our prediction, the more overly optimistic our estimator will be. On one extreme, if $$\hat{y}_i$$ is just $$y_i$$, you'll have perfect in sample prediction ($$R^2 = 1$$), but we're pretty sure the out-of-sample prediction is gonna be bad. In this case (it's easy to check by yourself), the degrees of freedom will be $$df(\hat{y}) = n$$. On the other extreme, if you use the sample mean of $$y$$: $$y_i = \hat{y_i} = \bar{y}$$ for all $$i$$, then your degrees of freedom will just be 1. Check this nice handout by Ryan Tishbirani for more details on this intuition Now a similar proof to the other answer, but with a bit more explanation Remember that, by definition, the average optimism is: $$\omega = E_y (Err_{in} - \overline{err})$$ $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ L(Y_i^0, \hat{f} (x_i) \; |\; T) \right] - {1 \over N} \sum_{i=1}^N L(y_i, \hat{f} (x_i) ) \right)$$ Now use a quadratic loss function and expand the squared terms: $$= E_y \left( {1 \over N} \sum_{i=1}^N E_{Y^0} \left[ (Y_i^0 - \hat{y}_i)^2 \right] - {1 \over N} \sum_{i=1}^N (y_i - \hat{y}_i)^2 ) \right)$$ $$= {1 \over N} \sum_{i=1}^N\left( E_y E_{Y^0}[(Y_i^0)^2] + E_y E_{Y^0} [(\hat{y}_i^2] -2 E_y E_{Y^0} [Y_i^0 \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ use $$E_y E_{Y^0}[(Y_i^0)^2] = E_y[y_i^2]$$ to replace: $$= {1 \over N}\sum_{i=1}^N \left( E_y[y_i^2] + E_y[y_i^2] -2 E_y [y_i] E_y[ \hat{y}_i] - E_y[y_i^2] - E_y[\hat{y}_i^2] + 2E[y_i \hat{y}_i] \right)$$ $$= {2 \over N} \sum_{i=1}^N \left( E[y_i \hat{y}_i] - E_y [y_i] E_y[ \hat{y}_i] \right)$$ To finish, note that $$Cov(x, w) = E[xw] - E[x]E[w]$$, which yields: $$= {2 \over N} \sum_{i=1}^N Cov(y_i, \hat{y}_i)$$ 2 formatting edited Oct 18 '16 at 2:50 cd98 315213 1 answered Oct 18 '16 at 2:36 cd98 315213