Four types of analytics. As you climb, both the value and the difficulty rise.
Cases: Descriptive = Big Picture · Diagnostic = Segment Analysis · Predictive = OKCupid · Prescriptive = Pet Adoption. Classify the scenario by the QUESTION it asks.
CRISP CRISP-DM — the six-phase spine
Cross-Industry Standard Process for Data Mining. In order: B-D-P-M-E-D. It loops — it is not a straight line.
1 · Businessframe the decision
→
2 · Data Understandcollect, explore, check
→
3 · Data Prep~80% of effort
→
4 · ModellingSheets & Python
→
5 · Evaluationanswers the question?
→
6 · Deploymentcommunicate / dashboard
↻
Iterative: Evaluation can send you back to Business Understanding or Data Preparation. Data Preparation is the quiet giant — most of a real project's time lives there.
Data Data types, measurement levels & tidy data
Know the structure of your data before you touch it — it decides what you can measure and how.
Structured
Rows & columns, a schema — a spreadsheet or SQL table.
Semi-structured
JSON / XML — tags, but no rigid table.
Unstructured
Text, images, audio — no schema at all.
Level
Meaning
Example
Nominal
Labels, no order
colour, region
Ordinal
Ordered, unequal gaps
small / med / large
Interval
Equal gaps, no true zero
temperature °C
Ratio
True zero, ratios valid
price, weight, count
Tidy data: each variable is a column, each observation is a row, each cell holds one value. Exactly what pandas and pivot tables expect.
Stats IQR & the 1.5·IQR outlier rule
The boxplot spans Q1 to Q3 (the middle 50%). Whiskers reach the fences; points past them are outliers.
A value is an outlier if it falls below Q1 − 1.5·IQR or above Q3 + 1.5·IQR. Quartiles use type-7 / QUARTILE.INC. (The seminars also flag extreme outliers past a 3·IQR fence.)
Viz The chart picker
Let the data's shape and your message choose the chart — not the other way round.
You want to show…
Use
Compare values across categories
Bar chart
A trend over time
Line chart
The distribution of one numeric variable
Histogram / boxplot
The relationship between two numerics
Scatter plot
Parts of a whole / composition
Stacked bar (pie sparingly)
Honest-chart rules: start bar axes at zero, label axes & units, cut chartjunk (maximize data-ink), one message per chart. A dashboard leads with KPIs in plain language.
Prob The conditional-probability pipeline
The course's four-step recipe for P(outcome | group) — same in OKCupid and Pet Adoption.
ncount rows per group × outcome
→
freq= n / total
→
sumFreqgroupby(group) .freq.transform('sum')
→
condProb= freq / sumFreq
condProb = P(outcome | group), because dividing by sumFreq re-normalizes within each group. Equivalent to pd.crosstab(group, outcome, normalize='columns'). Always check n — a high probability on a tiny group is noise.
Python pandas cheat-strip
The one-liners the seminars lean on. Text columns show as object in .info().
Numeric answers must match the tool exactly — copy the number from the same call the key uses; don't hand-round. Lists are 0-indexed and slices exclude the stop (lst[0:2] = first two).
Sheets Google Sheets ↔ pandas
The same operations, two tools. The exam can ask either way.
Task
Google Sheets
pandas
Average a column
=AVERAGE(B2:B99)
df['b'].mean()
Count non-empty
=COUNTA(A2:A99)
df['a'].count()
Build a category
=IF(C2>20,"Hi","Lo")
np.where(df.c>20,'Hi','Lo')
Group & summarize
Pivot table
df.groupby(...).agg(...)
Quartiles
=QUARTILE.INC(r,1)
df['x'].quantile(.25)
COUNT counts numbers only; COUNTA counts any non-empty cell. Lock references with $A$1 before filling a formula down. A pivot table IS a groupby.