Data science interviews test statistics, ML knowledge, and business thinking. These questions cover the most commonly asked topics across FAANG and startup interviews.
Type I (false positive) rejects a true null hypothesis. Type II (false negative) fails to reject a false null hypothesis. Which is worse depends on context — in medical testing, Type II (missing a disease) is worse. In spam filtering, Type I (blocking a real email) is worse. Discuss the trade-off between sensitivity and specificity.
Random forests are more robust to overfitting, require less tuning, and handle high-dimensional data well. Gradient boosting (XGBoost, LightGBM) typically achieves higher accuracy but requires careful hyperparameter tuning. Use RF for quick baselines and when interpretability matters. Use GBM for competitions and production models where accuracy is paramount.
Techniques include: oversampling minority class (SMOTE), undersampling majority, class weights in the loss function, ensemble methods, and choosing appropriate metrics (F1, AUC-ROC instead of accuracy). The best approach depends on the dataset size and business context.
Online metrics: click-through rate, conversion rate, average order value, user engagement time. Offline metrics: precision@k, recall@k, NDCG, MAP. Business metrics: revenue lift from recommendations vs. baseline. A/B testing to validate online impact.
Data collection → cleaning → feature engineering → model selection → training → evaluation → deployment → monitoring. Discuss tools at each stage: pandas/Spark for data, scikit-learn/TensorFlow for modeling, MLflow for tracking, Docker/Kubernetes for deployment, and monitoring for data drift.
The p-value is the probability of observing results at least as extreme as the actual results, assuming the null hypothesis is true. A p-value below 0.05 traditionally means statistical significance, but discuss limitations: it does not measure effect size, it is affected by sample size, and multiple testing requires correction (Bonferroni).