Skip to content
tezvyn:

Top 30 Advanced Data Science & Analytics Interview Questions and Answers

30 advanced multiple-choice Data Science & Analytics interview questions, the deep end: internals, failure modes, and the design calls a senior engineer is expected to defend. They come from 30 bites in the Data Science & Analytics library, the hardest slice of the 135 Data Science & Analytics interview questions in the library. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.

Analysis, notebooks, visualization, pandas, statistics

30 questions. Pick an answer, or open “Show the answer” to read it.

Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.

  1. Question 1 of 30

    Why is the correlation between profile completion and retention weak evidence that forcing completion will improve retention?

    Show the answer

    Answer: d · Engaged users self-select into completing profiles, confounding the relationship

    Motivated users both complete profiles and retain, so engagement is a confounder making completion a marker rather than a proven cause. A randomized experiment is needed; the other options misstate the actual problem.

    Read the full bite: Does forcing profile completion cause retention?

  2. Question 2 of 30

    What is the most important addition to a revenue metric when evaluating a change that may harm long-term satisfaction?

    Show the answer

    Answer: b · Long-horizon guardrail metrics like retention plus a sufficiently long experiment

    Long-term harm surfaces as delayed churn, so guardrail metrics measured over a long-enough window are essential to weigh against the immediate revenue lift. More precise short-term revenue alone still misses the delayed retention cost.

    Read the full bite: Framing ad-load tradeoffs: revenue versus retention

  3. Question 3 of 30

    When validating a composite burnout proxy, why test whether it predicts voluntary attrition six months later?

    Show the answer

    Answer: c · It establishes predictive validity by showing the proxy correlates with a meaningful future outcome

    Testing future attrition establishes predictive validity, confirming the composite index captures a construct with real downstream consequences. The most tempting distractor confuses prediction with causation: a proxy that predicts attrition does not prove burnout causes it, since unobserved confounders may drive both.

    Read the full bite: How would you build and validate a proxy target for employee burnout?

  4. Question 4 of 30

    In PCA on mean-centered data, what does the eigenvalue associated with a principal component directly represent?

    Show the answer

    Answer: d · The variance of the data projected onto that component's direction

    Each eigenvalue equals the variance captured along its eigenvector, which is why components are ranked by eigenvalue. Accuracy is a downstream model metric, not what the eigenvalue measures.

    Read the full bite: Eigenvalues, eigenvectors, and their role in PCA

  5. Question 5 of 30

    In a two-proportion conversion test, which change most directly explains why detecting a 2% relative lift requires roughly 390k users per variant instead of 63k for a 5% relative lift?

    Show the answer

    Answer: a · The absolute MDE shrinks from 0.5 to 0.2 percentage points, and sample size scales roughly with the inverse square of the absolute effect size.

    The correct answer identifies that the absolute MDE falls from 0.5 to 0.2 percentage points, and because N is roughly proportional to the inverse square of the absolute MDE, required sample size balloons by about sixfold. Distractor D is tempting because it quotes the true p(1-p) variance formula from the card, but in this range variance barely changes and cannot explain the explosion in sample size.

    Read the full bite: How do you determine sample size for a conversion lift experiment?

  6. Question 6 of 30

    Under what condition does MAP estimation give essentially the same result as MLE?

    Show the answer

    Answer: a · When the prior is uniform or the dataset is very large

    A uniform prior makes the posterior proportional to the likelihood, and with large data the likelihood overwhelms any prior, so MAP converges to MLE. A strong prior on small data does the opposite.

    Read the full bite: MLE versus MAP estimation and the role of priors

  7. Question 7 of 30

    When aggregating a 50GB CSV on a 16GB machine, which strategy keeps peak memory usage proportional to a small fragment rather than the entire file?

    Show the answer

    Answer: c · Iterate with read_csv(chunksize=...), aggregating each fragment and discarding it before reading the next

    Streaming with chunksize processes only one fragment at a time, keeping memory bounded by that fragment instead of the full 50GB. Option A is tempting because filtering columns and downcasting dtypes are valid optimizations, but materializing the entire file in a single DataFrame still exhausts RAM.

    Read the full bite: Process a 50GB CSV with only 16GB RAM

  8. Question 8 of 30

    You convert a 10-million-row DataFrame's string column with 6 million unique values to category. What is the likely effect on memory usage?

    Show the answer

    Answer: b · Memory increases because the category codes plus unique values list outweigh a simple object array.

    When cardinality exceeds roughly fifty percent of row count, the storage cost of category codes plus the unique values list exceeds that of a plain object array. Option A is a common misconception that category dtype always reduces memory, but it is only beneficial for low-cardinality columns.

    Read the full bite: How do you analyze and reduce large pandas DataFrame memory usage?

  9. Question 9 of 30

    Which pattern best synchronizes a large OLTP table to a warehouse while correctly handling hard deletes, out-of-order updates, and exactly-once recovery?

    Show the answer

    Answer: d · Capture database change events from the transaction log, stage them in an open-table format, and merge incremental files into the warehouse with checkpointed offsets

    CDC from the transaction log captures every mutating event including deletes and preserves ordering, while staging in an open-table format enables incremental merge into the warehouse with checkpointed offsets for exactly-once recovery. Dual writes risk inconsistency across independent transactions, and simple timestamp watermarking misses hard deletes and struggles with out-of-order rows unless paired with costly full extracts.

    Read the full bite: Design an incremental load pipeline from a transactional DB to a warehouse

  10. Question 10 of 30

    When targeting a site protected by advanced bot management that fingerprints TLS, browser runtime, and behavior, which strategy is most effective?

    Show the answer

    Answer: b · Match JA3/TLS signatures, patch automation leaks, and use realistic mouse trajectories

    Modern anti-bot stacks fingerprint TLS handshakes, browser automation leaks, and interaction entropy, so evasion requires addressing all three layers simultaneously. Proxies and user-agents alone fail at the transport layer, vanilla headless Chrome exposes runtime signals, and relying on CAPTCHA solving ignores the root detection vectors.

    Read the full bite: How would you evade an advanced anti-bot system while scraping?

  11. Question 11 of 30

    Which design decision most directly prevents a surge from thousands of IoT devices from overwhelming downstream stream processors?

    Show the answer

    Answer: d · Placing local rate limiting and batching at the edge gateway before the Kafka backplane

    The edge gateway isolates the core pipeline by applying local rate limiting and batching before Kafka. While three replicas with acks=all ensures durability against rack failures, it does not throttle an incoming flood from thousands of devices.

    Read the full bite: Design a scalable, fault-tolerant real-time IoT data ingestion system

  12. Question 12 of 30

    In a production time-series forecasting pipeline using rolling-origin validation, which approach correctly prevents future leakage?

    Show the answer

    Answer: a · Use backward-looking windows ending at t minus one and fit scalers exclusively on each training fold before transforming the matching validation fold

    Backward-looking windows ending at t minus one ensure no future data enters features, and fitting preprocessing per training fold stops global statistics from leaking into validation. Option D is tempting because global scaling is standard in non-temporal ML, yet it embeds future information into every historical row before any split occurs.

    Read the full bite: How do you prevent future leakage in time-series preprocessing?

  13. Question 13 of 30

    While designing a two-pass standardizer for a 500GB out-of-core dataset, your colleague proposes computing each partition's mean and then averaging those means with equal weights. What is the fundamental flaw?

    Show the answer

    Answer: d · It assumes every partition contains the same number of rows, producing a biased global mean when they differ.

    The global mean must weight each partition's local mean by its row count; equal weighting is only correct if all partitions are identical in size. Distractor D references a real concern from the card, but numerical stability relates to variance computation, not the bias introduced by unweighted mean averaging.

    Read the full bite: How would you standardize a 500GB dataset that does not fit in RAM?

  14. Question 14 of 30

    When is it usually best to apply neither stemming nor lemmatization to your text?

    Show the answer

    Answer: c · When feeding a subword-tokenized transformer like BERT

    Transformers use subword tokenization and pretraining that already handle morphology and casing, so normalizing can mismatch their expected input. Bag-of-words models, by contrast, benefit from vocabulary reduction via stemming or lemmatization.

    Read the full bite: Stemming versus lemmatization in text preprocessing

  15. Question 15 of 30

    Which approach best characterizes production-grade data observability for a C-level dashboard pipeline?

    Show the answer

    Answer: b · Layered monitoring mapped to business impact with lineage-aware alerts and severity-based escalation paths

    A strong observability system for executive dashboards requires layered monitoring integrated with lineage-aware alerting and severity-based escalation paths tied to business impact, not just individual technical checks. Option C describes valid freshness and completeness layers but lacks the incident response mapping and business context that distinguish production observability from basic pipeline validation.

    Read the full bite: How would you monitor data quality for a C-level dashboard pipeline?

  16. Question 16 of 30

    Which pipeline design best prevents backpressure during flash sales while enabling cost-efficient sessionization and warehouse loading?

    Show the answer

    Answer: b · ECS ingestion to Kinesis, S3 batches, EMR Serverless Spark sessionization, and Redshift COPY via Step Functions

    The correct answer decouples producers from processors with a buffer and uses batch-friendly EMR Serverless for sessionization before bulk-loading to Redshift. Distractor D is tempting because MSK is a valid buffer, but streaming everything into Redshift ignores that clickstream analytics is typically cheaper and more efficient as batch or micro-batch.

    Read the full bite: Design a clickstream pipeline from ingestion to data warehouse

  17. Question 17 of 30

    When plotting a numeric metric across tens of thousands of categories, which strategy best preserves analytical value while respecting visual encoding limits?

    Show the answer

    Answer: a · Aggregate to top-N categories with an 'other' bucket and use density or hierarchy plots

    Aggregating to top-N with an 'other' bucket and using density or hierarchy plots reduces dimensionality without hiding long-tail behavior; rotating or horizontal bar charts merely rearrange the same overloaded marks and fail to solve overplotting.

    Read the full bite: How would you visualize high-cardinality categorical relationships?

  18. Question 18 of 30

    Which finding in an 8-feature pair plot most directly justifies adding an interaction term before modeling?

    Show the answer

    Answer: b · An off-diagonal scatter showing a nonlinear trend that shifts distinctly across hue-separated clusters

    The card's concrete example links a nonlinear, class-dependent off-diagonal boundary directly to engineering an interaction term. A tight cigar suggests dropping redundancy, a skewed diagonal suggests a transform, and a single-panel outlier lacks the cross-panel triangulation the workflow requires.

    Read the full bite: Describe your systematic approach to interpreting an 8-feature pair plot

  19. Question 19 of 30

    During pre-modeling EDA, which finding most strongly indicates systematic sampling bias rather than class imbalance or random noise?

    Show the answer

    Answer: d · A QQ plot against census data shows systematic quantile shifts in age and income

    QQ plots against census benchmarks reveal systematic distortion between the sample and population, which defines sampling bias. Class imbalance is only a label distribution issue, and predicted-probability parity is a post-modeling metric that misses data-level bias before training.

    Read the full bite: How can EDA and visualization identify dataset bias before modeling?

  20. Question 20 of 30

    A fraud model scores ROC-AUC 0.92 and PR-AUC 0.45 on a dataset with one million negatives and one thousand positives. What best explains this divergence?

    Show the answer

    Answer: c · The massive negative majority shrinks the false positive rate, keeping ROC-AUC high, while the same false positives swamp the rare positives and devastate precision.

    ROC-AUC stays high because false positive rate divides by the huge number of negatives, making even thousands of false positives appear negligible; precision divides by predicted positives, so those same false positives dominate the rare positives and collapse PR-AUC. The threshold distractor is wrong because PR-AUC is an area across all thresholds, not a single operating point.

    Read the full bite: High ROC-AUC but low PR-AUC: what does this imply?

  21. Question 21 of 30

    When clustering GPS customer pings to identify irregular commercial corridors surrounded by sparse residential zones, which property most strongly favors DBSCAN over K-Means?

    Show the answer

    Answer: b · DBSCAN discovers arbitrary-shaped density peaks and labels low-density points as noise, whereas K-Means partitions space into K convex, isotropic regions.

    DBSCAN captures irregular commercial corridors and explicitly marks sparse regions as noise, while K-Means forces every point into K spherical Voronoi cells. Distractor B misrepresents K-Means' tendency to place centroids over rivers as outlier handling, when forced assignment actually distorts hotspot boundaries.

    Read the full bite: K-Means vs DBSCAN: which for geospatial hotspots?

  22. Question 22 of 30

    Why might you avoid a tree model's built-in gain or split-count feature importance for stakeholder explanations?

    Show the answer

    Answer: c · It is biased toward high-cardinality or frequently split features

    Impurity- or split-based importance inflates features with many distinct values, giving a distorted ranking. Permutation importance or mean absolute SHAP values provide a less biased global view.

    Read the full bite: Interpreting a black-box gradient boosting model

  23. Question 23 of 30

    Using difference-in-differences with Canada as treatment and Australia as control, what is the most direct way to validate the parallel trends assumption?

    Show the answer

    Answer: a · Plotting pre-launch engagement trends for both countries to confirm they did not diverge

    Examining pre-launch trends directly tests whether the control group is a valid counterfactual by verifying both groups would have evolved similarly absent treatment. A placebo test is a valuable robustness check, but it does not directly assess whether the parallel trends assumption holds; it only checks for spurious effects under a fake treatment date.

    Read the full bite: How would you estimate causal impact using a quasi-experimental method?

  24. Question 24 of 30

    In a sharp RDD evaluating a scholarship for students scoring exactly 700 or above, what is the fundamental reason that the estimated effect at the threshold is considered causally identified?

    Show the answer

    Answer: a · Students just below and above the 700 threshold are assumed to be similar in all relevant characteristics except scholarship receipt.

    The correct answer captures the continuity assumption: units immediately on either side of the cutoff are effectively comparable, so any outcome discontinuity is attributed to the treatment. The most tempting distractor, A, is wrong because RDD is a quasi-experimental design that does not rely on randomization; identification comes from the deterministic rule around the threshold.

    Read the full bite: Explain Regression Discontinuity Design and propose a real-world scenario

  25. Question 25 of 30

    How does UCB direct its exploration differently from epsilon-greedy?

    Show the answer

    Answer: c · It adds an uncertainty bonus that favors actions tried fewer times

    UCB picks the action maximizing its estimate plus a bonus that is large for under-sampled actions, making exploration targeted. Epsilon-greedy, by contrast, explores blindly and uniformly at random.

    Read the full bite: Exploration versus exploitation: epsilon-greedy and UCB

  26. Question 26 of 30

    What is the main representational advantage of multi-head attention over a single attention head?

    Show the answer

    Answer: b · It lets the model attend to different positions and relation types in parallel subspaces

    Splitting into heads over distinct subspaces lets each head specialize in different relationships, which a single averaged head cannot represent at once. It is about representational diversity, not adding layers or removing positional information.

    Read the full bite: Why Transformers use multi-head attention

  27. Question 27 of 30

    Which symptom best characterizes mode collapse in a GAN?

    Show the answer

    Answer: d · The generator outputs only a narrow set of similar samples, lacking diversity

    Mode collapse is low output diversity, the generator covering only a few modes that fool the discriminator. Vanishing gradients and exploding loss are distinct training pathologies, not mode collapse itself.

    Read the full bite: Mode collapse in GANs and how to fix it

  28. Question 28 of 30

    Why is groupByKey more likely to cause an executor OutOfMemoryError than reduceByKey?

    Show the answer

    Answer: d · It buffers all values for a key in memory instead of aggregating incrementally

    groupByKey shuffles and holds every value for a key in memory before processing, so a hot key can exceed executor memory. reduceByKey combines values incrementally on each side, sharply reducing memory pressure.

    Read the full bite: Diagnosing Spark executor OutOfMemoryError

  29. Question 29 of 30

    During a canary rollout, system latency and error rate look perfectly healthy. Why might you still need to roll the new model back?

    Show the answer

    Answer: d · Its prediction quality (e.g., calibration or CTR) may be worse despite healthy infrastructure

    A model can serve fast, error-free responses while making worse predictions, so quality metrics must be watched too. Infrastructure health alone does not prove the model is good, and quality can be compared on the canary slice.

    Read the full bite: Zero-downtime model updates with blue-green or canary

  30. Question 30 of 30

    Which approach reduces inference latency by training a smaller model to imitate a larger, more accurate one?

    Show the answer

    Answer: a · Knowledge distillation

    Distillation trains a compact student to reproduce a large teacher's behavior, cutting latency for a modest accuracy cost. PSI measures drift, blue-green is a rollout strategy, and k-anonymity is a privacy technique, none of which shrink a model.

    Read the full bite: Minimizing model prediction latency end to end

Could you explain these out loud?

That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon