Materi 09 · Advanced Techniques

Statistical Analysis untuk BA

Statistik bukan untuk akademisi saja. BA wajib paham descriptive vs inferential, hypothesis testing, correlation vs causation, dan distribution untuk decision yang scientifically defensible.

⏱ 30 Menit🎯 Intermediate📈 Statistics

1. Descriptive vs Inferential

2 Cabang Utama

Descriptive: mendeskripsikan data yang ada. Mean, median, std, distribution. Pertanyaan: "apa yang terjadi?"
Inferential: simpulkan tentang population dari sample. Hypothesis test, confidence interval. Pertanyaan: "apakah hasil ini significant?"

2. Measure of Central Tendency

Mean (Average) μ = Σx / n
// Sensitive ke outlier
Median Nilai tengah setelah sort
// Robust ke outlier — pakai untuk skewed data (income, price)
Mode Nilai yang paling sering muncul
// Untuk categorical data

Mean vs Median

Untuk income/revenue/price, median lebih representative dari mean. Mean Indonesia per kapita Rp 70 juta — median jauh di bawah karena distribusi tidak normal.

3. Measure of Variability

Variance & Standard Deviation σ² = Σ(x − μ)² / n // variance
σ = √σ² // std deviation
// Std dev di unit sama dengan data — lebih intuitif

4. Distribution

DistributionKarakterUse Case
Normal (Gaussian)Bell curve symmetricTinggi badan, IQ, error noise
Skewed RightLong tail kananIncome, price, sales
Skewed LeftLong tail kiriTest score (test mudah)
UniformEqual probabilityRandom number, lottery
BernoulliBinary outcomeConversion, click/no-click
PoissonCount of eventsCustomer arrivals/hour, defects

5. CORRELATION

Pearson Correlation r = Σ(x−μx)(y−μy) / √(Σ(x−μx)² × Σ(y−μy)²)
Range: -1 to +1
+1 = perfect positive | -1 = perfect negative | 0 = no linear

Correlation ≠ Causation

Penjualan es krim & tenggelam pantai sama-sama naik di musim panas. Bukan berarti es krim sebabkan orang tenggelam. Correlation sangat kuat, tapi cuaca panas adalah hidden variable. Selalu cari mekanisme kausal.

6. HYPOTHESIS TESTING

Workflow Standar

1. State H₀ (null) & H₁ (alternative). H₀: tidak ada efek. H₁: ada efek.
2. Pilih significance level α (biasanya 0.05).
3. Hitung test statistic (z, t, chi-square).
4. Hitung p-value. Jika p < α, reject H₀.
5. Interpretasikan. "Statistically significant" ≠ "important".

Common Tests z-test: sample size besar (>30), σ diketahui
t-test: sample kecil atau σ tidak diketahui
chi-square: categorical data independence
ANOVA: compare 3+ groups
Mann-Whitney: non-parametric (data tidak normal)

7. CONFIDENCE INTERVAL

CI Formula CI = x̄ ± z × (σ/√n)
// 95% CI = ±1.96 × SE | 99% CI = ±2.58 × SE

Saat report metric, jangan hanya angka — sertai confidence interval. "Conversion rate 4.2% (95% CI: 3.8% - 4.6%)". Ini menjawab "seberapa yakin kamu dengan angka itu?"

8. p-VALUE FALLACIES

9. SAMPLE SIZE & POWER

Sebelum experiment, hitung sample size minimum. Tools: Evan Miller, statsmodels Python.

Power Analysis Sample size n bergantung pada:
- Baseline rate (p)
- MDE (minimum detectable effect)
- Power (1-β, biasanya 0.80)
- Significance α (biasanya 0.05)

📝 Tugas Praktik

  1. Pakai dataset bisnis. Hitung mean, median, mode, std, IQR untuk metric kunci.
  2. Plot distribution histogram. Identifikasi skewness.
  3. Hitung correlation matrix untuk numeric features. Visualisasi heatmap.
  4. Lakukan 2-sample t-test: bandingkan revenue 2 kelompok customer.
  5. Pakai Evan Miller calculator: berapa sample size dibutuhkan untuk detect 5% lift?
  6. Tulis 1 paragraf insight yang scientifically defensible.

Rangkuman