NPTEL Data Analytics with Python Week 9 Assignment Answers 2024
1. Statement: There is no difference between, E(y) = β₀ + β₁x and y = β₀ + β₁x + e, both are regression equations.
Options:
a. True
b. False
Answer: b. False
Explanation: E(y) = β₀ + β₁x is the expected value (mean) of y, i.e., the deterministic part. y = β₀ + β₁x + e includes the random error term e, so they are not the same.
2. Which of the following statements is correct:
Options:
a. Sensitivity in ROC analysis is called True Positive Rate (TPR)
b. Specificity in ROC analysis is not called True Negative Rate (TNR)
c. Specificity in ROC analysis is called True Positive Rate (TPR)
d. Sensitivity in ROC analysis is called True Negative Rate (TNR)
Answer: a. Sensitivity in ROC analysis is called True Positive Rate (TPR)
Explanation: Sensitivity is the same as TPR = TP / (TP + FN)
3. In ROC analysis when the threshold value is higher:
Options:
a. Specificity decreases
b. Sensitivity decreases
c. Both a and b
d. None of the above
Answer: b. Sensitivity decreases
Explanation: A higher threshold makes the model stricter, increasing false negatives and lowering sensitivity.
4. Sensitivity in ROC analysis is defined as:
Options:
a. FP / (FP + TN)
b. FN / (TP + FN)
c. TN / (TN + FP)
d. TP / (TP + FN)
Answer: d. TP / (TP + FN)
Explanation: This is the standard definition of sensitivity (True Positive Rate).
5. In ROC analysis, a classifier is called ‘good’ if it has:
Options:
a. Low TPR and Low FPR
b. Low TPR and High FPR
c. High TPR and Low FPR
d. High TPR and High FPR
Answer: c. High TPR and Low FPR
Explanation: The ideal classifier should correctly detect positives (high TPR) while avoiding false alarms (low FPR).
6. For the given confusion matrix:
Predicted Positive Predicted Negative
Actual Positive 8 2
Actual Negative 3 7
Recall = TP / (TP + FN) = 8 / (8 + 2) = 0.8
Options:
a. 0.73
b. 0.7
c. 0.78
d. 0.8
Answer: d. 0.8
7. Precision is inversely proportional to recall.
Options:
a. True
b. False
Answer: b. False
Explanation: They have a trade-off, not a direct inverse relationship.
8. Standardization of features is not required before training a logistic regression model.
Options:
a. True
b. False
Answer: a. True
Explanation: It’s not strictly required but highly recommended, especially when regularization is used.
9. Which of the following is true:
Options:
a. Linear Regression error values have to be normally distributed but in the case of Logistic Regression it is not the case
b. Logistic Regression error values have to be normally distributed but not Linear Regression
c. Both Linear and Logistic Regression error values must be normally distributed
d. Neither requires normally distributed errors
Answer: a.
Explanation: Normality of errors is a key assumption in linear regression, not logistic regression.
10. Which of the following is true regarding the logistic function:
Options:
a. Logistic(x) = Logit(x)
b. Logistic(x) = Logit_inv(x)
c. Logit_inv(x) = Logit(x)
d. None of these
Answer: b. Logistic(x) = Logit_inv(x)
Explanation: The logistic function is the inverse of the logit function