Data Science Data Science-FREE Data Science 1 — Questions and Answers
Question 1: Which measure of central tendency is most resistant to the influence of outliers in a dataset?
- Mean
- Median (Correct answer)
- Mode
- Standard deviation
Correct answer: Median
The median is the middle value when data is sorted and is unaffected by extreme values, making it robust to outliers. The mean, by contrast, shifts significantly when outliers are present.
Question 2: In the context of machine learning, what is the primary purpose of a validation set?
- To train the model's parameters
- To evaluate the final model performance on unseen data
- To tune hyperparameters and select the best model configuration (Correct answer)
- To preprocess and clean the raw input data
Correct answer: To tune hyperparameters and select the best model configuration
A validation set is used during development to tune hyperparameters and compare different model configurations. The test set (not the validation set) is reserved for final unbiased evaluation.
Question 3: Which probability distribution is commonly used to model the number of events occurring within a fixed time interval when events happen independently?
- Normal distribution
- Binomial distribution
- Poisson distribution (Correct answer)
- Uniform distribution
Correct answer: Poisson distribution
The Poisson distribution models the count of independent events in a fixed interval of time or space, given a known average rate. It is widely used for event-count data such as customer arrivals or server requests per minute.
Question 4: What is the purpose of the 'learning rate' hyperparameter in gradient descent optimization?
- It determines the number of training epochs
- It controls how much the model's weights are updated at each step (Correct answer)
- It sets the proportion of data used for training versus validation
- It defines the depth of a decision tree
Correct answer: It controls how much the model's weights are updated at each step
The learning rate scales the gradient update applied to the model's weights at each iteration. A rate too high causes divergence, while a rate too low leads to very slow convergence.
Question 5: Which of the following best describes the concept of 'feature engineering'?
- Selecting the optimal machine learning algorithm for a task
- Transforming or creating input variables to improve model performance (Correct answer)
- Splitting data into training and test sets
- Evaluating a model using cross-validation
Correct answer: Transforming or creating input variables to improve model performance
Feature engineering involves creating new input variables or transforming existing ones — such as encoding categoricals, scaling numerics, or combining columns — to provide the model with more informative signals.
Question 6: In a linear regression model, what does the R-squared (R²) value indicate?
- The average error between predicted and actual values
- The proportion of variance in the target variable explained by the model (Correct answer)
- The number of independent variables in the model
- The probability that the model's coefficients are statistically significant
Correct answer: The proportion of variance in the target variable explained by the model
R² ranges from 0 to 1 and represents the fraction of the dependent variable's variance that is explained by the independent variables. An R² of 0.85 means the model accounts for 85% of the observed variability.
Which measure of central tendency is most resistant to the influence of outliers in a dataset?