Data Science Data Science/Questions/Data Science 1 — Questions and Answers
Question 1: Which of the following best describes the bias-variance tradeoff in machine learning?
- Increasing model complexity always reduces both bias and variance
- A model with high bias underfits the data, while a model with high variance overfits it (Correct answer)
- Bias and variance are independent properties that do not affect each other
- Reducing variance always leads to higher accuracy on unseen data
Correct answer: A model with high bias underfits the data, while a model with high variance overfits it
High bias means the model makes strong assumptions and fails to capture patterns (underfitting), while high variance means the model is too sensitive to training data (overfitting). The tradeoff involves finding the right complexity to minimize total error.
Question 2: When handling missing data in a dataset, which approach is most likely to introduce bias if the data is not missing at random (MNAR)?
- Multiple imputation using chained equations
- Listwise deletion (removing all rows with missing values) (Correct answer)
- Mean imputation for continuous variables
- Using a model that natively handles missing values
Correct answer: Listwise deletion (removing all rows with missing values)
Listwise deletion removes entire rows with any missing value. When data is MNAR, the missingness is related to the unobserved value itself, so deletion systematically removes certain patterns and introduces significant bias into the remaining dataset.
Question 3: What is the main advantage of using gradient boosting over a single decision tree?
- Gradient boosting trains faster than a single decision tree
- Gradient boosting sequentially corrects the errors of prior trees, improving predictive accuracy (Correct answer)
- Gradient boosting requires fewer hyperparameters to tune
- Gradient boosting eliminates the need for feature scaling
Correct answer: Gradient boosting sequentially corrects the errors of prior trees, improving predictive accuracy
Gradient boosting builds an ensemble of trees sequentially, where each new tree focuses on correcting the residual errors left by the previous trees. This iterative error correction typically yields much higher accuracy than any single decision tree.
Question 4: Which evaluation metric is most appropriate when the cost of false negatives is much higher than the cost of false positives, such as in cancer screening?
- Accuracy
- Specificity
- Recall (Sensitivity) (Correct answer)
- F1 Score
Correct answer: Recall (Sensitivity)
Recall measures the proportion of actual positives correctly identified (TP / (TP + FN)). When missing a true positive (false negative) is very costly, as in disease screening, maximizing recall ensures the fewest real cases are missed.
Question 5: In feature selection, what does the term 'multicollinearity' refer to and why is it a problem in linear regression?
- When two target variables are highly correlated, causing prediction instability
- When independent features are highly correlated with each other, making coefficient estimates unreliable (Correct answer)
- When a feature has too many missing values to be useful in a model
- When the target variable has a non-linear relationship with the features
Correct answer: When independent features are highly correlated with each other, making coefficient estimates unreliable
Multicollinearity occurs when independent variables are highly correlated with one another. In linear regression this inflates the variance of coefficient estimates, making them unstable and difficult to interpret, even though the overall model fit may appear adequate.
Question 6: Which statistical test is most appropriate for determining whether two independent groups have significantly different means, assuming normally distributed data and unknown but equal variances?
- Chi-square test
- Paired t-test
- Independent samples t-test (Student's t-test) (Correct answer)
- Mann-Whitney U test
Correct answer: Independent samples t-test (Student's t-test)
The independent samples t-test (Student's t-test) is designed to compare the means of two separate, unrelated groups when the data is approximately normally distributed and the variances are assumed to be equal. It produces a t-statistic and p-value to assess statistical significance.
Which of the following best describes the bias-variance tradeoff in machine learning?