0% found this document useful (0 votes)
5 views9 pages

Assignment

The document is an assignment on Regression and Correlation by Yagna Sai Gunda, submitted for a course in Probability and Statistics at BITS Pilani, Dubai Campus. It explains regression analysis as a method to model relationships between dependent and independent variables, highlighting its applications in various fields, and discusses correlation as a measure of the strength and direction of relationships between two variables. The assignment includes practical examples and data analysis to illustrate the concepts of regression and correlation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views9 pages

Assignment

The document is an assignment on Regression and Correlation by Yagna Sai Gunda, submitted for a course in Probability and Statistics at BITS Pilani, Dubai Campus. It explains regression analysis as a method to model relationships between dependent and independent variables, highlighting its applications in various fields, and discusses correlation as a measure of the strength and direction of relationships between two variables. The assignment includes practical examples and data analysis to illustrate the concepts of regression and correlation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

ASSIGNMENT

ON

REGRESSION AND CORRELATION

BY

YAGNA SAI GUNDA 2025ACPS0534U

Faculty Name: Ms. Gayathri

Date of Submission: 25/03/2026

Prepared in Partial Fulfilment of the Course: Probability and Statistics

AT

BITS Pilani, Dubai Campus


Dubai International Academic City, Dubai

UAE

(February 2026 – May 2026)


TOPIC 1: REGRESSION ANALYSIS

Regression Analysis is a fundamental statistical technique used to model and examine the
relationship between a dependent variable (also called the response or outcome variable) and one
or more independent variables (also called predictor or explanatory variables). The primary goal
of regression analysis is to fit a mathematical equation, known as the regression line or
regression equation, that best describes how the dependent variable changes with respect to the
independent variables. The most widely used form is Simple Linear Regression, which models
the relationship between one independent variable (X) and one dependent variable (Y) using the
equation ŷ = b₀ + b₁x, where b₀ is the y-intercept and b₁ is the slope. When there are multiple
independent variables, the method extends to Multiple Linear Regression. The regression
coefficients are typically estimated using the Least Squares Method, which minimises the sum of
squared differences between the actual data points and the values predicted by the regression
line. The slope tells us by how much Y is expected to change for every one-unit increase in X,
while the intercept gives the predicted value of Y when X equals zero. It is important not to use a
regression line to predict values far outside the range of the observed data, as this process of
extrapolation can lead to unreliable and misleading results. Regression analysis has wide ranging
real world applications. In business and economics, it is used for demand forecasting and sales
prediction. In engineering, it helps model the relationship between physical variables such as
emission rates and operating parameters. In machine learning, regression forms the basis for
predicting continuous output variables such as house prices, vehicle mileage, or stock values, and
in scientific research, it is used to quantify the effect of one measurable quantity on another.

Questions.

Can advertising expenditure be used to estimate the sales revenue of a company?

Advertising Expenditure in $1000s (X) Sales Revenue in $1000s (Y)

10 50
15 65
20 72
25 90
30 105
35 120
40 130
45 150
50 165
55 180

Solution:

Code for Regression :


Answer for Regression :

Inference for Regression :

Advertising expenditure can be used to estimate the sales revenue of the company.
Regression analysis aims to fit a mathematical equation that describes how a
dependent variable changes with respect to an independent variable. Based on the
data provided, there is a clear, positive linear trend as advertising expenditure
increases, the sales revenue consistently increases along with it. By calculating the
regression line for this dataset, a business can accurately forecast their expected
sales based on their marketing budget, which is a primary real world application of
this statistical method.
TOPIC 2: CORRELATION

Correlation is a statistical measure that quantifies both the strength and the direction of the linear
relationship between two quantitative variables. Unlike regression, which is concerned with
predicting one variable from another, correlation simply describes how closely and in what
manner two variables move together, without implying. The most commonly used measure is
Pearson's Correlation Coefficient (r), which is dimensionless and ranges from −1 to +1. A value
of r = +1 indicates a perfect positive linear relationship, meaning both variables increase together
proportionally; r = −1 indicates a perfect negative linear relationship, where one variable
increases as the other decreases; and r = 0 suggests no linear relationship between the variables
(though a non-linear relationship may still exist). Values of r ≥ 0.8 are generally interpreted as
strong positive correlation, while values between 0.5 and 0.8 indicate moderate positive
correlation. Importantly, Pearson's correlation coefficient is symmetric, swapping the roles of X
and Y does not change the value of r, and it is also invariant under linear transformations,
meaning multiplying or dividing a variable by a constant does not affect r. Other correlation
measures include Spearman’s rho (ρ), which is used for ranked or non-normally distributed data,
and Kendall’s tau (τ). Correlation has extensive real world applications, in scientific research, it
is used to study how one physical or chemical parameter changes with respect to another. In
medicine and public health, it helps identify risk factors associated with diseases. In finance and
economics, it is used to analyse how asset prices move relative to each other; in marketing and
business intelligence, correlation helps detect patterns in consumer behaviour and predict
demand, and in environmental science, it can reveal relationships between variables such as
temperature and carbon dioxide levels.

Questions.

Is there an association between daily temperature and electricity consumption in a city?


Dataset:

Daily Temperature in °C (X) Electricity Consumption in MWh (Y)

22 110
25 125
28 140
30 165
33 190
35 215
38 240
40 260
42 290
45 325

Solution:

Code for Correlation :


Answer for Correlation :

Inference For Correlation :

There is a strong association between daily temperature and electricity


consumption. Correlation is used to quantify the strength and direction of how two
variables move together. The dataset demonstrates that as the daily temperature
rises, the electricity consumption in the city increases proportionally. If we
calculate Pearson's Correlation Coefficient (r) for this data, it yields a value well
above 0.8, which indicates a strong positive correlation. This confirms a direct and
powerful relationship between hotter weather and higher electricity usage.

You might also like