Simple Linear Regression Exercises
Simple Linear Regression Exercises
EXERCISES
1. Why are the signs of the correlation coefficient and the slope equal?
of the least squares regression line? Rp.'r=bsx/sr.
4. If (JCj JC2•>'2)»---»3Vi)arepairsofobserveddatathatare
found on the line L:Y=mX+b, why L is the regression line
least squares for these points?, what percentage of the total variance of
the>',•isexplainedbyL?.
Rp. why E (y ->, ) 2=0, 100%.
8 The pairs (x1, y1), ..., (xn, yn) are such that they satisfy the relationship
Ify=0is,therelationshipSXY=S%5/valid?[Link].
=se3rge+reIhtX,
f I .find
9 the equation of
YenX regression', where X' = X + 3 and Y = Y + 6.
Rp. r - 9 = 2(X' - 3)
[Link]
110 Statistics
10. When studying the linear regression between average incomes (Yen $) and the number of
children by family (X), the following information was obtained:
x= 3, y - 700,s x =0.5-JsXY,
estimate the income of families with 4 children, how many children per family
Would an estimated income of $712 be appropriate?
RpY= 688 +4X.>' = $704.X=b
11. When estimating sales (10 of an item based on prices (X), a ...
least squares line based on a sample of 4 data points. If sales
observedwere10, 8 , 6 14 and if the respective estimated sales are 10.8.
8.2,5.6,13.4,whatpercentageofthevarianceofsalesisexplainedby
regression line? Rp. 96.57%.
12. In a study of the relationship between monthly income and education expenses
the families, a sample provides a coefficient of determination of
90.25%,respectiveaveragesof$420and$120,andrespectivestandarddeviations
from$10and$[Link]
a) How much are the estimated education expenses of a family whose income
Isthemonthlyamount$300?
b) If a family estimates their spending on education to be $370, how much should it be?
What is your monthly income?
13. When studying the relationship between age (X) and blood pressure (10 from)
Asample of women provided the following information:
s x =7.5,s Y = 10,x=50,y= 120, r = 0.90
a) Find the linear relationship of pressure with respect to age and predict it.
blood pressure for a 45-year-old woman.
b) What percentage of the variance of the pressures is explained by the regression of
blood pressure in relation to age?
Rp.a) y=60+l ,2X, si jc=45, y =114. b)81%.
14. When studying the relationship between costs (X) and profits (10 in dollars of
certain products based on a sample obtained the following information:
s x = 5 , s Y=4, x= 100, y= 50, K=-26+0.76X.
a) What percentage of the variance in profits is explained by the regression
on the cost benefits?
[Link]
Simple linear regression 111
$120?
a) r=0.95. ^=0.9025. el9025%, b) K-56=0.76(A"-1()3), 68.92.
Rp.r= -0.9.
16. Sinpares (x, (x„, yn) have correlation index r, verify that
the regression line for the points (xj*,>■*),...,(x*,>'*) where
* x.: - x y : - y..
x, = --------, y¡ = -------- parallel = l, 2,... , / i , esy = rx.
Sx Sy
Rp.x* = 0. v*=0,r*=r,theny'=rx'
17. Pairs (x1, y1), ...(xn, yn) are such that they fulfill the relationship: Y = bX
deduce using the method of least squares. Rp.b='LxyfZx
Employees?
b) What percentage of the variance in sales is explained by variability?
of the number of employees?
c) How many employees does the store have if the average sale is estimated at $1,100?
Y = l + 2.5X, 21 or $2100.
[Link]
112 Statistics
Week 2 3 4 5 6 7
Propaganda time 2 0 25 22 28 36 40
Sale of Product($ ) 300 310 - 320 350 420
20. An editor took a sample of 7 books noting the price and the number of
respective pages, obtaining the following data:
No. of pages 630 550 400 250 370 320 610
Price ($) 10 8 7 4 6 6 9
a) Determine a linear function between the price and the number of pages with it.
end of predicting prices. What percentage of the total variance of prices
Explain this function?
b) Estimate the price of a 300-page book. If this book is increased
2 0 pages in a second edition, how much would the price increase?
c)Howmanypagesshouldabookestimatedtocost$12.27have?
Y = 1.22 + 0.013X; 94.5%
a) Perform a linear regression and use the data to verify that the variance
Total variance is equal to the residual variance plus the variance explained by the model.
regression line.
b) Using the decomposition of variance, calculate r2 and interpreted it
result.
a) Y = 114.5 + 8.5X', X1 = 1 r.3,4,5. 750 = 27.5 + 722.5. b) r = 0.96.
22. I want to study the relationship between ages in years (X) of a type of
machines used in the manufacturing of a certain item and the number of
articles(y) that produce. Based on the sample from the following table:
a) Determine the least squares regression line to predict the
production. Estimate the production for 4, 7 and 8 years.
[Link]
Simple linear regression 113
X Y
2 95
3 70,80
4 -
5 75
6 60
7 -
8 _
9 45, 50
10 25
Y=101.5 - 6.64X 91.5 - 6.64X and R will change.
23. Be the consumer price index, taking 1980 as the base year.
say 1980 = 100). For the following data:
Year 1981 1982 1983 1984 1985 1986 1987
Y 106.0 111.1 117.2 121.3 125.2 128 0 132.6
24. The percentages of advertising expenses and the percentages of net profits
of sales in a sample of 9 businesses as follows:
Expenses 2.3 1.9 3.5 1.0 1.5 4.0 2.6 3.0 2.4
Benefits 4.0 3.8 6.2 2.9 3.4 6.8 4.5 5.0 4.2
25. A factory of a certain soft drink brand has randomly taken 9 weeks of the year,
observingtheaveragetemperatureindegreesCelsius(X)and
the quantity of soft drinks in thousands (y) orders during each of those
periods. The data is summarized in the following table:
X 28 14 12 31 30 19 24 15 16
Y 60 19 12 75 70 40 55 25 25
[Link]
114 Statistics
26. The following data is the selling prices in dollars. And a brand of
used cars years:
X 1 2 3 4 5 6
27. The following data is the net investment (X) and the interest rate (10
X 12 8 10 7 6 5 5
Y 4 5 6 7 8 9 10
Y=AXb e Y = a + bX
Y =----- í-----
A+BX
the following pairs of data:
X 4 8 12 16 20 24 28 32
Y 24 21 20 15 14 10 7 5
Rp.r= 4Y. Y'=0.003146+0.005176X, <=0.9127
Y = 5 +----- ?-----
A+BX
to the problem data 19. ( do first Y'=Y-5.
[Link]