10 free sample questions from a bank of 10, with the correct answers and explanations. No signup required — start practising right now.
1Which of the following issues should a data scientist be most concerned about when generating a synthetic data set?
The data set consuming too many resources
The data set having insufficient features
The data set having insufficient row observations
The data set not being representative of the population
Answer: D
The short version
D - Synthetic data must reproduce the joint distribution of the real population. A generated sample that does not mirror the population the model will serve teaches it structure that will not exist in production.
Key concepts
Synthetic data: Artificially generated records (SMOTE, bootstrapping, GANs such as CTGAN) produced when real data is scarce, sensitive or expensive to collect.
Representativeness (distribution fidelity): How closely the synthetic sample matches the real population's feature distributions, class balance and inter-feature correlations.
Training-serving skew: A mismatch between the distribution a model was trained on and the distribution it meets at inference time; the model degrades silently rather than crashing.
Coverage versus volume: Row count and feature count are visible and tunable properties, while fidelity to the population is a statistical property that can look perfectly healthy and still be wrong.
Why D is correct
Representativeness is the one property of a synthetic data set that inspection cannot verify. All the rows and columns are present, the file loads cleanly and the counts look adequate, yet if the generator under-represents rare sub-populations, truncates the tails or breaks the correlation structure between features, a model trained on it learns a decision boundary that does not hold for real customers. That failure appears only as unexplained production error after deployment, which is precisely why it outranks the engineering issues in this list.
Why the others are wrong
A. Resource consumption is a cost and performance problem. It is measurable, it scales down with cheaper hardware or fewer generated rows, and it never makes the data statistically wrong.
B. Too few features is an explicit, visible gap that shows up in an importance analysis or a flat model, and it is fixable by adding columns or joining another source.
C. Too few row observations is a statistical-power problem that is obvious from the sample size, and generating additional rows is exactly what synthetic data generation is for. Small n does not by itself mean the sample is unrepresentative.
DY0-001 exam tip
If a synthetic set can be generated in an afternoon but nobody can say how well it mirrors production, the failure mode you are buying is representativeness, not volume or compute.
2A data scientist is performing a linear regression and wants to construct a model that explains the most variation in the data. Which of the following should the data scientist maximize when evaluating the regression performance metrics?
Accuracy
R2
p value
AUC
Answer: B
The short version
B - Maximize R2, the coefficient of determination, because it is defined as the share of variance the model explains.
Key concepts
R2 (coefficient of determination): 1 minus SSres divided by SStot, the fraction of the target's total variation accounted for by the model; 1.0 is a perfect fit and 0.0 means no better than predicting the mean.
SSres / SStot: Residual sum of squares versus total sum of squares around the target's mean, the numerator and denominator of R2.
Adjusted R2: R2 with a penalty per added predictor, so extra parameters must earn their extra fit.
RMSE / MAE: Error-size metrics expressed in the units of the target; report them alongside R2 because they show magnitude, not proportion.
Classification metrics: Accuracy, precision, recall and AUC require discrete class labels and are undefined for a real-number outcome.
Why B is correct
The stem asks about explaining the most variation in a real-number target, and R2 is precisely the metric defined as a proportion of explained variation: R2 = 1 - SSres/SStot, where SStot is the variation that would exist with no model at all. Raising R2 therefore means capturing more of that total variation. It is also the one listed metric that is valid for a continuous regression target, since accuracy and AUC need class labels and a p-value is a hypothesis test rather than a fit statistic.
Why the others are wrong
A. Accuracy is a classification metric computed from a confusion matrix; a real-number dependent variable has no predicted-versus-actual class pairs to count, so accuracy is undefined here.
C. A p-value tests whether an individual coefficient differs significantly from zero. It says nothing about how much variation the model explains, a statistically significant model can have an R2 near zero, and you never maximize a p-value anyway - you minimize it.
D. AUC measures how well a binary classifier ranks positives above negatives. With a continuous target there is no positive class, so no ROC curve and no AUC exist.
DY0-001 exam tip
For a continuous target, the only metric on the list that literally measures explained variation is R2 - AUC and accuracy need classes, p-value needs a hypothesis.
3A data scientist is building an inferential model with a single predictor variable. A scatter plot of the independent variable against the real-number dependent variable shows a strong relationship between them. The predictor variable is normally distributed with very few outliers. Which of the following algorithms is the best fit for this model, given the data scientist wants the model to be easily interpreted?
A logistic regression
An exponential regression
A linear regression
A probit regression
Answer: C
The short version
C - A continuous real-number target with one strongly related numeric predictor is the textbook case for ordinary least squares linear regression.
Key concepts
Ordinary least squares (linear regression): Fits y = b0 + b1x by minimizing the sum of squared residuals; valid for continuous targets and directly interpretable coefficients.
Coefficient interpretability: b1 is the expected change in y per one-unit change in x, which is the business-readable statement the question asks for.
Logistic / probit regression: Generalized linear models whose link (logit, inverse normal CDF) maps a linear predictor to a probability in 0-1; they require a binary outcome.
Exponential regression: y = a * b^x, used when the relationship is multiplicative growth or decay and the scatter plot curves upward or downward.
OLS assumptions: Linearity, independence of errors, constant variance (homoscedasticity) and roughly normal residuals - a single normally distributed predictor with few outliers satisfies them comfortably.
Why C is correct
Three details in the stem point to OLS: the dependent variable is a real number rather than a class label, there is exactly one predictor with a strong relationship, and the predictor is roughly normal with few outliers. OLS is the maximum-likelihood fit of a straight line under normally distributed errors, so those conditions are precisely its assumptions - and it returns a single slope and intercept the analyst can read as 'x units of the predictor per y units of outcome', which satisfies the interpretability requirement. Logistic regression and probit both model the probability of a binary event, so neither can even accept this continuous target.
Why the others are wrong
A. Logistic regression predicts the probability of a binary outcome through a logit link. The target here is a continuous real number, and forcing a logit onto it distorts the fit and destroys the coefficient interpretation the scientist wants.
B. Exponential regression models multiplicative growth such as y = a * b^x. The scatter plot shows a straight-line relationship, there is no growth or decay curve to capture, and an exponential fit is harder to interpret and can overfit at the high end.
D. A probit regression is the binary-outcome sibling of logistic regression, using the inverse normal CDF as its link function. Nothing in the question is a binary outcome, so a probit link has no valid target to model.
DY0-001 exam tip
Read the target first: real number plus one clean numeric predictor plus 'must be interpretable' equals ordinary least squares, full stop.
4A data scientist wants to evaluate the performance of various nonlinear models. Which of the following is best suited for this task?
AIC
Chi-squared test
MCC
ANOVA
Answer: A
The short version
A - AIC compares candidate models of any functional form by trading likelihood fit against parameter count.
Key concepts
AIC (Akaike Information Criterion): 2k minus 2 times the log of the maximum likelihood, penalizing each estimated parameter; the model with the lowest AIC is expected to predict best out of sample.
AICc and BIC: Small-sample and Bayesian variants that penalize parameter count even harder, tightening model selection for fewer observations.
Chi-squared test: A goodness-of-fit or independence test against a specified hypothesis or distribution, not a general model-ranking tool.
MCC (Matthews correlation coefficient): A threshold-independent score for binary classifiers, requiring true class labels in the data.
ANOVA: Compares means across the levels of a categorical factor to test whether a factor explains response variation.
Why A is correct
AIC is computed entirely from two model-level quantities: the log-likelihood of the fitted model and the number of parameters k it estimated. Because it never touches the individual observations or the response column directly, it can be applied to arbitrary nonlinear candidates - trees, splines, GAMs, neural nets - as long as each reports a likelihood and a parameter count, producing one common scale where lower wins. AIC's penalty term is derived from the bias-variance tradeoff, so it explicitly estimates out-of-sample predictive error rather than rewarding a better in-sample fit.
Why the others are wrong
B. A chi-squared test asks whether observed counts or residuals fit a specified distribution. It requires a hypothesized reference model and gives a significance verdict; it cannot rank a set of arbitrary nonlinear candidates against each other.
C. MCC is a performance score for binary classification and needs true labels for both classes. The question says nothing about classification targets, and MCC cannot be computed for a continuous regression fit at all.
D. ANOVA tests whether group means differ across levels of a categorical factor, so it needs a designed grouping variable and normally distributed group errors. It is a hypothesis test about a factor's effect, not a criterion for selecting among nonlinear models.
DY0-001 exam tip
Choosing among nonlinear models needs a criterion computed from the fit itself - AIC. MCC and AUC need labels, ANOVA and chi-square need a designed grouping.
5Which of the following is the layer that is responsible for the depth in deep learning?
Convolution
Dropout
Pooling
Hidden
Answer: D
The short version
D - Depth is the number of stacked hidden layers between the input and output layers.
Key concepts
Hidden layer: Any layer between input and output whose weights are learned; depth is the count of these stacked layers.
Depth: The number of successive learnable transformations a signal passes through, which is what makes a network 'deep'.
Convolution layer: A layer type that applies sliding filters with shared weights to detect local features; it is one way to build depth, not the definition of it.
Dropout: A regularization that randomly zeroes a fraction of activations during training; it adds no layers at all.
Pooling: A downsampling operation that reduces spatial resolution; it reduces size, not network depth.
Why D is correct
'Deep learning' is named for and defined by the number of hidden layers stacked between input and output. Each hidden layer composes a learned transformation on the previous layer's output, so a network's representational depth - and its ability to build hierarchical features - is literally how many hidden layers it contains. Convolution, pooling and dropout are operations or mechanisms that may appear within those layers; none of them is the layer category that creates depth.
Why the others are wrong
A. Convolution is an operation and a layer architecture that applies filters across local regions with shared weights. Many deep networks are fully connected and have no convolution at all, so convolution cannot be what makes a network deep.
B. Dropout is a training-time regularization that randomly zeroes activations to prevent co-adaptation. It adds zero layers and removes no layers - it changes training, not architecture depth.
C. Pooling downsamples feature maps to reduce spatial size and computation. Shrinking resolution is not the same as stacking more learnable transformations, which is the sense 'depth' refers to.
DY0-001 exam tip
Depth is architecture, not arithmetic: count the hidden layers. Convolution, pooling and dropout are tricks inside layers, not the source of depth.
6Which of the following modeling tools is appropriate for solving a scheduling problem?
One-armed bandit
Constrained optimization
Decision tree
Gradient descent
Answer: B
The short version
B - Scheduling is an allocation problem, which is modeled as constrained optimization: maximize an objective subject to hard constraints.
Key concepts
Decision variables: The quantities being decided, here which job runs on which machine in which time slot.
Objective function: The quantity to maximize or minimize, such as total throughput, revenue or minimized makespan.
Constraints / feasible region: Hard limits such as machine capacity, job durations, precedence rules and time windows that restrict which assignments are legal.
One-armed bandit: An online exploration-exploitation algorithm for choosing between arms in A/B testing; it has no notion of assignments or capacity.
Gradient descent: An iterative solver that walks down a differentiable objective to find parameters; it is a fitting algorithm, not a scheduling problem formulation.
Why B is correct
Scheduling is defined by structure, not by prediction: jobs must be assigned to resources while satisfying capacity, precedence and time-window limits, and the goal is an extreme value such as minimum makespan or maximum throughput. That is exactly a constrained optimization problem - linear or mixed-integer programming - where the decision variables are the assignments, the objective is the schedule quality measure, and the constraints define the feasible region. Solvers such as branch-and-bound or the simplex method then search that region for the optimum.
Why the others are wrong
A. A one-armed bandit decides between competing options online to maximize long-run reward, which is what A/B testing uses. It cannot express precedence, machine capacity or time-window constraints, so it cannot build a schedule.
C. A decision tree is a supervised predictive model for classification or regression that splits features to predict a label. It has no representation of assignments, resources or constraints, so it cannot optimize a schedule.
D. Gradient descent is an optimization algorithm that finds parameters by stepping along a gradient; it solves differentiable smooth problems and cannot express discrete assignment or hard constraint logic. It is the solver, not the problem class.
DY0-001 exam tip
Scheduling, routing and allocation questions are constrained optimization every time: name the decision variables, the objective, then the constraints.
7Which of the following environmental changes is most likely to resolve a memory constraint error when running a complex model using distributed computing?
Converting an on-premises deployment to a containerized deployment
Migrating to a cloud deployment
Moving model processing to an edge deployment
Adding nodes to a cluster deployment
Answer: D
The short version
D - Adding nodes shards the data or model across workers, so no single process has to hold the whole state in RAM.
Key concepts
Memory constraint / OOM: A failure raised when a process's working set exceeds the memory available to it; in distributed training it appears on the node that holds too much state.
Data parallelism: Replicating the model and splitting the batch, so each worker holds a full model copy but only a fraction of the data.
Model parallelism: Splitting the model's layers or parameters across workers, so each worker holds only a slice of the model state - the direct fix for state-heavy models.
Horizontal scaling: Adding more machines to grow aggregate CPU, memory and I/O capacity without changing the workload definition.
Containerization: Packaging an application with its dependencies for consistent deployment; it changes distribution, not the memory ceiling.
Why D is correct
An out-of-memory error means the per-process state exceeded the RAM attached to that process. In a distributed job the remedy that targets that specific quantity is to add workers, because the job then shards its work - the batch across replicas in data parallelism, or the layers/parameters across devices in model parallelism - and the state any single process holds drops to roughly 1/n of the original. Nothing about the model or the code changes; the same job simply stops asking one node to carry everything.
Why the others are wrong
A. Converting to containers changes packaging, dependency isolation and deployment portability. The container shares the host's physical memory, so an OOM caused by too much per-process state occurs just the same.
B. Migrating to the cloud only helps if the instance size, instance count or memory-optimized configuration changes with it. Moving the identical workload to an identical cloud instance preserves the same per-node memory limit and the same OOM.
C. Edge devices have less RAM, slower processors and weaker interconnect than the cluster. Shifting a complex model out to the edge reduces the memory available and makes the constraint worse, not better.
DY0-001 exam tip
An OOM is a per-process memory problem, so fix it by splitting the process: more nodes. Packaging, cloud branding and edge devices change nothing about that number.
8A data analyst wants to save a newly analyzed data set to a local storage option. The data set must meet the following requirements:
Be minimal in size
Have the ability to be ingested quickly
Have the associated schema, including data types, stored with it
Which of the following file types is the best to use?
JSON
Parquet
XML
CSV
Answer: B
The short version
B - Parquet is column-oriented, compressed, and stores each column's data type plus the full schema in the file footer.
Key concepts
Columnar storage: Data written one column at a time so identical values sit adjacent and compress well, and only the columns a query needs are read.
Embedded schema: Parquet writes logical and physical types for every column into footer metadata, so the file is self-describing.
Compression: Snappy, gzip or zstd encode the column chunks, which is what keeps the on-disk size minimal.
Predicate pushdown: Column-level statistics in the footer let a reader skip row groups before decompressing anything, speeding up ingestion and scans.
Schema-on-read formats: CSV, JSON and XML carry little or no type information, so the consumer must infer or supply it and typically reads every value.
Why B is correct
All three requirements point at the same storage design. Column orientation puts repeated values next to each other so a dictionary or general-purpose compressor shrinks the file dramatically, satisfying minimal size. Reading only the needed column chunks with statistics available up front avoids parsing the whole file, satisfying fast ingestion. And because Parquet's footer carries each column's physical type alongside the schema, the data types travel with the file, satisfying the schema requirement without an external registry. JSON, XML and CSV satisfy none of the three convincingly.
Why the others are wrong
A. JSON repeats the field name on every record, writes numbers as text, and supports no compression or column statistics. It is the largest and slowest of these options and its types are inferred at read time.
C. XML repeats opening and closing tags for every value, which inflates the file far beyond JSON or CSV, and it has no embedded types or columnar compression.
D. CSV is compact but untyped: there is no schema, no data type information and no compression, so a reader must parse every value in every row even to use a single column.
DY0-001 exam tip
Requirements like minimal size, fast ingest and schema-with-the-data are the columnar-storage fingerprint - Parquet, not a text format.
9Which of the following is a key difference between KNN and k-means machine-learning techniques?
KNN operates exclusively on continuous data, while k-means can work with both continuous and categorical data.
KNN performs better with longitudinal data sets, while k-means performs better with survey data sets.
KNN is used for finding centroids, while k-means is used for finding nearest neighbors.
KNN is used for classification, while k-means is used for clustering.
Answer: D
The short version
D - KNN is supervised classification using labeled neighbors; k-means is unsupervised clustering that partitions unlabeled data around centroids.
Key concepts
K-nearest neighbors (KNN): A supervised, instance-based, lazy learner that stores the labeled training set and labels a new point by majority vote among its k closest neighbors.
Distance metric: The similarity measure (Euclidean, Manhattan) KNN needs to find neighbors; it only works well on numeric features that have been scaled.
k-means: An unsupervised partitioning algorithm that picks k centroids, assigns each point to its nearest centroid, recomputes centroids, and repeats until the within-cluster variance stops falling.
Centroid: The arithmetic mean of the points in a cluster - a property of k-means, not of KNN.
Cluster ID versus class label: k-means returns arbitrary group identifiers; KNN returns a label drawn from the real classes it was trained on.
Why D is correct
The distinction is supervision and output. KNN cannot produce a single prediction without labeled training rows: it keeps them all, measures distance from the new point, takes the k closest and votes on their known class labels - so it is a classifier. k-means runs the opposite way: it takes rows with no labels at all, chooses k starting centroids, and iterates assign-then-update until the partition stabilizes, returning group IDs that carry no class meaning. One needs a target variable; the other discovers structure without one.
Why the others are wrong
A. The asymmetry is invented and backwards. KNN requires numeric, scaled features because it computes distances, and k-means also operates on numeric vectors unless you specifically use k-prototypes or Gower distance for mixed types.
B. Whether the data came from a longitudinal study or a survey says nothing about the algorithms. KNN and k-means differ in supervision, objective and output, not in the provenance of the dataset.
C. The two are swapped. Finding centroids and minimizing within-cluster variation is k-means; finding nearest neighbors and voting on their labels is KNN.
DY0-001 exam tip
Memory hook: KNN needs the labels it was trained on and looks at nearby points; k-means invents the labels itself and looks at cluster centers.
10A data scientist needs to:
Build a predictive model that gives the likelihood that a car will get a flat tire.
Provide a data set of cars that had flat tires and cars that did not.
All the cars in the data set had sensors taking weekly measurements of tire pressure similar to the sensors that will be installed in the cars consumers drive. Which of the following is the most immediate data concern?
Granularity misalignment
Multivariate outliers
Insufficient domain expertise
Lagged observations
Answer: D
The short version
D - Weekly sensor readings sit behind the labeled failure event, so the features are lagged observations that must be aligned to the event window.
Key concepts
Lagged observations: Recorded values whose timestamp precedes the event they are used to predict; the size of the gap is the feature's lag.
Feature window versus label window: The span of history used to build a feature must be defined relative to the moment the label is attached.
Temporal granularity: How often a signal is sampled; weekly sampling bounds how precisely you can locate a change in tire condition.
Data cleaning: Outlier detection, imputation and dedup - necessary housekeeping that does not change how features line up with labels.
Rare-event prediction: Predicting an infrequent outcome such as a flat tire, where positives are rare and temporal alignment dominates model performance.
Why D is correct
The label 'this car got a flat tire' is attached at an instant, but the sensors only record once a week. The most recent measurement before that event can be days old, so the features carry information from a period that has little to do with the failure itself. Before any modeling, you must aggregate and align the readings over the correct pre-event window, roll them into event-time features, and check the same cadence exists at inference. Because the production sensors sample identically, the whole gap between feature time and label time is lag, which is why this is the immediate concern.
Why the others are wrong
A. Granularity is actually consistent here - the training cars carry the same weekly sensors as the production fleet, so there is no train-versus-serve resolution mismatch. The mismatch that exists is temporal lag inside the pre-event window, not a difference in sampling rate.
B. Multivariate outliers are a genuine but standard cleaning task: they are detectable with routine outlier analysis and removable or winsorized. They do not change the structural problem of features that are offset in time from the label.
C. Insufficient domain expertise is an organizational gap - who to consult, which failure modes matter - not a property of the data set that a model can detect. It can be closed with interviews without touching the data, while the lag must be engineered out.
DY0-001 exam tip
With time-stamped sensors and an event label, ask when each reading was taken relative to the event. If the answer is 'up to a week earlier', you have lag, and lag outranks every cleaning concern.