Docsity

DATA SCIENCE Practice Exam, Exams of Technology

Toggle sidebar
bg1
DATA SCIENCE Practice Exam
**Question 1. Which of the following best describes the bias‑variance trade‑off in supervised
learning?**
A) High bias leads to underfitting, while high variance leads to overfitting.
B) High bias leads to overfitting, while high variance leads to underfitting.
C) Both high bias and high variance always improve model accuracy.
D) Bias and variance are unrelated concepts.
Answer: A
Explanation: Bias is error from erroneous assumptions in the learning algorithm (causing
underfitting). Variance is error from sensitivity to small fluctuations in the training set (causing
overfitting). Balancing them yields optimal generalization.
**Question 2. In the context of hypothesis testing, a p‑value of 0.03 indicates that**
A) There is a 3% probability that the null hypothesis is true.
B) The observed data would occur with 3% probability if the null hypothesis were true.
C) The alternative hypothesis is true with 97% confidence.
D) The test is inconclusive.
Answer: B
Explanation: A p‑value measures the probability of obtaining results at least as extreme as those
observed, assuming the null hypothesis holds. It does not give the probability that the null is
true.
**Question 3. Which metric is most appropriate for evaluating a binary classifier on an
imbalanced dataset where the minority class is of primary interest?**
A) Accuracy
B) Precision
C) Recall
D) F1‑score
Answer: C
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c

Partial preview of the text

Download DATA SCIENCE Practice Exam and more Exams Technology in PDF only on Docsity!

Question 1. Which of the following best describes the bias‑variance trade‑off in supervised learning? A) High bias leads to underfitting, while high variance leads to overfitting. B) High bias leads to overfitting, while high variance leads to underfitting. C) Both high bias and high variance always improve model accuracy. D) Bias and variance are unrelated concepts. Answer: A Explanation: Bias is error from erroneous assumptions in the learning algorithm (causing underfitting). Variance is error from sensitivity to small fluctuations in the training set (causing overfitting). Balancing them yields optimal generalization. Question 2. In the context of hypothesis testing, a p‑value of 0.03 indicates that A) There is a 3% probability that the null hypothesis is true. B) The observed data would occur with 3% probability if the null hypothesis were true. C) The alternative hypothesis is true with 97% confidence. D) The test is inconclusive. Answer: B Explanation: A p‑value measures the probability of obtaining results at least as extreme as those observed, assuming the null hypothesis holds. It does not give the probability that the null is true. Question 3. Which metric is most appropriate for evaluating a binary classifier on an imbalanced dataset where the minority class is of primary interest? A) Accuracy B) Precision C) Recall D) F1‑score Answer: C

Explanation: Recall (sensitivity) captures the proportion of actual positives correctly identified, which is crucial when the minority class is important. Accuracy can be misleading on imbalanced data. Question 4. In a decision tree, the Gini impurity for a node with class distribution [0.7, 0.3] is A) 0. B) 0. C) 0. D) 0. Answer: B Explanation: Gini = 1 – Σ(p_i²) = 1 – (0.7² + 0.3²) = 1 – (0.49 + 0.09) = 1 – 0.58 = 0.42. Question 5. Which of the following is NOT a regularization technique for linear regression? A) Lasso (L1) B) Ridge (L2) C) Elastic Net D) Principal Component Analysis Answer: D Explanation: PCA is a dimensionality reduction method, not a regularization penalty applied to the regression coefficients. Question 6. In k‑means clustering, the “elbow method” is used to A) Determine the optimal number of clusters by visualizing within‑cluster sum of squares. B) Compute the Euclidean distance between centroids. C) Initialize cluster centroids randomly. D) Measure cluster purity.

Answer: B Explanation: AUC ranges from 0.5 (random guessing) to 1 (perfect classifier). It reflects the trade‑off between true positive rate and false positive rate. Question 10. The “curse of dimensionality” primarily affects A) Model interpretability. B) Training speed of linear models. C) Distance‑based algorithms like k‑NN. D) Regularization techniques. Answer: C Explanation: In high‑dimensional spaces, distances between points become less discriminative, degrading performance of algorithms that rely on distance metrics. Question 11. Which of the following is a property of the Laplace (add‑one) smoothing technique in Naïve Bayes text classification? A) It reduces the impact of rare words. B) It eliminates the need for prior probabilities. C) It guarantees non‑zero probability for unseen words. D) It converts multinomial probabilities to binary. Answer: C Explanation: Adding one to each word count ensures that any word not seen in training still receives a non‑zero probability. Question 12. In time series analysis, the term “seasonality” refers to A) A long‑term upward or downward trend. B) Random fluctuations that cannot be modeled. C) Regular, repeating patterns at fixed intervals.

D) The effect of outliers on the series. Answer: C Explanation: Seasonality captures systematic, calendar‑related variations such as daily, monthly, or yearly cycles. Question 13. Which loss function is most appropriate for training a binary classifier with imbalanced classes when you care more about false negatives? A) Mean Squared Error B) Binary Cross‑Entropy C) Weighted Binary Cross‑Entropy D) Hinge Loss Answer: C Explanation: By assigning a higher weight to the minority (positive) class, the weighted loss penalizes false negatives more heavily. Question 14. In the context of ensemble methods, “bagging” primarily reduces A) Bias B) Variance C) Model complexity D) Data dimensionality Answer: B Explanation: Bagging (Bootstrap Aggregating) builds multiple models on different bootstrap samples and averages their predictions, thereby reducing variance. Question 15. Which of the following is a characteristic of a Markov Decision Process (MDP)? A) The next state depends on the entire history of states.

A) Choosing between model‑based and model‑free algorithms. B) Deciding whether to use a deterministic or stochastic policy. C) Balancing the acquisition of new knowledge with leveraging known rewarding actions. D) Selecting the discount factor γ. Answer: C Explanation: Exploration gathers information about the environment; exploitation uses existing knowledge to maximize reward. An effective RL agent balances both. Question 19. Which of the following is NOT a typical step in the CRISP‑DM data mining process? A) Business Understanding B) Data Understanding C) Model Deployment D) Feature Engineering Answer: D Explanation: While feature engineering occurs during “Data Preparation,” it is not listed as a separate CRISP‑DM phase; the six phases are Business Understanding, Data Understanding, Data Preparation, Modeling, Evaluation, and Deployment. Question 20. When using a Random Forest classifier, increasing the number of trees generally A) Decreases both bias and variance indefinitely. B) Increases bias but reduces variance. C) Reduces variance with diminishing returns after a certain point. D) Has no effect on model performance. Answer: C Explanation: More trees lower variance by averaging predictions, but after many trees the improvement plateaus while computation cost rises.

Question 21. In natural language processing, word embeddings such as Word2Vec are designed to capture A) Exact word counts in a document. B) Syntactic rules of a language. C) Semantic similarity based on context. D) Part‑of‑speech tags. Answer: C Explanation: Word2Vec learns dense vector representations where words appearing in similar contexts have similar vectors, reflecting semantic relationships. Question 22. Which evaluation metric is most suitable for a multi‑class classification problem with imbalanced classes? A) Overall accuracy B) Macro‑averaged F1‑score C) Micro‑averaged precision D) Log‑loss Answer: B Explanation: Macro‑averaged F1 treats each class equally by averaging per‑class F1 scores, thus mitigating the impact of class imbalance. Question 23. In the context of gradient descent, a “learning rate schedule” is used to A) Randomly shuffle the training data each epoch. B) Adjust the step size over time to improve convergence. C) Increase the number of hidden layers during training. D) Change the loss function dynamically. Answer: B

D) It eliminates the need for tree depth control. Answer: B Explanation: XGBoost adds regularization, tree pruning, and parallel computation, leading to faster training and often better performance. Question 27. In a confusion matrix for a binary classifier, the term “false discovery rate” (FDR) is defined as A) FP / (TP + FP) B) FN / (FN + TP) C) FP / (FP + TN) D) TP / (TP + FN) Answer: A Explanation: FDR = proportion of predicted positives that are actually negative, i.e., FP divided by all predicted positives (TP + FP). Question 28. Which of the following statements about the “No Free Lunch” theorem is correct? A) There exists a universally best learning algorithm for all problems. B) The performance of any algorithm is identical on all possible problems. C) No single algorithm outperforms all others across every possible problem distribution. D) It applies only to unsupervised learning. Answer: C Explanation: The theorem states that averaged over all possible problems, every algorithm has the same expected performance; thus, algorithm selection must be problem‑specific. Question 29. In the context of unsupervised clustering, the silhouette coefficient measures A) The distance between cluster centroids.

B) The compactness and separation of clusters. C) The number of clusters that maximizes variance. D) The probability that a point belongs to a given cluster. Answer: B Explanation: Silhouette values combine intra‑cluster cohesion (how close a point is to its own cluster) and inter‑cluster separation, ranging from - 1 to 1. Question 30. Which of the following is a key characteristic of a “deep” neural network compared to a “shallow” one? A) It uses only linear activation functions. B) It contains multiple hidden layers, enabling hierarchical feature learning. C) It always achieves higher accuracy regardless of data. D) It cannot be trained with backpropagation. Answer: B Explanation: Deep networks have several hidden layers that can learn increasingly abstract representations, unlike shallow networks with one hidden layer. Question 31. In the K‑Nearest Neighbors algorithm, the choice of distance metric most directly affects A) The number of features selected. B) How similarity between instances is quantified. C) The learning rate during training. D) The regularization strength. Answer: B Explanation: The distance metric (e.g., Euclidean, Manhattan) defines how the algorithm measures closeness between data points, influencing neighbor selection.

Explanation: In multi‑label problems, classes are not mutually exclusive; a sigmoid per class (independent probabilities) is preferred. Question 35. In time series forecasting, the ARIMA(p,d,q) model combines A) Autoregression, integration (differencing), and moving average components. B) Adaptive regression, iterative smoothing, and quantile regression. C) Augmented regression, independent variables, and quadratic terms. D) Automatic relevance, dimensionality reduction, and isolation forest. Answer: A Explanation: AR (p) captures dependence on past values, I (d) denotes differencing to achieve stationarity, MA (q) models dependence on past forecast errors. Question 36. Which of the following is a common method for detecting outliers in a high‑dimensional dataset? A) Z‑score on each feature independently. B) Mahalanobis distance. C) Simple linear regression residuals. D) One‑hot encoding. Answer: B Explanation: Mahalanobis distance accounts for covariance among variables, providing a multivariate measure of how far a point lies from the mean distribution. Question 37. In the context of model interpretability, SHAP values provide A) Global feature importance only. B) Local explanations based on game‑theoretic contribution of each feature. C) A way to reduce model size. D) A method for hyperparameter optimization.

Answer: B Explanation: SHAP (SHapley Additive exPlanations) attributes to each feature the contribution to a Question 38. Which of the following is the most appropriate technique for dimensionality reduction when preserving pairwise distances as much as possible? A) Principal Component Analysis (PCA) B) t‑Distributed Stochastic Neighbor Embedding (t‑SNE) C) Linear Discriminant Analysis (LDA) D) Independent Component Analysis (ICA) Answer: A Explanation: PCA projects data onto orthogonal axes that capture maximal variance, preserving global Euclidean distances better than methods focused on local structure (e.g., t‑SNE). Question 39. In a binary classification problem, the Matthews Correlation Coefficient (MCC) is preferred over accuracy when A) Classes are perfectly balanced. B) The cost of false positives equals the cost of false negatives. C) The dataset is highly imbalanced. D) The model outputs probabilities. Answer: C Explanation: MCC incorporates all four confusion‑matrix categories and remains informative even with severe class imbalance, unlike accuracy which can be misleading. Question 40. Which of the following statements about the “bias” term in a linear model is correct? A) It is the slope of the regression line. B) It shifts the decision boundary away from the origin. C) It is always zero after standardization.

B) Exponential loss C) Binary cross‑entropy (log loss) D) Mean absolute error Answer: C Explanation: Binary cross‑entropy is convex with respect to the predicted probability and directly optimizes the likelihood of the observed binary outcomes. Question 44. In the context of time‑series decomposition, the “trend” component is best described as A) The repeating seasonal pattern. B) The irregular random noise. C) The long‑term direction of the series. D) The short‑term fluctuations. Answer: C Explanation: Trend captures the overall upward or downward movement over a long horizon, separate from seasonal and residual components. Question 45. Which of the following is a key advantage of using a “stacked ensemble” over a simple bagging ensemble? A) It reduces computational cost. B) It can combine heterogeneous base learners to improve predictive power. C) It guarantees lower bias than any individual model. D) It eliminates the need for validation data. Answer: B Explanation: Stacking trains a meta‑learner on the predictions of diverse base models, enabling it to capture complementary strengths and often yielding higher accuracy.

Question 46. In a convolutional neural network, “padding = same” means A) No padding is added; output size is smaller than input. B) Padding is added so that output size equals input size. C) Padding is added only on the top and left edges. D) Padding size is dynamically learned during training. Answer: B Explanation: “Same” padding adds zeros around the input so that the spatial dimensions of the output feature map match those of the input after convolution. Question 47. Which evaluation metric is most appropriate for a ranking system where the position of relevant items matters? A) Mean Squared Error B) Precision@k C) ROC‑AUC D) Log‑loss Answer: B Explanation: Precision@k measures the proportion of relevant items among the top‑k results, directly reflecting ranking quality where early positions are more valuable. Question 48. In the context of graph neural networks (GNNs), the message‑passing framework primarily performs A) Global pooling of node features. B) Aggregation of neighbor information to update node embeddings. C) Random walk sampling of edges. D) Spectral decomposition of the adjacency matrix. Answer: B

D) Both B and C are correct. Answer: D Explanation: Tree‑based importance measures sum impurity reductions (or gain) attributable to each feature; because splits depend on ordering, scaling does not affect importance. Question 52. In the context of reinforcement learning, the term “policy gradient” refers to A) Updating the value function using temporal‑difference methods. B) Directly optimizing the policy parameters by gradient ascent on expected reward. C) Estimating the transition probabilities of the environment. D) Using Q‑learning to derive a deterministic policy. Answer: B Explanation: Policy‑gradient methods compute the gradient of expected return with respect to policy parameters and adjust them to maximize reward. Question 53. Which of the following is a characteristic of a “generative” model? A) It directly models P(Y|X). B) It models the joint distribution P(X,Y) and can generate new samples. C) It always uses decision trees. D) It cannot be used for classification. Answer: B Explanation: Generative models learn the joint probability and can sample new data points; discriminative models focus only on the conditional distribution. Question 54. In a support vector machine with a radial basis function (RBF) kernel, the hyperparameter γ controls A) The width of the margin. B) The trade‑off between margin size and classification error.

C) The influence of a single training example (kernel bandwidth). D) The regularization strength. Answer: C Explanation: γ determines how far the influence of a single training example reaches; a larger γ leads to narrower kernels, causing the model to fit more closely to the data. Question 55. Which of the following is NOT a valid assumption of the classic linear regression model? A) Errors are independent and identically distributed (i.i.d.). B) The relationship between predictors and response is linear. C) Predictors are multicollinear. D) Errors have constant variance (homoscedasticity). Answer: C Explanation: Multicollinearity violates the assumption of independent predictors and can inflate variance of coefficient estimates; it is not a valid assumption. Question 56. In the context of clustering, the “Davies‑Bouldin index” is used to A) Measure intra‑cluster similarity only. B) Evaluate the ratio of within‑cluster scatter to between‑cluster separation (lower is better). C) Determine the optimal number of clusters by maximizing the index. D) Compute silhouette scores for each point. Answer: B Explanation: The Davies‑Bouldin index averages the ratio of within‑cluster dispersion to between‑cluster separation; lower values indicate better clustering. Question 57. Which of the following best describes the purpose of “batch normalization” in deep neural networks?