More in Data Science & Analytics — page 4
Framing ad-load tradeoffs: revenue versus retention
WHAT IT TESTS: balancing competing metrics over time. OUTLINE: define revenue plus guardrail engagement metrics, run a long-enough experiment to see retention effects, and weigh short-term lift against lifetime-value erosion.
Does forcing profile completion cause retention?
WHAT IT TESTS: distinguishing correlation from causation. OUTLINE: name the confounder (engaged users self-select into completing profiles), warn that forcing it may not transfer the effect, and propose a randomized experiment.
Python Virtual Environments
A virtual environment is an isolated Python installation with its own packages, so each project gets the exact dependency versions it needs without conflicting with other projects or the system Python.
Transformer Architecture
The Transformer replaces recurrence with self-attention, letting every token directly attend to every other token in parallel. This enables long-range context and fast training on GPUs, making it the backbone of modern large language models and much of…
Generative Adversarial Network (GAN)
A GAN trains two networks in competition: a generator that fabricates fake samples and a discriminator that judges real versus fake. Their adversarial game pushes the generator toward realistic outputs, enabling image synthesis and data generation without…
Walk me through a CNN's layers for image classification
Tests hierarchical feature extraction in CNNs. Answer: conv filters learn edges-to-objects with shared weights, pooling reduces dimensions and adds invariance, fully-connected layers classify.
How do you leverage and fine-tune BERT for niche classification?
Tests transfer learning with scarce labels. Outline: pick a domain-adjacent checkpoint, add a classification head, use learning rates near 2e-5 with early stopping, and stratify tiny validation splits.
Describe Transformer architecture and why self-attention beats recurrence
This tests parallelization and long-range dependencies. A strong answer outlines the encoder-decoder stack with multi-head self-attention, contrasts O(1) sequential steps versus RNNs' O(n) unrolling, and warns that describing it as averaging misses key ideas.
What is a word embedding and how does it beat one-hot encoding?
Tests dense semantic vectors versus sparse one-hot representations. A good answer defines embeddings as learned real-valued vectors where similar words are close, contrasts them with orthogonal one-hot vectors lacking similarity, and names Word2Vec or GloVe.
What is overfitting and how does Dropout prevent it?
Tests generalization intuition: overfitting is low train error but high test error. Good answers say dropout randomly zeros hidden units during training to stop co-adaptation. Bad answers say dropout permanently deletes neurons or just reduces capacity.
Explain vanishing and exploding gradients and common mitigation techniques.
Why deep backpropagation causes diverging gradient magnitudes. Repeated multiplication across layers shrinks or explodes gradients; cite tanh [0,1] range; list ReLU, batch norm, and gradient clipping. Blaming activation choice alone without citing depth.
Explain Regression Discontinuity Design and propose a real-world scenario
WHAT IT TESTS: Causal inference via sharp cutoffs when randomization is impossible. ANSWER OUTLINE: Compare units just above and below a threshold for local effects; propose scenario with forcing variable. RED FLAG: Calling it randomized or ignoring bandwidth.
How would you estimate causal impact using a quasi-experimental method?
WHAT IT TESTS: Causal inference via difference-in-differences. ANSWER OUTLINE: DiD with Canada versus Australia; assert parallel trends; validate with pre-period plots and placebo tests.
What is Simpson's Paradox and how can it bias A/B tests?
Tests whether you recognize that aggregate trends can reverse within subgroups. A strong answer defines the paradox, gives an A/B example where treatment wins overall but loses in every segment due to skewed allocation, and prescribes stratified analysis.

How do network effects violate A/B tests and how to mitigate them?
Tests SUTVA violations and network experiment design. Answers note treated users alter control outcomes, then propose social-graph cluster randomization to isolate spillovers. Red flag: ignoring peer-to-peer spillover and using user-level randomization.

Why not stop an A/B test when it looks significant early?
Tests whether you understand repeated looks inflate false positives. The term is peeking: checking daily can turn a 5% Type I error rate into roughly 15% by day 3. Red flag: citing "low sample size" without stating that early stopping invalidates the p-value.
A/B test: 0.1% lift. Statistical vs practical significance?
TESTS: Distinguishing proof from business value. OUTLINE: Statistical significance says the 0.1% is real; practical significance asks if revenue exceeds engineering cost. Frame with CIs and ROI. RED FLAG: Shipping just because p is low while ignoring cost.

P-value vs confidence interval in an A/B test
WHAT IT TESTS: Frequentist reasoning beyond binary significance. ANSWER OUTLINE: A p-value gauges evidence against the null; a 95% CI shows plausible effect sizes and precision. RED FLAG: Calling the CI a 95% probability the true difference is inside.

How do you determine required sample size for an A/B test?
Tests statistical power and experimental design. Name four inputs: baseline conversion rate, minimum detectable effect, alpha (5%), and power (80%), then solve for N. Red flag: "test until significant" or fixed guesses like 1000 users without effect size.
K-Means vs DBSCAN: which for geospatial hotspots?
Tests matching algorithmic assumptions to data structure. K-Means needs K and assumes spheres; DBSCAN discovers arbitrary density shapes and labels noise. Choose DBSCAN for geospatial hotspots because density is irregular.