Linear Equations, Simple Linear Regression, Intercept and Slope, Correlation

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Linear equations, simple linear regression,

intercept and slope, correlation

In this assignment we will practise the unit on Simple Regression


Van den Berg, S.M. (2018). Chapter 2, Linear Modelling: 90 minutes
introduction.

Scatterplots
Fitting lines to data
Correlation
Read this assignment carefully and answer the questions.
Bring either a printout or digital version to the tutorial / lecture.
The teacher will discuss your / your group’s answers and will answer additional
questions

Part 1 (at home)

1) Identify the dependent and independent variable in the following cases:

Case Dependent Independent


variable variable
To study aggression, participants are asked to
record the hours of sleep they get, and their
aggressive behaviour during team sports is
recorded.
A researcher wants to study the effects of sleep
deprivation on physical coordination. The researcher
randomly selects a group of college students and
deprives the participants of either 48, 36, or 24 hours
of sleep.
To help her workers to be more productive, a boss
decided to increase vacation from 2 to 3 weeks a
year. The workers’ productivity was recorded both
before and after the change in vacation.
A study examines whether the display of physical
aggression in the classroom towards other children
is affected by the absence or presence of insecure
attachment patterns.

2) Determine for each case the direction of the relationship oft he scatterplots below:
(positive/negative)

1
Scatterplot

Relationship

3) A bookstore owner uses a simple regression model to predict the number of


sold books on a given day based on the hours of rain during the opening
hours of that day. The linear equation is as follows:

NBooks = 90 – 7 * rainyhours + e

a) What is the predicted numbers of sold books on a sunny day?


b) What is the predicted numbers of sold books on a day with only rain and the
shop is open for 9 hours?
c) What is the slope of the linear equation?
d) What is the intercept of the linear equation?
e) What is the meaning of the letter e in the linear equation?

4) Below are data from a bookstore from a number of days in the past.
Number of Sales (in
Sales People €)
Working
2 10
3 11
7 13
9 14
10 18
10 20
12 20
15 22
16 22
20 26

a) Prepare a scatterplot of Sales (y) against Number of sales people working(x).

2
b) What is the direction of the association? (positive or negative)

c) What is the strength of the relationship? (weak or strong)

5) Go to canvas and open the dataset: Sales.sav.


In this dataset you see two variables. The variable sales refers to the average
amount of sales for companies in a month.The variable advertorials refers to
the total time of advertorials in a month (Minutes and seconds) for each
company. For these variables, higher values mean more sales and more
advertorials, respectively.

a) To make sense of these data, first look at the summary statistics, i. e.


descriptives.

b) Which of the two is the most logical dependent variable and which is the
most logical independent variable?

3
c) Using both the scatterplot and the correlation coefficient (see last page of
this assignment for syntax), interpret how aggression and harsh parenting
are related to eachother.

d) Draw the regression line over the scatterplot (see last page)

e) Interpret the scatterplot and the regression line:


a. are the residuals large or small?
b. Is the regression line a good approximation oft he relationship
between the two variables?

f) Assume you have the following research hypothesis:“The more


advertorials given in time, the more sales is observed, as measured among
companies.” Conduct a linear regression analysis. See last page of this
assignment.

g) In the SPSS output, in the Parameter Estimates table, you see a column
with Bs. One for the Intercept and one for the slope. Write out the linear
equation with the parameter values.

h) Interpret the slope of the regression equation: what does the value mean?

i) Make a histogram of the residuals.

j) Would you say there is a strong relationship between advertorials and


sales?

4
How to do it with SPSS:

What SPSS Menu Dialog Steps SPSS Syntax


Scatterplot Graphs  Legacy Dialogs 
GRAPH
Scatter/Dot  Simple Scatter /SCATTERPLOT
Define (Variables to axes)  OK Variable1 WITH Variable2.

Scatterplot Graphs  regression variable plots STATS REGRESS PLOT


YVARS= Variable1
with (vertical axis dependentvariable XVARS= Variable2
regression and horizontal axis indepvariable) /FITLINES LINEAR.
line  Options  Scatterplot fit lines:
Linear  Continue  OK
Correlation Analyze  Correlate  Bivariate 
Correlations
Select variables  OK Variable1 with Variable2.

Simple Analyse General Linear Model 


UNIANOVA DependentVariable
linear Univariate Dependent variable & WITH IndependentVariable
regression Independent variable: Continuous /PRINT=PARAMETER.
Variable (to Covariate(s) box)
Select Options button from the
above step  Parameter estimates
 Continue
Compute Select Save button from the above
UNIANOVA DependentVariable
residuals step  Select Residuals WITH IndependentVariable
Unstandardized  Continue /PRINT=PARAMETER
The residuals appear in your data /SAVE=RESID.

Displaying GRAPH
/HISTOGRAM=RES_1.
residuals

<<End of assignment

You might also like