InterviewRole

Data Scientist Interview Questions

A path for statistics, experimentation, Python, machine learning, and product thinking.

Questions

What is statistical significance?medium

Answer

It means the observed result is unlikely under the null hypothesis.

Explanation

Interviewers expect you to separate p-value, confidence, sample size, effect size, and practical business importance.

Follow-upCan a result be significant but not useful?

How do you explain confidence intervals?medium

Answer

They show a plausible range for an estimated value.

Explanation

A good explanation avoids saying there is a fixed probability the true value is inside one computed interval; instead, describe repeated sampling behavior.

Follow-upHow does sample size affect the interval?

What is sampling bias?medium

Answer

It happens when sampled data does not represent the target population.

Explanation

Bias can come from selection, survivorship, non-response, instrumentation, or product exposure differences.

Follow-upHow would you reduce bias in an experiment?

How do you write maintainable Python?medium

Answer

Use simple functions, clear names, tests, typing where useful, and small modules.

Explanation

Interviewers look for readability, error handling, separation of concerns, and code that another engineer can change safely.

Follow-upWhen would you add type hints?

What are generators useful for?medium

Answer

They produce values lazily without building a full list.

Explanation

Generators are useful for streams, large files, and pipelines where memory efficiency matters.

Follow-upHow is yield different from return?

How do you handle errors in Python?medium

Answer

Catch specific exceptions and keep recovery close to the failure.

Explanation

Avoid broad except blocks unless re-raising or adding context. Good error handling makes failure modes explicit.

Follow-upWhen should you create a custom exception?

How do you start an ML problem?medium

Answer

Define the objective, metric, baseline, data, and deployment constraints.

Explanation

A strong answer checks whether ML is needed, creates a simple baseline, and validates data quality before model complexity.

Follow-upWhen would rules beat ML?

What is overfitting?medium

Answer

A model learns training noise and fails to generalize.

Explanation

Mention train-validation gaps, regularization, simpler models, more data, cross-validation, and leakage checks.

Follow-upHow do you detect leakage?

How do you choose an evaluation metric?medium

Answer

Match the metric to the business cost of errors.

Explanation

Accuracy may fail for imbalance. Consider precision, recall, F1, ROC-AUC, PR-AUC, calibration, or ranking metrics.

Follow-upWhen is recall more important than precision?

How do you design an A/B test?medium

Answer

Define hypothesis, primary metric, guardrails, sample size, and rollout plan.

Explanation

Good answers include randomization, power, duration, segmentation, novelty effects, and decision criteria.

Follow-upWhat can invalidate an experiment?

What are guardrail metrics?medium

Answer

Metrics that protect user or business health while optimizing the primary goal.

Explanation

Examples include latency, churn, complaint rate, revenue, or quality metrics that should not degrade.

Follow-upCan a test win and still not ship?

How do you interpret conflicting metrics?medium

Answer

Prioritize the decision framework and investigate segment-level tradeoffs.

Explanation

Conflicts often reveal heterogeneous effects, measurement issues, or a product tradeoff that needs stakeholder alignment.

Follow-upHow would you present the decision?

How do you define activation?medium

Answer

Activation is the user action that predicts long-term value.

Explanation

It should be measurable, early in the journey, and validated against retention or business outcomes.

Follow-upHow would you find the activation event?

What is cohort analysis?medium

Answer

It compares groups that share a starting event or period.

Explanation

Cohorts help separate user aging, seasonality, acquisition quality, and product changes.

Follow-upHow do retention curves help?

How do you measure feature success?medium

Answer

Tie usage, outcome, and guardrail metrics to the feature goal.

Explanation

Avoid measuring clicks alone. Look for behavior change, user value, quality, and unintended consequences.

Follow-upWhat if adoption is high but retention drops?
Back to Home