I'm self-studying Introduction to Statistical Learning. Page 19 of the book states the following:     Consider a given estimate $\hat{f}$ and a set of predictors $X$, which yields the prediction $\hat{Y} = \hat{f}(X)$. Assume for a moment that both $\hat{f}$ and $X$ are fixed. Then, it is easy to show that      $$ E(Y-\hat{Y})^2 = E[f(X) + \epsilon - \hat{f}(X)]^2 = [f(X) = \hat{f}(X)]^2 + Var(\epsilon)$$   Question: How exactly is the step from $E[f(X) + \epsilon - \hat{f}(X)]^2$ to $[f(X) = \hat{f}(X)]^2 + Var(\epsilon)$ justified?
On page 19 of the textbook  (by James, Witten, Hastie and Tibshirani--it is freely downloadable on the web, and very good), the following is stated:  Consider a given estimate $$\hat{Y} = \hat{f}(x)$$ Assume for a moment that both $$\hat{f}, X$$ are fixed. Then, it is easy to show that: $$\mathrm{E}(Y - \hat{Y})^2 = \mathrm{E}[f(X) + \epsilon - \hat{f}(X)]^2$$ $$ = [f(X) - \hat{f}(X)]^2 + \mathrm{Var}(\epsilon)$$  It is further explained that the first term represents the reducible error, and the second term represents the irreducible error. I am not fully understanding how the authors arrive at this answer. I worked through the calculations as follows: $$\mathrm{E}(Y - \hat{Y})^2 = \mathrm{E}[f(X) + \epsilon - \hat{f}(X)]^2$$ This simplifies to $[f(X) - \hat{f}(X) + \mathrm{E}[\epsilon]]^2 = [f(X) - \hat{f}(X)]^2$ assuming that $\mathrm{E}[\epsilon] = 0$. Where is the $\mathrm{Var}(x)$ indicated in the text coming from? Any suggestions would be greatly appreciated.
I'm trying to  working on Linux. I have PAINSTAKINGLY installed NVidia drivers, Cuda 5.0 and incidentally I'm failing on the last step when I run make:  make  all-recursive make[1]: Entering directory `/var/progs/CudaMiner' Making all in compat make[2]: Entering directory `/var/progs/CudaMiner/compat' Making all in jansson make[3]: Entering directory `/var/progs/CudaMiner/compat/jansson' gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..     -g -O2 -MT dump.o -MD -MP -MF .deps/dump.Tpo -c -o dump.o dump.c /bin/bash: gcc: command not found make[3]: *** [dump.o] Error 127 make[3]: Leaving directory `/var/progs/CudaMiner/compat/jansson' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/progs/CudaMiner/compat' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/progs/CudaMiner' make: *** [all] Error 2   I'm pretty sure I have gcc, in fact I have multiple versions of it. I installed version 4.6 (which is what cuda requires) but it doesn't seem to find it. I'm so close!  Thanks in advance. Proof that the One-Dimensional Simple Harmonic Oscillator is Non-Degenerate? The standard treatment of the one-dimensional  (SHO) using the raising and lowering operators arrives at the countable basis of eigenstates $\{\vert n \rangle\}_{n = 0}^{\infty}$ each with corresponding eigenvalue $E_n = \omega \left(n + \frac{1}{2}\right)$. Refer to this construction as the abstract solution.  How does the abstract solution also prove uniqueness? Why is there only one unique sequence of countable eigenstates? In particular, can one prove the state $\vert 0\rangle$ is the unique ground state without resorting to coordinate representation? (It would then follow that the set $\{\vert n \rangle\}_{n = 0}^{\infty}$ is also unique.)  The uniqueness condition is obvious if one solves the problem in coordinate representation since then one works in the realm of differential equations where uniqueness theorems abound. Most textbooks ignore this detail (especially since they often solve the problem both in coordinate representation and abstractly), however I have found two exceptions:   Shankar appeals to a theorem which proves one-dimensional systems are non-degenerate, however this is unsatisfactory for two reasons:   Not every one-dimensional system is non-degenerate, however a general result can be proven for a large class of potentials (the SHO potential is in such a class). The proof requires a departure from the abstract solution since it classifies the potentials according to their functional properties.  Griffiths addresses this concern in a footnote stating that the equation $a \vert 0\rangle = 0$ uniquely determines the state $\vert 0\rangle$. Perhaps this follows from the abstract solution, however I do not see how. How do I fix my locale issue? A friend of mine was trying to explain to me how all infinities are equal. For example, they were saying that there are the same amount of numbers between $0$–$1$ as there are between $0$–$2$.  The way they explained it, you could prove that there are the same amount of numbers by getting a match to each number.  For example, for any number in the range from $0$–$2$, you can find a matching number in the range $0$–$1$ by dividing the number by 2. In every case, the ending number will end up between $0$–$1$. In addition, if you multiplied any number in the range of $0$–$1$ by 2, you will always end up with a number between $0$–$2$ Therefore, there should be the same infinite amount of numbers between  $0$–$1$ as there are between $0$–$2$.  Is this principle accurate? The problem that I had with it was, if in-fact there are the same amount of numbers between 0 and 1 as there are between 0 and 2, why is 2 greater than 1? Baby Rudin claim: $1+\frac{1}{3}-\frac{1}{2}+\frac{1}{5}+\frac{1}{7}-\frac{1}{4}+\frac{1}{9}+\frac{1}{11}-\frac{1}{6}...$ converges This sequence is a rearrangement of the series $1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\frac{1}{5}...$. Note that at this point in the text we do not have any theorem about the convergence of rearrangements.  Let $\{s_n\}$ be the sequence of partials sums of the series then for $n \ge 0$  $s_{3(n+1)} = \sum ^n _ {k=0} \frac{1}{4k+1} + \frac{1}{4k+3} - \frac{2}{4k+4}$  We can view it as the sequence(on $n$) of partials sums of  $\sum_0 a_n = \sum_0 \frac{1}{4n+1} + \frac{1}{4n+3} - \frac{2}{4n+4}$  Where $|a_n| = a_n = \frac{1}{4n+4}\{\frac{3}{4n+1}+\frac{1}{4n+3}\} \le \frac{1}{4n^2}$.  By the comparison test $s_{3(n+1)}$ converges to some real $\alpha$.  But $s_{3(n+1)+1} = s_{3(n+1)}+ \frac{1}{4n+5}$ and $s_{3(n+1)+2} = s_{3(n+1)}+ \frac{1}{4n+5}+\frac{1}{4n+7} $hence we have a partition of $\{s_n\}$ into subsequences which tend to $\alpha$ and this implies $s_n \rightarrow \alpha$.  Is my proof correct? Any alternative solutions are appreciated. I am familiar with what partitions are, but I saw , and realised I didn't know what "aligned partitions" are.  So what does it mean to "align" partitions? What are the benefits, and the downsides? Dumbed-down explanation how scientists know the number of atoms in the universe? It is often quoted that the number of atoms in the universe is 10$^{70}$ or 10$^{80}$.  How do scientists determine this number?   And how accurate is it (how strong is the supporting evidences for it)?  Is it more likely (logically >50% chance) that the numbers are right, or is it more likely that the numbers are wrong? Given a set $\{1,2,3,4\}$, how is the following relation $R$ antisymmetric?  $$R = \{(1, 2), (2, 3), (3, 4)\}$$  Note: Antisymmetric is the idea that if $(a,b)$ is in $R$ and $(b,a)$ is in $R$, then $a = b$. In my textbook  it says the above is antisymmetric which isn't the case as whenever $(a,b)$ is in $R$, $(b,a)$ is not. Why does HTML require that multiple spaces show up as a single space in the browser? Adding Multiple Maps in QGIS Composer? Case insensitive searching in Oracle I am a precision modeler, which means I like to be exact instead of "eyeballing" things when I model. I am very happy to see the option to Edge Slide with Clamping Off in v2.75a, but I don't seem to be able to snap the edge slide destination to a vertex point elsewhere on the model. Is this possible and I am just missing something? Mac turns off randomly and has lines on screen For some reason my iMac keeps turning off around 5 to 10 minutes into boot.  Also just recently it turns on but has shaded lines going down the screen. I have not installed any weird programs and i have not used it in around 3 months.   Any ideas on what the issue is, i don't have any other information about the issue besides whats happening when i use it.  The image i'm showing you was found on google but this looks exactly like mine does.  The model of my imac is the late 2011 model. Using both “one’s” and “their” to refer to the same entity How does damage dealt increase as you level up I've recently taken over as GM in my group.  We are all new to RPGs except for our original GM, so they decided to run an adventure path so it would be easier to change GMs if they had to stop playing.  Along this path, we had one CR 4 encounter that took us an hour, almost killed our bloodrager and knocked our brawler unconscious. When we leveled up, our GM told us to increase the damage we did by "one level," so my 1d6 became 2d6 and my friend's 2d6 became 4d6.  I saw no problem with this as a player, but I was looking over the adventure path and later encounters that also have a CR of 4 could be ended in one turn by our bloodrager. This would make encounters really boring, and my goal is to avoid boredom.  My question is: As you level up, how does the damage you do increase? Does it go up like my GM said so that at level 3 my rapier does 3d6 and the bloodrager's earth breaker does 6d6, or does it go up by some other method?  I have read the PHB and I don't think that what the GM was saying is correct, but being a first-time player I wasn't sure if had just missed something, so I figured I should ask elsewhere. 3 prong to 4 prong dryer cord change My 2 year old whirlpool dryer has a 3 prong cord. My new house has a 4 prong. The dryer doesn't have a spot for 4 wires. The ground wire coming from the dryer is attached to the dryer itself. A new 4 pronged dryer cord has white, red, black, and green wires. Maybe the green wire hooks to the ground screw with the one coming from the dryer? Is it possible to automatically "add" \left and \right commands in front of all brackets? The source code should be left intact, but LaTeX should interpret every pair of brackets as if they were preceded by such commands. This is because adding \left and \right commands is time consuming and makes source code longer and less readable. I considered defining new commands such as \lb and \rb for \left( and \right), but it doesn't seem very elegant to me: what if I also want to add square brackets for example?  Any ideas? Thanks. It's the first time I'm using Tikz on Latex. I have to draw this block diagram (this is a low resolution snip from a paper)   In Tikz I have done this:   That is very similar but I need some adjustments, like the u_i arrow and the node sum after the H(s) block.  Is there anybody that can help me with this?  my code:      \tikzstyle{block} = [draw, fill=white, rectangle,  minimum height=2em, minimum width=3em] \tikzstyle{sum} = [draw, fill=white, circle, radius=1mm, node distance=1.5cm] \tikzstyle{input} = [coordinate] \tikzstyle{output} = [coordinate] \tikzstyle{pinstyle} = [pin edge={to-,thin,black}]  \begin{tikzpicture}[auto, node distance=2cm,&gt;=latex'] \node [input, name=input] {}; \node [input, above of=input](input1) {}; \node [sum, right of=input] (sum) {}; \node [block, right of=sum] (controller) {$K(s)$}; \node [sum, right of=controller] (sum1) {}; \node [block, right of=sum1] (filterinv) {$H^{-1}(s)$}; \node [block, right of=filterinv] (system) {$G(s)$}; \node [output, right of=system] (output) {}; \node [output, above of=output] (output1) {}; \node [block, below of=filterinv] (filter) {$H(s)$}; \node [block, above of=controller] (delay) {$D(s)$}; \node [sum, below of=sum1] (sum2) {};  \draw [-&gt;] (filterinv) -- node[name=u] {$u_{i}$} (system); \draw [draw,-&gt;] (input) -- node {$s_{i-1}$} (sum); \draw [-&gt;] (sum) -- node {$e_{i}$} (controller); \draw [-&gt;] (system) -- node [name=q] {$q_{i}$}(output); \draw [-&gt;] (q) |- (filter); \draw [-&gt;] (filter) -- node {} (sum2); \draw [-&gt;] (controller) -- node {} (sum1); \draw [-&gt;] (sum1) -- node[name=xi] {$\xi_{i}$} (filterinv); \node [input, below of=sum1](input2) {}; \draw [draw,-&gt;] (input2) -- node {$r_{i}$} (sum2); \draw [-&gt;] (sum2) -| node[pos=0.99] {$-$}      node [near end] {$\tilde{s}_i$} (sum); \draw [-&gt;] (delay) -| node[] {}      node [near end] {} (sum1); \draw [draw,-&gt;] (input1) -- node[pos=0.15] {$u_{i-1}$} (delay); \draw [-&gt;] (u) |- node[pos=0.99] {$u_i$}      node [near end] {} (output1);  \end{tikzpicture} Is there any truth to the idea that you shouldn't multiply seasonings when multiplying a recipe? I often hear cooks discuss that idea that if you are multiplying, say, a recipe for 4 to be a for 32, that you shouldn't multiply some herbs, spices, or salt. I've never understood any reason why this should be true. Maybe something to do with surface area to volume ratios, or cooking times? Does anyone have a real explanation, or is this nonsense? Filling in new field in attribute table based on values of another field in ArcGIS Desktop? I have added a new field (Category) in an attribute table of a shapefile and I would like to fill it with numbers, 0 or 1, based on the numbers of another field (Calorific value) of the same attribute table.   That means that if the Calorific value is higher than 15, then I would like to fill in the corresponding cells of the (new) Category field with 1. If the Calorific value is less than 15, then the rest cells of the (new) Category field to be filled in with the number 0.   Is there a way to do this automatically rather than manually?