Konsep Dasar Probabilitas

Statistika Dasar

Logo

STUDY CASE 1

Penerapan Probabilitas dalam Prediksi Kualitas Produk:

Sebuah perusahaan manufaktur memproduksi barang elektronik dan ingin memprediksi apakah suatu produk akan cacat atau tidak. Data historis menunjukkan bahwa 5% dari produk yang diproduksi adalah cacat. Perusahaan menggunakan data tentang jenis komponen dan proses produksi untuk memprediksi cacat produk menggunakan teknik probabilitas.


1. Data Historis

  • Probabilitas produk cacat: \[ P(D = \text{Yes}) = 0.05, \quad P(D = \text{No}) = 0.95 \]

  • Probabilitas komponen: \[ P(C = \text{Low}) = 0.30, \quad P(C = \text{High}) = 0.70 \]

  • Probabilitas proses produksi: \[ P(P = \text{Below}) = 0.40, \quad P(P = \text{Standard}) = 0.60 \]

Berikut adalah probabilitas bersyarat yang telah diasumsikan:

  • \(P(C = \text{Low}, P = \text{Below} \,|\, D = \text{Yes}) = 0.07\)
  • \(P(C = \text{Low}, P = \text{Below} \,|\, D = \text{No}) = 0.02\)

2. Probabilitas Total

Probabilitas total digunakan untuk menghitung \(P(C = \text{Low}, P = \text{Below})\) dengan mempertimbangkan kedua kemungkinan produk cacat (\(D = \text{Yes}\)) atau tidak cacat (\(D = \text{No}\)).

Rumus probabilitas total:

\[ P(C = \text{Low}, P = \text{Below}) =\\ P(C = \text{Low}, P = \text{Below} \,|\, D = \text{Yes}) \cdot P(D = \text{Yes}) + P(C = \text{Low}, P =\\ \text{Below} \,|\, D = \text{No}) \cdot P(D = \text{No}) \]

Substitusi nilai-nilai yang diketahui:

\[ P(C = \text{Low}, P = \text{Below}) = (0.07 \cdot 0.05) + (0.02 \cdot 0.95) \]

\[ P(C = \text{Low}, P = \text{Below}) = 0.0035 + 0.019 = 0.0225 \]

3. Probabilitas Bersyarat

\(P(D = \text{Yes} \,|\, C = \text{Low}, P = \text{Below})\)

Dengan menggunakan Teorema Bayes, kita dapat menghitung probabilitas bersyarat berikut:

\[ P(D = \text{Yes} \,|\, C = \text{Low}, P = \text{Below}) = \frac{P(C = \text{Low}, P = \text{Below} \,|\, D = \text{Yes}) \cdot P(D = \text{Yes})}{P(C = \text{Low}, P = \text{Below})} \]

Substitusi nilai yang sudah diketahui:

\[ P(D = \text{Yes} \,|\, C = \text{Low}, P = \text{Below}) = \frac{(0.07 \cdot 0.05)}{0.0225} \]

\[ P(D = \text{Yes} \,|\, C = \text{Low}, P = \text{Below}) = \frac{0.0035}{0.0225} = 0.1556 \]

5. Kesimpulan

  • Probabilitas Marginal:
    • \(P(C = \text{Low}) = 0.30\)
    • \(P(D = \text{Yes}) = 0.05\)
    • \(P(P = \text{Below}) = 0.40\)
  • Probabilitas Bersyarat:
    • \(P(C = \text{Low}, P = \text{Below} \,|\, D = \text{Yes}) = 0.07\)
    • \(P(C = \text{Low}, P = \text{Below} \,|\, D = \text{No}) = 0.02\)
  • Probabilitas Total:
    • \(P(C = \text{Low}, P = \text{Below}) = 0.0225\)
  • Probabilitas \(P(D = \text{Yes} \,|\, C = \text{Low}, P = \text{Below})\):
    • \(P(D = \text{Yes} \,|\, C = \text{Low}, P = \text{Below}) = 0.1556\) atau \(15.56\%\)

STUDY CASE 2

Penerapan Probabilitas dalam Deteksi Penipuan Transaksi:

Sebuah perusahaan e-commerce ingin mendeteksi transaksi yang berpotensi penipuan. Berdasarkan data historis, 1% dari transaksi yang dilakukan adalah penipuan. Perusahaan ingin menggunakan fitur-fitur tertentu seperti lokasi transaksi, jumlah pembelian, dan metode pembayaran untuk memprediksi apakah suatu transaksi adalah penipuan atau tidak.


1. Data Historis

  • Probabilitas transaksi adalah penipuan (\(P(F = \text{Fraud})\)) = 1%
  • Probabilitas transaksi bukan penipuan (\(P(F = \text{Not Fraud})\)) = 99%
  • Probabilitas lokasi tertentu adalah di luar negeri (\(P(L = \text{Foreign})\)) = 20%
  • Probabilitas jumlah pembelian lebih dari 500 (\(P(A = \text{High})\)) = 10%
  • Probabilitas menggunakan kartu kredit sebagai metode pembayaran (\(P(M = \text{Credit Card})\)) = 50%

Bagaimana probabilitas bahwa suatu transaksi adalah penipuan (\(F = \text{Fraud}\)), jika diketahui transaksi dilakukan dari lokasi luar negeri, jumlah pembelian lebih dari $500, dan metode pembayaran menggunakan kartu kredit?

2. Penyelesaian dengan Teorema Bayes

Data Asumsi Baru:

  1. Probabilitas lokasi luar negeri:

    • \(P(L = \text{Foreign} \mid F = \text{Fraud}) = 0.7\)
    • \(P(L = \text{Foreign} \mid F = \text{Not Fraud}) = 0.2\)
  2. Probabilitas jumlah pembelian besar:

    • \(P(A = \text{High} \mid F = \text{Fraud}) = 0.6\)
    • \(P(A = \text{High} \mid F = \text{Not Fraud}) = 0.1\)
  3. Probabilitas metode pembayaran kartu kredit:

    • \(P(M = \text{Credit Card} \mid F = \text{Fraud}) = 0.7\)
    • \(P(M = \text{Credit Card} \mid F = \text{Not Fraud}) = 0.4\)

Langkah-Langkah Perhitungan:

  1. Probabilitas gabungan dengan kondisi penipuan:

    \[ P(L = \text{Foreign}, A = \text{High}, M = \text{Credit Card} \mid F = \text{Fraud}) =\\ P(L = \text{Foreign} \mid F = \text{Fraud}) \cdot P(A = \text{High} \mid F = \text{Fraud}) \cdot P(M = \text{Credit Card} \mid F = \text{Fraud}) \] Substitusi nilai:

    \[ P(L, A, M \mid F = \text{Fraud}) = 0.7 \cdot 0.6 \cdot 0.7 = 0.294 \]

  2. Probabilitas gabungan dengan kondisi bukan penipuan:

    \[ P(L = \text{Foreign}, A = \text{High}, M = \text{Credit Card} \mid F = \text{Not Fraud}) =\\ P(L = \text{Foreign} \mid F = \text{Not Fraud}) \cdot P(A = \text{High} \mid F = \text{Not Fraud}) \cdot P(M = \text{Credit Card} \mid F = \text{Not Fraud}) \] Substitusi nilai:

    \[ P(L, A, M \mid F = \text{Not Fraud}) = 0.2 \cdot 0.1 \cdot 0.4 = 0.008 \]

  3. Probabilitas total:

    \[ P(L = \text{Foreign}, A = \text{High}, M = \text{Credit Card}) = \\P(L, A, M \mid F = \text{Fraud}) P(F = \text{Fraud}) + P(L, A, M \mid F = \text{Not Fraud}) P(F = \text{Not Fraud}) \] Substitusi nilai:

    \[ P(L, A, M) = (0.294 \cdot 0.01) + (0.008 \cdot 0.99) = 0.00294 + 0.00792 = 0.01086 \]

  4. Probabilitas penipuan bersyarat:

    \[ P(F = \text{Fraud} \mid L = \text{Foreign}, A = \text{High}, M = \text{Credit Card}) =\\ \frac{P(L, A, M \mid F = \text{Fraud}) P(F = \text{Fraud})}{P(L, A, M)} \] Substitusi nilai:

    \[ P(F = \text{Fraud} \mid L = \text{Foreign}, A = \text{High}, M = \text{Credit Card}) = \frac{0.294 \cdot 0.01}{0.01086} = \frac{0.00294}{0.01086} \approx 0.271 \]

Hasil Akhir:

Probabilitas bahwa transaksi tersebut adalah penipuan:

\[ P(F = \text{Fraud} \mid L = \text{Foreign}, A = \text{High}, M = \text{Credit Card}) \approx 27.1\% \]