# Linear regression vs. Pearson's [duplicate]

I understand that linear regression is finding the "best fitting line" and Pearson's r is measuring correlation between two variables, but I can't visualize this difference.

I had a project where I was finding if certain brain cancers were correlated to age, or sex for example, and I was advised to use linear regression for this, but from the definition above, in my head it sounds like Pearson's r was what I was looking for?

Can someone clarify this difference?

## marked as duplicate by whuber♦ regression StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Mar 12 at 15:40

Check out this previous post to understand the differences/similarities between the two and how they are related.

I would assume the person advising you was implying that you should look at multiple predictors in the same model (e.g., regression) rather than look at each one separately (e.g., bivariate correlations).

• As the post is years old, I would like to ask if you or someone else can elaborate on this part of the highest voted comment: "Neither simple linear regression nor correlation answer questions of causality directly. This point is important, because I've met people that think that simple regression can magically allow an inference that X causes Y." Does he/she mean that a multiple regression is needed to infer causality? – Paze Mar 12 at 22:56
• In short, no. Multiple regression can rule out some competing hypotheses and is thus better than simple regression for inferring causality. Yet, regression tests association, not causation (link). Absent controlled experiments, people do use some regression methods to infer causality (e.g. propensity matching, regression discontinuity designs). Yet, using regression in this manner also requires strong theoretical justifications. Multiple regression absent strong theoretical justifications would make a week argument for causality. – Mark Mar 13 at 14:48

The simple correlation can only be done between two variables. So, if you only wanted to look at age being associated with cancer, then a simple correlation would suffice. If you run a regression with just one variable, it will have the same outcome as the pearson correlation. Regression (or specifically, multiple regression), allows you to enter more than one variable into the model to explain the outcome variable (cancer). So with multiple regression, you could include not only age, but also sex, and even an interaction between age and sex.