Skip to content
tezvyn:

Top 30 Easy Data Science & Analytics Interview Questions and Answers for Freshers

30 easy multiple-choice Data Science & Analytics interview questions, the ones an interviewer opens with: definitions, everyday syntax, and the quick checks that you have really used it. They come from 30 bites in the Data Science & Analytics library, the gentlest slice of the 135 Data Science & Analytics interview questions in the library. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.

Analysis, notebooks, visualization, pandas, statistics

30 questions. Pick an answer, or open “Show the answer” to read it.

Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.

  1. Question 1 of 30

    Which approach best demonstrates a sound framework for measuring e-commerce user engagement?

    Show the answer

    Answer: a · Use DAU/MAU, adoption, retention, and stickiness tied to conversion and churn

    The card defines a strong framework as linking DAU/MAU, adoption, retention, and stickiness to trial conversion and churn. Tracking total page views is a red-flag vanity metric because it is untied to those outcomes.

    Read the full bite: What metrics track e-commerce user engagement and how do you prioritize them?

  2. Question 2 of 30

    An e-commerce site sees search users convert at 5% and non-search users at 2%. What is the best next step to estimate the true incremental impact of search?

    Show the answer

    Answer: a · Match searchers to similar non-searchers using device, landing page, and prior sessions, then compare rates

    Matching on confounders like device and landing page isolates selection bias, which is why the example shows the true incremental lift drops to roughly 25% after propensity matching. Running a two-sample t-test on the raw rates assumes the groups are comparable and would incorrectly validate an inflated, non-causal difference.

    Read the full bite: How would you validate that search users are more likely to purchase?

  3. Question 3 of 30

    Which hypothesis pair best tests whether a green signup button increases registrations compared to blue?

    Show the answer

    Answer: b · H0: The registration conversion rate for green equals that for blue; H1: The registration conversion rate for green is strictly greater than that for blue.

    The correct answer frames H0 as no difference and H1 as a directional increase in the specific metric, matching the one-tailed nature of the business question. Option A is tempting because it uses 'no difference,' but it wrongly uses a two-tailed alternative that ignores the directional ask and wastes statistical power.

    Read the full bite: What are your null and alternative hypotheses for this A/B test?

  4. Question 4 of 30

    You run an experiment and obtain p = 0.03. Which statement correctly interprets this p-value?

    Show the answer

    Answer: c · If the null hypothesis were true, there is a 3% probability of observing data at least this extreme.

    A p-value assumes the null hypothesis is true and quantifies the probability of seeing data at least this extreme under that assumption; it does not measure the probability that the null is false, that the alternative is true, or that the result occurred by chance.

    Read the full bite: What is a p-value? Interpret p = 0.03 at alpha = 0.05.

  5. Question 5 of 30

    A pandas DataFrame has 5% missing values in customer_age, completely at random. When is dropna the better choice over fillna?

    Show the answer

    Answer: c · When generating a quick aggregate report and the remaining 95% of data is sufficient

    The card states that dropna is safe for a quick aggregate report when data is missing completely at random and the remaining sample is still large enough. Option A describes the opposite scenario: when age is predictive, dropping rows discards valuable labeled outcomes and reduces model performance, so imputation is preferred instead.

    Read the full bite: Describe strategies for handling missing values in pandas DataFrames

  6. Question 6 of 30

    For a DataFrame with a string index, which call raises an error and why?

    Show the answer

    Answer: d · df.iloc['x'], because iloc requires integer positions not labels

    iloc is strictly positional and rejects a string label, raising a TypeError. df.loc['x'] and df.iloc[0] both work correctly on a string-indexed frame.

    Read the full bite: Pandas loc versus iloc indexing

  7. Question 7 of 30

    When converting a large list of flat dictionaries to a pandas DataFrame, which method minimizes Python-level overhead by leveraging vectorized C-backed construction?

    Show the answer

    Answer: c · Pass the list of dicts directly to pd.DataFrame so the constructor builds the block manager in one pass

    Passing the list directly to pd.DataFrame leverages a C-backed constructor that builds the block manager in a single vectorized pass. Option D is tempting but wrong because iteratively using pd.concat creates a new DataFrame each iteration, resulting in quadratic time complexity from repeated memory copies.

    Read the full bite: Most efficient way to convert list of dicts to pandas DataFrame

  8. Question 8 of 30

    Which query pattern correctly identifies customers who have never placed an order?

    Show the answer

    Answer: b · LEFT JOIN orders then filter WHERE orders.customer_id IS NULL

    C uses the correct anti-join pattern: LEFT JOIN preserves all customers and IS NULL keeps only those with no matching orders. D is tempting because it looks like logical negation, but if orders.customer_id contains any NULLs, NOT IN unexpectedly returns an empty set instead of the desired customers.

    Read the full bite: Find customers who have not placed any orders

  9. Question 9 of 30

    Which approach correctly handles the full response lifecycle when fetching JSON from a REST API in production using Python's requests?

    Show the answer

    Answer: c · Verify the status with r.raise_for_status() before parsing with r.json()

    Calling r.raise_for_status() before r.json() catches HTTP errors like 404 or 500 before parsing fails. Skipping the status check is a major red flag because error responses often do not contain valid JSON, causing r.json() to crash.

    Read the full bite: How do you fetch JSON from a REST API and parse it?

  10. Question 10 of 30

    Why is it important for a scraper to follow robots.txt directives on a publicly accessible website?

    Show the answer

    Answer: a · Because ignoring it can lead to IP bans, legal liability, and unnecessary server load for the target site

    Ignoring robots.txt risks IP bans, legal action under laws like the CFAA, and added server costs for the target site. The most tempting distractor wrongly treats the file as a security boundary that hides pages, but it only requests polite crawler behavior and does not actually restrict access.

    Read the full bite: What is robots.txt, why respect it, and consequences of ignoring it?

  11. Question 11 of 30

    Why is mean imputation often a poor default for a heavily skewed numerical column?

    Show the answer

    Answer: a · It is pulled by outliers and shrinks the column's variance

    The mean is sensitive to outliers in skewed data and filling with one constant reduces variance and distorts correlations; the median is more robust. Mean imputation keeps all rows rather than removing them.

    Read the full bite: Handling missing numerical values

  12. Question 12 of 30

    A data scientist chooses Z-score standardization over Min-Max scaling before training a logistic regression model with gradient descent. What is the primary statistical reason for this choice?

    Show the answer

    Answer: b · Z-score standardization centers features at mean zero with unit variance, ensuring weight updates proceed at comparable rates during gradient descent.

    Z-score standardization places features on comparable scales so gradient descent updates all weights at similar rates and no feature dominates the loss surface. The Min-Max distractor is tempting but incorrect because bounding values to [0, 1] does not equalize variances, and high-variance features can still compress the signal of others.

    Read the full bite: Min-Max scaling vs Z-score standardization: differences and algorithm preferences

  13. Question 13 of 30

    When a categorical feature has thousands of unique values, which approach avoids the dimensionality and memory issues of one-hot encoding while keeping predictive signal?

    Show the answer

    Answer: d · Target encoding, which replaces each category with the mean of the target variable for that category

    Target encoding collapses a high-cardinality categorical feature into a single numeric column by using the mean target value per category, avoiding sparse dimensionality while preserving signal. Label encoding is a common distractor because it keeps the feature as one column, but it imposes an artificial order on nominal categories that can mislead linear or distance-based models.

    Read the full bite: Why avoid one-hot encoding for high cardinality and what are alternatives?

  14. Question 14 of 30

    Which factor most strongly justifies choosing ETL over ELT?

    Show the answer

    Answer: d · Regulations require that sensitive data be masked before entering storage

    ETL is correct because it transforms data on external compute before loading, satisfying requirements to mask sensitive data before it reaches storage. The option citing cheaper warehouse compute is tempting but actually describes a primary reason to choose ELT instead.

    Read the full bite: Describe the difference between ETL and ELT and when to choose each

  15. Question 15 of 30

    In a retail data warehouse, why is a query for total sales by category usually slower when using a snowflake schema instead of a star schema?

    Show the answer

    Answer: b · The snowflake schema must traverse multiple dimension sub-tables to reach category, increasing join overhead

    In a snowflake schema, category is stored in a separate table linked through subcategory and product, so the query must traverse multiple joins, increasing execution time. The distractor claiming the snowflake stores repeated category names confuses it with the denormalized star schema, which keeps all attributes in one wide dimension table.

    Read the full bite: Star schema vs snowflake schema: differences and trade-offs

  16. Question 16 of 30

    An interview dataset has missing values in several columns. What should you do before deciding between mean imputation and multivariate imputation?

    Show the answer

    Answer: c · Quantify missingness per column and row, visualize null patterns, and assess whether the data is MCAR, MAR, or MNAR

    The mechanism behind missingness determines whether deletion or imputation is appropriate and which technique preserves relationships without introducing bias. Option A is dangerous because dropping rows without checking how much data is lost or whether the remaining set is biased can silently distort the sample.

    Read the full bite: First steps to identify and handle missing values

  17. Question 17 of 30

    Why is a violinplot generally preferred over a bar plot when exploring house prices across neighborhoods?

    Show the answer

    Answer: a · It preserves the full distribution, revealing features like bimodality and outliers that a bar plot's single statistic would obscure.

    The card states that bar plots collapse a continuous distribution into a single estimate like the mean, hiding variance, multimodality, and extreme values, whereas violinplots reveal the full distribution shape. Option D actually describes the key limitation of a bar plot, not an advantage of a violinplot.

    Read the full bite: Which plot visualizes a continuous versus categorical variable and why?

  18. Question 18 of 30

    During EDA, a heatmap reveals a strong positive correlation between daily ice cream sales and sunscreen sales. What is the most appropriate next step before making causal business recommendations?

    Show the answer

    Answer: d · Investigate potential confounders such as outdoor temperature and examine partial correlations before making causal recommendations.

    The card emphasizes that a strong heatmap correlation should prompt a search for confounders such as temperature and further analysis like partial correlation, not a causal conclusion. Option B is wrong because heatmap color intensity reflects linear association, not causal strength, which is a key red flag mentioned.

    Read the full bite: Explain correlation vs causation and heatmap limitations in EDA

  19. Question 19 of 30

    In fraud detection with 1% fraud prevalence, a model labels every transaction as legitimate and achieves 99% accuracy. What is the key lesson?

    Show the answer

    Answer: a · Accuracy can be misleading because it ignores the rare positive class entirely

    The card describes the accuracy paradox, where a trivial classifier achieves 99% accuracy on imbalanced fraud data while catching zero actual fraud, proving accuracy can hide complete failure on the minority class. Option C is tempting because 99% sounds excellent, but it wrongly rewards a model that is entirely useless for the business goal of detecting fraud.

    Read the full bite: Why is accuracy misleading for fraud detection, and what metrics instead?

  20. Question 20 of 30

    Which description best captures how K-Means iteratively forms its final clusters?

    Show the answer

    Answer: d · It initializes K centroids, then repeatedly assigns points to the nearest centroid and recomputes each centroid as the cluster mean until stable.

    K-Means uses Lloyd's algorithm to repeatedly assign observations to the nearest centroid and update each centroid to the cluster mean until convergence. Option B is tempting because random initialization is correct, but the algorithm is not a single-pass assignment; without iterative refinement it would not minimize within-cluster variance.

    Read the full bite: How does K-Means clustering work and how do you choose K?

  21. Question 21 of 30

    If the baseline conversion rate drops from 5% to 1% while the target relative lift stays the same, how does required sample size change?

    Show the answer

    Answer: a · It increases because lower baselines need larger samples to detect the same relative lift

    The card explicitly warns that lower baseline rates require larger samples to detect the same relative lift. Option B is tempting because unchanged relative targets seem like they should yield unchanged sample sizes, but the baseline rate is a core input that directly affects the required N.

    Read the full bite: How do you determine required sample size for an A/B test?

  22. Question 22 of 30

    An A/B test shows a 2.5% conversion lift with a 95% confidence interval from 0.5% to 4.5% and a p-value of 0.03. Which interpretation is correct?

    Show the answer

    Answer: d · The data are incompatible with zero lift at the 5% level, and the interval shows plausible effect sizes between 0.5% and 4.5%.

    A 95% confidence interval identifies effect sizes that are not rejected by the data under the null, so excluding zero aligns with p < 0.05 while also showing magnitude and precision. Option B is wrong because it treats the frequentist interval as a Bayesian probability statement about the true parameter.

    Read the full bite: P-value vs confidence interval in an A/B test

  23. Question 23 of 30

    An A/B test shows a 0.1% revenue lift with p = 0.03. What should you evaluate before recommending the feature ship?

    Show the answer

    Answer: c · Whether the expected revenue gain exceeds the engineering and maintenance costs

    Practical significance means the revenue lift must justify engineering and maintenance costs, not merely achieve a low p-value. While checking the confidence interval against the minimum detectable effect helps assess precision, it does not replace a direct return-on-investment calculation.

    Read the full bite: A/B test: 0.1% lift. Statistical vs practical significance?

  24. Question 24 of 30

    Why do early layers in a very deep tanh network typically receive negligible gradients?

    Show the answer

    Answer: b · Because backpropagation repeatedly multiplies tanh derivatives in [0,1] across layers

    The root cause is the chain rule's repeated multiplication of bounded derivatives across depth, collapsing the gradient magnitude. Blaming tanh's squashing alone misses the critical role of depth in the multiplicative effect.

    Read the full bite: Explain vanishing and exploding gradients and common mitigation techniques.

  25. Question 25 of 30

    During training, what does dropout do to hidden unit activations to prevent overfitting?

    Show the answer

    Answer: a · It randomly sets a fraction of them to zero on each forward pass to stop co-adaptation.

    Dropout randomly zeros hidden activations during training to prevent neurons from co-adapting to specific partners, which improves generalization. Option B is tempting but wrong because dropout does not permanently remove neurons; the full network is retained and used at test time.

    Read the full bite: What is overfitting and how does Dropout prevent it?

  26. Question 26 of 30

    What is the main reason word embeddings capture semantic relationships that one-hot encoding cannot?

    Show the answer

    Answer: d · Embeddings learn dense vectors where contextually similar words are close together

    Embeddings are trained on co-occurrence patterns so words with shared contexts occupy nearby points in dense vector space, whereas one-hot vectors are orthogonal and equidistant. Distractor A is tempting but wrong because embeddings are not simply hashed or compressed one-hot vectors; their values are learned to create meaningful geometric relationships.

    Read the full bite: What is a word embedding and how does it beat one-hot encoding?

  27. Question 27 of 30

    Why does Spark's distinction between transformations and actions improve performance?

    Show the answer

    Answer: c · Laziness lets Spark see the full DAG and optimize before any execution

    Because transformations are lazy, Spark can analyze the entire chain and optimize it, for example pipelining stages and pushing down filters, before an action triggers execution. Transformations run on executors, and not all avoid shuffles.

    Read the full bite: Spark transformations versus actions

  28. Question 28 of 30

    How does HDFS primarily achieve fault tolerance against individual node failures?

    Show the answer

    Answer: c · By replicating every block across multiple DataNodes

    HDFS stores multiple replicas of each block, by default three, on different nodes, so a node failure loses no data and blocks are re-replicated. The NameNode holds metadata, not the actual block data.

    Read the full bite: HDFS purpose and fault tolerance

  29. Question 29 of 30

    What happens between the map and reduce phases in a MapReduce job?

    Show the answer

    Answer: b · A shuffle and sort groups all values by key for the reducers

    The shuffle and sort stage groups every value sharing a key and routes it to the right reducer, which is essential for aggregation. Reducers run after mappers, not before, and duplicate keys are grouped, not discarded.

    Read the full bite: The MapReduce paradigm explained

  30. Question 30 of 30

    Which visualization best isolates recurring within-year seasonal patterns from three years of daily sales?

    Show the answer

    Answer: b · A seasonal plot overlaying each year's months on a shared month axis

    Overlaying years on a common month axis aligns comparable periods so recurring peaks and troughs stand out. A raw multi-year line buries seasonality in noise and trend, and a pie chart cannot represent time at all.

    Read the full bite: Visualizing long-term trend versus seasonality

Could you explain these out loud?

That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon