Cheat sheet + 20 flashcards covering statistics, distributions, correlation, hypothesis testing, data cleaning, and choosing the right visualisation.
Quantitative: numerical, measurable — discrete (whole: number of sales) or continuous (any value: temperature).
Qualitative: categorical, descriptive — nominal (no order: colour) or ordinal (ordered: rating 1–5).
Mean: sum / count. Sensitive to outliers.
Median: middle value when sorted. Robust to outliers. Use for skewed data.
Mode: most frequent value. Only measure valid for categorical data.
Symmetric distribution: mean ≈ median ≈ mode.
Variance: σ² = Σ(xᵢ−μ)²/N — average squared deviation.
Std Dev: σ = √variance — same units as data, easier to interpret.
IQR: Q3 − Q1. Spread of middle 50%. Outlier rule: x < Q1−1.5·IQR or x > Q3+1.5·IQR.
Symmetric bell curve: mean = median = mode.
Described by μ (mean) and σ (std dev).
68-95-99.7 rule:
~68% of data within ±1σ
~95% within ±2σ
~99.7% within ±3σ
Positive skew (right tail): mean > median. A few very high values pull mean up. E.g. income data.
Negative skew (left tail): mean < median.
Outliers: data points far from the rest. Always investigate before removing — may be data errors or genuine extremes.
Correlation: two variables move together — measured by Pearson r ∈ [−1, +1].
r = 1: perfect positive · r = −1: perfect negative · r = 0: no linear relationship.
Correlation ≠ Causation. A hidden confounder variable may explain both.
H₀ (null): no effect / no difference — assume true until evidence says otherwise.
H₁ (alternative): the effect you're testing for.
p-value: probability of seeing data this extreme if H₀ is true.
p < α (usually 0.05) → reject H₀.
Type I (α): reject H₀ when it is true — false positive / false alarm.
Type II (β): fail to reject H₀ when it is false — false negative / missed detection.
Power = 1 − β: probability of correctly detecting a real effect.
1. Handle missing values — impute (mean/median) or drop
2. Remove duplicates
3. Fix data types (parse dates, cast numbers)
4. Detect & handle outliers
5. Standardise formats (dates, strings, categories)
6. Validate against business rules
Group rows by a dimension, then apply an aggregate function:
COUNT, SUM, AVG, MIN, MAX
Example: "revenue by region by month" = GROUP BY region, month, then SUM(revenue).
Filter after aggregation with HAVING, not WHERE.
Distribution of continuous: histogram or box plot
Compare categories: bar chart
Trend over time: line chart
Two continuous variables: scatter plot
Part-of-whole: pie / stacked bar
Correlation matrix: heatmap
Descriptive: summarise the data you have — mean, SD, charts, frequency tables. No generalisation beyond the dataset.
Inferential: draw conclusions about a larger population from a sample — hypothesis tests, confidence intervals, regression.
Space flip · → next · ← prev · G got it · R review