Data Science Interview Questions and Answers 2026

A data science interview is several interviews in one: statistics, machine learning, coding, product sense and a take-home. This guide maps each round with model answers, then works a churn take-home on real telecom data, including the checks that separate a strong submission from a high score.

GloryTecks Team

Training & Placement Faculty

28 May 2026 7 min read

Last updated: 9 October 2026

Share:

Data science interview questions span more ground than any other data role: probability puzzles, statistics, machine learning theory, coding, product judgement and usually a take-home project. This guide maps the rounds, gives a representative question and the answer interviewers look for in each, then works a full churn take-home on real data, because the take-home is where judgement shows.

The rounds and model answers

Statistics and probability. "Weekend users convert better; is it real?" A strong answer gives the difference with an interval, checks for confounders such as month mix, and counts how many comparisons were made. Both rounds are worked on real data in statistics interview questions and probability interview questions.

Machine learning concepts. "Your model is 78% accurate. Is that good?" Only against a baseline: if 78% of cases are negative, it may have learned nothing. Expect overfitting, regularisation, thresholds and calibration; see machine learning interview questions.

Features and data. "This feature doubled your AUC. What do you do?" Ask when its value becomes known, before celebrating. See feature engineering interview questions; for forecasting roles, time series interview questions.

Coding. SQL and Python, usually pandas plus one algorithmic task, as in Python coding interview patterns.

Product sense. "How would you measure whether a new recommendation feature works?" Define a primary metric tied to the goal, guardrail metrics, the experiment design and the sample size, and say what result would make you stop.

Behavioural. "Tell me about a model that did not work." Interviewers want a specific project, what you expected, what the data showed, what you changed and what you learned. A failure explained well is worth more than a success described vaguely.

Take-home. A dataset, a question, a deadline and a presentation, worked below.

A take-home, worked: who will churn?

The data is UCI's Iranian Churn set: 3,150 telecom customers, with usage over nine months and whether each customer had churned three months later, a gap the dataset documents as a planning window (UCI: Iranian Churn). The brief: build a model that helps a retention team decide whom to contact.

python
import numpy as np
import pandas as pd
from sklearn.ensemble import HistGradientBoostingClassifier
from sklearn.inspection import permutation_importance
from sklearn.metrics import roc_auc_score
from sklearn.model_selection import StratifiedKFold, cross_val_score, train_test_split

d = pd.read_csv("Customer Churn.csv")                          # UCI Iranian Churn: 9 months of usage, churn 3 months later
d.columns = [" ".join(c.split()) for c in d.columns]           # the file has double spaces in some names
y, X = d.pop("Churn"), d
print(f"1. {len(d):,} customers, {y.mean():.1%} churned, {d.duplicated().sum()} rows exactly duplicate another's features")
conflicts = d.assign(Churn=y).groupby(list(d.columns))["Churn"].nunique().gt(1).sum()
print(f"   feature patterns that appear with both labels: {conflicts}")

rule = X["Complains"].eq(1)
print(f"\n2. Baseline rule 'complained -> will churn': flags {rule.mean():.1%}, "
      f"precision {y[rule].mean():.1%}, catches {rule[y == 1].mean():.1%} of churners")

model = HistGradientBoostingClassifier(random_state=0)
folds = StratifiedKFold(5, shuffle=True, random_state=0)
raw = cross_val_score(model, X, y, cv=folds, scoring="roc_auc")
unique = ~X.assign(Churn=y).duplicated(keep="first")
dedup = cross_val_score(model, X[unique], y[unique], cv=folds, scoring="roc_auc")
print(f"\n3. Gradient boosting, 5-fold AUC: with duplicates {raw.mean():.3f} | duplicates removed first {dedup.mean():.3f}")
single = {c: max(roc_auc_score(y, X[c]), 1 - roc_auc_score(y, X[c])) for c in X.columns}
print("   too good to be true? best single-feature AUCs:", {k: round(v, 3) for k, v in sorted(single.items(), key=lambda kv: -kv[1])[:3]})

Xu, yu = X[unique], y[unique]
X_train, X_test, y_train, y_test = train_test_split(Xu, yu, test_size=0.3, stratify=yu, random_state=0)
fit = model.fit(X_train, y_train)
score = fit.predict_proba(X_test)[:, 1]
print(f"\n4. Held-out AUC {roc_auc_score(y_test, score):.3f}; retention budget covers the top 10% by risk:")
top = score >= np.quantile(score, 0.9)
print(f"   {top.sum()} customers flagged, {y_test[top].mean():.1%} of them churn, "
      f"capturing {y_test[top].sum() / y_test.sum():.1%} of all churners (base rate {y_test.mean():.1%})")

imp = permutation_importance(fit, X_test, y_test, scoring="roc_auc", n_repeats=10, random_state=0)
ranked = pd.Series(imp.importances_mean, X.columns).sort_values(ascending=False)
print("\n5. Permutation importance on held-out data (AUC lost), top 4:", ranked.head(4).round(3).to_dict())
text
1. 3,150 customers, 15.7% churned, 314 rows exactly duplicate another's features
   feature patterns that appear with both labels: 14

2. Baseline rule 'complained -> will churn': flags 7.7%, precision 83.0%, catches 40.4% of churners

3. Gradient boosting, 5-fold AUC: with duplicates 0.987 | duplicates removed first 0.989
   too good to be true? best single-feature AUCs: {'Status': 0.796, 'Seconds of Use': 0.791, 'Customer Value': 0.786}

4. Held-out AUC 0.991; retention budget covers the top 10% by risk:
   86 customers flagged, 97.7% of them churn, capturing 62.7% of all churners (base rate 15.7%)

5. Permutation importance on held-out data (AUC lost), top 4: {'Frequency of use': 0.045, 'Complains': 0.039, 'Call Failure': 0.034, 'Seconds of Use': 0.033}

What the strong submission points out

The data has duplicates, some contradictory. 314 rows repeat another row's features exactly, and 14 feature patterns appear with both "churned" and "stayed". Duplicates can leak between cross-validation folds and inflate scores; here, removing them first left the AUC essentially unchanged, 0.989 against 0.987. Reporting that you checked, and that it did not matter, is still part of a strong answer.

A simple rule is a serious baseline. "Customers who complained will churn" flagged 7.7% of customers with 83.0% precision and caught 40.4% of churners. Any model has to beat that, and the rule is easy to explain to the retention team.

A very high score is a reason to check for leakage. The model reached a held-out AUC of 0.991. Before trusting it, check whether any one feature carries the answer by itself, the signature of leakage (scikit-learn: common pitfalls). None did: the best single feature, a status flag, reached 0.796. Together with the documented three-month gap between features and label, that makes leakage less likely, though not impossible. Say so in exactly those terms.

Translate the score into the team's decision. If the team can contact 10% of customers, the model's top decile, 86 customers in the test set, contained 97.7% churners and captured 62.7% of all churners, against a 15.7% base rate. That is the sentence the business remembers.

Explain with held-out importance. Permutation importance on the test set ranked frequency of use, complaints, call failures and seconds of use highest (scikit-learn: permutation importance). Low and falling usage plus service problems: a story the retention team can act on, for example by fixing call failures before offering discounts.

State the limits. One company, one year, anonymised features and a model that predicts churn rather than who can be saved. The next step is an experiment: contact a random half of the top decile and measure how many churn compared with the other half.

How to prepare

Spend the first weeks on statistics and SQL, which nearly every process tests, then machine learning concepts with your own small experiments, so that each answer comes with a number you produced. Finish with two complete take-homes on public datasets, presented aloud in fifteen minutes. Keep a list of the questions you could not answer and close one gap each day.

Mistakes that cost offers

  • Reporting AUC without a baseline or a business translation.
  • Not checking duplicates and leakage when scores look excellent.
  • Explaining with training-set importance, which rewards memorisation.
  • Confusing prediction with intervention: a high-risk customer is not necessarily persuadable.

What are the most common data science interview questions?

Probability and statistics questions, machine learning concepts such as overfitting and evaluation metrics, feature engineering and leakage, SQL and Python coding, product and experiment design, and a take-home or case study.

How do I prepare for a data science take-home?

Profile the data first, set a simple baseline, validate honestly, check for leakage when results look too good, translate the metric into the decision the business faces, and state the limits and next steps.

What is a good AUC for a churn model?

It depends on the data and the baseline. Compare with a simple rule and report what the model achieves at the capacity the business has, such as precision and churners captured in the top 10%.

Do I need deep learning for data science interviews?

For most generalist roles, no. Statistics, classical machine learning, SQL and clear communication matter more; deep learning is expected for roles that name it.

These skills are taught end to end in the Data Science course.

Sources

GloryTecks Team

Training & Placement Faculty

The GloryTecks faculty team mentors learners across Data Science, AI and Data Engineering, with a focus on real-time projects and placement readiness in Hyderabad.

Want to master Interview Questions?

Join GloryTecks’ expert-led Data Science training in Hyderabad with real-time projects and 100% placement support.

Explore course