ML Assignment 2
ML Assignment 2
(a) Estimate β0/ C and β1/ M - for the linear regression E(Y) = β0 + β1* X / E(Y) =
M*X + C
(b) Find the value of (Coefficient of determination) R2
(c) Plot the data E(Y)
Q-2 The grades of a class of 9 students on a midterm report (x) and on the final
examination (y) are as follows:
X 77 50 71 72 81 94 96 99 67
Y 82 66 78 34 47 85 99 99 68
Where,
E(Y) = Estimated value of Y
β0/ C = Constant/ intersection point with Y
β1/ M = Slope
(a) Estimate β0/ C and β1/ M - for the linear regression E(Y) = β0 + β1* X / E(Y) =
M*X + C
(b) Find the value of (Coefficient of determination) R2
(c) Plot the data E(Y)
(d) Estimate the final examination grade of a student who received a grade of 85 on the
midterm report.
Q-3 A study was made by a retail merchant to determine the relation between
weekly advertising expenditures and sales.
Advertisi
ng Costs
($) Sales ($)
40 385
20 400
25 395
20 365
30 475
50 440
40 490
20 420
50 560
40 525
25 480
50 510
Where,
E(Y) = Estimated value of Y
β0/ C = Constant/ intersection point with Y
β1/ M = Slope
(a) Estimate β0/ C and β1/ M - for the linear regression E(Y) = β0 + β1* X / E(Y) =
M*X + C
(b) Find the value of (Coefficient of determination) R2
(c) Plot the data E(Y)
(d) Estimate the weekly sales when advertising costs are $35.
Q-4 A study of the amount of rainfall and the quantity of air pollution removed
produced the following data:
Where,
E(Y) = Estimated value of Y
β0/ C = Constant/ intersection point with Y
β1/ M = Slope
(a) Estimate β0/ C and β1/ M - for the linear regression E(Y) = β0 + β1* X / E(Y) =
M*X + C
(b) Find the value of (Coefficient of determination) R2
(c) Plot the data E(Y)
MODEL WT MPG
General
Motor 4520 15
Tata 2065 29
Honda 2440 31
Hyundai 2290 28
Suzuki 3195 23
Isuzu 3480 21
Jeep 4090 15
Land-rove
r 4535 13
Lexus 3390 22
Ferrari 3930 18
Where,
E(Y) = Estimated value of Y
β0/ C = Constant/ intersection point with Y
β1/ M = Slope
(a) Estimate β0/ C and β1/ M - for the linear regression E(Y) = β0 + β1* X / E(Y) =
M*X + C
(b) Find the value of (Coefficient of determination) R2
(c) Plot the data E(Y)
(d) Estimate the mileage for a vehicle weighing 4000 pounds.
(e) Suppose that Honda engineers claim that, on average, the Civic (or any other model
weighing 2440 pounds) gets more than 30 mpg. Based on the results of the regression
analysis, would you believe that claim? Why or why not?
Q-6 Consider the regression of infants at birth. The data are as per follow.
Chest Size
Weight (kg) (cm)
2.75 29.5
2.15 26.3
4.41 32.2
5.52 36.5
3.21 27.2
4.32 27.7
2.31 28.3
4.3 30.3
3.71 28.7
Where,
E(Y) = Estimated value of Y
β0/ C = Constant/ intersection point with Y
β1/ M = Slope
(a) Estimate β0/ C and β1/ M - for the linear regression E(Y) = β0 + β1* X / E(Y) =
M*X + C
(b) Find the value of (Coefficient of determination) R2
(c) Plot the data E(Y)
(d) What percentage of the variation in infant chest sizes is explained by the difference in
weight?
Q-7 Apply One-HOT Encoder 2nd index and again apply the 3rd index of column on given
below data set.
1 Sunny Weak No
2 Sunny Strong No
6 Rain Strong No
Q-8 Apply One-HOT Encoder 2nd index and again apply the 5th index of column on given
below data set.
Day Outlook Temperature Humidity Wind Play
Tennis
Q-9 Apply Label Encoder 2nd index and again apply on 2nd index of column on given
below data set.
1 Sunny Weak No
2 Sunny Strong No
6 Rain Strong No
Q-11 What is feature scaling? For given 2 – dimensional dataset, Normalize the dataset
using Min-Max Normalization [0,1] and Standard Scalar [-1,1].
Q-12 Explain Bias, Variance , Overfitting and Underfitting for machine learning models.
Q-13 Explain various classifier performance measures. (accuracy, precision, recall,
sensitivity, specificity)
Q-15 Explain the following confusion matrix terms for machine learning approach
and find the result of following term:
1. Accuracy 2. Precision 3. Recall 4. Specificity 5. F1 Score
----------------------------------------------------------------------------------------