Linear Regression Solved Example with One Independent Variable

 

Linear Regression Solved Numerical Example with One Independent Variable

In this tutorial, we will understand how to use a regression equation to predict the glucose level given the age. We will consider the following is the data set for understanding the concept of Linear Regression Numerical Example with One Independent Variable.

SUBJECTAGE XGLUCOSE LEVEL Y
14399
22165
32579
44275
55787
65981
755?

Solution:

Video Tutorial Linear Regression Solved Example with One Independent Variable

Regression analysis is used to:

  • Predict the value of a dependent variable based on the value of at least one independent variable.
  • Explain the impact of changes in an independent variable on the dependent variable.

The dependent variable is the variable we wish to explain and

Independent variable is the variable used to explain the dependent variable

The key steps for regression are simple:

  1. List all the variables available for making the model.
  2. Establish a dependent variable of interest.
  3. Examine visual (if possible) relationships between variables of interest.
  4. Find a way to predict the dependent variables using the other variables.

The regression model is described as a linear equation that follows.

y is the dependent variable, that is, the variable being predicted.

x is the independent variable or the predictor variable.

There could be many predictor variables (such as x1, x2, . . .) in a regression equation.

However, there can be only one dependent variable (y) in the regression equation.

Here we need to find the value of bo, b1 using the following equation.

Step 1: Make a chart of your data, filling in the columns in the same way as you would fill in the chart if you were finding the Pearson’s Correlation Coefficient

SUBJECTAGE XGLUCOSE LEVEL YXYX2Y2
14399425718499801
2216513654414225
3257919756256241
44275315017645625
55787495932497569
65981477934816561
Σ247486204851140940022

Step 2: Use the following equations to find b0 and b1.

Find b0:

Find b1:

Step 3: Insert the values into the equation.

y’ =bo  +b1 * x

y’ = 65.14 + (0.385225 * x)

Step 4: Prediction – the value of y for the given value of x = 55

y’ = 65.14 +(0.385225 ∗55)

y’ =86.327

Summary:

In this tutorial, we understood, how to use a Linear regression with One Independent Variable to predict the glucose level given the age – a Solved Example. If you like the tutorial share it with your friends. Like the Facebook page for regular updates and YouTube channel for video tutorials.

Leave a Comment

Your email address will not be published. Required fields are marked *