Onsite Data Analysis Project
You are given an unfamiliar dataset during an onsite interview and asked to perform a complete data analysis in roughly one hour. The dataset could be anything -- customer transactions, sensor readings, financial returns. You have access to Python (pandas, sklearn, matplotlib) and a Jupyter notebook.
Walk through your full approach: how do you spend your time, what do you look at first, how do you decide what to model, and how do you present your findings? Be specific about the tools and techniques you would use at each stage.
Assume the interviewer cares as much about your process and communication as the final result.
Hints
- Think about time allocation first -- what fraction of your hour goes to understanding the data vs. building a model?
- Always establish a baseline (predict the mean or majority class) before fitting any model, so you can show your model actually adds value.
- Keep your notebook clean with section headers and narrate your process -- the interviewer is evaluating your thinking as much as your output.
Worked Solution
How to Think About It: The biggest mistake candidates make is diving straight into modeling. Interviewers are testing whether you can think clearly under time pressure with messy, unfamiliar data. The right move is to spend the first third of your time just understanding the data -- because the single most common failure mode is building a model on data you do not actually understand. A working end-to-end pipeline with a simple model beats a half-finished complex model every time.
Key Insight: Treat this like a real work deliverable, not an exam. You are telling a story: "Here is what I found in the data, here is what I built, here is what I would do next." The interviewer wants to see structured thinking and clear communication at every step.
The Method:
1. Data exploration (15-20 min): - Load the data: df.shape, df.dtypes, df.head() to get oriented. - df.describe() for summary statistics on numerics. Look for suspicious min/max values, high cardinality, or features with zero variance. - Check missingness: df.isnull().sum(). If more than 30% of a column is missing, flag it but do not drop it yet. - Identify the target variable (ask the interviewer if ambiguous) and feature types (numeric, categorical, datetime). - Compute a correlation matrix and eyeball it for strong relationships or multicollinearity.
2. Data cleaning (10-15 min): - Handle missing values: median imputation for numeric features, mode for categorical, or create a "missing" indicator if the missingness itself might be informative. - Remove exact duplicates. - Cap outliers at the 1st/99th percentile or use a log transform for heavy-tailed features. - Convert date columns to datetime, extract useful features (day of week, month, time since some anchor). - One-hot encode categoricals with few levels; label-encode or target-encode high-cardinality ones.
3. Exploratory analysis (15-20 min): - Univariate: histograms or KDE plots for key features. Box plots to compare distributions across groups. - Bivariate: scatter plots of the top correlated features vs. the target. For classification, look at class balance. - If time series: plot the target over time, look for trends, seasonality, regime changes. - Write down 2-3 hypotheses based on what you see (e.g., "feature X seems to drive the target").
4. Modeling (15-20 min): - Train/test split (80/20, or time-based if temporal). Never touch the test set until the end. - Start with a baseline: predict the mean (regression) or majority class (classification). Record the metric. - Fit a simple model first: linear/logistic regression. Check coefficients for sanity. - Then try one tree-based model: Random Forest or XGBoost with default hyperparameters. - Evaluate on the held-out set using an appropriate metric (RMSE for regression, AUC for classification). Compare to baseline. - Extract feature importances from the tree model. Do they match your EDA hypotheses?
5. Presentation (5-10 min): - Summarize in 3 bullets: what the data looks like, what you found, how well the model performs. - Show 2-3 clean visualizations (target distribution, feature importance, actual vs. predicted). - State limitations honestly: small sample size, data leakage risks, features you wish you had. - Suggest concrete next steps: additional feature engineering, hyperparameter tuning, more sophisticated models, collecting more data.
Practical Considerations: - Communicate constantly. Narrate what you are doing and why. Silence is your enemy in an onsite. - If the data has a time dimension, be careful about leakage -- do not use future information to predict the past. - Prefer interpretable models unless the interviewer specifically asks for accuracy. A linear model you can explain beats a black box you cannot. - If something breaks or looks wrong, say so. Debugging gracefully under pressure is a signal of experience. - Keep your notebook organized with section headers. The interviewer may review it after.
Answer: Spend roughly equal time on exploration, cleaning, EDA, and modeling, with a short wrap-up. Prioritize a working end-to-end pipeline over any single polished step. Communicate your reasoning throughout, and always compare your model against a simple baseline.
Intuition
This problem tests the skill that separates junior and senior data scientists: the ability to go from zero to insight under time pressure with unfamiliar data. In real quant work, you frequently get handed a new dataset -- a new signal, a client's portfolio, an anomaly in production -- and need to make sense of it quickly. The candidates who do best are the ones who resist the urge to jump to the fanciest model and instead spend time understanding what they are looking at. A simple model on well-understood, clean data almost always beats a complex model on data you have not explored.
The other meta-lesson is about communication. On a trading desk, your analysis is only valuable if you can explain it to someone who did not do the work. Structuring your approach as a narrative -- here is what I see, here is what I think it means, here is what I would do next -- is exactly how senior quants present to portfolio managers and risk committees.