Data Science Quiz
Questions: 16 · 10 minutes
1. A medical screening model predicts a rare condition. Missing a person who has the condition is especially costly. Which metric most directly measures the proportion of actual positive cases the model identifies?
Specificity
Precision
Recall
Accuracy
2. An analyst standardizes every numeric column using the mean and standard deviation of the full dataset, then divides the data into training and test sets. What is the main problem?
Information from the test set has leaked into preprocessing
The training set will necessarily become too small
Standardized features cannot be used by predictive models
Standardization can be used only with categorical variables
3. An observational dataset shows that people who use a fitness app more often also exercise more. What would best support a causal claim that the app increases exercise?
A stronger correlation in the same observational dataset
A larger sample collected with the same observational design
A chart showing app use before exercise in the dataset
A well-designed randomized experiment comparing app access with a control condition
4. A team wants to estimate how well a predictive model will perform on new, unseen records. What is the main purpose of keeping a separate test set?
To guarantee that the model will perform equally well after deployment
To increase the number of features available during training
To evaluate the finalized model on data not used for fitting or model selection
To remove the need for validation during model development
5. A fraud detection team reviews every transaction flagged by a model, and legitimate transactions sent for review are very costly. Which metric focuses on how many flagged transactions are actually fraudulent?
Recall
Mean squared error
Specificity
Precision
6. Household incomes in a sample are strongly right-skewed because a few values are extremely high. Which measure best represents a typical income while limiting the influence of those extremes?
The range
The arithmetic mean
The median
The variance
7. In an A/B test, a confidence interval for the difference in average outcomes is entirely above zero at the chosen confidence level. Which conclusion is most justified?
The new version will improve the outcome for every user
The size of the improvement is automatically important in practice
There is no uncertainty remaining about the true effect
The data provide evidence of a positive average difference at that confidence level
8. A data scientist wants repeated runs of the same random train-test split to select the same records. What is the most direct step?
Add more rows after each run
Set and record the random seed used by the splitting procedure
Sort the target values from highest to lowest before splitting
Remove the target column before saving the dataset
9. During model development, what is the primary purpose of k-fold cross-validation?
To convert a regression target into categories
To eliminate every source of sampling bias
To estimate performance across multiple training-validation splits
To replace the need for a final untouched test set in all cases
10. What is a common purpose of regularization in a predictive model?
To make every feature have the same correlation with the target
To convert an unsupervised task into a supervised one
To ensure all training examples are predicted correctly
To discourage excessive model complexity and help reduce overfitting
11. Six months after deployment, a model's performance declines because the relationship between customer behavior and the target has changed. What does this most directly illustrate?
A syntax error in the training code
Concept drift affecting the model after deployment
Successful regularization during training
Perfect multicollinearity in every input feature
12. A dataset has many correlated numeric features, and an analyst wants a smaller set of uncorrelated components that retain as much variance as possible. Which technique fits this goal?
Principal component analysis
Logistic regression
One-hot encoding
Stratified sampling
13. A table named sales contains region and revenue columns. Which SQL query correctly calculates average revenue for each region?
SELECT region, AVG(revenue) FROM sales GROUP BY revenue;
SELECT region, AVG(revenue) FROM sales GROUP BY region;
SELECT AVG(region), revenue FROM sales GROUP BY region;
SELECT region, revenue FROM sales WHERE revenue = AVG(revenue);
14. A feature records customers' preferred contact channel as email, phone, chat, or post, with no natural order. Which basic encoding avoids implying that one category ranks above another?
One-hot encoding
Assigning values 1, 2, 3, and 4 to the categories
Replacing each category with the row number
Min-max scaling the category names
15. A retailer has customer behavior data but no predefined customer types. It wants to discover groups of customers with similar behavior. Which approach is most suitable?
Linear regression
Clustering
Binary classification
Time-series forecasting
16. A model achieves 99% accuracy on its training data but only 68% accuracy on unseen test data. Which explanation is most likely?
The model is overfitting patterns specific to the training data
The model is underfitting because both scores are equally low
The target variable must be continuous
The test data have been used too many times during training