This is probably a very basic question but I cannot find the answer after experimenting a lot with it. I am using the Davis dataset from  (Self-Reports of Height and Weight) from 200 individuals. The question that I am trying to answer is what weight is to be expected for a specific height. My first assumption here is that weight depends on height, so I am building my model using  model=lm(davis$weight~davis$height)   As far as I understand, the independent variable is on the right whereas the dependent is on the left, right? Now, the summary of the model is   Call: lm(formula = davis$weight ~ davis$height)  Residuals:     Min      1Q  Median      3Q     Max  -19.658  -5.381  -0.555   4.807  42.894   Coefficients:                Estimate Std. Error t value Pr(&gt;|t|)     (Intercept)  -130.91040   11.52792  -11.36   &lt;2e-16 *** davis$height    1.15009    0.06749   17.04   &lt;2e-16 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 8.505 on 198 degrees of freedom Multiple R-squared:  0.5946,    Adjusted R-squared:  0.5925  F-statistic: 290.4 on 1 and 198 DF,  p-value: &lt; 2.2e-16   and I am assuming that I can calculate weight = (height*1.15009) -130.91040 So, assuming this is correct, I was approached by a colleague who said that height does not predict weight but vice versa. However, changing the model to   model=lm(davis$weight~davis$height)   gives me different results when I use the values of  &gt; summary(model)  Call: lm(formula = davis$height ~ davis$weight)  Residuals:      Min       1Q   Median       3Q      Max  -18.3492  -3.7151  -0.2466   3.5349  20.8802   Coefficients:               Estimate Std. Error t value Pr(&gt;|t|)     (Intercept)  136.83054    2.02039   67.72   &lt;2e-16 *** davis$weight   0.51696    0.03034   17.04   &lt;2e-16 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 5.702 on 198 degrees of freedom Multiple R-squared:  0.5946,    Adjusted R-squared:  0.5925  F-statistic: 290.4 on 1 and 198 DF,  p-value: &lt; 2.2e-16   and calculate height = (weight*0.517) + 136.831. For example, according to the first model, a person with 190 centimeters is expected to weigh 87.6067 kilograms where when I enter these kilos into the second model, that person is expected to be about 182 centimeters tall. Any advice or a good book where I can really understand this? Thank you in advance!
The Pearson correlation coefficient of x and y is the same, whether you compute pearson(x, y) or pearson(y, x). This suggests that doing a linear regression of y given x or x given y should be the same, but I don't think that's the case.   Can someone shed light on when the relationship is not symmetric, and how that relates to the Pearson correlation coefficient (which I always think of as summarizing the best fit line)?
Is it possible to install Python 3.x in 14.04 LTS, or upgrade from Python 2.7.6 to 2.7.8? Arrays in Java and how they are stored in memory How can we communicate short messages long-distance? A cop vs a superhuman criminal I read the story over ten years ago while I was still trying to learn English, so I can only vaguely remember that the story is about a cop trying to track down a criminal who had superhuman abilities. Some of his abilities were pyrokinesis, using his mind to form a golem from earth and roam around while he stays in the room and stopping time. Eventually the cop was able to catch the criminal and shot him dead.   If anyone could identify the book I would be very grateful. I'd love to read it for nostalgic purposes. Way to detect frozen video with ffmpeg? Is there a way to detect frozen video with ffmpeg? I only need to know if there are rather large regions of frozen video, say 10 seconds or more.   I'm familar with the  filter.   Maybe you could first difference adjacent frames, then use blackdetect to tell whether the difference has not changed? I'm not sure how to perform the difference though. Do WALLS matter if I'm building the 6-inch brick defense from Corruption/Crimson for my city? How do you detect Credit card type based on number? I'm trying to figure out how to detect the type of credit card based purely on its number. Does anyone know of a definitive, reliable way to find this? Good abstract algebra books for self study Last semester I picked up an algebra course at my university, which unfortunately was scheduled during my exams of my major (I'm a computer science major). So I had to self study the material, however, the self written syllabus was not self study friendly (good syllabus overall though).  The course was split up into 3 parts, group theory, ring theory and field theory. As a computer science major we only had to study the first 2.  Now that I passed the exam for this course I want to study the field theory part ( which covers Galois theory, etc).  So, now I want to ask whether any of you know any good books on abstract algebra, which lift off at basic ring theory and continue to more advanced ring theory and to finite fields, Galois theory, ...  Please keep in mind that I am not a math major, and that I would like books which are suited for self study (thus a lot of examples and intuition).  Thanks in advance! Which is the recommended way to plot: matplotlib or pylab? For any two sets $A,B$ , $|A|\leq|B|$ or $|B|\leq|A|$ Let $A,B$ be any two sets. I really think that the statement $|A|\leq|B|$ or $|B|\leq|A|$ is true. Formally:     $$\forall A\forall B[\,|A|\leq|B| \lor\ |B|\leq|A|\,]$$   If this statement is true, what is the proof ? An inequality involving 4 real or complex numbers Let a,b,c,d be real or complex numbers with absolute value less than $1$. Is the following true:  $$|ab-cd| \leq |a-c| +|b-d|?$$ I am looking for a word that would describe being obsessed with the details of a larger entity such that the "looker" neglects to see the whole or (perhaps more importantly) the purpose of the whole.  Basically, "not seeing the big picture".  What can [more] succinctly describe this?  Edit: I just found this post: . I think I want the exact opposite. List the files containing a particular word in their text How can I buy apps in the App Store without a credit card? While I'm waiting for my credit card to arrive, I still want to be able to buy some apps for my iPad!  Are there alternative ways to pay for apps, without resorting to someone else's credit card? Can Reduce *really* not solve for x here? How do I get the local machine name in C#? The prepositions “with”, “at” and “for” are also used to associate a business title with a company's name. It seems that they are interchangeable, with no (significant) difference in meaning. The following examples taken from The New York Times website seem to confirm that:      Until now, said Justin Nielson, a senior analyst for the media   research firm SNL Kagan, “there really hasn't been any direct   competitor . . .      “The consumer is still deleveraging,” said Jason Goldberg, a senior   analyst with Barclays. “It's not a lack of supply; it's a lack of   demand.”      “There’s the party of fear and the party of despair,” Nikos Xydakis, a   political analyst and an editor at Kathimerini daily, said.   Are they really the same as for meaning? If it isn't so, what is the difference between them? Why would Antimatter behave differently via Gravity? If $f:[a,b]\to \mathbb{R}$ is continuous and nonnegative and $\int_a^b{f}=0$, then $f(x)=0$ for all $x\in [a,b]$ Suppose that a function $f:[a,b]\to\mathbb{R}$ is continuous and nonnegative. Prove that if $\int_a^b{f}=0$, then $f(x)=0$ for all $x\in [a,b]$.   I've been trying to prove it using the extreme value theorem, continuity and the upper and lower sums but can't come up with something tight enough. More specifically, I've been trying to relate $|f(x)-f(t)|&lt;\epsilon$ to the sum of $M_k-m_k(x_k-x_{k-1})$ How to let `dpkg -i` install dependencies for me?