Anda di halaman 1dari 25

VARIABEL RANDOM

Statistika dan Probabilitas


Pengertian
2

❑ Random variable (variabel acak)


❑ suatu fungsi yang didefinisikan pada sample space
❑ Jenis
❑ Discrete random variables
❑ Continuous random variables
❑ Contoh
❑ jumlah hari hujan selama 1 tahun → diskret
❑ jumlah (volume) hujan selama 1 tahun → kontinu

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Variabel Random
3

❑ Notasi
❑ X → variabel random
❑ x → nilai variabel random
❑ Fungsi
❑ Suatu fungsi variabel random adalah variabel random pula
❑ Jika X adalah variabel random, maka Z = f(X) adalah juga variabel random

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Variabel Random Diskret
4

❑ X = discrete random variables


❑ = x1, x2, x3, …, xn

fX(x1)
fX(x2) probabilitas ∑ fX(xi) = 1
fX(x3)
fX(xn)

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


https://istiarto.staff.ugm.ac.id

5 fX(xi)
distribusi probabilitas diskret

x1 x2 x3 … xn−1 xn
1
distribusi probabilitas kumulatif
diskret
FX(xi)

probabilitas
0 x1 x2 x3 … xn−1 xn x ≤ xi

Statistika dan Probabilitas


❑ Distribusi probabilitas kumulatif
6
suatu variabel random X untuk X = x

𝐹𝑋 𝑥 = ෍ 𝑓𝑋 𝑥𝑖
𝑥𝑖 ≤𝑥

❑ Distribusi probabilitas
suatu variabel random X untuk X = x
𝑓𝑋 𝑥𝑖 = 𝐹𝑋 𝑥𝑖 − 𝐹𝑋 𝑥𝑖−1

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


▪ Frekuensi relatif ▪ Probabilitas
7
𝑓𝑥𝑖 = 𝐹𝑥𝑖 − 𝐹𝑥𝑖−1 𝑓𝑋 𝑥𝑖 = 𝐹𝑋 𝑥𝑖 − 𝐹𝑋 𝑥𝑖−1

▪ Frekuensi relatif kumulatif


𝑖

𝐹𝑥𝑖 = ෍ 𝑓𝑥𝑗 𝐹𝑋 𝑥 = ෍ 𝑓𝑋 𝑥𝑖
𝑗=1 𝑥𝑖 ≤𝑥

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Variabel Random Kontinu
8

❑ Probabilitas
𝑛𝑖 ni = jumlah data di klas ke-i
prob 𝐴 = = 𝑓𝑥𝑖
𝑛 n = jumlah seluruh data

❑ Dengan demikian fxi dapat dipandang sebagai nilai estimasi probabilitas


fxi → estimasi prob (A)
variabel random
histogram frekuensi → pendekatan distribusi probabilitas kontinu diperlakukan
seolah-olah variabel
frekuensi kumulatif → pendekatan distribusi probabilitas kumulatif random diskret

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


pX(x) luas =
prob(X ≤ b) luas = 1
9
pdf = probability density function
luas =
prob(a ≤ X ≤ b)

a b x
1
PX(x)
cdf = cumulative probability
distribution function
PX(b) prob(a ≤ X ≤ b) PX(x) = prob(X ≤ x)
PX(a)
0 x
a b
https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas
pX(x) = probability density function of a continuous random variable
10
PX(x) = cumulative probability distribution function

𝑃𝑋 𝑥 = prob 𝑋 ≤ 𝑥 𝑑𝑃𝑋 𝑥 = 𝑝𝑋 𝑥 𝑑𝑥 𝑃𝑋 𝑥 = න 𝑝𝑋 𝑡 𝑑𝑡
−∞

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Beberapa Sifat Probabilitas
11

b
(1) pX (x )  0, x (5) prob(a  X  b ) = pX (t ) d t = PX (b ) − PX (a )

a
+

 pX (x ) d x = 1
c
(2)
(6) prob( X = c ) = pX (t ) d t = PX (c ) − PX (c ) = 0

−
c
(3) PX (−  ) = 0

(4) PX (+  ) = 1 prob (a  X  b ) = prob (a  X  b ) = prob (a  X  b ) = prob (a  X  b )

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Kala Ulang (Return Period)
12

prob ( X  a ) = prob ( X  a )

❑ Jadi dalam definisi kala ulang


a. suatu kejadian yang menyamai atau melampaui suatu nilai tertentu
b. suatu kejadian yang melampaui suatu nilai tertentu
❑ Kedua definisi, a dan b, adalah sama mengingat probabilitas suatu
kejadian (event) menyamai suatu nilai tertentu bernilai nol

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Contoh #1
13

❑ Diketahui suatu variabel random X memiliki fungsi kerapatan probabilitas (pdf)


sbb.
x 2 untuk 0  x  2

pX (x ) = 
0 untuk nilai x yang lain

❑ Gambarlah pdf tersebut


❑ Tunjukkan bahwa prob(0 < X < 2) = 1
❑ Hitunglah prob(X < 1.5)= PX(1.5)
❑ Hitunglah prob(0.5 < X < 1.5)

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Contoh #2
14

❑ Pengolahan data annual series curah hujan harian maksimum, H mm, di suatu stasiun ARR
(Automatic Rainfall Recorder) menunjukkan bahwa sebaran probabilitas suatu besaran
curah hujan, pH(h), dapat dinyatakan dengan suatu fungsi (pdf) sbb.
1
 75 untuk 0  h  50
 1
pH (h ) =  (100 − h) untuk 50  h  100
 3750
0 untuk nilai h yang lain


❑ Gambarlah pdf tsb.


❑ Carilah fungsi cdf berdasarkan pdf tsb.
❑ Hitunglah prob(40 mm < H < 60 mm)

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Bivariate Distributions
15

❑ Pada bahasan sebelumnya, variabel random adalah variabel tunggal


(univariate distribution)
❑ Pada bahasan berikut ini, variabel random terdiri dari dua variabel
(bivariate distributions)
❑ Apabila kita ingin mempelajari perilaku dua atau lebih variabel random, maka
kita perlu menghitung probabilitas gabungan atau probabilitas bersama (joint
probabilities)
❑ Probabilitas gabungan → pdf gabungan

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Bivariate Distributions
16

❑ Probabilitas gabungan, probabilitas bersama


pX ,Y (x , y ) = PX ,Y (x , y ) pdf
x y

PX ,Y (x , y ) = prob ( X  x  Y  y ) cdf
+ +
=   pX ,Y (s, t )dt d s
− −

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Bivariate Distributions
17

❑ Beberapa sifat bivariate distribution


PX ,Y (x ,  ) cdf variabel random X saja (univariate)

PX ,Y ( , y ) cdf variabel random Y saja (univariate)

pX ,Y (x , y )  0

PX ,Y (+  ,+ ) = 1

PX ,Y (−  , y ) = PX ,Y (x ,− ) = 0

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Distribusi Marginal
18

❑ Dua variabel random X dan Y


❑ Ingin diketahui perilaku variabel X tanpa mempertimbangkan nilai variabel Y
❑ Densitas marginal (pdf) dan distribusi kumulatif marginal (cdf)
pX ,Y (x , y ) → pX (x ) PX ,Y (x , y ) → PX (x )
PX (x ) = PX (x ,  ) = prob ( X  x  Y   ) = prob ( X  x )
+ x + x
pX (x ) =  pX ,Y (x , t )dt
−
=   pX ,Y (s, t )dt d s =  pX (s)d s
− − −

pdf cdf
https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas
Distribusi Marginal
19

❑ Dua variabel random X dan Y


❑ Untuk variabel Y
pX ,Y (x , y ) → pY (y ) PX ,Y (x , y ) → PY (y )
PY (y ) = PY ( , y ) = prob ( X    Y  y ) = prob (Y  y )
+
y + y
pY (y ) =  pX ,Y (s, y )d s
−
=   pX ,Y (s, t )d s dt =  pY (t )dt
− − −

pdf cdf

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Distribusi Bersyarat (Conditional Distributions)
20

❑ Dua variabel random X dan Y


❑ Ingin diketahui perilaku variabel X yang bergantung pada variabel Y
◼ Distribusi X jika Y = y0
◼ Distribusi Y jika x1 ≤ X ≤ x2

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Distribusi Bersyarat (Conditional Distributions)
21

 p (x , t )d t
p (x y di dalam S ) =
X ,Y
S

 p (t )dt
X ,Y i
Y
S

prob(x di dalam R y di dalam S ) =  p (x y di dalam S )d x


XY
R
pX ,Y (x , y 0 )
pX Y (x y = y 0 ) = yang lebih sering dituliskan
pY (y 0 )
p (x , y )
pX Y (x y ) = X ,Y
pY (y )

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Independence
22

❑ Variabel random X dan Y


❑ X dan Y independence jika
pX Y (x y ) bukan fungsi y
pX Y (x y ) = pX (x )

❑ Joint probabilities
◼ Perkalian densitas marginal kedua variabel
pX ,Y (x , y ) = pX (x )  pY (y )

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Contoh
23

Data jumlah hari yang memiliki temperatur udara rerata (T°C) dan kelembaban udara relatif (H%) di suatu
stasiun klimatologi

Temperatur udara, T°C


22-24 24-26 26-28 28-30 30-32 32-34
Kelembaban relatif, H%

0 – 20 2 4 6 2 2 1

20 – 40 4 8 12 30 6 9

40 – 60 5 15 30 60 30 20

60 - 80 3 7 9 25 17 11

80 - 100 1 0 2 12 8 3

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


Contoh
24

❑ Dari tabel temperatur udara dan kelembaban udara tsb.


❑ pdf (gabungan)
❑ pdf marginal dan cdf marginal temperatur udara rerata
❑ pdf marginal dan cdf marginal kelembaban udara relatif
❑ probabilitas temperatur udara berkisar pada 28°C s.d. 30°C
❑ probabilitas temperatur udara berkisar pada 28°C s.d. 30°C pada saat
kelembaban udara relatif 60% s.d. 80%

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas


25

Terima kasih

https://istiarto.staff.ugm.ac.id Statistika dan Probabilitas

Anda mungkin juga menyukai