Skip to content

Data Science Rapid-Fire Questions & Answers

50 questions for the rapid-fire stage — 32 easy, 18 medium.

About the rapid-fire round

Rapid-fire questions are quick definitions and one-line answers that interviewers fire at the start or end of a round to check your Data Science basics. Aim to answer each in under 20 seconds.

Tips for the rapid-fire round

  • Answer in one or two sentences, then stop.
  • If you don't know, say so quickly and move on; don't guess at length.
  • Revise these the morning of the interview.
  • Practise with a friend who reads them in random order.
Solved — rapid-fireStart 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 Intersection over Union (IoU)?

Save to ▾
Show answer
IoU measures how well a predicted box or mask overlaps the ground truth. It is the area of their intersection divided by the area of their union, giving a value from 0 for no overlap to 1 for a perfect match. In detection, a prediction usually counts as correct if IoU is at least 0.5 with a ground truth box of the same class. IoU is also used inside non-maximum suppression.
02

What is cross-validation and why use it?

Save to ▾
Show answer
Split the data into k folds, train on k−1 folds and validate on the remaining one, rotate and average the scores. It gives a more reliable estimate than one split and helps tune hyperparameters without touching the test set.
03

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.
04

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.
05

What do kernel size, stride and padding mean in a convolution layer?

Save to ▾
Show answer
The kernel is a small learnable filter, such as 3x3, that slides over the image and computes a weighted sum at each position. Stride is how many pixels it moves each step; stride 2 halves the output size. Padding adds border pixels so the output can keep the same size and edge pixels get processed. Output size equals (input minus kernel plus 2 times padding) divided by stride, plus one.
06

What is early stopping?

Save to ▾
Show answer
Early stopping monitors a validation metric during training and stops when it has not improved for a set number of rounds, called patience. It is used in gradient boosting and neural networks to prevent overfitting and save time. The model from the best round is kept. The validation set must not be the final test set, otherwise the reported test score becomes optimistic.
07

L1 vs L2 regularisation?

Save to ▾
Show answer
L1 (Lasso) adds absolute weights and can shrink some to zero, giving feature selection. L2 (Ridge) adds squared weights and shrinks them smoothly without removing features.
08

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.
09

Type I vs Type II error?

Save to ▾
Show answer
Type I = false positive (rejecting a true null), probability α. Type II = false negative (missing a real effect), probability β. Power = 1 − β.
10

Explain train, validation and test sets.

Save to ▾
Show answer
Train fits the model, validation tunes hyperparameters and model choice, and the untouched test set gives a final unbiased estimate of performance.
11

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.
12

What is the difference between list, tuple, set and dict in Python?

Save to ▾
Show answer
List: ordered and mutable. Tuple: ordered and immutable (hashable, slightly faster). Set: unordered, unique items, fast membership checks. Dict: key–value pairs with fast lookup by key.
13

What is the logical order of execution of a SQL query?

Save to ▾
Show answer
Although you write SELECT first, the database logically processes FROM and JOIN first, then WHERE, GROUP BY, HAVING, SELECT, DISTINCT, ORDER BY and finally LIMIT. This explains common errors: you cannot use a SELECT alias in WHERE because WHERE runs before SELECT, but you can use it in ORDER BY. Window functions are computed after WHERE and GROUP BY, so filter on them in an outer query.
14

What is the vanishing gradient problem?

Save to ▾
Show answer
Gradients shrink as they pass through many layers (for example with sigmoid), so early layers barely learn. ReLU, residual connections and good initialisation help.
15

What is the difference between a function and a method?

Save to ▾
Show answer
A method is a function that belongs to an object or class and receives the instance (self) as its first argument.
16

What is skewness?

Save to ▾
Show answer
A measure of asymmetry. Right-skewed data has a long tail on the right (mean greater than median); left-skewed is the opposite. Log transforms often reduce right skew.
17

How does dropout work?

Save to ▾
Show answer
During training it randomly switches off a fraction of neurons so the network cannot depend on any single unit, acting as a regulariser against overfitting.
18

Explain INNER, LEFT, RIGHT and FULL OUTER joins.

Save to ▾
Show answer
An INNER JOIN returns only rows with matching keys in both tables. A LEFT JOIN returns all rows from the left table, with NULLs where the right has no match. A RIGHT JOIN is the mirror of that. A FULL OUTER JOIN returns all rows from both sides, matched where possible. In analytics, LEFT JOIN from a customers table is common so customers with no orders are still counted.
19

What is standard deviation and what does it tell you?

Save to ▾
Show answer
The square root of the variance; it measures how far values typically sit from the mean, in the same units as the data.
20

Difference between loc and iloc in Pandas?

Save to ▾
Show answer
loc selects by label (row and column names, inclusive of the end label); iloc selects by integer position (end-exclusive).
21

Why do you apply a log transform to some features?

Save to ▾
Show answer
A log transform compresses large values and spreads small ones, which reduces right skew in features like income, price or page views. This helps linear models and distance-based models that are sensitive to scale and outliers. Use log1p, which is log of 1 plus x, when the feature has zeros. For negative values, a Yeo-Johnson transform works. Tree models generally do not need it.
22

Explain p-value in simple words.

Save to ▾
Show answer
The probability of seeing a result at least this extreme if the null hypothesis were true. A small p-value (for example < 0.05) is evidence against the null hypothesis.
23

What is the difference between a set and a dictionary?

Save to ▾
Show answer
A set stores unique values with no keys; a dictionary stores key-value pairs with unique keys. Both use hashing, so lookups are O(1) on average.
24

How does K-means clustering work and how do you choose k?

Save to ▾
Show answer
It assigns points to the nearest centroid and updates centroids until stable. Choose k with the elbow method, silhouette score or business context.
25

Explain the Law of Large Numbers.

Save to ▾
Show answer
As the number of independent trials grows, the sample average converges to the true expected value, which is why larger samples give more stable estimates.
26

What is the difference between ROW_NUMBER, RANK and DENSE_RANK?

Save to ▾
Show answer
All three number rows within a window ordered by some column. ROW_NUMBER gives unique numbers even for ties: 1, 2, 3. RANK gives tied rows the same rank and skips the next numbers: 1, 1, 3. DENSE_RANK gives ties the same rank without gaps: 1, 1, 2. Use ROW_NUMBER to pick exactly one row per group, and DENSE_RANK for questions like the second highest distinct salary.
27

What is a normal distribution?

Save to ▾
Show answer
A symmetric bell-shaped distribution defined by mean and standard deviation, where about 68%, 95% and 99.7% of values lie within 1, 2 and 3 standard deviations.
28

What is the difference between WHERE and HAVING in SQL?

Save to ▾
Show answer
WHERE filters individual rows before grouping, so it cannot use aggregate functions. HAVING filters groups after GROUP BY and can use aggregates. Example: WHERE order_date >= '2026-01-01' keeps only this year's orders, then GROUP BY customer_id HAVING SUM(amount) > 10000 keeps customers who spent more than 10,000. Filtering early with WHERE is also faster because fewer rows are grouped.
29

What is SVM and the kernel trick?

Save to ▾
Show answer
SVM finds the maximum-margin separating hyperplane. Kernels such as RBF compute similarity in a higher-dimensional space implicitly, so non-linear boundaries are possible.
30

How do list comprehensions work and why use them?

Save to ▾
Show answer
They build a list in one readable expression, for example [x*x for x in data if x > 0]. They are usually faster than an equivalent for-loop with append.
31

What is conditional probability? Give an example.

Save to ▾
Show answer
Conditional probability is the chance of an event given that another event has happened, written P(A given B) = P(A and B) / P(B). Example: 10 percent of users buy, and 40 percent of users who add to cart buy. So P(buy given cart) is 0.4, much higher than the overall 0.1. It is the base of Bayes' theorem, Naive Bayes and many funnel analyses.
32

What is regularization? Explain L1 vs L2.

Save to ▾
Show answer
Regularization adds a penalty on weights to reduce overfitting. L1 (Lasso) adds |w| and can push features to exactly zero. L2 (Ridge) adds w² and shrinks weights smoothly.
33

Explain logistic regression.

Save to ▾
Show answer
It models the log-odds of a binary outcome as a linear function and passes it through a sigmoid to give probabilities, trained by maximising likelihood.
34

How do you perform feature selection?

Save to ▾
Show answer
Use filter methods (correlation, chi-square), wrapper methods (RFE), embedded methods (Lasso, tree importance) and domain knowledge, validating each choice with cross-validation.
35

What is data leakage?

Save to ▾
Show answer
Information from outside the training window, such as future data or test statistics, enters training and inflates performance. Split first, then fit scalers and encoders on training data only.
36

What is a Poisson distribution used for?

Save to ▾
Show answer
Modelling the count of events in a fixed interval when events occur independently at a constant average rate, such as calls per hour or defects per batch.
37

What is the difference between COUNT(*), COUNT(column) and COUNT(DISTINCT column)?

Save to ▾
Show answer
COUNT(*) counts all rows, including rows with NULLs. COUNT(column) counts only rows where that column is not NULL. COUNT(DISTINCT column) counts unique non-NULL values. For example, in an orders table, COUNT(*) is the number of orders, COUNT(coupon_code) is orders that used a coupon, and COUNT(DISTINCT customer_id) is the number of unique buyers. Mixing them up is a common reporting bug.
38

How do you handle missing values?

Save to ▾
Show answer
First understand why data is missing. Then drop rows or columns with too many nulls, impute with mean/median/mode or a model (KNN), add a 'was_missing' flag, and fit imputers on training data only.
39

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.
40

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.
41

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.
42

What are *args and **kwargs?

Save to ▾
Show answer
*args collects extra positional arguments into a tuple; **kwargs collects extra keyword arguments into a dict. They make function signatures flexible and are common in wrappers and decorators.
43

What is transfer learning?

Save to ▾
Show answer
Reusing a model pretrained on a large dataset and fine-tuning it on a smaller task-specific dataset, saving data, time and compute.
44

What is a confidence interval?

Save to ▾
Show answer
A range built from sample data that would contain the true parameter in a stated percentage (for example 95%) of repeated samples. It is not the probability that the parameter lies inside this one interval.
45

How do you deal with high-cardinality categorical features?

Save to ▾
Show answer
Use target or frequency encoding with cross-validation, hashing, embeddings or grouping rare categories, instead of huge one-hot matrices.
46

What is the difference between hard voting and soft voting in ensembles?

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

What are lambda functions and where are they useful?

Save to ▾
Show answer
Small anonymous one-line functions, handy as arguments to sort, map, filter or Pandas apply.
48

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.
49

Pearson vs Spearman correlation?

Save to ▾
Show answer
Pearson measures linear relationships on continuous data; Spearman uses ranks, so it captures monotonic relationships and is less sensitive to outliers.
50

What is a confusion matrix?

Save to ▾
Show answer
A table of true positives, false positives, true negatives and false negatives from which accuracy, precision, recall and F1 are calculated.

Frequently asked questions

What happens in the Data Science rapid-fire round?

Rapid-fire questions are quick definitions and one-line answers that interviewers fire at the start or end of a round to check your Data Science basics. Aim to answer each in under 20 seconds.

How do I clear the rapid-fire round?

Answer in one or two sentences, then stop. If you don't know, say so quickly and move on; don't guess at length. Revise these the morning of the interview.

Which round comes next?

A typical order is online assessment, telephonic screening, one or two technical rounds, a managerial round and HR. Use the other round pages to practise each stage.