Skip to content

IBM Data Science Interview Questions & Answers

Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.

About IBM hiring for Data Science roles

IBM is a global technology company offering hybrid cloud, AI through watsonx, software such as Red Hat, infrastructure and IBM Consulting services. Its India Software Labs and IBM Consulting teams form one of its largest workforces outside the US. It hires in India for software developers, test engineers, data engineers, data scientists and consultants.

For Data Science roles, this IBM practice set focuses most on Python for Data Science (8), Deep Learning and NLP (6), SQL for Data Science (5), Feature Engineering (5). It has 16 easy, 23 medium, 1 hard questions, so you can start easy and work up to the harder ones.

Company type
IT services
Headquarters
Armonk, New York, USA
Main India offices
Bengaluru, Pune, Hyderabad, Kolkata, Gurugram

IBM Data Science interview process

  1. Online assessment (cognitive games + coding)
  2. English language test
  3. Technical interview
  4. Managerial or HR round

Typical pattern based on public candidate experiences. Rounds vary by role, team and year.

Solved for IBMStart 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 the difference between a star schema and a snowflake schema?

Save to ▾
Show answer
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.
02

How do you handle rare categories in a categorical feature?

Save to ▾
Show answer
Categories that appear only a few times give unreliable signals and create many sparse columns. A common fix is to group all categories below a frequency threshold, like 1 percent, into an Other bucket. You can also use frequency encoding or smoothed target encoding. Make sure the encoder handles unseen categories at prediction time, for example with handle_unknown set to ignore.
03

What is SARIMA and how does it extend a plain ARIMA model?

Save to ▾
Show answer
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.
04

Tell me about a time an experiment result changed a product decision.

Save to ▾
Show answer
Situation: the team was confident a redesigned home page would increase orders. Task: I owned the experiment design and analysis. Action: I set conversion as primary and session length and refunds as guardrails, ran it for two full weeks and found no lift in orders but a drop for older app versions. Result: we fixed the performance issue, retested, and shipped a version that raised orders by about 1.5 percent.
05

What is an A/A test and why would you run one?

Save to ▾
Show answer
In an A/A test both groups get the identical experience. Since there is no real difference, results should be significant only about 5 percent of the time at alpha 0.05. Running A/A tests validates your experimentation platform: it catches broken randomisation, logging bugs, sample ratio problems and metrics whose variance is wrongly estimated. Teams often run them when launching a new platform or a new metric.
06

What are primary metrics and guardrail metrics in an experiment?

Save to ▾
Show answer
The primary metric is the one the change is meant to improve and that decides success, such as checkout conversion. Guardrail metrics are ones that must not get worse, such as page load time, refund rate, unsubscribes or revenue per user. Defining both before the test prevents cherry-picking afterwards. A change that lifts the primary metric but breaks a guardrail is usually not shipped without further discussion.
07

What are Python's main built-in data types?

Save to ▾
Show answer
int, float, complex, bool, str, list, tuple, set, dict and NoneType. Mutable ones are list, set and dict; the others are immutable.
08

How do you profile and speed up slow Python code?

Save to ▾
Show answer
Measure first with cProfile or timeit, then replace loops with NumPy or Pandas vectorised calls, use built-ins, caching and better data structures.
09

What are dataclasses in Python and why are they useful in data projects?

Save to ▾
Show answer
A dataclass, created with the @dataclass decorator, automatically generates __init__, __repr__ and __eq__ from annotated fields. It is a clean way to hold structured records such as a training config with learning rate, batch size and paths. Options like frozen=True make instances immutable, and default values reduce boilerplate. Compared with plain dictionaries, dataclasses give attribute access, type hints and clearer errors when a field is misspelled.
10

Pandas: find customers whose monthly spend increased for three consecutive months.

Save to ▾
Show answer
m = (df.assign(month=df['date'].dt.to_period('M')) .groupby(['customer_id', 'month'])['amount'].sum() .reset_index() .sort_values(['customer_id', 'month'])) m['up'] = (m.groupby('customer_id')['amount'].diff() > 0).astype(int) # three rises in a row = three consecutive increases m['streak'] = (m.groupby('customer_id')['up'] .rolling(3).sum().reset_index(level=0, drop=True)) result = m.loc[m['streak'] == 3, 'customer_id'].unique()
11

Write SQL to find the second highest salary in an employees table.

Save to ▾
Show answer
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;
12

In production your model receives category values, like a new payment method, that never appeared in training. What happens and how do you handle it?

Save to ▾
Show answer
Depending on the encoder, the pipeline may crash or silently map the value to all zeros. Plan for it: use OneHotEncoder with handle_unknown='ignore' or map unseen values to an explicit 'other' bucket that also exists in training for rare values. Log and monitor the rate of unknown categories, since a rising rate signals data drift, and retrain when new categories become common.
13

A deep network you built from scratch does not learn at all; the loss stays flat from the first epoch. Could weight initialisation be the reason?

Save to ▾
Show answer
If weights start too large, activations and gradients explode; if too small, they vanish, and training stalls. If all weights are equal, every neuron learns the same thing. Good schemes keep the variance of activations stable across layers: Xavier or Glorot initialisation for tanh and sigmoid, and He initialisation for ReLU. Frameworks use sensible defaults, but it matters when building custom layers or very deep networks.
14

Write SQL to find users who logged in on at least three consecutive days.

Save to ▾
Show answer
WITH d AS ( SELECT DISTINCT user_id, CAST(login_at AS DATE) AS day FROM logins ), g AS ( SELECT user_id, day, day - CAST(ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY day) AS INT) AS grp FROM d ) SELECT DISTINCT user_id FROM g GROUP BY user_id, grp HAVING COUNT(*) >= 3; -- date minus row number is constant within a streak (PostgreSQL syntax)
15

What is U-Net and why is it popular for segmentation?

Save to ▾
Show answer
U-Net is an encoder-decoder network. The encoder downsamples to capture context, and the decoder upsamples back to full resolution to produce a per-pixel mask. Skip connections copy encoder feature maps to the matching decoder level, so fine spatial detail lost during downsampling is recovered. It works well with limited labelled data, which made it the standard for medical imaging and industrial defect segmentation, and it is also the backbone of many diffusion models.
16

You target-encoded a city column and validation AUC jumped from 0.72 to 0.95. What do you suspect?

Save to ▾
Show answer
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.
17

Pandas: compute a 7-day rolling average of daily sales for each store.

Save to ▾
Show answer
# df has columns: store, date, sales df['date'] = pd.to_datetime(df['date']) df = df.sort_values(['store', 'date']) df['sales_7d_avg'] = ( df.groupby('store')['sales'] .transform(lambda s: s.rolling(7, min_periods=1).mean()) )
18

Write Pandas code to create useful features from a datetime column.

Save to ▾
Show answer
df['ts'] = pd.to_datetime(df['ts']) df['hour'] = df['ts'].dt.hour df['dayofweek'] = df['ts'].dt.dayofweek df['is_weekend'] = df['dayofweek'].isin([5, 6]).astype(int) df['month'] = df['ts'].dt.month df['days_since_signup'] = (df['ts'] - df['signup_date']).dt.days
19

Write SQL to find customers who ordered in January 2026 but not in February 2026.

Save to ▾
Show answer
SELECT DISTINCT o.customer_id FROM orders o WHERE o.order_date >= '2026-01-01' AND o.order_date < '2026-02-01' AND NOT EXISTS ( SELECT 1 FROM orders f WHERE f.customer_id = o.customer_id AND f.order_date >= '2026-02-01' AND f.order_date < '2026-03-01' );
20

What is MAPE and when is it a poor metric for forecast accuracy?

Save to ▾
Show answer
MAPE is the mean of absolute errors divided by actual values, expressed as a percentage. It is easy to explain to business teams, but it breaks when actuals are zero or near zero, because the percentage explodes. It also penalises over-forecasts more than under-forecasts and weights small items heavily. For intermittent or low-volume series prefer MAE, weighted MAPE or MASE, which compares error to a naive baseline.
21

What is the difference between apply, map and applymap in Pandas?

Save to ▾
Show answer
map works element-wise on a Series, apply works on a Series or along a DataFrame axis, and applymap (now DataFrame.map) applies a function to every cell.
22

Write a Dockerfile for a Python model API.

Save to ▾
Show answer
FROM python:3.11-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app/ ./app COPY model.joblib . EXPOSE 8000 CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
23

How do you choose a learning rate for a neural network?

Save to ▾
Show answer
Start with a sensible default such as 1e-3 for Adam, run a learning-rate range test, and use schedulers or warm-up while watching the loss curve.
24

How do you work with domain experts to find good features?

Save to ▾
Show answer
Situation: on an insurance claims model, my first features gave average results. Task: improve fraud detection. Action: I sat with two claim investigators for a day and asked what made them suspicious. They mentioned claims filed soon after policy start and repeated garage names. I turned these into features and checked them with the team. Result: recall at the same precision rose by 12 points. Experts often know signals the data hides.
25

What is NumPy broadcasting?

Save to ▾
Show answer
The rule that lets arrays of different shapes operate together by virtually stretching the smaller one, for example adding a scalar or a (3,) vector to a (4,3) matrix.
26

What is the difference between an epoch, a batch and an iteration?

Save to ▾
Show answer
An epoch is one pass over the training data; a batch is the subset used for one update; an iteration is one weight update on a batch.
27

How do you check whether a variable is normally distributed?

Save to ▾
Show answer
Start visually with a histogram and a Q-Q plot; points close to the straight line suggest normality. Check skewness and kurtosis values. Then use a formal test such as Shapiro-Wilk for small samples or Anderson-Darling. Remember that with very large samples, tests flag tiny harmless deviations, so judge by the plots too. If data is skewed, consider a log transform or a non-parametric method.
28

What are precision and recall trade-offs in practice?

Save to ▾
Show answer
Raising the threshold improves precision but lowers recall. Fraud detection leans to recall, while spam filters often prefer precision; choose by the cost of each error.
29

What does the axis parameter mean in NumPy and Pandas?

Save to ▾
Show answer
axis tells an operation which direction to work along. axis=0 works down the rows, so df.sum(axis=0) gives one total per column. axis=1 works across columns, so df.sum(axis=1) gives one total per row. In df.drop, axis=1 means drop columns and axis=0 means drop rows. A simple way to remember it: the axis you name is the one that gets collapsed or removed.
30

Correlation vs covariance?

Save to ▾
Show answer
Covariance shows the direction of a relationship but depends on units. Correlation is covariance scaled to −1…+1, so it shows direction and strength and is unit-free.
31

How is an image represented for a deep learning model?

Save to ▾
Show answer
An image is a numeric array of height by width by channels, where a colour image has three channels, usually RGB, with pixel values from 0 to 255. Libraries differ: OpenCV loads BGR in HWC order, while PyTorch expects tensors in CHW order with a batch dimension in front. Before training you convert to float, scale to 0-1 and normalise with the mean and standard deviation used by the pretrained model.
32

What are RNNs and why did LSTMs improve them?

Save to ▾
Show answer
RNNs process sequences with a hidden state but struggle with long dependencies. LSTMs add gates that control what to remember or forget, easing the vanishing gradient.
33

What is a baseline model and why should you build one first?

Save to ▾
Show answer
A baseline is the simplest reasonable prediction, such as predicting the most common class, last week's value or a basic logistic regression. It sets the minimum score any real model must beat. Without it, a 75 percent accuracy can look good when predicting the majority class already gives 80 percent. Baselines also catch pipeline bugs early and show whether extra complexity is worth it.
34

Explain the chi-square test.

Save to ▾
Show answer
It checks whether observed category counts differ from expected counts, used for independence between two categorical variables and for goodness of fit.
35

How do you detect outliers?

Save to ▾
Show answer
Use the IQR rule (below Q1-1.5 IQR or above Q3+1.5 IQR), z-scores beyond 3, box plots or model-based methods such as Isolation Forest, then decide whether to cap, remove or keep them.
36

What is normalisation, and why are analytics tables often denormalised?

Save to ▾
Show answer
Normalisation splits data into related tables to remove redundancy, so each fact is stored once, which suits transactional systems with many updates. Analytics workloads mostly read large volumes, and joins across many tables are slow and error-prone. So warehouses often use denormalised, wide tables or star schemas that repeat some attributes. The trade-off is more storage and the need to keep copies consistent through pipelines.
37

What is subword tokenisation like BPE or WordPiece?

Save to ▾
Show answer
Subword tokenisers split text into frequent pieces between characters and full words. Byte Pair Encoding starts from characters and repeatedly merges the most frequent pairs. WordPiece, used by BERT, is similar but chooses merges by likelihood. Rare words like unhappiness become un, happi, ness, so there are no unknown words and the vocabulary stays around 30,000 to 100,000. Token counts also decide LLM cost and context use.
38

Random forest vs a single decision tree?

Save to ▾
Show answer
A forest averages many trees trained on bootstrapped rows and random feature subsets, which cuts variance and overfitting at the cost of interpretability.
39

What is data augmentation?

Save to ▾
Show answer
Data augmentation creates new training examples by applying realistic changes to existing ones. For images this means flips, rotations, crops and brightness changes. For text it can mean synonym replacement, back-translation or random word dropping. For audio, adding noise or shifting pitch. It improves generalisation when data is limited. Changes must keep the label correct; flipping a digit 6 can turn it into a 9.
40

What are naive and seasonal naive forecasts, and why should you always compute them?

Save to ▾
Show answer
A naive forecast predicts that the next value equals the last observed value. A seasonal naive forecast predicts the value from the same period last season, such as last Monday for next Monday. They take seconds to build and are surprisingly hard to beat on many business series. Always report your model's error relative to these baselines; if a complex model cannot beat seasonal naive, it is not adding value.

Tips to crack the IBM Data Science interview

  • Practise IBM's game-based cognitive assessments, which test pattern recognition, memory and numerical reasoning quickly.
  • Learn basics of hybrid cloud, Red Hat OpenShift and watsonx, which IBM promotes as core strategic areas.
  • Revise SQL, Python or Java fundamentals and be ready to explain one project in depth.
  • 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; IBM interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the IBM Data Science interview?

Candidates usually go through 4 stages: Online assessment (cognitive games + coding); English language test; Technical interview; Managerial or 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 IBM Data Science interview?

This practice set leans on Python for Data Science (8), Deep Learning and NLP (6), SQL for Data Science (5), Feature Engineering (5). Revise those first, then practise explaining one or two of your own projects end to end, because most IBM interviewers ask you to walk through real work.

Are these the exact questions asked at IBM?

No. These are curated practice questions that match the skills and difficulty usually tested in it services interviews like IBM's. They are not a leaked or verified list of past questions.

Where does IBM hire Data Science professionals in India?

IBM has large teams in Bengaluru, Pune, Hyderabad, Kolkata, Gurugram. Openings and locations change often, so check the IBM careers page and filter by city and experience.

Data Science questions for similar companies