
Education Journalist | Study Abroad Lead
Correlation and regression are two statistical techniques used to analyze relationships between variables and make predictions based on observed data. It helps to determine whether changes in one variable correspond to systematic changes in another variable.
- The correlation coefficient ranges from -1 to +1, where -1 represents a perfect negative correlation, +1 represents a perfect positive correlation, and 0 indicates no correlation.
- Regression goes beyond correlation and aims to predict the value of a dependent variable based on one or more independent variables.
- It allows to estimate the relationship between the variables and make forecasts or projections.
- Regression models provide us with equations that describe how the dependent variable changes as the independent variables vary.
| Table of Content |
Key Terms: Correlation, Regression, Correlation Coefficient, Data, Statistics, Depended Variable, Mean, Standard Deviation.
Definitions of Correlation and Regression
[Click Here for Sample Questions]
Correlation helps to understand how changes in one variable are associated with changes in another variable. Correlation does not imply causation; it simply indicates the strength and direction of the relationship.
- The correlation coefficient, typically denoted by "r," ranges from -1 to +1.
- A positive correlation coefficient indicates a direct or positive relationship, where both variables move in the same direction.
- A negative correlation coefficient suggests an inverse or negative relationship, where the variables move in opposite directions.
- Zero indicates no linear relationship between the variables.
Regression attempts to forecast or estimate the value of the dependent variable based on the independent variables' values.
- Regression analysis produces an equation that describes the mathematical relationship between the variables.
- The equation allows us to understand how changes in the independent variables influence the dependent variable.
- By fitting the data to the regression model, we can make predictions and infer the impact of the independent variables on the dependent variable.
- Regression can be used for both linear and non-linear relationships and is widely applied in various fields for prediction, forecasting, and many more.
Read More: Probability and Statistics
Correlation Analysis
[Click Here for Sample Questions]
To perform correlation analysis, we typically use a scatter plot, which is a graphical representation of the data points. In a scatter plot, each data point represents a pair of values from the two variables being analyzed. The x-axis and the y-axis represent variables. By plotting the data points, we can visually observe the pattern and identify any potential relationship between the variables.
There are three possible scenarios that can arise from a correlation analysis:
Positive Correlation: In a positive correlation, the data points tend to cluster around an upward-sloping line on the scatter plot.
- This indicates that as one variable increases, the other variable also tends to increase.
- The correlation coefficient will be positive, indicating a direct relationship between the variables.
Negative Correlation: In a negative correlation, the data points tend to cluster around a downward-sloping line on the scatter plot.
- This indicates that as one variable increases, the other variable tends to decrease.
- The correlation coefficient will be negative here.
No Correlation: In a scenario with no correlation, the data points are scattered randomly across the scatter plot.
- There is no apparent pattern or relationship between the variables.
- The correlation coefficient will be close to zero, indicating no significant linear association between the variables.
Correlation coefficients can range from -1 to +1, with values close to -1 or +1 indicating a strong correlation, and values close to zero indicating a weak or no correlation. The closer the correlation coefficient is to -1 or +1, the more closely the variables are related.
Read More: Probability
Regression Analysis
[Click Here for Sample Questions]
The goal of regression analysis is to develop a mathematical equation that describes the relationship between the variables. This equation is called the regression model. However, regression analysis can also handle more complex relationships using multiple independent variables, resulting in multiple linear regression or nonlinear regression models.
- The regression model is determined by estimating the coefficients, or parameters, associated with the independent variables.
- These coefficients quantify the impact of each independent variable on the dependent variable.
- By fitting the data to the regression model, the best-fitting line or curve can be obtained that minimizes the differences between the observed data points and the predicted values from the model.
Read More: Mode Formula
Correlation Formula
[Click Here for Sample Questions]
The correlation coefficient, denoted by "r," measuring the strength and direction of the linear relationship between two variables. The most commonly used formula to calculate the correlation coefficient is the Pearson correlation coefficient formula.
The Pearson correlation coefficient formula is as follows:
r = (Σ((X - XÌÂ)(Y - È2))) / (√(Σ(X - XÌÂ)2) √(Σ(Y - È2)2))
In this formula:
X and Y are the values of the two variables being analyzed.
XÌÂ and È2 are the means (averages) of the X and Y variables, respectively.
Σ represents the summation symbol, which indicates that we need to sum up the values across all data points.
The resulting correlation coefficient, r, will range from -1 to +1. A value of -1 indicates a perfect negative correlation, +1 indicates a perfect positive correlation, and 0 indicates no correlation.
Read More: Mean, Median and Mode
Linear Regression Formula
[Click Here for Sample Questions]
Simple linear regression defines the relationship between a dependent variable (Y) and a single independent variable (X).
The formula for simple linear regression, including the calculation of coefficients, is as follows:
Y = β0 + β1X + ε
In this equation:
Y represents the dependent variable (the variable we want to predict or explain).
X represents the independent variable (the variable used to predict or explain the variation in the dependent variable).
β0 is the intercept, representing the value of Y when X is equal to zero.
β1 is the regression coefficient, representing the change in Y for each unit change in X.
ε represents the error term, which accounts for the variability or randomness in the relationship between Y and X that is not explained by the linear equation.
To estimate the values of the coefficients β0 and β1, we typically use the method of least squares regression. The objective is to minimize the sum of the squared differences between the observed values of Y and the values predicted by the linear equation.
The formulas to calculate the coefficient estimates are as follows:
β1 = (Σ((X - XÌÂ)(Y - È2))) / Σ((X - XÌÂ)2)
β0 = È2 - β1XÌÂ
In these formulas:
X and Y are the observed values of the independent and dependent variables, respectively.
XÌÂ and È2 are the means of the X and Y variables, respectively.
Σ represents the summation symbol, indicating that we need to sum up the values across all data points.
Read More: Mean and Median
Correlation and Regression Statistics
[Click Here for Sample Questions]
Correlation Coefficient (r): The correlation coefficient measures the strength and direction of the linear relationship between two variables.
- It ranges from -1 to +1. +1 indicates a perfect positive correlation.
- -1 indicates a perfect negative correlation and 0 indicates no correlation.
Significance Level (p-value): The p-value associated with the correlation coefficient indicates the statistical significance of the observed correlation.
- It tells us the probability of obtaining a correlation as extreme as the observed value, assuming there is no true correlation in the population.
- A smaller p-value indicates stronger evidence for a significant correlation.
Coefficient of Determination (R-squared): R-squared measures the proportion of the total variation in the dependent variable that is explained by the independent variables in the regression model. It ranges from 0 to 1.
- A value of 1 indicates that the regression model explains all the variations in the dependent variable.
- But a value of 0 indicates that the model explains none of the variations.
Regression Coefficients: The regression coefficients (β1, β2, β3, ..., βn) represent the estimated effect of each independent variable on the dependent variable.
- They indicate the change in the dependent variable for a one-unit change in the corresponding independent variable while holding other variables constant.
- The coefficients are accompanied by standard errors, which provide information about the precision of the estimates.
Differences Between Correlation and Regression
[Click Here for Sample Questions]
| Properties | Correlation | Regression |
|---|---|---|
| Purpose | Measure the strength and direction of the linear relationship between two variables | Model and predict the value of a dependent variable based on one or more independent variables |
| Nature of Variables | Deals with the association between two numeric variables | Involves both dependent and independent variables |
| Directionality | Assesses the strength and direction of the relationship | Explores how changes in independent variables impact the dependent variable |
| Outcome | Correlation coefficient (r) indicating the strength and direction of the relationship | Equation representing the relationship between dependent and independent variables |
| Statistical Measures | Correlation coefficient (r) and significance level (p-value) | R-squared coefficient of determination, standard error of estimation, regression coefficients F-statistic and t-statistic |
| Examples | Examining the relationship between height and weight | Predicting house prices based on factors like square footage, number of rooms, location, etc. |
Solved Example
[Click Here for Sample Questions]
Example 1: Analyze the relationship between the number of hours studied and the exam scores of a group of 10 students. The data is as follows:
| Hours of Study (X) | Exam Score (Y) |
|---|---|
| 2 | 60 |
| 3 | 65 |
| 4 | 70 |
| 5 | 75 |
| 6 | 80 |
| 7 | 85 |
| 8 | 90 |
| 9 | 95 |
| 10 | 100 |
| 11 | 105 |
Solution: Step 1: Calculate the means (averages) of X and Y:
Mean of X (XÌÂ) = (2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11) / 10 = 6.5
Mean of Y (È2) = (60 + 65 + 70 + 75 + 80 + 85 + 90 + 95 + 100 + 105) / 10 = 82.5
Step 2: Calculate the deviations from the means (X - XÌÂ) and (Y - È2)
Step 3: Calculate the product of the deviations (X - XÌÂ)(Y - È2)
| X - XÌÂ | Y - È2 | (X - XÌÂ)(Y - È2) | (X - XÌÂ)2 | | (Y - È2)2 |
|---|---|---|---|---|
| - 4.5 | - 22.5 | 101.25 | 20.25 | 506.25 |
| - 3.5 | - 17.5 | 61.25 | 12.25 | 306.25 |
| - 2.5 | - 12.5 | 31.25 | 6.25 | 156.25 |
| - 1.5 | - 7.5 | 11.25 | 2.25 | 56.25 |
| - 0.5 | - 2.5 | 1.25 | 0.25 | 6.25 |
| 0.5 | 2.5 | 1.25 | 0.25 | 6.25 |
| 1.5 | 7.5 | 11.25 | 2.25 | 56.25 |
| 2.5 | 12.5 | 31.25 | 6.25 | 156.25 |
| 3.5 | 17.5 | 61.25 | 12.25 | 306.25 |
| 4.5 | 22.5 | 101.25 | 20.25 | 506.25 |
Step 4: Calculate the sum of the product of the deviations:
Σ((X - XÌÂ)(Y - È2)) = 101.25 + 61.25 + 31.25 + 11.25 + 1.25 + 1.25 + 11.25 + 31.25 + 61.25 + 101.25 = 410
Step 5: Calculate the square of the deviations (X - XÌÂ)2 and (Y - È2)2
Step 6: Calculate the sum of the squared deviations:
Σ((X - XÌÂ)2) = 20.25 + 12.25 + 6.25 + 2.25 + 0.25 + 0.25 + 2.25 + 6.25 + 12.25 + 20.25 = 82.5
Σ((Y - È2)2) = 506.25 + 306.25 + 156.25 + 56.25 + 6.25 + 6.25 + 56.25 + 156.25 + 306.25 + 506.25 = 2160
Step 7: Calculate the correlation coefficient (r):
r = Σ((X - XÌÂ)(Y - È2)) / \(\sqrt{}\)(Σ((X - XÌÂ)2) * Σ((Y - È2)2))
= 410 / \(\sqrt{}\) (82.5 * 2160)
= 410 / \(\sqrt{}\)(178200)
≈ 0.96
The calculated correlation coefficient (r) is approximately 0.96, indicating a strong positive correlation between the number of hours studied and the exam scores. This means that as the number of hours studied increases, the exam scores tend to increase as well.
Also Read:
Things to Remember
- Correlation measures the strength and direction of the linear relationship between two variables.
- It ranges from -1 to +1, where -1 represents a perfect negative correlation, +1 represents a perfect positive correlation, and 0 represents no correlation.
- Correlation analysis helps to identify the degree of association between variables but does not imply causation.
- It is useful in determining the direction and strength of relationships, identifying outliers, and making predictions based on patterns.
- Regression analysis aims to model the relationship between a dependent variable and one or more independent variables.
- Simple linear regression involves a single independent variable, while multiple regression involves two or more independent variables.
- It estimates the coefficients of the regression equation to determine how changes in independent variables affect the dependent variable.
- Regression analysis helps to make predictions, understand the impact of variables, identify significant predictors, and assess the strength of relationships.
- Regression analysis provides insights into the relationships between variables and helps in making informed decisions and predictions.
Sample Questions
Ques: What is correlation? (2 Marks)
Ans: Correlation is a statistical measure that describes the relationship between two variables. It indicates the degree to which the variables are related or associated with each other. Correlation values range from -1 to +1, where -1 indicates a strong negative correlation, +1 indicates a strong positive correlation, and 0 indicates no correlation.
Ques: What is the difference between positive correlation and negative correlation? (2 Marks)
Ans: Positive correlation refers to a relationship between two variables where they both move in the same direction. When one variable increases, the other variable also tends to increase. In contrast, negative correlation refers to a relationship where the variables move in opposite directions. When one variable increases, the other variable tends to decrease.
Ques: How is the correlation coefficient interpreted? (2 Marks)
Ans: The correlation coefficient (r) is a numerical value that indicates the strength and direction of the relationship between two variables. The value of r ranges from -1 to +1. A value close to +1 indicates a strong positive correlation, a value close to -1 indicates a strong negative correlation and a value close to 0 indicates no or weak correlation.
Ques: What is regression analysis used for? (2 Marks)
Ans: Regression analysis is used to examine and quantify the relationship between a dependent variable and one or more independent variables. It helps in understanding how changes in the independent variables affect the dependent variable and enable prediction or estimation of the dependent variable based on the values of the independent variables.
Ques: What is the difference between simple linear regression and multiple regression? (2 Marks)
Ans: Simple linear regression involves analyzing the relationship between two variables: one dependent variable and one independent variable. It assumes a linear relationship between the variables. In contrast, multiple regression involves analyzing the relationship between a dependent variable and multiple independent variables. It allows for the consideration of multiple factors that may influence the dependent variable simultaneously.
Ques: How is the coefficient of determination (R-squared) interpreted in regression analysis? (2 Marks)
Ans: The coefficient of determination (R-squared) is a measure of how well the regression model fits the observed data. It represents the proportion of the variation in the dependent variable that can be explained by the independent variable(s). R-squared ranges from 0 to 1, where 1 indicates that the model explains all the variability in the dependent variable and 0 indicates that the model does not explain any of the variability.
Ques: TV Hours: 12, 8, 10, 14, 6, 9, 11, 7, 13, 15, 8, 10
Academic Performance: 70, 65, 75, 80, 60, 68, 73, 62, 78, 82, 67, 72 (4 Marks)
Ans: Step 1: Calculate the mean of TV hours (xÌÂ) and academic performance (yÌÂ).
xÌÂ = (12 + 8 + 10 + 14 + 6 + 9 + 11 + 7 + 13 + 15 + 8 + 10) / 12 = 10
yÌÂ = (70 + 65 + 75 + 80 + 60 + 68 + 73 + 62 + 78 + 82 + 67 + 72) / 12 = 70.83 (rounded to two decimal places)
Step 2: Calculate the deviations from the mean for both variables (TV hours and academic performance).
dx: 2, -2, 0, 4, -4, -1, 1, -3, 3, 5, -2, 0
dy: -0.83, -5.83, 4.17, 9.17, -10.83, -2.83, 2.17, -8.83, 7.17, 11.17, -3.83, 1.17
Step 3: Calculate the product of the deviations for each pair of values.
(dx * dy): -1.66, 11.66, 0, 36.67, 43.33, 2.83, 2.17, 26.50, 21.50, 55.83, 7.67, 0
Step 4: Calculate the sum of the products of deviations (Σ(dx * dy)).
Σ(dx * dy) = -1.66 + 11.66 + 0 + 36.67 + 43.33 + 2.83 + 2.17 + 26.50 + 21.50 + 55.83 + 7.67 + 0 = 208.17
Step 5: Calculate the sum of the squares of deviations for both variables.
Σ(dx2) = 22 + (-2)2 + 02 + 42 + (-4)2 + (-1)2 + 12 + (-3)2 + 32 + 52 + (-2)2 + 02 = 78
Σ(dy2) = (-0.83)2 + (-5.83)2 + 4.172 + 9.172 + (-10.83)2 + (-2.83)2 + 2.172 + (-8.83)2 + 7.172 + 11.172 + (-3.83)2 + 1.172 = 544.47 (rounded to two decimal places)
Step 6: Calculate the correlation coefficient (r).
r = Σ(dx * dy) / \(\sqrt{}\)(Σ(dx2) * Σ(dy2))
r = 208.17 / \(\sqrt{}\)(78 * 544.47)
r ≈ 0.664
Therefore, the correlation coefficient between TV hours and academic performance is approximately 0.664, indicating a moderately positive correlation.
Ques: Advertising Expenses: 12, 10, 15, 18, 20, 14, 17, 19, 16, 13, 11, 22, 23, 21, 24, Sales Revenue: 75, 70, 80, 85, 90, 77, 82, 88, 83, 76, 72, 94, 96, 91, 98 (4 Marks)
Ans: Step 1: Calculate the mean of advertising expenses (xÌÂ) and sales revenue (yÌÂ).
xÌÂ = (12 + 10 + 15 + 18 + 20 + 14 + 17 + 19 + 16 + 13 + 11 + 22 + 23 + 21 + 24) / 15 = 17
yÌÂ = (75 + 70 + 80 + 85 + 90 + 77 + 82 + 88 + 83 + 76 + 72 + 94 + 96 + 91 + 98) / 15 = 84.33 (rounded to two decimal places)
Step 2: Calculate the deviations from the mean for both variables (advertising expenses and sales revenue).
dx: -5, -7, -2, 1, 3, -3, 0, 2, -1, -4, -6, 5, 6, 4, 7
dy: -9.33, -14.33, -4.33, 0.67, 5.67, -7.33, -2.33, 3.67, -1.33, -8.33, -12.33, 9.67, 11.67, 6.67, 13.67
Step 3: Calculate the product of the deviations for each pair of values.
(dx * dy): 46.65, 100.61, 8.66, 0.67, 17.01, 22.44, 0, 7.34, 1.33, 33.34, 73.99, 48.35, 70.02, 26.68, 95.69
Step 4: Calculate the sum of the products of deviations (Σ(dx * dy)).
Σ(dx * dy) = 46.65 + 100.61 + 8.66 + 0.67 + 17.01 + 22.44 + 0 + 7.34 + 1.33 + 33.34 + 73.99 + 48.35 + 70.02 + 26.68 + 95.69 = 553.08
Step 5: Calculate the sum of the squares of deviations for both variables.
Σ(dx2) = (-5)2 + (-7)2 + (-2)2 + 12 + 32 + (-3)2 + 02 + 22 + (-1)2 + (-4)2 + (-6)2 + 52 + 62 + 42 + 72 = 182
Σ(dy2) = (-9.33)2 + (-14.33)2 + (-4.33)2 + 0.672 + 5.672 + (-7.33)2 + (-2.33)2 + 3.672 + (-1.33)2 + (-8.33)2 + (-12.33)2 + 9.672 + 11.672 + 6.672 + 13.672 = 1285.84 (rounded to two decimal places)
Step 6: Calculate the correlation coefficient (r).
r = Σ(dx * dy) / \(\sqrt{}\)(Σ(dx2) * Σ(dy2))
r = 553.08 / \(\sqrt{}\)(182 * 1285.84)
r ≈ 0.882
Therefore, the correlation coefficient between advertising expenses and sales revenue is approximately 0.882, indicating a strong positive correlation.
Ques: A study was conducted to analyze the relationship between the number of study hours and the corresponding exam scores. The data collected for 8 students are as follows: (4 Marks)
Study Hours: 3, 5, 7, 4, 6, 8, 10, 9
Exam Scores: 60, 65, 70, 62, 68, 72, 75, 78
a) Calculate the regression equation for predicting exam scores based on study hours.
b) Use the regression equation to predict the exam score when a student studies for 6 hours.
Ans: a) Calculate the regression equation:
Step 1: Calculate the mean of study hours (xÌÂ) and exam scores (yÌÂ).
xÌÂ = (3 + 5 + 7 + 4 + 6 + 8 + 10 + 9) / 8 = 6.5
yÌÂ = (60 + 65 + 70 + 62 + 68 + 72 + 75 + 78) / 8 = 68.5
Step 2: Calculate the deviations from the mean for both variables (study hours and exam scores).
dx: -3.5, -1.5, 0.5, -2.5, -0.5, 1.5, 3.5, 2.5
dy: -8.5, -3.5, 1.5, -6.5, -0.5, 3.5, 6.5, 9.5
Step 3: Calculate the product of the deviations for each pair of values.
(dx * dy): 29.75, 5.25, 0.75, 16.25, 0.25, 5.25, 22.75, 23.75
Step 4: Calculate the sum of the products of deviations (Σ(dx * dy)).
Σ(dx * dy) = 29.75 + 5.25 + 0.75 + 16.25 + 0.25 + 5.25 + 22.75 + 23.75 = 104.75
Step 5: Calculate the sum of the squares of deviations for study hours (Σ(dx2)).
Σ(dx2) = (-3.5)2 + (-1.5)2 + 0.52 + (-2.5)2 + (-0.5)2 + 1.52 + 3.52 + 2.52 = 31.5
Step 6: Calculate the regression coefficient (β).
β = Σ(dx * dy) / Σ(dx2)
β = 104.75 / 31.5 = 3.327
Step 7: Calculate the intercept (α).
α = yÌÂ - β * xÌÂ
α = 68.5 - 3.327 * 6.5 = 47.1115 (rounded to four decimal places)
The regression equation for predicting exam scores based on study hours is:
y = 47.1115 + 3.327 * x
b) Use the regression equation to predict the exam score when a student studies for 6 hours.
Step 1: Substitute x = 6 into the regression equation.
y = 47.1115 + 3.327 * 6
y ≈ 66.2715 (rounded to four decimal places)
Therefore, the predicted exam score when a student studies for 6 hours is approximately 66.2715.
Ques: A real estate agency wants to predict the selling price of houses based on their sizes (in square feet). The agency collected data for 12 houses: (5 Marks)
House Size (in sq. ft.): 1200, 1400, 1600, 1800, 2000, 2200, 2400, 2600, 2800, 3000, 3200, 3400
Selling Price (in $): 150,000, 170,000, 185,000, 200,000, 210,000, 230,000, 250,000, 270,000, 280,000, 300,000, 320,000, 335,000
a) Calculate the regression equation for predicting the selling price based on house size.
b) Use the regression equation to predict the selling price when the house size is 2,600 sq. ft.
Ans: a) Calculate the regression equation:
Step 1: Calculate the mean of house sizes (xÌÂ) and selling prices (yÌÂ).
xÌÂ = (1200 + 1400 + 1600 + 1800 + 2000 + 2200 + 2400 + 2600 + 2800 + 3000 + 3200 + 3400) / 12 = 2400
yÌÂ = (150000 + 170000 + 185000 + 200000 + 210000 + 230000 + 250000 + 270000 + 280000 + 300000 + 320000 + 335000) / 12 = 249166.67 (rounded to two decimal places)
Step 2: Calculate the deviations from the mean for both variables (house sizes and selling prices).
dx: -1200, -1000, -800, -600, -400, -200, 200, 400, 600, 800, 1000, 1200
dy: -99166.67, -79166.67, -64166.67, -49166.67, -39166.67, -19166.67, 00833.33, 20833.33, 30833.33, 50833.33, 70833.33, 85833.33
Step 3: Calculate the product of the deviations for each pair of values.
(dx * dy): 119000000, 79166667, 51266667, 29466667, 15666667, 3833333, 1666667, 8333333, 3649999, 4166667, 7083333, 10299999
Step 4: Calculate the sum of the products of deviations (Σ(dx * dy)).
Σ(dx * dy) = 119000000 + 79166667 + 51266667 + 29466667 + 15666667 + 3833333 + 1666667 + 8333333 + 3649999 + 4166667 + 7083333 + 10299999 = 461000000
Step 5: Calculate the sum of the squares of deviations for house sizes (Σ(dx2)).
Σ(dx2) = (-1200)2 + (-1000)2 + (-800)2 + (-600)2 + (-400)2 + (-200)2 + 2002 + 4002 + 6002 + 8002 + 10002 + 12002 = 3840000
Step 6: Calculate the regression coefficient (β).
β = Σ(dx * dy) / Σ(dx2)
β = 461000000 / 3840000 = 120.0521 (rounded to four decimal places)
Step 7: Calculate the intercept (α).
α = yÌÂ - β * xÌÂ
α = 249166.67 - 120.0521 * 2400 = -13611.2856 (rounded to four decimal places)
The regression equation for predicting the selling price based on house size is:
y = -13611.2856 + 120.0521 * x
b) Use the regression equation to predict the selling price when the house size is 2,600 sq. ft.
Step 1: Substitute x = 2600 into the regression equation.
y = -13611.2856 + 120.0521 * 2600
y ≈ 304090.8204 (rounded to four decimal places)
Therefore, the predicted selling price when the house size is 2,600 sq. ft. is approximately $304,090.82.
For Latest Updates on Upcoming Board Exams, Click Here: https://t.me/class_10_12_board_updates
Check-Out:






Comments