tezvyn:

Data Science & Analytics

Analysis, notebooks, visualization, pandas, statistics

283 bites

Data Science & Analytics88 sec read

Demographic Parity versus Equalized Odds in hiring

WHAT IT TESTS: understanding fairness definitions. OUTLINE: demographic parity equalizes selection rates regardless of qualification; equalized odds equalizes true and false positive rates across groups, conditioning on the true label.

Data Science & Analytics83 sec read

Explain an interaction effect to a non-statistician

WHAT IT TESTS: communicating interaction effects plainly. OUTLINE: define interaction as it depends on, show separate slope lines per age group, give the business takeaway on targeting.

Data Science & Analytics83 sec read

Present a small but significant A/B test lift

WHAT IT TESTS: structuring an experiment narrative. OUTLINE: hypothesis, design and validity checks, result with effect size and interval, business impact of 0.5%, then a clear recommendation.

Data Science & Analytics83 sec read

Interactive versus static plots for EDA

WHAT IT TESTS: matching viz tooling to the task. OUTLINE: interactive libraries win for exploring dense, high-cardinality, or multi-dimensional data via zoom, hover, and filtering; static plots win for reproducible, publication output.

Data Science & Analytics81 sec read

Parquet versus CSV for analytical data lakes

WHAT IT TESTS: columnar versus row storage trade-offs. OUTLINE: Parquet stores by column enabling projection pushdown, compression, and predicate skipping; CSV is row-based, untyped, and slow to scan.

Data Science & Analytics80 sec read

Audit an ML pipeline for GDPR compliance

WHAT IT TESTS: applying GDPR principles technically. OUTLINE: inventory data and check minimization, verify processing matches stated purpose, build lineage to trace any prediction's inputs.

Data Science & Analytics82 sec read

A/B test two fraud models in production

WHAT IT TESTS: production model experimentation design. OUTLINE: randomize by entity, consider shadow mode first, collect precision/recall and business loss, decide with significance and guardrails.

Data Science & Analytics89 sec read

Communicate a forecast interval to an executive

WHAT IT TESTS: communicating uncertainty to leadership. OUTLINE: give the point estimate but frame the range as scenarios, use a fan chart, tie the interval to planning decisions and risk. RED FLAG: presenting $10M as a guaranteed single number with no range.

Data Science & Analytics84 sec read

Purpose of watermarks in Spark Structured Streaming

WHAT IT TESTS: streaming state management. OUTLINE: a watermark sets a threshold on event-time lateness, lets late data update windows up to that bound, and tells Spark when to finalize and drop old state. RED FLAG: confusing event time with processing time.

Data Science & Analytics82 sec read

repartition() versus coalesce() in Spark

WHAT IT TESTS: Spark partition control. OUTLINE: repartition does a full shuffle and can increase or balance partitions; coalesce avoids a full shuffle and only reduces them. RED FLAG: thinking coalesce can increase partitions or always beats repartition.

Data Science & Analytics76 sec read

Explain a loan denial with LIME or SHAP

WHAT IT TESTS: local explainability and its limits. OUTLINE: LIME fits a local surrogate, SHAP attributes the prediction across features via Shapley values, both give per-feature contributions.

Data Science & Analytics74 sec read

Design an automated A/B test reporting system

WHAT IT TESTS: scalable experiment reporting design. OUTLINE: standardized metric definitions, automated stats with confidence intervals and guardrails, segment breakdowns, a clear ship recommendation.

Data Science & Analytics81 sec read

Explain false positives and negatives for churn

WHAT IT TESTS: translating errors into business cost. OUTLINE: false positive flags a loyal customer (wasted incentive), false negative misses a leaver (lost customer), tie to threshold choice.

Data Science & Analytics79 sec read

Catalyst Optimizer and Project Tungsten in Spark

WHAT IT TESTS: knowledge of Spark SQL internals. OUTLINE: Catalyst transforms logical plans with rules, picks physical plans by cost; Tungsten optimizes execution with off-heap memory and codegen.

Data Science & Analytics77 sec read

Primary metric up, guardrail down: ship or not?

WHAT IT TESTS: handling metric trade-offs. OUTLINE: tie metrics to business value, weigh short-term lift against retention damage, use guardrails and an overall evaluation criterion.

Data Science & Analytics81 sec read

Handle source schema changes without downtime

WHAT IT TESTS: schema-evolution strategy. OUTLINE: add columns as nullable additive changes, version the schema, use formats like Iceberg or Parquet that support evolution, backfill new types safely. RED FLAG: an in-place destructive ALTER that breaks readers.

Data Science & Analytics82 sec read

Design a SQL upsert from a staging table

WHAT IT TESTS: knowledge of idempotent loads. OUTLINE: define a stable key, use MERGE or INSERT ON CONFLICT, dedupe the staging set first, run in a transaction. RED FLAG: a naive INSERT that duplicates or a delete-then-insert race.

Data Science & Analytics80 sec read

Explain KNN or MICE imputation principles

WHAT IT TESTS: understanding that imputation should preserve correlations. OUTLINE: KNN borrows from similar rows, MICE models each variable from the others iteratively and creates multiple datasets. RED FLAG: treating all imputation as filling means.

Data Science & Analytics78 sec read

When should you keep outliers, not drop them?

WHAT IT TESTS: judgment about when outliers are signal. OUTLINE: keep them in fraud or anomaly detection, use robust models and metrics. RED FLAG: blindly deleting anything beyond three standard deviations.

Data Science & Analytics2 min read

pandas .apply() versus vectorized operations

WHAT IT TESTS: pandas performance literacy. OUTLINE: apply runs a Python function per row or column, flexible but slow due to per-element looping; prefer vectorized ops; use apply only for custom logic with no vectorized equivalent.