Goodness of Fit Test in Regression


Goodness-of-Fit Test

The goodness-of-fit test is used to determine if the data adequately explain changes in the response variable. The standard error of the estimate and the coefficient of determination are two important goodness-of-fit measurements for regression analysis.

If the regression model successfully describes an event or phenomenon, the actual and estimated values of the response variable will be equal, and the amount of deviation (called error) will be zero. As a result, the sum of squares deviation will be zero. In terms of the regression line, this means that all observed data fall on the regression line and there is no variation or deviation of observed values from the regression line.

This ideal circumstance does not often exist in the field because in regression analysis, researchers and economists work with sample data rather than population data, and there is a possibility of inaccuracy or error. This quantity of inaccuracy or error is measured by using an absolute measure of dispersion known as the standard error of the estimate. 

1.      Standard Error of the Estimate

The standard error of the estimate is also called the standard deviation of the regression and measures the average distance that the observed values fall from the regression line using the units of the response variable. The population standard error of the estimate of Y on X (simple linear regression model) is denoted by δy.and defined as:

                                            
The estimate of δy.x is denoted by sY.X which is defined as: 

The denominator (n – 2) is because two parameters are estimated in a simple linear regression model.

The standard error of the estimate is an absolute measure of the regression model, which is difficult to comprehend. This absolute measure was enhanced by a relative measure known as the coefficient of determination. The coefficient of determination is a relative measure of the regression model that determines how much variance in the response variable can be explained by the predictor variable.

2.      Coefficient of Determination

Here, the total variation in the response variable is partitioned into explained variation (explained by the predictor) and unexplained variation (the predictor fails to explain or variation due to other predictors not included in the model).

That's 

Total Variation = Explained Variation + Unexplained Variation

∑(Y-Y−)² = ∑(Y^- Y−) ² + ∑(Y - Y^

R² = Explained Variation / Total Variation

R² = ∑(Y^- Y−)² / ∑(Y-Y−)²

 = 1 - ∑(Y - Y^ / ∑(Y - Y⁻) ²

The value of R² lies between 0 and 1.

The high value of the coefficient of determination indicates that the estimated value of the response variable by regression is close to the true or actual value of the phenomenon. 

The interpretation of R² is more striking than the standard error of the estimate. The coefficient of determination has some advantages over the standard error of the estimate. they are given below.
i. The coefficient of determination tells us how precise the model's prediction is using the same units of response variable.
ii. It indicates how far the data points are from the estimated regression line.
iii. The standard error of the estimate is used to check the assumption of homoscedastic variance.
iv. The temporal or other variable(s) on the relationship of the response variable and predictor.
v. In normal distribution the 95% prediction interval will be:
±2Sy.x

Practice Question 

A survey of the pocket money of children in primary school was made by choosing at random four children of each of the ages 5, 7, 9, and 11 years. The amount of pocket money received is given below:

Age (years)

Pocket Money (Rs.)

5

2

8

10

12

7

9

13

14

16

9

9

14

16

21

11

18

19

23

36

Find the regression equation for predicting pocket money from age, and also determine the standard error of the estimate and coefficient of determination.

Solution: Let pocket be denoted by Y and age be denoted by X. The OLS method is used to estimate the parameters of the model.

X

Y

XY

X^2

Y^2

5

2

10

25

4

5

8

40

25

64

5

10

50

25

100

5

12

60

25

144

7

9

63

49

81

7

13

91

49

169

7

14

98

49

196

7

16

112

49

256

9

9

81

81

81

9

14

126

81

196

9

16

144

81

256

9

21

189

81

441

11

18

198

121

324

11

19

209

121

361

11

23

253

121

529

11

36

96

121

1296

128

240

2120

1104

4498



The regression line of pocket money on age.
Y^ α^ + β^ X
Y^ = - 5.00 + 2.50 X

Standard error of the estimate:

The standard distance between the observation and the regression line is Rs. 5 age.

Coefficient of determination between pocket money and age:

 = 1 - ∑(Y - Y^ / ∑(Y - Y⁻)²

∑(Y - Y^ = Y^2 α^ Y -β^ XY

∑(Y - Y^ = 4498 - (-5)240 - 2.50 x 2120

∑(Y - Y^  = 398

∑(Y - Y⁻)² = ∑Y² - ∑(Y / n

∑(Y - Y⁻)² = 4498 - (240)^2 / 16

∑(Y - Y⁻)² = 898

 = 1 - ∑(Y - Y^ / ∑(Y - Y⁻)²

 = 1 - 398 / 898

R² = 0.5568
The variation in pocket money is 66.58 % explain by age.


Scatter Plot


Using SPSS


Coefficientsa

Model

Unstandardized Coefficients

Standardized Coefficients

t

Sig.

B

Std. Error

Beta

1

(Constant)

-5.000

4.952

 

-1.010

.330

age

2.500

.596

.746

4.194

.001

a. Dependent Variable: pocket money

b. All requested variables entered.

Model Summary

Model

R

R Square

Adjusted R Square

Standard Error of the Estimate

1

.746a

.557

.525

5.33185

a. Predictors: constant, age

Project – I

Let's say we were curious to learn what consumers thought about online buying and wanted to research the variables that affected it. Let's focus on only four of them: i). convenience; ii). time-saving; iii). web features; and iv). customers' level of trust.


These four elements are the foundation of a questionnaire that has been developed and circulated:

No.

Questions

Strongly disagree

disagree

neutral

Agree

Strongly agree

 

Convenience

1.

I receive my package on time by shopping 

online.

1

2

3

4

5

2.

When shopping online, detailed information on items is offered.

1

2

3

4

5

3.

Online shopping allows me to buy products whenever I want every day.

1

2

3

4

5

4.

It is simple to select a product and evaluate it against competitors while shopping online

1

2

3

4

5

5

The need for travel is diminished by online shopping.

1

2

3

4

5

6

Online shopping cuts down on energy use.

1

2

3

4

5

7

The home delivery is a big advantage.

1

2

3

4

5

 

Website Features

8

The layout of the website makes it simple for me to find things.

1

2

3

4

5

9

When buying online, the website's design facilitates my search for and selection of the appropriate item.

1

2

3

4

5

10

The product review may be viewed here.

1

2

3

4

5

11

The return or change policy of the product is specified.

1

2

3

4

5

12

Addressing inquiries about the product to make a purchase.

1

2

3

4

5

13

The chatbot is available 24/7

1

2

3

4

5

14

The website is available on mobile apps.

1

2

3

4

5

15

The website will have multilingual support.

1

2

3

4

5

16

I always discovered things advertised online in accordance with market norms.

1

2

3

4

5

 

Time Saving

17.

Product selection and evaluation require less time.

1

2

3

4

5

18.

Time is saved by shopping online.

1

2

3

4

5

19.

Product selection and evaluation require less time.

1

2

3

4

5

20.

Online shopping provides the opportunity to use potential time for potential work.

1

2

3

4

5

21.

Online shopping makes it simple to send gifts to a loved one in time for upcoming events.

1

2

3

4

5

 

Trust

22.

Your expectation is met by the online purchasing process.

1

2

3

4

5

23.

Online transactions are secure.

1

2

3

4

5

23.

In the context of Pakistan, online purchasing is quite practical or efficient.

1

2

3

4

5

24.

Loyal customers can be attracted through online shopping.

1

2

3

4

5

25.

Online retailers charge fair pricing for their goods

1

2

3

4

5

26.

The websites are comfortable in searching.

1

2

3

4

5


Customers imagined recorded observations are input into SPSS.





The output of online shopping regresses on convenience factor:


In the same way, regress online shopping on web features.

The output:







No comments:

Post a Comment

Moving Average Models (MA Models) Lecture 17

  Moving Average Models  (MA Models)  Lecture 17 The autoregressive model in which the current value 'yt' of the dependent variable ...