Deutsche Bank Data Science Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Deutsche Bank hiring for Data Science roles
Deutsche Bank is a German global bank with corporate banking, investment banking, private banking and asset management businesses. Its India technology and operations centres in Pune, Bengaluru, Mumbai and Jaipur support global functions. It hires for software engineers, QA engineers, data engineers, business analysts and risk analysts.
For Data Science roles, this Deutsche Bank practice set focuses most on Machine Learning (8), Feature Engineering (5), Generative AI and LLMs (5), A/B Testing & Experimentation (4). It has 4 easy, 32 medium, 4 hard questions, so you can start easy and work up to the harder ones.
Company type
Banking & finance
Headquarters
Frankfurt, Germany
Main India offices
Pune, Bengaluru, Mumbai, Jaipur
Deutsche Bank Data Science interview process
Online assessment (aptitude + coding)
Technical round 1
Technical round 2
Managerial round
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for Deutsche BankStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
✓ 3 questions free • Unlock the rest in seconds
01
What is an Overall Evaluation Criterion (OEC) in experimentation?
An OEC is a single agreed metric, or a weighted combination of metrics, that represents long-term business value and is used to judge experiments. Good OECs are sensitive enough to move within a test's duration yet aligned with long-term goals; for example, sessions per user with penalties for churn rather than raw clicks. Having an OEC prevents teams from each optimising their own metric and makes ship decisions consistent across the organisation.
02
Write Pandas code to read a large CSV in chunks and compute total sales per city.
# process 1 million rows at a time
import pandas as pd
totals = {}
for chunk in pd.read_csv('sales.csv', usecols=['city', 'amount'], chunksize=1_000_000):
part = chunk.groupby('city')['amount'].sum()
for city, amt in part.items():
totals[city] = totals.get(city, 0) + amt
result = pd.Series(totals).sort_values(ascending=False)
03
You must classify support messages into 40 categories, but some categories have only 20 examples. What do you do?
Start with a pretrained sentence embedding model plus a simple classifier, or fine-tune a small transformer with class weights. For the rare categories, try few-shot approaches such as SetFit or an LLM with examples in the prompt, and generate or collect more examples. Merge categories that are rarely distinguishable. Report per-class F1 rather than overall accuracy, and route low-confidence predictions to a human queue.
04
You are building defect detection for a factory line where only 1 in 1,000 images shows a defect. How do you approach it?
With so few defects, a plain classifier will learn to say no defect. Collect every defect image possible and oversample them or use class-weighted or focal loss. Consider anomaly detection trained only on good parts, which flags anything unusual. Use augmentation that mimics real variation in lighting and position. Evaluate with recall at a fixed false alarm rate, since missing a defect usually costs far more than a manual recheck.
05
What is the difference between regression and classification?
Recursive feature elimination trains a model, ranks features by importance or coefficient size, removes the weakest ones, and repeats until the desired number remains. RFECV picks the number of features using cross-validation. It considers features together rather than one at a time. The downsides are high compute cost on large data and unstable results when features are correlated, so check stability across folds.
08
After joining orders with a promotions table, total revenue doubled. What went wrong?
The join created duplicate order rows, because some orders match more than one promotion row, so each amount is counted several times. Check by comparing COUNT(*) with COUNT(DISTINCT order_id) after the join. Fix it by aggregating the promotions table to one row per order first, picking one promotion with ROW_NUMBER, or summing revenue before the join. Always check row counts after every join.
09
Your LLM gives different summaries for the same document on different runs, but auditors need consistent output. What do you do?
Set temperature to zero or near zero and fix other sampling settings, and use a seed where the API supports it, though outputs may still vary slightly. Pin the exact model version. Use a structured output format with fixed fields, and reduce ambiguity in the prompt. Cache and store each generated output with its inputs and version, so the stored result, not a regeneration, is what auditors see.
10
A feature won its A/B test with a 4 percent lift, but after full launch the metric barely moved. Why might that happen?
Several reasons are common. Winner's curse: significant results from underpowered tests tend to overestimate the true effect. Novelty effect faded after launch. Seasonality or other launches changed the baseline, so a before-after comparison is misleading. The test population may differ from all users, for example only one platform. Use a holdout after launch to measure real impact, and run tests with adequate power and duration.
11
What is the difference between a star schema and a snowflake schema?
A star schema has a central fact table, like sales with amounts and foreign keys, surrounded by denormalised dimension tables such as product, customer and date. A snowflake schema normalises dimensions further, for example product links to a separate category table. Star schemas need fewer joins and are faster and simpler for analysts. Snowflake schemas save storage and reduce duplication but make queries more complex.
ARIMA models a time series using three parts. AR, autoregressive, uses past values of the series. I, integrated, differences the series d times to remove trend and make it stationary. MA, moving average, uses past forecast errors. You choose p, d and q using ACF and PACF plots or information criteria like AIC. SARIMA adds seasonal terms. ARIMA works well for single, fairly stable series but struggles with many external drivers.
13
What is non-maximum suppression in object detection?
A detector usually predicts many overlapping boxes for the same object. Non-maximum suppression keeps the box with the highest confidence, removes other boxes of the same class whose IoU with it exceeds a threshold such as 0.5, and repeats with the remaining boxes. A threshold that is too low can delete genuinely nearby objects in crowded scenes, so variants like soft-NMS lower scores instead of removing boxes.
14
Write Pandas code to create lag and rolling features for each customer.
df = df.sort_values(['customer_id', 'month'])
g = df.groupby('customer_id')['spend']
df['spend_lag1'] = g.shift(1)
df['spend_lag3'] = g.shift(3)
# shift first so the current month is not included
df['spend_roll3_mean'] = g.transform(lambda s: s.shift(1).rolling(3).mean())
15
Write Python code to run an ADF stationarity test and difference the series if needed.
from statsmodels.tsa.stattools import adfuller
def is_stationary(s, alpha=0.05):
p_value = adfuller(s.dropna())[1]
return p_value < alpha
series = s.copy()
d = 0
while not is_stationary(series) and d < 2:
series = series.diff()
d += 1
print('differencing order d =', d)
Use stratified splits, class weights, resampling such as SMOTE, threshold tuning and judge models with precision, recall, F1 or PR-AUC instead of accuracy.
17
How do you pull large data from a SQL database into Pandas efficiently?
Push as much work as possible into SQL: filter, aggregate and select only needed columns before pulling. Use pd.read_sql with a SQLAlchemy engine and chunksize to stream large results. For very large extracts, export to Parquet from the warehouse and read that, which is much faster than row-by-row transfer. Set dtypes like category early, and never use SELECT star on a big table from a notebook.
18
Halfway through a test you discover a bug that broke the treatment for Android users. What do you do?
Stop or pause the affected part, fix the bug and restart the test with fresh data, since mixing broken and fixed periods biases results. Do not simply drop Android users from analysis afterwards, because that can break randomisation balance if the bug affected behaviour or logging. Document the incident, and add pre-launch checks such as running the variant through QA on every platform and monitoring guardrails in the first hours.
19
Your random forest is accurate but too slow at prediction time for a real-time API. What do you do?
First measure where the time goes. Then reduce trees and maximum depth and check the accuracy loss. Switch to a gradient boosting model, which often needs fewer, smaller trees. Compile the model with tools like ONNX Runtime or Treelite. Cache features or precompute scores for known users. If accuracy allows, a simpler logistic regression may meet the latency budget easily. Always compare options on the same validation set.
20
Your product image classifier works on studio catalogue photos but fails on photos users take with their phones. Why, and what do you do?
This is domain shift: user photos have clutter, blur, poor lighting and odd angles that the model never saw. Collect and label a sample of real user photos and evaluate on them separately. Add augmentation for blur, noise, colour jitter, rotation and random crops, and fine-tune on a mix of studio and real images. Monitor accuracy on user photos in production, since that is the distribution that matters.
21
What is the difference between hard voting and soft voting in ensembles?
In hard voting each model predicts a class and the majority wins. In soft voting each model gives class probabilities, they are averaged, and the class with the highest average wins. Soft voting usually works better because it uses each model's confidence, but it needs calibrated probabilities from all models. Hard voting is simpler and works even with models that only output labels.
22
What is Bayesian A/B testing and how are its results reported?
Bayesian A/B testing starts with a prior on each variant's metric, updates it with observed data and produces a posterior distribution. Instead of a p-value, you report things like the probability that treatment beats control, say 94 percent, and the expected loss if you choose the wrong variant. Business teams find this easier to interpret. Priors must be chosen sensibly, and continuous monitoring still needs discipline about decision rules.
23
Write SQL to find the second highest salary in an employees table.
SELECT MAX(salary) AS second_highest
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);
-- alternative with window function
SELECT DISTINCT salary
FROM (SELECT salary, DENSE_RANK() OVER (ORDER BY salary DESC) AS rnk
FROM employees) t
WHERE rnk = 2;
24
What are interaction features and when do they help?
Interaction features combine two or more variables, such as price times quantity, or income divided by number of dependents. They help linear models capture effects where one variable changes the impact of another. Tree models can learn some interactions themselves, but explicit ratios often still help. Too many automatic interactions explode the feature count and overfit, so build them from domain logic and validate each one.
25
What is the difference between generative and discriminative models?
Discriminative models learn P(y given x) directly (logistic regression, SVM). Generative models learn the joint P(x, y) and can generate data (Naive Bayes, GANs).
26
What are hybrid search and reranking in retrieval systems?
Hybrid search combines keyword search, like BM25, with vector search. Keywords catch exact matches such as product codes and names, while vectors catch meaning and paraphrases. Results are merged, often with reciprocal rank fusion. Reranking then takes the top 20 to 50 candidates and scores each one against the query with a cross-encoder model, which is slower but more accurate. Together they usually improve RAG answer quality noticeably.
27
After one-hot encoding you have 2,000 features and training is slow. What do you do?
Find which columns caused the explosion, usually a few high-cardinality categoricals. Group rare categories into Other, or switch those columns to frequency, target or hashing encoding. Use sparse matrices so zeros take no memory. Tree libraries like LightGBM and CatBoost can handle categoricals natively without one-hot. Then remove near-constant columns and check that validation scores hold up with the smaller feature set.
It applies Bayes' theorem assuming features are independent given the class. The assumption is rarely true but the model is fast and works well for text.
First check retrieval on its own with a labelled set of questions, since generation cannot fix bad context. Then improve chunking so passages are self-contained, add metadata filters such as product or date, try a better embedding model, and add hybrid search with keywords. A reranker on the top 20 results often helps most. Also rewrite vague user questions into clearer search queries before retrieval.
31
What is chunking in RAG and how do you choose a chunk size?
Chunking splits documents into smaller pieces before embedding them, so retrieval returns focused passages that fit in the prompt. Small chunks, like 200 tokens, are precise but lose context; large chunks, like 1,000 tokens, keep context but add noise and cost. Split on natural boundaries such as headings and paragraphs, add some overlap, and keep metadata like title and section. Then tune chunk size using retrieval metrics on real questions.
A large language model is a neural network, usually a decoder-only transformer, trained on huge amounts of text to predict the next token. With billions of parameters and further instruction tuning, it can answer questions, summarise, write code and follow instructions. It does not look up facts; it generates likely text based on patterns learned in training, so it can be fluent but wrong. Data scientists use LLMs through APIs or open-weight models.
33
What should you log for a production prediction service?
For each request, log a request ID, timestamp, model version, input features or a hash of them, the prediction and score, and latency. Log errors and fallback use separately. Do not log raw personal data unless needed and allowed; mask it. Aggregate these logs into dashboards for traffic, latency percentiles, error rate and score distribution. Joining logged predictions with later outcomes gives the data for monitoring and retraining.
34
What is SARIMA and how does it extend a plain ARIMA model?
SARIMA adds seasonal terms to ARIMA. It is written ARIMA(p,d,q)(P,D,Q)m, where the second set are seasonal AR, differencing and MA orders, and m is the season length, such as 7 for daily data with a weekly cycle or 12 for monthly data. SARIMAX further allows external regressors like price or holidays. It handles one seasonal period well but struggles with multiple seasonalities, such as daily plus yearly.
35
You target-encoded a city column and validation AUC jumped from 0.72 to 0.95. What do you suspect?
Target encoding replaces each category with the average target value for that category, for example the churn rate per city. It handles high-cardinality columns compactly. The main risk is leakage: if a row's own target is included in its encoding, the model sees the answer and overfits. Prevent it with out-of-fold encoding, smoothing toward the global mean for rare categories, and fitting only on training data.
Bias occurs when the sample does not represent the population. Reduce it with random or stratified sampling, higher response rates and by checking sample demographics against the population.
37
How do you use groupby with multiple aggregations?
Accuracy, F1 and confusion matrices for classification, BLEU or ROUGE for generation and summarisation, perplexity for language models, plus human review.
39
Your sales forecast scores well in k-fold cross-validation but fails in production. What could be wrong with the validation?
Random k-fold mixes future and past rows, so the model trains on data from after the period it predicts. That leaks information and inflates scores. Use time-based splits instead: train on an expanding or rolling window and validate on the next period, like TimeSeriesSplit in scikit-learn. Leave a gap between train and validation when features use lagged values, so the test reflects real forecasting conditions.
pd.pivot_table(df, index='region', columns='month', values='sales', aggfunc='sum') reshapes long data into a summary matrix; melt() does the reverse.
Tips to crack the Deutsche Bank Data Science interview
Revise Java, SQL and OOP, which appear commonly in Deutsche Bank technology interviews.
Learn the trade lifecycle and basics of foreign exchange and fixed income for domain questions.
Read about Deutsche Bank's focus on cloud transformation and its partnership with Google Cloud.
Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
Practise the hard questions on this page aloud; Deutsche Bank interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Deutsche Bank Data Science interview?
Candidates usually go through 5 stages: Online assessment (aptitude + coding); Technical round 1; Technical round 2; Managerial round; HR round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.
Which topics should I prepare for the Deutsche Bank Data Science interview?
This practice set leans on Machine Learning (8), Feature Engineering (5), Generative AI and LLMs (5), A/B Testing & Experimentation (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Deutsche Bank interviewers ask you to walk through real work.
Are these the exact questions asked at Deutsche Bank?
No. These are curated practice questions that match the skills and difficulty usually tested in banking & finance interviews like Deutsche Bank's. They are not a leaked or verified list of past questions.
Where does Deutsche Bank hire Data Science professionals in India?
Deutsche Bank has large teams in Pune, Bengaluru, Mumbai, Jaipur. Openings and locations change often, so check the Deutsche Bank careers page and filter by city and experience.