BMS Project Final
BMS Project Final
Group Assignment
DECLARATION FORM
We hereby declare that this academic work is our own and those derived from other sources have been
appropriately acknowledged. We understand that if found otherwise, our academic work will be cancelled
and no mark will be awarded besides the legal consequences.
Comments: ………………………………………………………..
Signature of Module Tutor
PRICE AND DEMAND OF ONION IN INDIA
Introduction
Linear regression analysis is the widely used of all statistical techniques. Simple linear regression
is statistical method that allows us to summarize and study relationship between two continuous
variables. We assume that the relationships between variables are linear because:
Linear regression are simplest non-trivial relationships that can be imagined.
The ‘true’ relationship between our variables are often at least approximately linear over
the range of values that are interest to us.
We can often transform the variables in such a way as to linearize the relationships.
Linear regression attempts to model the relationship between two variables by fitting a linear
equation to observed data. It has an equation of the form Y = a + bX, where X is the explanatory
variable and Y is the dependent variable.
If the correlation coefficient indicates a sufficiently strong relationship (direct or inverse)
between variables, we may wish to explore that relationship using regression techniques.
Goal of simple linear regression:
It is to predict the value of a independent variable based on an independent variable.
The greater the linear relationships between the independent variable and the dependent variable,
the more accurate the prediction.
The syntax to calculate each of the terms in the regression is as follows:
• Slope, m: =SLOPE(known_y's, known_x's)
• y-intercept, b: =INTERCEPT(known_y's, known_x's)
• Correlation Coefficient, r: =CORREL(known_y's, known_x's)
• R-squared, r2: =RSQ(known_y's, known_x's)
1
PRICE AND DEMAND OF ONION IN INDIA
Following is the data of price of Onion and quantity demanded in India in the year 2011.
Month Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Average Price 9 10 14 11 15 11 16 13 17 17 20 19
(in thousand)
Demand 179 162 137 169 144 158 142 145 121 118 111 105
(in thousand)
3) Conduct a regression analysis and obtain the regression equation and the coefficient of
correlation. Use excel to perform the regression analysis
Regression Analysis using Excel Environment
Regression analysis between the price and quantity supply of Coca-Cola Company.
Let Independent variable (Price) be X, and Dependent variable (supply) be Y.
Obtain regression equation Supply on Price that is Y on X using excel.
We have three methods in excel to obtain a regression equation they are;
1. Using excel functions
2. Using scatter plot chart
3. Using data analysis tool
2
PRICE AND DEMAND OF ONION IN INDIA
3
PRICE AND DEMAND OF ONION IN INDIA
4
PRICE AND DEMAND OF ONION IN INDIA
Finally, slope, Y-intercept, Karl Pearson’s correlation and the coefficient of determination shown
the spreadsheet as follows. Substitute the value of Y-intercept and slope in the linear equation
that is Y= a+bx
5
PRICE AND DEMAND OF ONION IN INDIA
Again click on chart element and go to Trendline and click on the arrow which is
shown on the right side of trendline.
Then select more options where it will show a panel called Format Trandline
Inside panel select Linear (Trendline options), Automatic (Treandline name),
Display equation of chart and display R-squared value as shown below.
6
PRICE AND DEMAND OF ONION IN INDIA
Finally our graph and regression equation will be shown on the spreadsheet
7
PRICE AND DEMAND OF ONION IN INDIA
Final the output will be generated automatically as shown in the spreadsheet below;
Regression equation and value of slope, Y-intercept, Karl Pearson correlation and
coefficient of determination when we interchange the value of dependent and Independent
variable are as follows;
8
PRICE AND DEMAND OF ONION IN INDIA
Manual solution to obtain regression equation and Karl Pearson’s correlation coefficient.
Solution:
Let X be Average Price (in thousand) and let Y be Demand (in thousand)
∑𝑿 𝟏𝟕𝟐
̅ =
𝑿 = = 𝟏𝟒. 𝟑𝟑
𝑵 𝟏𝟐
∑𝒀 𝟏, 𝟔𝟗𝟏
̅ =
𝒀 = = 𝟏𝟒𝟎. 𝟗𝟐
𝑵 𝟏𝟐
9
PRICE AND DEMAND OF ONION IN INDIA
Y on X X on Y
𝒏 ∑ 𝑿𝒀 − ∑ 𝑿 . ∑ 𝒀 𝒏 ∑ 𝑿𝒀 − ∑ 𝑿. ∑ 𝒀
𝒃𝒀𝑿 = 𝟐
𝒃𝑿𝒀 =
𝒏 ∑ 𝑿 − (∑ 𝑿)𝟐 𝒏 ∑ 𝒀𝟐 − (∑ 𝒀)𝟐
(𝟏𝟐×𝟐𝟑,𝟑𝟒𝟏)−(𝟏𝟕𝟐×𝟏,𝟔𝟗𝟏) (𝟏𝟐×𝟐𝟑,𝟑𝟒𝟏)−(𝟏𝟕𝟐×𝟏,𝟔𝟗𝟏)
= =
(𝟏𝟐×𝟐,𝟔𝟎𝟖)−(𝟏𝟕𝟐)𝟐 (𝟏𝟐×𝟐𝟒𝟒,𝟒𝟏𝟓)−(𝟏,𝟔𝟗𝟏)𝟐
𝟐𝟖𝟎,𝟎𝟗𝟐−𝟐𝟗𝟎,𝟖𝟓𝟐 𝟐𝟖𝟎,𝟎𝟗𝟐−𝟐𝟗𝟎,𝟖𝟓𝟐
= =
𝟑𝟏,𝟐𝟗𝟔−𝟐𝟗,𝟓𝟖𝟒 𝟐,𝟗𝟑𝟐,𝟗𝟖𝟎−𝟐,𝟖𝟓𝟗,𝟒𝟖𝟏
−𝟏𝟎,𝟕𝟔𝟎 −𝟏𝟎,𝟕𝟔𝟎
= =
𝟏,𝟕𝟏𝟐 𝟕𝟑,𝟒𝟗𝟗
̅ = 𝒃𝒀𝑿 (𝑿 − 𝑿
𝒀−𝒀 ̅) ̅ = 𝒃𝑿𝒀 (𝒀 − 𝒀
𝑿−𝑿 ̅)
𝒀 − 𝟏𝟒𝟎. 𝟗𝟐 = −𝟔. 𝟐𝟖𝟓𝟎(𝑿 − 𝟏𝟒. 𝟑𝟑) 𝑿 − 𝟏𝟒. 𝟑𝟑 = −𝟎. 𝟏𝟒𝟔𝟒(𝒀 − 𝟏𝟒𝟎. 𝟗𝟐)
𝒀 − 𝟏𝟒𝟎. 𝟗𝟐 = −𝟔. 𝟐𝟖𝟓𝟎𝑿 + 𝟗𝟎. 𝟎𝟔𝟒𝟏 𝑿 − 𝟏𝟒. 𝟑𝟑 = −𝟎. 𝟏𝟒𝟔𝟒𝒀 + 𝟐𝟎. 𝟔𝟑𝟎𝟕
𝒀 = −𝟔. 𝟐𝟖𝟓𝟎𝑿 + 𝟗𝟎. 𝟎𝟔𝟒𝟏 + 𝟏𝟒𝟎. 𝟗𝟐 𝑿 = −𝟎. 𝟏𝟒𝟔𝟒𝒀 + 𝟐𝟎. 𝟔𝟑𝟎𝟕 + 𝟏𝟒. 𝟑𝟑
𝒓 = √𝒃𝑿𝒀 − 𝒃𝒀𝑿
= ±√𝟔. 𝟐𝟖𝟓𝟎 × 𝟎. 𝟏𝟒𝟔𝟒
= ±√𝟎. 𝟗𝟐𝟎𝟏
= −𝟎. 𝟗𝟓
10
PRICE AND DEMAND OF ONION IN INDIA
Slope of regression line Y on X is -6.285; it means that when average price increased by
1 unit on average, it will result in 6.285 million quantity decrease in supply of onion in
India in 2011.
From the sign of a regression coefficient tells us whether there is positive or negative
correlation between each dependent and the independent variables. A negative coefficient
of 0.959 indicates that as the value of the independent variable (average price) increases,
the mean of the dependent variable (quantity demand of onion) will decrease as shown on
the regression line in previous page with the help of excel function.
We computed the coefficient of correlation between quantity demand and the average
price of onion as shown on the previous solution. With the help of the coefficient of
correlation we can know about statistical relationship between two variablesInvalid
source specified.. In other word it shows how two variables move in relation to one
another. We obtain the result as -0.959 which lies in negatively very high degree of
correlation category. Therefore the relation is strong and the predicted value will be valid.
11
PRICE AND DEMAND OF ONION IN INDIA
Regression line of X on Y
Keeping Y (quantity demand) as independent variable and X (average price) as the dependent
variables we obtain the following result;
equation as; X = 34.963 - 0.1464Y
X-intercept as; 34.963
Slope as; - 0.1464
Coefficient of determination as; 0.920
Coefficient of correlation as; -0.959
Slope of regression line Y on X is - 0.1464; it means that when average quantity demand
of onion increased by 1 unit it will result in 0.1464 decreases in average price of onion in
India.
From the sign of a regression coefficient tells us whether there is positive or negative
correlation between each dependent and the independent variablesInvalid source
specified.. A negative coefficient of -0.959 indicates that as the value of the independent
variable (average price) increases, the mean of the dependent variable (quantity demand
of onion in million) will decrease.
We computed the coefficient of correlation between quantity demand and the average
price of onion as shown on the previous solution. With the help of the coefficient of
correlation we can know about statistical relationship between two variables. In other
word it shows how two variables move in relation to one another. We obtain the result as
-0.959 which lies in negatively very high degree of correlation category. Therefore the
relation is strong and the predicted value will be valid.
12
PRICE AND DEMAND OF ONION IN INDIA
The independent variable for this gross data which we have collected from the average price of
onion is predictor variable. In our group project work, we are going to consider the price per
units. This means that we can be in position to think/find the quantity demand of onion.
Let’s see the simple scatter plot of the data which we have obtained with the help of excel
function.
25
20
Price 15
per
unit 10
0
0 50 100 150 200
13
PRICE AND DEMAND OF ONION IN INDIA
25
20 y = -0.1464x + 34.963
R² = 0.9201
15
Price
Series1
Per
10 Linear (Series1)
unit
5
0
0 50 100 150 200
14
PRICE AND DEMAND OF ONION IN INDIA
15
PRICE AND DEMAND OF ONION IN INDIA
II. Since onion is perishable goods they cannot really apply the result obtained from
regression equation since they cannot store the onion for longer duration if there is fall in
demand.
III. Since onion is necessities goods, therefore when the price is lower there is greater
demand as per the finding. But in real life quantity demand will increase slightly and
remain constant even if piece continuously fall since quantity use of onion during curry
will be almost constant.
In conclusion the correlation is another method to forecast the sales, demand and supply.
Correlation looks at the strength of relationship between two variables. Likewise, through our
conclusion the business may be able to interpret and predict the relationship between price and
quantity demanded whereby business will be aware of increasing price and its impact on supply
and demand of the product. Eventually, business shall alter the price of goods and services to
increase the volume of sales quantitatively and qualitatively. Business shall learn that increasing
the price will decrease quantity demand from the customers which ultimately impacts the sales
and income of the business and on other hand decreasing the price shall increase the demand but
have to think and decide more while decreasing the price drastically which may affect the profit
margin though sales may increase.
However, the negative expected impacts shall be unreliable data to some extent. Though there is
negative relationship between price and quantity demanded in our extracted data and conclusion
where it was depicted as with decrease in price it may increase the quantity demanded however,
with advancement in technology and innovation even with increasing price the demand shall
remain same or increase thus, we shall conclude that our conclusion shall not be always a
reliable data in real application.
16
PRICE AND DEMAND OF ONION IN INDIA
How can you take advantage of your data or why your data is not useful?
Advantages of Linear Regression that we can take as we apply in reality are as follows;
Simple implementation
Linear Regression is a very simple algorithm that can be implemented very easily to give
satisfactory results. Furthermore, these models can be trained easily and efficiently even on
systems with relatively low computational power when compared to other complex algorithms.
Linear regression has a considerably lower time complexity when compared to some of the other
machine learning algorithms. The mathematical equations of linear regression are also fairly easy
to understand and interpret. Hence linear regression is very easy to master.
17
PRICE AND DEMAND OF ONION IN INDIA
Conclusion
This project has enabled us to examine historical data and analyzed past records which helps us
to understand data to make better decisions, including prediction of sales. With the help of this
project, we are able to forecast about the future price and demand of the Onion in India and it
also helped us in finding ways to improve the efficiency of the business process. It is very
important for getting better results in future. All in one, the completion of this project furnished
us distinguished opportunity to expand our knowledge on the topic ‘regression analyses.
Nevertheless, we enjoyed doing this project and we are pretty sure that this project will definitely
help us in our future endeavor.
18
PRICE AND DEMAND OF ONION IN INDIA
Reference
(2016, March 21). Retrieved from https://macrotrends.net/stocks/charts/KO/cocacola/stock-
price-history
The Superior University, Lahore. (2015, January 1). Retrieved from
https://www.slideshare.net/mobile/Faazi321/market-demand-and-supply-of-coke
19