Linear Regression using R: Part I

In this blog we are going to see what linear regression is and in my next blog we will how to implement the same in R.

What is linear regression?

As per very simple definition from internet it goes like this:

A technique in which a straight line is fitted to a set of data points to measure the effect of a single independent variable. The slope of the line is the measured impact of that variable. It is one of the most widely used statistical techniques. It’s the study of linear relationship (straight-line) between variables under an assumption of normally distributed errors.

Why?

To determine the effect of one variable on the other. Technically, linear regression estimates how much Y changes when X changes one unit.

Examples?

  1. Change in the fuel prices increases/decreases the inflation
  2. Change in the raw material cost increases / decreases the product price
  3. Change in class size increases/decreases the participation of the students in events

How do I do it manually?

Want to checkout manually how it’s being done please refer to this link, which provides a clear explanation of how linear regression works.

In the next blog we will see how we can use R for linear regression using the Population in India from 1901 and 2011.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s