Data Science & Machine Learning Interview Preparation Notes

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/77

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering statistical modeling, A/B testing methodologies, machine learning fundamentals, ensemble methods, time series forecasting, and Spark/Databricks architecture.

78 Terms

1
New cards

Assumptions of OLS Linear Regression

Key conditions required for Ordinary Least Squares regression: linearity in parameters, independent errors, constant error variance (homoscedasticity), no perfect multicollinearity, errors with mean zero and uncorrelated with predictors (exogeneity), and normal errors (required only for small-sample inference).

2
New cards

Exogeneity Violation

A condition in linear regression where errors are correlated with predictor variables (XX); it is considered the most severe violation because it introduces bias into coefficient estimates, unlike most other violations which only distort standard errors.

3
New cards

Heteroscedasticity

The violation of the constant error variance assumption; coefficients remain unbiased, but standard errors, t-statistics, and p-values become incorrect (typically overly optimistic).

4
New cards

Multicollinearity

A condition where predictor variables are highly correlated, causing coefficient estimates to exhibit inflated variance and unstable signs, though model predictions may remain accurate.

5
New cards

Variance Inflation Factor (VIF)

A diagnostic metric used to detect multicollinearity among predictors, where values exceeding 5 to 105\text{ to }10 indicate problematic correlation.

6
New cards

Clustered Standard Errors

A correction applied to standard errors when errors are correlated within groups or clusters (such as repeated measures per workspace) to prevent understating standard errors and overclaiming statistical significance.

7
New cards

Omitted Variable Bias

The bias introduced into an included predictor's coefficient estimate when an excluded variable both influences the outcome yy and is correlated with that included predictor.

8
New cards

Elasticity (Log-Log Regression)

The interpretation of coefficient β\beta when both xx and yy are log-transformed, signifying that a 1%1\% increase in xx is associated with approximately a β%\beta\% change in yy.

9
New cards

R2R^2 (Coefficient of Determination)

The proportion of variance in the outcome variable yy explained by the regression model; it never decreases upon adding more features and provides no indication of causality or out-of-sample accuracy.

10
New cards

Lasso Regression (L1L_1)

A regularized regression technique that applies an absolute-value penalty on coefficient magnitudes, capable of shrinking coefficients to exactly zero to perform automated feature selection.

11
New cards

Ridge Regression (L2L_2)

A regularized regression technique that applies a squared-magnitude penalty, shrinking all coefficients smoothly toward zero while stably handling highly correlated predictors.

12
New cards

Logistic Regression

A classification model that models the log-odds of a binary outcome as a linear combination of predictors, where a 11-unit increase in a feature multiplies the odds of the outcome by eβe^{\beta}.

13
New cards

Interaction Term

A predictor formed by multiplying two features (x1×x2x_1 \times x_2), allowing the effect of x1x_1 on the target to depend on the value of x2x_2.

14
New cards

Cook's Distance / Leverage

Regression diagnostic measures used to detect influential outlier data points that exert disproportionate pull on model coefficients.

15
New cards

Generalized Linear Model (GLM)

A flexible framework connecting a linear predictor to the mean of an exponential-family outcome via a link function (e.g., logistic link for binary outcomes, Poisson for event counts, Gamma for positive skewed data).

16
New cards

Parallel Trends Assumption

The core identifying assumption of difference-in-differences analysis stating that, in the absence of treatment, the treatment and control groups would have followed parallel trajectory paths over time.

17
New cards

Regularization

The addition of a mathematical penalty on model complexity (coefficient magnitude) to trade a small increase in bias for a substantial reduction in variance.

18
New cards

p-value

The probability of observing sample test data at least as extreme as the observed data under the assumption that the null hypothesis is true; it is not the probability that the null hypothesis itself is true.

19
New cards

Type I Error

A false positive error occurring when a true null hypothesis is incorrectly rejected, defined at the significance rate α\alpha.

20
New cards

Type II Error

A false negative error occurring when the test fails to reject a false null hypothesis (missing a genuine effect), defined at rate β\beta.

21
New cards

Statistical Power

The probability (1−β1 - \beta) of correctly detecting a true effect of a specified magnitude; it increases with larger sample size, larger effect size, and higher α\alpha, and decreases with higher variance.

22
New cards

95% Confidence Interval

An interval estimate such that if an experiment were repeated many times independently, 95%95\% of intervals constructed using this procedure would contain the true population parameter.

23
New cards

Central Limit Theorem (CLT)

The statistical principle that the sample mean of many independent, identically distributed variables with finite variance approaches a normal distribution as sample size grows, regardless of the underlying shape of the distribution.

24
New cards

Bessel's Correction

Dividing by n−1n - 1 rather than nn in the sample variance calculation to correct for the degree of freedom lost when estimating the sample mean, ensuring an unbiased variance estimate.

25
New cards

Welch's t-test

A two-sample hypothesis test for comparing means that does not assume equal population variances, serving as the safer default over Student's t-test.

26
New cards

Chi-Square Test

A statistical hypothesis test used to assess associations between two categorical variables or compare observed cell counts against expected counts, assuming expected counts are at least roughly 55.

27
New cards

Mann-Whitney U Test

A non-parametric statistical test that compares the rank distributions of two independent groups, useful when the metric is ordinal or heavily skewed and normal distribution assumptions fail.

28
New cards

Bootstrapping

A non-parametric statistical technique that repeatedly resamples a single dataset with replacement to simulate the sampling distribution of a statistic (e.g., confidence intervals for medians or ratio metrics).

29
New cards

Bayes' Theorem

A mathematical formula for calculating conditional probability: P(A∣B)=P(B∣A)P(A)P(B)P(A|B) = \frac{P(B|A)P(A)}{P(B)}, showing how prior probabilities are updated based on observed evidence.

30
New cards

Law of Large Numbers (LLN)

A mathematical theorem stating that as sample size increases, the empirical sample mean converges asymptotically toward the true population expected value.

31
New cards

Simpson's Paradox

A statistical phenomenon wherein a consistent trend observed across individual subgroups disappears or reverses when the groups are aggregated together due to confounding subgroup weights.

32
New cards

Survivorship Bias

A form of selection bias where conclusions are distorted because the analysis focuses exclusively on entities that passed an attrition filter (such as analyzing only retained customers to study renewal drivers).

33
New cards

Standard Error (SE)

The standard deviation of an estimate's sampling distribution (e.g., SE=SDn\text{SE} = \frac{\text{SD}}{\sqrt{n}}), describing the precision of the estimated statistic rather than individual data dispersion.

34
New cards

Maximum Likelihood Estimation (MLE)

A method of estimating statistical model parameters by finding parameter values that maximize the likelihood of having generated the observed data.

35
New cards

Minimum Detectable Effect (MDE)

The smallest genuine effect size an A/B test has sufficient statistical power to reliably detect at pre-specified α\alpha and power thresholds, typically determined by business viability.

36
New cards

SUTVA Violation (Interference)

A violation of the Stable Unit Treatment Value Assumption occurring when the treatment assignment of one unit influences the outcome of another unit (e.g., users sharing clusters or workspaces), typically biasing effect estimates toward zero.

37
New cards

Peeking Problem

The practice of repeatedly inspecting experimental results during data collection and stopping the test when p<0.05p < 0.05, which inflates the true false positive rate far beyond nominal levels.

38
New cards

CUPED

Controlled-experiment Using Pre-Existing Data: an experimental variance reduction technique that subtracts a scaled pre-experiment covariate (Yadj=Y−θ(X−Xˉ)Y_{\text{adj}} = Y - \theta(X - \bar{X})) to yield higher statistical power with the same expected effect.

39
New cards

Sample Ratio Mismatch (SRM)

A statistically significant deviation between observed sample allocation counts and intended experimental design ratios, serving as a critical diagnostic indicator of assignment or telemetry bugs.

40
New cards

Novelty Effect

An experimental phenomenon where users engage more intensely with a modified feature purely because it is unfamiliar, resulting in an artificial metric lift that fades over time.

41
New cards

Primacy Effect

Initial user resistance or diminished engagement observed when introducing a change due to habituation to the old experience, which diminishes as users adapt.

42
New cards

Guardrail Metrics

Critical operational or business health indicators (such as query latency p95, error rates, compute costs, or retention) that must remain uncompromised even if the primary metric improves.

43
New cards

A/A Test

An experiment where both treatment and control groups receive the exact same experience to validate randomization pipelines, telemetry, and ensure the empirical false positive rate conforms to α\alpha.

44
New cards

Goodhart's Law

The adage that when a measure becomes a target, it ceases to be a good measure, as optimization efforts focus on gaming the proxy rather than enhancing the underlying goal.

45
New cards

Bias-Variance Trade-off

The decomposition of expected prediction error into bias2+variance+irreducible noise\text{bias}^2 + \text{variance} + \text{irreducible noise}, highlighting how under-parameterized models underfit (high bias) while overly complex models overfit (high variance).

46
New cards

Data Leakage

The inadvertent introduction of information into the training dataset that would not be available at the actual time of prediction, artificially inflating validation performance.

47
New cards

Precision

The proportion of predicted positive instances that are truly positive: TPTP+FP\frac{\text{TP}}{\text{TP} + \text{FP}}, measuring prediction accuracy on positive calls.

48
New cards

Recall

The proportion of actual positive instances correctly captured by the classifier: TPTP+FN\frac{\text{TP}}{\text{TP} + \text{FN}}, measuring sensitivity.

49
New cards

ROC-AUC

Area Under the Receiver Operating Characteristic curve; quantifies ranking performance across all decision thresholds and equals the probability that a random positive instance is ranked above a random negative one.

50
New cards

PR-AUC

Area Under the Precision-Recall curve; a classification metric focusing exclusively on the positive class, providing greater informativeness than ROC-AUC when positive outcomes are rare.

51
New cards

Model Calibration

The property where predicted class probabilities correspond directly to observed empirical probabilities (e.g., among samples scored at 0.30.3, roughly 30%30\% are true positives).

52
New cards

Target Encoding

A categorical encoding method replacing categories with the average target value; it poses severe data leakage risks unless calculated strictly out-of-fold with smoothing.

53
New cards

Principal Component Analysis (PCA)

An unsupervised linear dimensionality reduction technique that projects correlated features onto orthogonal directions of maximum variance.

54
New cards

k-means Clustering

An unsupervised clustering algorithm that iteratively assigns observations to the closest of kk centroids to minimize within-cluster sum of squared distances.

55
New cards

Generative vs Discriminative Models

Generative models learn the joint probability distribution P(x,y)P(x, y) (e.g., Naive Bayes), whereas discriminative models learn the conditional distribution P(y∣x)P(y|x) or decision boundary directly (e.g., logistic regression).

56
New cards

Gradient Descent

An iterative optimization algorithm that updates model parameters in the direction opposite to the gradient of the loss function to locate a minimum.

57
New cards

Bagging (Bootstrap Aggregating)

An ensemble technique that trains multiple independent models in parallel on bootstrap resamples of training data and averages their predictions to decrease variance.

58
New cards

Out-of-Bag (OOB) Error

The evaluation error computed on the approximately 37%37\% of training instances not sampled in an individual tree's bootstrap sample (1−1e≈0.6321 - \frac{1}{e} \approx 0.632 sampled), providing a built-in validation metric.

59
New cards

Permutation Feature Importance

A model-agnostic feature importance metric that measures the drop in validation performance after randomly shuffling the values of a single feature.

60
New cards

SHAP (Shapley Additive exPlanations)

A game-theoretic framework that computes Shapley values to attribute the contribution of each individual feature to a specific model prediction both locally and globally.

61
New cards

Stationarity

A time-series property where the mean, variance, and autocorrelation structure remain constant over time, serving as a core prerequisite for ARIMA modeling.

62
New cards

ARIMA(p, d, q)

A time-series forecasting model combining pp autoregressive lag terms, dd orders of differencing to induce stationarity, and qq moving-average lagged forecast error terms.

63
New cards

Autocorrelation

The correlation of a time series with lagged values of itself, which violates independence assumptions and causes standard errors from naive tests to be understated.

64
New cards

Interrupted Time Series Analysis

A quasi-experimental methodology that evaluates the impact of an intervention by comparing post-intervention trends against a modeled pre-intervention baseline.

65
New cards

Exponential Smoothing (ETS)

A time-series forecasting method that generates predictions using weighted averages of past observations with exponentially decaying weights, with options for trend and seasonal adjustments.

66
New cards

Databricks Lakehouse

A unified data platform architecture merging the low-cost, open-format storage of data lakes with the ACID transactions, data governance, and high query performance of data warehouses.

67
New cards

Delta Lake

An open storage layer built on Parquet file formats using a file-based transaction log to deliver ACID transactions, schema enforcement and evolution, time travel, and upsert/MERGE operations.

68
New cards

Medallion Architecture

A data organization design pattern comprised of three layers: Bronze (raw ingested data), Silver (cleaned, transformed, deduplicated data), and Gold (aggregated, curated business-level tables for BI and ML).

69
New cards

Unity Catalog

Databricks' centralized data governance framework providing access control, data lineage tracking, auditing, and discovery across data and AI assets under a three-level namespace (catalog.schema.table).

70
New cards

MLflow

An open-source ML lifecycle management platform supporting experiment tracking (logging parameters and metrics), model packaging, centralized model registry, and production deployment.

71
New cards

Spark Lazy Evaluation

An execution paradigm where transformations (such as select or filter) only construct a logical execution plan, delaying computation until an action (such as count or write) triggers optimized physical execution.

72
New cards

Spark Shuffle

The physical movement and redistribution of data across cluster worker nodes over the network, triggered by wide transformations such as groupBy and join, incurring heavy disk and network I/O.

73
New cards

Broadcast Join

A distributed join optimization where Spark copies a small lookup table to the memory of every worker executor, enabling large tables to be joined locally without network shuffling.

74
New cards

Data Skew (Spark)

An uneven distribution of partition keys across a cluster where a few tasks process disproportionately huge volumes of data, causing long-tail execution bottlenecks.

75
New cards

Databricks Unit (DBU)

A normalized unit of compute processing capability per hour utilized as the fundamental unit of usage-based billing across Databricks platform products and SKUs.

76
New cards

Mosaic AI Agent Evaluation

Databricks' evaluation framework designed for assessing generative AI applications and autonomous agents using automated LLM judges to benchmark quality and safety.

77
New cards

Complete Separation (Perfect Separation)

A condition in logistic regression where a predictor perfectly separates positive and negative classes, preventing the existence of finite maximum likelihood estimates as coefficients trend to infinity.

78
New cards

Linear Probability Model (LPM)

An Ordinary Least Squares regression applied to a binary outcome that estimates percentage-point marginal effects directly, though it can yield predictions outside [0,1][0, 1] and inherently violates homoscedasticity.