I have a dataset with 37 independent variables and a dependent variable. In order to take care of multicollinearity among the independent variables, I conducted a PCA on them. My first principal component explains 53% of the variance in the data.  However, when I run a linear regression using top 10 PCs (explaining ~90% of the variance) as independent variables:  lm(dependent ~ PC1 + PC2 + ...))   the regression coefficient for PC1 comes to be statistically insignificant (all other 9 PCs are highly significant). I would have imagined that PC1 would have been highly significant.  Am I conceptually missing something?
Suppose I am running a regression $Y \sim X$. Why by selecting top $k$ principle components of $X$, does the model retain its predictive power on $Y$?   I understand that from dimensionality-reduction/feature-selection point of view, if $v_1, v_2, ... v_k$ are the eigenvectors of covariance matrix of $X$ with top $k$ eigenvalues, then $Xv_1, Xv_2 ... Xv_k$ are top $k$ principal components with maximum variances. We can thereby reduce the number of features to $k$ and retain most of the predictive power, as I understand it.   But why do top $k$ components retain the predictive power on $Y$?   If we talk about a general OLS $Y \sim Z$, there is no reason to suggest that if feature $Z_i$ has maximum variance, then $Z_i$ has the most predictive power on $Y$.   Update after seeing comments: I guess I have seen tons of examples of using PCA for dimensionality reduction. I have been assuming that means the dimensions we are left with have the most predictive power. Otherwise what's the point of dimensionality reduction?
C programming, why does this large array declaration produce a segmentation fault? While I understand the intuition behind expectation, I don't really understand the meaning of variance and moment.   What is a good way to think of those two terms? Target='_blank' to show in new window, NOT new tab, possible? How to get data off a completely dead Android phone? Phone worked perfectly. Then one day completely dead, nothing at all. It may have been that "one day" was after some time of laying around, cannot recall.  Model: Android AT&amp;T Samsung Galaxy S3 (SGH-i747 SKU S9255)  Already tried;   Charging phone: no visual output at all, no leds Removing battery while charging: no visual output at all, no leds Removing SIM and SD card: no visual output at all, no leds Attempt to turn on: no visual output at all, no leds   I need to get our family photo's off this phone (stored on internal memory). I care less about the hardware/phone itself.  Thank you for any help you can offer! Evaluate : $1+\frac{2}{6}+\frac{2\cdot 5}{6\cdot 12}+\frac{2\cdot 5\cdot 8}{6\cdot12\cdot 18}+\ldots$ Evaluate : $$1+\frac{2}{6}+\frac{2\cdot 5}{6\cdot 12}+\frac{2\cdot 5\cdot 8}{6\cdot12\cdot 18}+\ldots$$  thought: I have tried to manipulate the series so that the sum upto n terms , can be simplified. But I can't figure out any profitable result. Pgfplots: How to fill area under a curve in a 3d plot similar to \closedcycle in 2d How can I fill the area under a curve in a 3d plot, similar to the \closedcycle command in ordinary 2d plots? Applying this command does a filling which is not rotated.  Minimal working example:  \documentclass{article}  \usepackage{tikz} \usepackage{pgfplots} \begin{document}   \begin{tikzpicture}      \begin{axis}[     xmin=0,xmax=3,     zmin=0,zmax=2     ]         \addplot3[red,domain=0:1,fill=blue,opacity=0.5,samples y=0] (2,x,x^2) \closedcycle ;      \end{axis}   \end{tikzpicture} \end{document}   In 2D it looks like this  \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document}   \begin{tikzpicture}   \begin{axis}[domain=0:1     ]         \addplot[red,domain=0:1,fill=blue,opacity=0.5,samples y=0] {x^2} \closedcycle ;   \end{axis}   \end{tikzpicture} \end{document}   How can I easily apply this to a 3D plot? Why aren't we sterilizing N95 masks? What are the chances of getting $K$ identical outcomes in a row in a series of $Y$ independent events? Each event has two possible outcomes: a and b.  Each event is independent.  Outcome a has $X\%$ chance of happening.  If we run $Y$ number of such events, what are the chances of getting $K$ outcomes a in a row, at least once?  To put it in practical terms imagine a series of coin tosses. Each coin toss has two possible outcomes: a = heads and b = tails. Outcome a = heads has a chance of $50\%$. If we run $Y = 100$ number of coin tosses, what are the chances of getting $K = 10$ outcomes a=heads in a row, at least once?   I'm using the practical example only so I can express the idea more clearly. I'm interested in finding out the general formulas and computations so that I can run the calculations for any $X$, $Y$, or $K$.  I would also be very interested in knowing how the probabilities would change if the events would not be independent. What if the more outcomes a we have in a row the bigger the chance of getting an outcome a in the next event? What if it's the other way around, and the more outcomes a in a row we have the lower the chance of getting another a? I am installing Ubuntu 16.04 in an Intel NUC computer with UEFI enabled. I am using an SSD from another computer. During the installation I chose Erase the disk and make a new full install  At the end of the process I see:  grub-efi-amd64-signed failed installation /target/ Ubuntu 16.04    And the system does not boot.  I tried to use boot-repair but apparently it does not solve the problem. I am trying to build an executable jar program which depends on external jar downloaded. In my project, I included them in the build path and can be run and debug within eclipse.  When I tried to export it to a jar, I can run the program but I can't when I try to press a button which includes function calls and classes from the external jar. I have edited the environment variables (Windows XP) CLASSPATH to include paths of all the external jar, but it doesn't work.  A point to note is that I got compile warnings while exporting my executable jar, but it doesn't show up any description about the warnings.  Would someone kindly provide a thorough guide on how to include an external jar program using eclipse? Denote by $\mathbb{N}$ the set of natural numbers and by $2^{\mathbb N}$ the set of all subsets of $\mathbb N$. Let $E$ be some subset of $2^{\mathbb N}$ such that for  every pair of elements in $E$, one is a subset of the other. Clearly, $E$ could be countable by considering $E=\big\{\{1,\cdots, n\}, n\in\mathbb N\big\}$. My question is the following: could we find an example that $E$ is uncountable? Many thanks for the answer! Pause button started working for Chrome / Youtube, messing with audio player controls Could not get lock /var/lib/apt/lists/lock when I try to apt-get update I'm getting the below error,  E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/ Is there any difference between "offense" and "offence"? I had a look at Knuth's The Art of Computer Programming, book 1. In chapter 1, section 1.2.2, exercise 25, he presents the following algorithm for calculating logarithm:  given $x\in[1,2)$, do the following:  L1: [Initialize] Set $y\leftarrow0$, $z\leftarrow x/2$, $k\leftarrow1$.  L2: [Test for end] If $x=1$, stop.  L3: [Compare] If $x-z&lt;1$, go to L5.  L4: [Reduce values] Set $x\leftarrow x-z$, $z\leftarrow x/2^k$, $y\leftarrow y+\log_b(2^k/(2^k-1))$, and go to L2.  L5: [Shift] Set $z\leftarrow z/2$, $k\leftarrow k+1$, and go to L2.  (The algorithm needs an auxiliary table which stores $\log_b2$, $\log_b(4/3)$, and so on, to as many values as the precision of the computer.  Then Knuth concludes: this exercise is to explain why the above algorithm will terminate and why it computes an approximation of $y=\log_b x$.  Well, I see that it works, but I am not able to explain why... Terminal limits scrolling I have a running log, it outputs a lot to the terminal. Unfortunately, when I try to scroll up and view older output, it appears there is a limit. And I am unable to scroll past a certain point. On the Mac, the terminal allows you to scroll up to the start of the session. Is there a way to do this in ubuntu terminal? Exporting coordinates from LAS files to CSV? Is there any tool available for extracting the X, Y and Z coordinates from a .las file and exporting them to a .csv or similar file? Another phrase for "a chicken and egg situation" Is there any other phrase that conveys the same meaning as  the phrase "a chicken and egg situation" especially if one has to use this phrase in an official/corporate set up? How do I set a user environment variable? (permanently, not session) expected true to respond to true?