1 Introduksi
1.1 Latar Belakang
Randomization adalah prinsip ketiga dari R-R-B Fisherian (Randomization–Replication–Blocking) yang melindungi eksperimen dari systematic bias dan time-confounding: drift kalibrasi instrumen, fatigue operator, ambient temperature gradient selama hari, atau urutan batch bahan baku (Fisher, 1935; Montgomery, 2017). Tanpa randomization, time-based nuisance masuk ke treatment effect.
Randomization & Run Sheet bertugas mengkonversi design matrix (Plackett-Burman, Factorial, RSM, dst.) menjadi printable run sheet dengan urutan random — siap dibawa ke laboratorium atau dikirim ke production floor.
1.2 Tujuan Modul
Modul Randomization & Run Sheet di SQalytics ditujukan untuk:
- Menerima design matrix dari modul DOE lain (Screening, Factorial, RSM, Mixture).
- Menerapkan complete randomization, restricted randomization within block, atau partial reset within day.
- Menghasilkan printable run sheet dengan kolom: run ID, randomized order, factor levels (decoded ke unit nyata), space untuk timestamp dan response.
- Menyediakan batch resume: jika run sheet di-pause hari ke-2, urutan masih konsisten.
- Audiens: praktisi laboratorium yang menjalankan DOE multi-day, ProQ industri yang butuh paper trail run.
1.3 Posisi di Antara Alternatif
Pilih Randomization & Run Sheet setelah design matrix sudah dibuat di modul DOE lain. Untuk design generation, pakai Screening Design Builder, Factorial Design Builder, atau RSM Studio. Untuk blocking dengan restricted randomization, pakai Blocking / Batch Design. Untuk replication study, pakai Replicate & Center Point Checker.
2 Metode
2.1 Dasar Teoretis
Complete randomization: shuffle semua $N$ runs dengan Fisher-Yates algorithm (Knuth, 1997):
- For $i$ dari $N-1$ ke $1$:
- Pilih $j$ uniformly dari $0$ ke $i$.
- Swap $a[i]$ dengan $a[j]$.
Property: setiap permutasi memiliki probability $1/N!$.
Restricted randomization (within-block): shuffle hanya dalam block. Pakai pada RCBD, Latin Square.
Pseudo-random seed: pakai reproducible seed (mis. unix timestamp atau experiment ID) supaya randomization dapat di-replicate untuk audit trail. Modul SQalytics default pakai cryptographic-quality PRNG (Mersenne Twister atau PCG64).
Run sheet template (Box, Hunter, & Hunter, 2005, Appendix):
| Col | Content | Catatan |
|---|---|---|
| Run ID | Unique identifier (mis. R001) | Tracking |
| Random order | 1, 2, 3, ... $N$ | Eksekusi order |
| Factor levels | Decoded to actual units | Mis. T = 65 °C bukan "0" |
| Date / Time start | Timestamp | Drift audit |
| Date / Time end | Timestamp | Duration calculation |
| Response 1, 2, ... | Empty fields | Recording |
| Operator | Initial | Personnel audit |
| Notes | Comments | Anomalies |
Stratified randomization untuk multi-day: pisahkan $N$ runs ke $k$ blok harian, randomize within day dan randomize day order.
2.2 Persamaan Inti
Fisher-Yates shuffle: $O(N)$ algorithm dengan uniform permutation probability $1/N!$.
Block size: $N_{\text{block}} = N / k$ untuk balanced.
Reproducibility: $\text{seed} = f(\text{experiment ID, date})$ untuk audit replay.
2.3 Asumsi & Batas Validitas
| Asumsi | Konsekuensi jika dilanggar | Cara cek di SQalytics |
|---|---|---|
| Randomization actually executed in lab | Time-based bias | Operator training + audit |
| Seed disimpan untuk reproducibility | Cannot replicate | Modul auto-save seed |
| Within-block randomization untuk RCBD | Block × order confounded | Pakai restricted mode |
| Run sheet printable + lab-friendly | Operator skip atau mis-record | Tabel jelas + space cukup |
| Long-running experiments di-resume tepat | Inconsistent randomization | Save state per session |
3 Cara Kerja
3.1 Step-by-Step di SQalytics
- Buka
Randomization & Run Sheet. - Muat design matrix (CSV dari modul DOE atau manual upload).
- Pilih randomization type:
Complete(default),Within-block(untuk RCBD),Per-day stratified(multi-day). - (Opsional) Atur random seed untuk reproducibility.
- (Opsional) Tambahkan kolom kustom (Operator, Response, Notes).
- Klik
Generate Run Sheet. - Tinjau hasil: Tab
Run Sheet— full table dengan randomized order; TabDecoded Values— factor levels in actual units; TabPrint Preview— formatted untuk PDF. - Ekspor PDF atau CSV.
3.2 Template Tabel Input + Contoh Data Sintetis
Input dari Factorial Design (2³ = 8 run):
| Run ID | A (T °C) | B (Time min) | C (Ratio mL/g) |
|---|---|---|---|
| R001 | 50 | 15 | 5 |
| R002 | 80 | 15 | 5 |
| R003 | 50 | 45 | 5 |
| R004 | 80 | 45 | 5 |
| R005 | 50 | 15 | 20 |
| R006 | 80 | 15 | 20 |
| R007 | 50 | 45 | 20 |
| R008 | 80 | 45 | 20 |
3.3 Contoh Luaran
Generated run sheet (random seed = 42):
| Run order | Run ID | A (T °C) | B (Time min) | C (Ratio mL/g) | Start | End | Response | Operator | Notes |
|---|---|---|---|---|---|---|---|---|---|
| 1 | R005 | 50 | 15 | 20 | __ | __ | __ | __ | __ |
| 2 | R008 | 80 | 45 | 20 | __ | __ | __ | __ | __ |
| 3 | R002 | 80 | 15 | 5 | __ | __ | __ | __ | __ |
| 4 | R007 | 50 | 45 | 20 | __ | __ | __ | __ | __ |
| 5 | R001 | 50 | 15 | 5 | __ | __ | __ | __ | __ |
| 6 | R004 | 80 | 45 | 5 | __ | __ | __ | __ | __ |
| 7 | R006 | 80 | 15 | 20 | __ | __ | __ | __ | __ |
| 8 | R003 | 50 | 45 | 5 | __ | __ | __ | __ | __ |
Randomization & Run Sheet dari design matrix design_factorial (Fisher, 1935; Knuth, 1997).4 Kesimpulan
4.1 Relevansi Real-World
- Multi-day DOE dengan day sebagai block.
- GMP compliance — paper trail audit untuk run order.
- Operator rotation — assign run ke operator berbeda untuk minimize operator effect.
- Time-of-day effects — coffee tasting morning vs afternoon impacted by chronotype.
- Catatan eksperimen reproducible — seed memungkinkan replay.
4.2 Where to Go from Here
⚙ Troubleshooting Cepat
Project / Settings.i Riwayat Revisi
| Tanggal | Revisi | Penulis |
|---|---|---|
| 2026-05-12 | Migrasi MD v2 → HTML final dengan figure publikasi + caption Elsevier-style (W2 batch 12 Mei) | Claude |
| 2026-05-12 | Draft v2 publikasi (Fisher-Yates + run sheet template + APA Fisher/Montgomery/Knuth) | Claude |
4 Referensi
- Fisher, R. A. (1935). The design of experiments. Oliver and Boyd.
- Montgomery, D. C. (2017). Design and analysis of experiments (9th ed.). John Wiley & Sons.
- Box, G. E. P., Hunter, J. S., & Hunter, W. G. (2005). Statistics for experimenters: Design, innovation, and discovery (2nd ed.). John Wiley & Sons.
- Knuth, D. E. (1997). The art of computer programming, Volume 2: Seminumerical algorithms (3rd ed.). Addison-Wesley.