Q: Fit a straight-line y=a+bx into the given data and estimate the production in the year 2000.
Year(x): 1966 1976 1986 1996 2006
Production in lbs(y): 10 12 13 16 17
a) 12.33
b) 14.96
c) 11.85
d) 18.67
Answer: b
Explanation: Solving by using Actual Mean Method
N=5
Mean of x=1986 and y=13
x y X=x-1986 Y=y-13 X2 XY
1966 10 -20 -3 400 60
1976 12 -10 -1 100 10
1986 13 0 0 0 0
1996 14 10 1 100 10
2006 16 20 3 400 60
∑X=0 ∑Y=0 ∑X2 =1000 ∑XY=140
We know that,
∑y=Na+b∑x
∑xy=a∑x+b∑x2
Substituting the values from the table into the equations-
0=(5)a+b(0) – (1)
a=0
140=(a)0+b(1000) – (2)
b=0.14
Thus, the equation is
Y=a+Bx
Y=0+0.14X
Resubstituting X=x-1986 and Y=y-13
y-13=0.14(x-1986)
y=-265.04+0.14x
To find the production in the year 2000, substitute x = 2000.
y=-265.04+0.14(2000)
y=14.96.
Q: Which of the following statements are true?
I. A regression equation with k independent variables has k regression coefficients.
II. regression coefficients (b0, b1, b2, etc.) are variables in the regression equation.
III. The principle of least squares calls for minimizing the sum of the squared residuals.
A) I only
B) II only
C) III only
D) All of the above
E) None of the above
Answer: C) III only
Q: Predict the year when Sugar Land’s population will reach 75,000 using exponential regression
model.
Years since 0 1 2 3 4 5
1980
Population 18940 21150 23490 27570 29610 35480
A) 2015
B) 1991
C) 1992
D) 2010
Answer: B) 1991
Q: Match the type of model seems appropriate with the figures shown:
A) P) Linear Regression Model
B) Q) Exponential Regression Model
C) R) Power Law Regression Model
Q: A steel cylinder at 80° F of length 12" is placed in a commercially available liquid nitrogen
bath (−315° F). If the thermal expansion coefficient of steel behaves as a second order
polynomial function of temperature and the polynomial is found by regressing the data below,
Temperature, T (°F) Thermal expansion Coefficient, α ( µ in/in/°F)
-320 2.76
-240 3.83
-160 4.72
-80 5.43
0 6.00
80 6.47
the reduction in the length of the cylinder in inches most nearly is:
A) 0.0219
B) 0.0231
C) 0.0235
D) 0.0307
Answer: C) 0.0235
Q: Solve using Newton Raphson for multivariate system:
𝐹1 (𝑦) = 3 − 5𝑦2 + 4𝑦3 − 𝑦2 3 = 0
𝐹2 (𝑦) = 1 − 2𝑦2 + 3𝑦3 + 4𝑦3 3 = 0
Where, . Start with an initial guess of 0.5 i.e. 𝑦2 (1) 𝑎𝑛𝑑 𝑦3 (1) = 0.5 and choose the
correct options from amongst the following:
a) The iterations are converging
b) 𝑦3 (4) = 0.0755, 𝑦2 (4) = 0.6141
c) 𝑦3 (4) = 0.0711, 𝑦2 (4) = 0.6551
d) The iterations are not converging
Q: Solve using Newton Raphson:
4
𝑦 = 1 + 3(1 − 𝑦)3 𝑒𝑥𝑝[5( )]
𝑦
Use initial guess of 𝑦 (1)=1.05.
a) 𝑦 (3)=1.02731 and 𝑦 (4)=1.0990
b) Iterations are not converging
c) Interactions are converging
d) 𝑦 (3)=1.0157 and 𝑦 (4)=1.0099
Q: Use the NR method to find the second iterate of the solution of:
𝑓(𝑥) = 11(𝑥 3 + 1)𝑒 −2𝑥 − 8𝑐𝑜𝑠(2𝑥) = 0
Start with a guess of 0.5.
a) 𝑥2 =0.466
b) 𝑥2 =0.446
c) 𝑥2 =0.464
d) None
Q: Using bisection method, find an approximate solution of the following:
𝑥4 − 𝑥3 − 5 = 0
Take a=1.75 and b=2.5 as initial guesses, after the completion of 4 iterations which is correct:
a) 𝑎(4) =1.7695 and 𝑏(4) =1.8843
b) 𝑎(4) =1.7969 and 𝑏(4) =1.8438
c) None of the above
d) 𝑎(4) =1.8213 and 𝑏(4) =1.8476
Q: Solve using Fixed-Point iteration:
𝑒 −𝑥 (𝑥 2 + 5𝑥 + 2) + 1 = 0
𝑒𝑥𝑝(𝑥(𝑖))+𝑥(𝑖)3 +4𝑥(𝑖) 2 +2𝑥 (𝑖) +2
Using the following: 𝑥(𝑖+1) = 𝑥(𝑖) 2+3𝑥(𝑖) −3
Use 𝑥0 =-2.
a) 𝑥4 =-0.6
b) None
c) 𝑥4 =-0.603
d) 𝑥4 =-0.58
Q: Fit a straight line for the given points (x,y)
X Y
0 3
1 6
2 8
3 11
4 13
5 14
(a) Y = 2.26x
(b) Y = 3.52+2.26x
(c) Y = 3.52x
(d) Y= 4+3x
Solution:
Straight line equation is y=a+bx.
The normal equations are
∑y=an+b∑x
∑xy=a∑x+b∑x2
The values are calculated using the following table
x y x2 x⋅y
0 3 0 0
1 6 1 6
2 8 4 16
3 11 9 33
4 13 16 52
5 14 25 70
--- --- --- ---
∑x=15 ∑y=55 ∑x2=55 ∑x⋅y=177
Substituting these values in the normal equations
6a+15b=55
15a+55b=177
Solving these two equations using Elimination method,
6a+15b=55
and 15a+55b=177
6a+15b=55→(1)
15a+55b=177→(2)
equation(1)×5⇒30a+75b=275
equation(2)×2⇒30a+110b=354
Subtracting ⇒-35b=-79
⇒35b=79
⇒b=7935
⇒b=2.2571
Putting b=2.2571 in equation (1), we have
6a+15(2.2571)=55
⇒6a=55-33.8571
⇒6a=21.1429
⇒a=21.14296
⇒a=3.5238
∴a=3.5238and b=2.2571
Now substituting this values in the equation is y=a+bx, we get
y=3.5238+2.2571x
Q: The table shows the average braking distance of a car at various speeds. Use a second-
degree polynomial to predict the braking distance at 70 mph.
Speed (x) (miles/hr) 20 30 40 50 60
Braking Distance (y) 20 45 80 125 180
(ft)
(a) 245 ft
(b) 225 ft
(c) 285 ft
(d) 265 ft
Fitted polynomial :- Y = 5x2
Q: The method of _____________ is the most appropriate method to fit a unique curve
from the given data.
(a) Squares of square
(b) Sum of square
(c) Least squares
(d) None of these
Q: Find the least square solution to the system AX = b where
0 1 6
𝐴 = (1 1) 𝑏 = (0)
2 1 0
In simpler terms, find the matrix X which minimizes ||AX – b||
−3
a) 𝑥̂ = ( )
5
0
b) 𝑥̂ = ( )
6
5
c) 𝑥̂ = ( )
−3
2
d) 𝑥̂ = ( )
−4
Solution: -
As per lecture slides,
We have
And
Calculating Inverse :-
Q: For the given data with one response variable y and two predictor variables X1 and X2,
fit a multiple linear regression model.
a) ŷ = -6.867 + 3.148x1 – 1.656x2
b) ŷ = 9.219 - 3.245x1 – 2.656x2
c) ŷ = 7.869 + 5.148x1 + 1.697x2
d) ŷ = 4.564 - 3.702x1 – 1.067x2
Solution :-
Sum of X1 = 555
Sum of X2 = 145
Sum of Y = 1452
Mean X1 = 69.375
Mean X2 = 18.125
Mean Y = 181.5
Sum of squares (SSX1) = 263.875
Sum of squares (SSX2) = 194.875
Sum of products (SPX1Y) = 1162.5
Sum of products (SPX2Y) = -953.5
Sum of products (SPX1X2) = -200.375
Regression Equation = ŷ = b1X1 + b2X2 + a
b1 = ((SPX1Y)*(SSX2)-(SPX1X2)*(SPX2Y)) / ((SSX1)*(SSX2)-(SPX1X2)*(SPX1X2)) = 35484.63/11272.5 =
3.14789
b2 = ((SPX2Y)*(SSX1)-(SPX1X2)*(SPX1Y)) / ((SSX1)*(SSX2)-(SPX1X2)*(SPX1X2)) = -18668.88/11272.5 =
-1.65614
a = MY - b1MX1 - b2MX2 = 181.5 - (3.15*69.38) - (-1.66*18.13) = -6.86749
ŷ = 3.14789X1 - 1.65614X2 - 6.86749
Q: Which of the following in NOT an advantage of Bairstow’s method ?
A) It has the capabilities of returning of both real and complex roots, and it may take a long time,
but it doesn’t fail.
B) An advantage of the method is that it uses real arithmetic only.
C) The farther the starting values from the roots, the longer it takes to converge.
D) Since it is a 2nd order method, convergence is relatively fast.
ANSWER:
(C)
Q: Let aoxn + a1x(n-1) + · · · + an-1x + an = 0 be a polynomial equation, where ao > 0, a1, a2, . . . ,
am-1 ≥ 0, am < 0, for some m ≤ n, and B is the greatest of the absolute values of the negative
coefficients. Then the upper bound of the positive roots of the equation is
𝑚 𝑎
A) 1 + √ 𝐵0
𝑚 𝐵
B) 1 + √𝑎
0
𝑛 𝑎
C) 1 + √ 𝐵𝑛
𝑚𝑛 𝑎
D) 1 + √ 0
𝐵
𝑚/𝑛 𝐵
E) 1 + √𝑎
0
ANSWER:
(B)
Q: Let aoxn + a1x(n-1) + · · · + an-1x + an = 0, where a0, a1, . . . , an are real coefficients, be a
1 𝐴
polynomial equation. Also, let r = 𝐵 and R = 1 + , where A = max{|a1|, |a2|, . . . , |an|} and
1+ |𝑎 |
0
|𝑎𝑛|
B = max{|a0|, |a1|, . . . , |an-1|}. Then
A) All roots lie in the interval (0, r)
B) Positive roots lie in the interval (0, R)
C) Positive roots lie in the interval (r, R) and negative roots lie in the interval (−R, −r)
D) All roots lie in the interval (r, R)
ANSWER:
(C)
Q: The pressure of the gas corresponding to various volumes V is measured, given by the
following data:
V(cm3) 50 60 70 90 100
p(kgcm−2 64.7 51.3 40.5 25.9 78
)
Which of the following equations fits the data to the form of equation as: pV = c. (Values upto
two decimal places)
A) pV = c, { = 0.29 , c = 157.79 }
B) pV = c, { = 0.39, c = 167.29 }
C) pV = c, { = 0.99, c = 157.29 }
D) pV = c, { = 0.29, c = 167.79 }
ANSWER:
(D)
Q: To find the constants a and b of the regression model y=aebx to
fit (x1,y1), (x2,y2), ..., (xn,yn) the sum of the residuals that is minimized is
A) ∑𝑛𝑖=1(𝑦𝑖 − 𝑎𝑒 𝑏𝑥𝑖 )2
B) ∑𝑛𝑖=1(ln(𝑦𝑖 ) − ln(𝑎) − 𝑏 𝑥𝑖 )2
C) ∑𝑛𝑖=1(𝑦𝑖 − ln(𝑎) − 𝑏 𝑥𝑖 )2
D) ∑𝑛𝑖=1(ln(𝑦𝑖 ) − ln(𝑎) − 𝑏 ln (𝑥𝑖 ))2
ANSWER:
(B)
Q: Raman has been asked to report absolute error for the following set of data(Using linear
regression):
x y
4.066 0.657
5.132 0.757
8.354 0.857
3.157 1.235
2.136 1.459
1.138 1.126
The given line is : 2.066x – 3.145y – 5.0654 =0
He doesn’t know of absolute function and ends up reporting a wrong answer. Find the value that
he reported?
A. 0.000283
B. 27.84759
C. -27.84759
D. -0.000283
Solution: x y 2.066x-3.145y-5.0654
4.066 0.657 1.268691
5.132 0.757 3.156547
8.354 0.857 9.498699
3.157 1.235 -2.42711
2.136 1.459 -5.24098
1.138 1.126 -6.25556
Sum = 0.000283
You just need to report the actual error.
Q: If you consider the basis as ‘Quantification of error of linear regression’, what would you
report standard variation of the Regression Line for following set of data:
x y
4.066 0.657
5.132 0.757
8.354 0.857
3.157 1.235
2.136 1.459
1.138 1.126
The given line is : 2.066x – 3.145y – 5.0654 =0
A. 174.2894
B. 27.84759
C. -27.84759
D. 147.2652
Solution:
x y 2.066x-3.145y-5.0654 error
squared
4.066 0.657 1.268691 1.609577
5.132 0.757 3.156547 9.963789
8.354 0.857 9.498699 90.22528
3.157 1.235 -2.42711 5.890878
2.136 1.459 -5.24098 27.46786
1.138 1.126 -6.25556 39.13206
You need to 0.000283 174.2894 report the sum
of squared error.
Q: Find the value of a0 and a1 that fits well while we try to minimize the square of the residual
obtained in linear regression for the following set of data: (Consider it as: y=a0 + a1 x)
x y
4.066 0.657
5.132 0.757
8.354 0.857
3.157 1.235
2.136 1.459
1.138 1.126
A. a0 = - 0.07156 , a1 = 1.30221
B. a0 = - 0.04567 , a1 = 1.65849
C. a0 = -0.04567 , a1 = 2.65984
D. a0 = -0.06759 , a1 = 1.65849
Solution: x y x*y xi*xi
4.066 0.657 2.671362 16.53236
5.132 0.757 3.884924 26.33742
8.354 0.857 7.159378 69.78932
3.157 1.235 3.898895 9.966649
2.136 1.459 3.116424 4.562496
1.138 1.126 1.281388 1.295044
23.983 6.091 22.01237 128.4833
A0 = - A1 =
0.07156 1.301221
Q: Find the standard error of the estimate for the following data:
x y
4.066 0.657
5.132 0.757
8.354 0.857
3.157 1.235
2.136 1.459
1.138 1.126
A. 6.396089
B. 6.325584
C. 6.148946
D. 6.257896
Solution :
Q: Find r2(coefficient of determination) for the following data:
x y
4.066 0.657
5.132 0.757
8.354 0.857
3.157 1.235
2.136 1.459
1.138 1.126
A. 0.3498
B. 0.2568
C. 0.4567
D. 0.3059
Solution: Please refer lecture slide 13
Consider a polynomial function:
F(x) = 1.25 - 3.875x + 2.125x2 + 2.75x3 – 3.5x4 + x5
Bairstow’s method is a numerical technique to find out the roots of a given order polynomial
function in which the roots will occur in a sequence if the algorithm is followed correctly. Find
the first two roots of the above polynomial using Bairstow’s method to answer the following
questions. Take the guess values for r and s to be -1 each. The calculation step using the guess
values to find b’s will be considered as the first iteration (Note: Please do not make mistakes
in the iterations otherwise your answer will not match the given options.).
1. After how many iterations the solution will converge when the tolerance limit is 0.00001.
(A) 3
(B) 6
(C) 4
(D) 5
2. What will be the sum of b’s coefficients of x2 and x3 after the 2nd iteration?
(A) 3.530235
(B) 1.000000
(C) 8.780271
(D) 4.786621
3. What will be the relative error (Δs/s) after 2nd iteration?
(A) 0.03046
(B) 0.70598
(C) 0.86549
(D) 0.75245
4. What will be the value of square root of discriminant based on converged r and s values?
(A) 1.79
(B) 1.60
(C) 1.50
(D) 1.57
5. What will be the sum of b’s coefficients of x2 from 1st iteration and x4 from the 2nd
iteration?
(A) -2.027423
(B) -8.344722
(C) -4.144170
(D) -3.769170