Skip to content

Meta Data Science Interview Questions & Answers

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

Solved for MetaStart practicing
3 QUESTIONS FREESign up or log in 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 sampling bias and how can you reduce it?

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

What is a p-value?

MetaMedium
Save to ▾
Show answer
The probability of seeing a result at least as extreme as the observed one if the null hypothesis were true. A small p-value is evidence against the null, not proof that the alternative is true.
03

What is batch normalisation?

MetaMedium
Save to ▾
Show answer
It normalises layer inputs per mini-batch and then rescales them, stabilising and speeding up training and allowing higher learning rates.
04

How would you fine-tune a pretrained language model for classification?

MetaHard
Save to ▾
Show answer
Add a classification head, freeze or gradually unfreeze layers, use a small learning rate, train on labelled data with validation, and track F1 per class.
05

Pearson vs Spearman correlation?

MetaEasy
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.
06

Pandas: merge vs join vs concat?

MetaMedium
Save to ▾
Show answer
merge joins on columns, SQL-style (how='inner', 'left', ...). join joins on the index. concat stacks DataFrames along rows or columns.
07

Explain the KNN algorithm and its drawbacks.

MetaMedium
Save to ▾
Show answer
It predicts from the k nearest labelled points. It is simple but slow at prediction time, sensitive to scaling and irrelevant features, and weak in high dimensions.
08

Train accuracy is 95% but test accuracy is 70%. What do you do?

MetaHard
Save to ▾
Show answer
This is overfitting. Check for data leakage, simplify the model, add regularization, get more data or augment it, use cross-validation, early stopping and feature selection.
09

CNN vs RNN vs Transformer — what is the difference?

MetaHard
Save to ▾
Show answer
CNNs use convolutions to find spatial patterns (images). RNNs/LSTMs process sequences step by step but struggle with long context. Transformers use self-attention to look at all tokens at once — parallel and better at long-range context; they power modern LLMs.
10

What is skewness?

MetaEasy
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.
11

Why is XGBoost so popular?

MetaMedium
Save to ▾
Show answer
It combines gradient boosting with regularisation, handling of missing values, parallel tree construction and speed optimisations, and it performs strongly on tabular data.
12

Explain train, validation and test sets.

MetaEasy
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.
13

What are lambda functions and where are they useful?

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

What are RNNs and why did LSTMs improve them?

MetaMedium
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.
15

How do you tune hyperparameters?

MetaMedium
Save to ▾
Show answer
Use grid search, random search or Bayesian optimisation with cross-validation, starting with a coarse random search and narrowing the promising ranges.
16

How do you detect and treat concept drift?

MetaMedium
Save to ▾
Show answer
Monitor input distributions and live metrics, compare to training baselines, and retrain or recalibrate on fresh data when performance drops.
17

How do you deploy and monitor a machine learning model?

MetaHard
Save to ▾
Show answer
Package the model behind an API with versioning, track latency and errors, monitor input drift and prediction quality, and automate retraining with rollback.
18

How do list comprehensions work and why use them?

MetaEasy
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.
19

What are precision and recall trade-offs in practice?

MetaMedium
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.
20

What is feature scaling and which models need it?

MetaMedium
Save to ▾
Show answer
Putting features on comparable ranges using standardisation or min-max scaling. Distance-based and gradient-based models (KNN, SVM, regression, neural nets) need it; tree models do not.
21

Explain Bayes' theorem with an example.

MetaMedium
Save to ▾
Show answer
P(A given B) = P(B given A) x P(A) / P(B). In a medical test it converts test accuracy and disease prevalence into the real chance a positive result means disease.
22

How do you profile and speed up slow Python code?

MetaMedium
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.
23

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

MetaMedium
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.
24

Explain the chi-square test.

MetaMedium
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.
25

What is the difference between Bayesian and frequentist approaches?

MetaHard
Save to ▾
Show answer
Frequentists treat parameters as fixed and use long-run frequencies; Bayesians treat parameters as distributions updated with data via priors and posteriors, giving direct probability statements.
26

What is data leakage?

MetaEasy
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.
27

What is transfer learning?

MetaMedium
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.
28

What are *args and **kwargs?

MetaEasy
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.
29

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

MetaEasy
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.
30

How do you evaluate and explain a model to business stakeholders?

MetaHard
Save to ▾
Show answer
Tie metrics to business outcomes such as cost saved, show feature importance or SHAP values, give example predictions and be transparent about limitations.
31

How do you handle imbalanced classes?

MetaMedium
Save to ▾
Show answer
Use stratified splits, class weights, resampling such as SMOTE, threshold tuning and judge models with precision, recall, F1 or PR-AUC instead of accuracy.
32

What is SVM and the kernel trick?

MetaMedium
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.
33

Difference between a shallow copy and a deep copy?

MetaMedium
Save to ▾
Show answer
A shallow copy duplicates the outer object but shares nested objects. A deep copy (copy.deepcopy) recursively duplicates everything, so changes to nested items do not leak.
34

What is a RAG system and why use it?

MetaHard
Save to ▾
Show answer
Retrieval-Augmented Generation fetches relevant documents and gives them to an LLM as context, reducing hallucination and keeping answers grounded in current private data.
35

What is a Poisson distribution used for?

MetaEasy
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.
36

What is cross-validation and why use it?

MetaEasy
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.
37

How do you perform feature selection?

MetaMedium
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.
38

What is the difference between regression and classification?

MetaEasy
Save to ▾
Show answer
Regression predicts continuous values such as price; classification predicts discrete categories such as spam or not spam.
39

Explain p-value in simple words.

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

How do you use groupby with multiple aggregations?

MetaMedium
Save to ▾
Show answer
df.groupby('region').agg(total=('sales','sum'), avg=('sales','mean')) gives named aggregations per group in one pass.
41

What is the vanishing gradient problem?

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

How do transformers differ from RNNs?

MetaHard
Save to ▾
Show answer
Transformers use self-attention to process all tokens in parallel and capture long-range context, making them faster to train and more scalable than sequential RNNs.
43

Type I vs Type II error?

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

What is PCA and when do you use it?

MetaMedium
Save to ▾
Show answer
It projects data onto orthogonal directions of maximum variance to reduce dimensions, remove correlation and speed up models, at some cost of interpretability.
45

What is a confidence interval?

MetaMedium
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.
46

How do you remove duplicates from a DataFrame?

MetaEasy
Save to ▾
Show answer
df.drop_duplicates(subset=[...], keep='first') removes repeated rows; use duplicated() first to inspect what will be dropped.
47

How do you handle missing values?

MetaEasy
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.
48

What is stacking in ensemble learning?

MetaMedium
Save to ▾
Show answer
Training a meta-model on the predictions of several base models, often using cross-validated predictions to avoid leakage.
49

What is the difference between == and is?

MetaEasy
Save to ▾
Show answer
== compares values for equality, while is checks whether two names point to the same object in memory. Use is mainly for None checks.
50

How does a CNN work?

MetaMedium
Save to ▾
Show answer
Convolution filters slide over the input to detect local patterns, pooling reduces size, and deeper layers combine edges into shapes and objects. Used mainly for images.
51

Explain logistic regression.

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