Data science
105 bites tagged Data science: interview questions with model answers, and 60-second explainers.
Test yourself: Top 30 Data science interview questions →Multiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.Explain Regression Discontinuity Design and propose a real-world scenario
Compare units just above and below a threshold for local effects; propose scenario with forcing variable.
How do you determine required sample size for an A/B test?
Tests statistical power and experimental design. Name four inputs: baseline conversion rate, minimum detectable effect, alpha (5%), and power (80%), then solve for N. Red flag: "test until significant" or fixed guesses like 1000 users without effect size.
How can EDA and visualization identify dataset bias before modeling?
Tests operationalizing bias detection before modeling. Strong answers compare sample distributions to population norms, audit feature coverage with heatmaps, and track missingness by subgroup. Red flag: citing only class imbalance or ignoring sampling frame.
Describe your systematic approach to interpreting an 8-feature pair plot
Check 8 diagonals for skew; scan 28 off-diagonals for nonlinear trends, variance patterns, and hue clusters; flag redundancy; spot outliers.
Explain correlation vs causation and heatmap limitations in EDA
Tests whether you distinguish association from causal mechanism. A strong answer defines both, shows heatmaps spot multicollinearity in EDA, and warns that color ignores confounders and non-linear links. Red flag: claiming high correlation proves causation.
How do you determine sample size for a conversion lift experiment?
Tests fluency with statistical experiment design. A strong answer frames N as a function of alpha, power, baseline rate, and MDE, noting that shrinking the MDE or raising power inflates N. Red flag: picking N from traffic instead of risk tolerance.
What is a p-value? Interpret p = 0.03 at alpha = 0.05.
Tests frequentist testing and p-value misinterpretations. Define p-value as the probability of data this extreme under the null; since 0.03 < 0.05, reject the null at 5%. Never say it is the probability the null is false or the result is due to chance.
How would you build and validate a proxy target for employee burnout?
Combine survey scales with behavioral signals such as off-hours logins and PTO drops; validate via convergent and predictive validity against attrition.
Explain time series stationarity and how to achieve it
Tests your grasp of core time series assumptions. Define stationarity (constant mean/variance over time), explain why models need it for stable predictions, and name methods to test and achieve it. A red flag is just saying the data looks 'flat'.
How would you handle 10% null values in a key column?
This tests your understanding of data cleaning trade-offs. First, investigate the cause of nulls. Then, discuss simple imputation (mean/median) vs. discarding rows, weighing pros and cons. A red flag is jumping to a solution without asking about the data.
Train-test split vs. time-series cross-validation?
Tests if you see why temporal data breaks random splits. Contrast random sampling with sequential 'walk-forward' validation, where you only use past data to predict the future.
How does CUPED increase the statistical power of an experiment?
Tests your grasp of variance reduction. Explain CUPED as ANCOVA, using pre-experiment data (X) to remove predictable noise from the outcome (Y). Effectiveness depends on correlation (rho), reducing variance by (1-rho^2).
P-Value: Gauging Surprise, Not Certainty
A p-value measures surprise: it's the probability of seeing your results by chance, assuming your change had no effect. It's used in A/B testing to decide if an effect is noise or significant. A small p-value doesn't prove your hypothesis is true.
ML Threat Modeling: Assume Your Data Is Compromised
Threat modeling for ML means assuming your training data is already compromised. This is crucial for services using public or user-supplied datasets. The main footgun is trusting data sources, as data poisoning can silently corrupt your model's behavior.
Data Drift vs. Concept Drift: When Models Go Stale
Your ML model's accuracy decays when the real world no longer matches its training data. This is drift. It happens when user behavior changes (concept drift) or input data distributions shift (data drift).
Survival Analysis: Predicting When, Not Just If
Survival analysis predicts *when* an event like user churn will happen, not just *if*. It's used to model customer lifetime or hardware failure rates. The key mistake is using simple averages, which are skewed by users who haven't churned yet (censored data).
Prophet: Time Series Forecasting for Seasonal Data
Prophet treats a time series as a sum of its parts: a long-term trend, seasonal cycles, and holidays. It's used for business forecasting, like predicting sales, when you have strong seasonal data. The footgun is using it for non-seasonal data.
Bonferroni Correction: Raising the Bar for Significance
The Bonferroni correction prevents finding false positives when running many tests by making your significance threshold stricter for each one. It's used in A/B tests with multiple variants.
Chi-Squared Test: Are These Two Things Related?
A Chi-Squared test detects 'surprising' differences between what you observe and what you'd expect. It's used to check if two categorical variables, like a landing page variant and a user's sign-up action, are independent or related.
Null Hypothesis: Assume No Effect Until Proven Otherwise
The null hypothesis is your default assumption: nothing changed. You run experiments to gather enough evidence to reject this default. In A/B testing, the null is that your new feature has no effect, while the alternative is that it does.
The Big Idea: Your Presentation's Single-Sentence Core
The "Big Idea" is a single sentence distilling your presentation's core message. It must state your point of view and what's at stake, telling your audience what to know and what to do.
Data Sonification: Hearing Your Data's Story
Data sonification is data visualization for your ears, mapping data points to sound properties like pitch or volume. It helps find patterns in complex datasets, like network traffic, where visuals fail.
Log Transformation: Taming Skewed Data for Better Models
A log transform tames skewed data by compressing large values and spreading out small ones. It's used on data like income or web traffic to help it meet the assumptions of linear models. The footgun: it fails on zero or negative values.
Missing Data Imputation: Filling in the Blanks
Instead of deleting rows with missing values, imputation makes an educated guess to fill the blanks, preserving your sample size. It's used in survey analysis or time-series data where dropping records would introduce bias.
Get Data science bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
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.