1
$\begingroup$

The Problem: I'm working on a problem from the Conceptual exercises from chapter three of "An Introduction to Statistical Learning". The problem is asking to show how the top equation below can be rewritten as the bottom equation.

Self-Study Notes: This is not for a class, purely for my curiosity. The simplification below is my attempt at the problem, written using LaTex, not copied from another source.

$$\hat{y_i}~=~x_i\hat{\beta}~~~~~and~~~~~\hat{\beta}~=~\frac{\sum_{i=1}^{n} x_iy_i}{\sum_{i'=1}^n x^2_{i'}}$$$$\hat{y_i}~=~x_i\frac{\sum_{i=1}^{n} x_iy_i}{\sum_{i'=1}^n x^2_{i'}}$$$$\hat{y_i}~=~\left( \frac{x_i}{1} \right)\frac{\sum_{i=1}^{n} x_iy_i}{\sum_{i'=1}^n x^2_{i'}}$$$$\hat{y_i}~=~\sum_{i=1}^{n} \left( \frac{\sum_{i=1}^{n} x_{i'}x_i}{\sum_{i''=1}^n x^2_{i''}} \right)y_{i'}$$$$\hat{y_i}~=~\sum_{i=1}^{n} a_{i'}y_{i'}~~~where~~~ a_{i'}~=~\left( \frac{\sum_{i=1}^{n} x_{i'}x_i}{\sum_{i''=1}^n x^2_{i''}} \right)$$

Question #1: I understand everything up until how the third equation becomes the fourth. Why was the additional $\sum_{i=1}^{n}$ added and why was the $y_i$ changed to $y_{i'}$ and moved outside of the summation in the fraction? Why was the $x_i$ able to "move inside" (for lack of a better phrase) of the numerator $\sum_{i=1}^{n}$

$$\hat{y_i}~=~\left( \frac{x_i}{1} \right)\frac{\sum_{i=1}^{n} x_iy_i}{\sum_{i'=1}^n x^2_{i'}}$$$$\hat{y_i}~=~\sum_{i=1}^{n} \left( \frac{\sum_{i=1}^{n} x_{i'}x_i}{\sum_{i''=1}^n x^2_{i''}} \right)y_{i'}$$

Question #2: (This could be part of my lack of understanding of the problem) What is the distinction between $x_{i'}$ (with the apostrophe) stand for as opposed to $x_i$ (no apostrophe)? I understand that $x_i$ stands for the ith observation, but I don't know what the apostrophe adds to the meaning. I asked a specific question regarding this here but would like a more general answer as well

$\endgroup$
1
  • $\begingroup$ Welcome to Cross Validated. Please type your question as text, do not just post a photograph (see here). When you retype the question, please also add the [self-study] tag & read its wiki. $\endgroup$
    – DeltaIV
    Commented Dec 27, 2017 at 23:13

2 Answers 2

0
$\begingroup$

You can replace i' with j and i'' with k and just look for some vector multiplication and you should come up with the desired result.Here (i) just represents a particular observation and i' is not the transpose or complement in this scenario.

$\endgroup$
1
  • $\begingroup$ "... i' is not the transpose or complement in this scenario." So if it isn't the transpose or complement, can they be used interchangeably? $\endgroup$
    – m_squared
    Commented Dec 28, 2017 at 13:09
0
$\begingroup$

The summation identity I needed to solve the equation was $C \cdot \sum_{i=1}^{n}f(x)~=~\sum_{i=1}^{n}C \cdot f(x)$. I believe I've solved it as: $$\hat{y_i}~=~x_i\hat{\beta}~~~~~and~~~~~\hat{\beta}~=~\frac{\sum_{i=1}^{n} x_iy_i}{\sum_{i'=1}^n x^2_{i'}}$$ $$\hat{y_i}~=~x_i\frac{\sum_{i=1}^{n} x_iy_i}{\sum_{i'=1}^n x^2_{i'}}$$ $$\hat{y_i}~=~\left( \frac{x_i}{1} \right)\frac{\sum_{i=1}^{n} x_iy_i}{\sum_{i'=1}^n x^2_{i'}}$$

$$\hat{y_i}~=~\sum_{i=1}^{n} \left( \frac{x_i}{1} \right)\left( \frac{\sum_{i=1}^{n} x_{i'}y_{i'} }{\sum_{k=1}^n x^2_{k}} \right)$$ $$\hat{y_i}~=~\sum_{i=1}^{n} \left( \frac{x_i}{1} \right) \left( \frac{y_i}{1} \right)\left( \frac{\sum_{i=1}^{n} x_{i'} }{\sum_{k=1}^n x^2_{k}} \right)$$ $$\hat{y_i}~=~\sum_{i=1}^{n} \left( \frac{y_i}{1} \right)\left( \frac{\sum_{i=1}^{n} x_ix_{i'}}{\sum_{k=1}^n x^2_{k}} \right)$$

$$\hat{y_i}~=~\sum_{i=1}^{n} \left( \frac{\sum_{i=1}^{n} x_{i}x_{i'} }{\sum_{k=1}^n x^2_{k}} \right)y_{i'}$$ $$\hat{y_i}~=~\sum_{i=1}^{n} a_{i'}y_{i'}~~~where~~~ a_{i'}~=~\left( \frac{\sum_{i=1}^{n} x_ix_{i'} }{\sum_{k=1}^n x^2_{k}} \right)$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.