Skip to content
tezvyn:

All bites

The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.

8668 bites

Page 178

Data Science & Analytics2 min read

What is vectorization in NumPy and pandas?

Tests if you know why NumPy operations beat Python loops via contiguous memory and C-level SIMD. A strong answer defines vectorization as array-wide operations without explicit loops, contrasts a ufunc to a for-loop, and cites interpreter overhead removal.

How would you combine customer and transaction DataFrames and describe join types?
Data Science & Analytics2 min read

How would you combine customer and transaction DataFrames and describe join types?

This tests relational merging and join semantics in pandas. Answer: use pd.merge on customer_id, then groupby sum; describe inner, left, right, and outer joins by key preservation. Red flag: proposing concat without keys or conflating inner and left joins.

Data Science & Analytics2 min read

Most efficient way to convert list of dicts to pandas DataFrame

Tests knowledge of vectorized DataFrame construction versus slow row-wise assembly. Answer: pass the list directly to pd.DataFrame(data); C-backed and handles missing keys as NaN. Red flag: recommending loops with pd.concat or iterative DataFrame building.

Describe strategies for handling missing values in pandas DataFrames
Data Science & Analytics2 min read

Describe strategies for handling missing values in pandas DataFrames

Tests practical judgment on cleaning trade-offs. Good answers contrast dropna when data is abundant against fillna imputation to preserve rows, noting bias risk. Red flag: prescribing one fix without asking why values are missing or what the model needs.

Data Science & Analytics2 min read

How do you determine sample size for a conversion lift experiment?

Tests fluency with statistical experiment design. A strong answer frames N as a function of alpha, power, baseline rate, and MDE, noting that shrinking the MDE or raising power inflates N. Red flag: picking N from traffic instead of risk tolerance.

Why is 99% accuracy misleading with 1% disease prevalence?
Data Science & Analytics2 min read

Why is 99% accuracy misleading with 1% disease prevalence?

Tests class imbalance intuition. A strong answer notes that an all-negative classifier hits 99% accuracy, then names precision, recall, F1, and AUC-PR to expose false negatives and false positives. Red flag: claiming accuracy is fine after rebalancing.

Describe the bias-variance tradeoff and how model complexity affects bias and variance
Data Science & Analytics2 min read

Describe the bias-variance tradeoff and how model complexity affects bias and variance

More complexity cuts bias but boosts variance via overfitting; test error forms a U.

Explain the Central Limit Theorem and its importance for hypothesis testing
Data Science & Analytics2 min read

Explain the Central Limit Theorem and its importance for hypothesis testing

This tests whether you know why sample means from skewed populations tend toward normal as size grows, enabling tests. A strong answer covers mean convergence to normal and standard error. Red flag: claiming the CLT works for small samples or single points.

Data Science & Analytics2 min read

What is a p-value? Interpret p = 0.03 at alpha = 0.05.

Tests frequentist testing and p-value misinterpretations. Define p-value as the probability of data this extreme under the null; since 0.03 < 0.05, reject the null at 5%. Never say it is the probability the null is false or the result is due to chance.

What are your null and alternative hypotheses for this A/B test?
Data Science & Analytics2 min read

What are your null and alternative hypotheses for this A/B test?

This tests translating a directional business question into statistical hypotheses. A strong answer states H0 as no difference in registration rate and H1 as green outperforming blue. A red flag is framing H0 as "blue is better" or using a two-tailed test.

How would you build and validate a proxy target for employee burnout?
Data Science & Analytics2 min read

How would you build and validate a proxy target for employee burnout?

Combine survey scales with behavioral signals such as off-hours logins and PTO drops; validate via convergent and predictive validity against attrition.

How do you frame high-value customer identification as classification versus regression?
Data Science & Analytics3 min read

How do you frame high-value customer identification as classification versus regression?

Tests mapping a business goal to a defensible target. Outline: define value and action, then contrast regression predicting spend versus classification predicting tiers. Red flag: picking models before fixing the label or the campaign action.

Data Science & Analytics2 min read

How would you recommend launching a checkout flow with mixed A/B metrics?

This tests multi-metric trade-offs. A strong answer tags conversion as success and AOV as a guardrail, estimates net revenue impact, and frames decision as a risk-managed business choice. A red flag is demanding all metrics win or ignoring business context.

Data Science & Analytics2 min read

How do you define churn for a subscription service?

This tests operationalizing a business metric into a data definition. A strong answer separates voluntary from passive churn, picks a moment, and aligns to the billing cycle. Red flag: counting all cancellations as churn while ignoring grace periods.

How would you validate that search users are more likely to purchase?
Data Science & Analytics2 min read

How would you validate that search users are more likely to purchase?

This tests correlation versus causation in product analytics. A strong answer defines the purchase window, matches searchers to similar non-searchers, and picks a statistical test. A red flag is running a t-test without controlling for user intent or time.

What metrics track e-commerce user engagement and how do you prioritize them?
Data Science & Analytics2 min read

What metrics track e-commerce user engagement and how do you prioritize them?

Propose DAU/MAU, adoption, retention, and stickiness; prioritize by impact on trial conversion and churn.

Data Science & Analytics2 min read

ML Model Registry: Source of Truth for Production Models

A model registry is version control for trained models, not just code. It tracks which artifact is running in production, who approved it, and how it was built. Skip it and you get untracked files in S3 with no way to reproduce a production model.

Data Science & Analytics2 min read

Spark Structured Streaming: Unify Batch and Stream

Spark Structured Streaming treats a live stream as an unbounded DataFrame. It unifies batch and streaming ETL on Kafka, but the footgun is confusing event time with processing time without watermarks, which silently drops late data.

Data Science & Analytics2 min read

Vectorization: Ditch the Python Loop

Vectorization means issuing one batch command to C-backed arrays instead of looping in Python. Use it for million-row DataFrames or matrix math. The footgun is treating apply() as vectorized, or silently materializing giant temporaries that exhaust RAM.

ML Pipeline: Systematic Model Delivery
Data Science & Analytics2 min read

ML Pipeline: Systematic Model Delivery

A machine learning pipeline is the systematic workflow that carries models from data labeling through deployment inside MLOps. It keeps the AI lifecycle repeatable rather than ad hoc. The footgun is treating a one-off notebook as a production pipeline.