I can't guarantee these answers are 100% correct — take them as reference only!
LinkedIn Stats
One bank has 5 tellers and a single line; another bank has 5 tellers but 5 separate lines. Which one would you stand in?
Simple statistical explanation: the "long plank effect" (the opposite of the weakest-link effect). In a single queue, your waiting time is determined by the fastest available teller. In multiple queues, your waiting time depends on the slowest teller in your own line, which could be much longer than average if you're unlucky.
Queueing theory (Erlang-C model): a single queue gives more stable wait times, since the next available teller always serves the next customer. Multiple queues give higher variance, since choosing a slow teller's line can drastically increase your wait. The average waiting time is the same either way — same mean, but bigger variance for the multi-line setup.
Distributions
Part 1:
- Q1. Draw the distribution of American men's heights (normal distribution)
- Q2. Draw the distribution of American women's heights (normal distribution)
- Q3. If you combine men and women together, what does the distribution look like? (bimodal distribution)
Part 2:
- Q1. Everyone on LinkedIn has connections (say person A has 100, B has 200, C has 500) — draw the distribution of number of connections (right-skewed)
- Q2. They asked about the range of the mean, and asked me to explain why
- Q3. Compare the mean, median, and mode, and explain why (I spent a long time explaining this one)
For a right-skewed distribution: mode < median < mean. This happens because the long right tail pulls the mean to the right, while the median and mode stay closer to where most of the data sits.
Simpson's paradox
The SF-vs-NY email campaign question: a marketing team wants to test a new email campaign — how do you determine whether the new email is actually better? This tests Simpson's paradox, which is an old classic on this forum. They also asked whether you could compute a confidence interval for it.
Another Simpson's paradox question: two email versions were tested for two consecutive weeks in two different cities. In each city individually, version B looked better than A, but combined across both cities, A came out ahead.
Points you're expected to hit: time, city, and whether the dataset is balanced. It's an imbalanced sample — the two cities have different baseline conversion rates to begin with, because of confounding factors like region and geography (different email delivery times, different time zones, different user habits). You should retest to make sure the data is balanced.
How to deal with class imbalance:
Data-level approaches:
- Undersample the majority class (works well when the dataset is large; the risk is losing useful information)
- Oversample the minority class, by duplicating data or generating synthetic samples with SMOTE (works well when you need to keep all the data, but risks overfitting if you just duplicate)
Algorithm-level approaches:
- Assign a higher weight to the minority class in the loss function so the model isn't biased toward the majority class
- Use anomaly detection instead of classification
- Evaluate with metrics suited for imbalanced data — precision & recall, F1 score, AUC, confusion matrix. Precision is TP/(TP+FP), recall is TP/(TP+FN)
They also asked: if you're sampling from a super-large dataset, how do you verify the model built from the sample is actually good?
- Check whether the sampled dataset represents the full dataset well — stratified sampling for categorical variables, and check the distribution of key features (histograms, K-S test, differences in mean/median/std)
- Check whether the model trained on the sample generalizes to the full dataset — train on the sample, then evaluate on a holdout set from the full data; or use out-of-sample validation (hold out something like 10% of the full dataset before sampling, as the test set)
- Train the model on multiple bootstrapped samples and check the variance in performance to see if it's stable
How to prevent overfitting in tree-based models: use regularization (max depth, min samples per split, pruning); ensemble methods (Random Forest, Boosting); cross-validation and early stopping; and better features with more data.
Why isn't L1/L2 regularization unbiased? L1/L2 regularization are biased estimators because they shrink coefficients toward zero, but that bias is often a worthwhile tradeoff for better generalization and lower variance.
Discussion
Loading comments…