Anda di halaman 1dari 57

Random Variables

Discrete Random Variables


Continuous Random Variables
Pengertian

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 diskrit
jumlah (volume) hujan selama 1 tahun kontinu

Random Variables 2
Random Variables

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

Random Variables 3
Univariate Probability Distributions

X = discrete random variables


= x1, x2, x3, , xn

fX(x1)
fX(x2) probability
fX(x3) fX(xn) fX(xi) = 1

Random Variables 4
a discrete
probability distribution
fX(xi)

x1 x2 x3 xn1 xn
1
a discrete cumulative
probability distribution
FX(xi)

probability
x xi
0
x1 x2 x3 xn1 xn

Random Variables 5
Cumulative probability distribution
suatu variabel random X untuk X = x

FX x f X xi
xi x

Probability distribution
suatu variabel random X untuk X = x

f X xi FX xi FX xi 1

Random Variables 6
Univariate random variables
Jika X dapat bernilai x1, x2 , , xn
yang masing-masing memiliki probability
fX(x1), fX(x2), , fX(xn) dan fX(xi) = 1,
maka X adalah variabel random diskrit.

Random Variables 7
Frequency
f xi Fxi Fxi 1 frekuensi relatif
i
Fxi f x j frekuensi relatif kumulatif
j 1

Probability
f X xi FX xi FX xi 1

FX x f X xi
xi x

Random Variables 8
Continuous Random Variables

Probability

prob A f xi
ni
n
ni = jumlah data di klas ke-i
n = jumlah seluruh data

Dengan demikian, fxi dapat dipandang sebagai nilai estimasi


probability.
continuous random
fxi estimasi prob(A) variable treated as
thought it were
histogram frekuensi pendekatan distribusi probability discrete

frekuensi kumulatif pendekatan distribusi probability kumulatif

Random Variables 9
pX(x) pdf = probability density function

luas = 1
luas =
prob(X b)
luas =
prob(a X b)

a b x

1
PX(x)
cdf = cumulative probability
distribution function

PX(x) = prob(X x)
PX(b)
PX(a) prob(a X b)
0
a b x

Random Variables 10
pX(x) = probability density function of a continuous random variable
PX(x) = cumulative probability distribution function

PX x prob X x

d PX x p X x d x
x
PX x p X t d t

Random Variables 11
Beberapa sifat probability
b
1) p X x 0, x 5) proba X b p X t d t
a
2) p X x d x 1 PX b PX a
c
3) PX 0 6) prob X c p X t d t
4) PX 1 c
PX c PX c 0

proba X b proba X b
proba X b proba X b

Random Variables 12
Kala Ulang

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 megingat


probability suatu kejadian (event) menyamai suatu
nilai tertentu adalah nol

Random Variables 13
Contoh

ST Contoh univariate probability distribution

Random Variables 14
Bivariate Distributions (1)

Apabila diinginkan untuk mengetahui perilaku dua


atau lebih random variables joint probabilities
Joint probability density function
2
p X ,Y x, y PX ,Y x, y
x y

PX ,Y (x , y) prob X x andY y

pX ,Y s, t dt d s

Random Variables 15
Bivariate Distributions (2)

Beberapa persamaan
p X ,Y x, is a cumulative univariate probability function of X only

PX ,Y , y is a cumulative univariate probability function of Y only

p X ,Y x, y 0
PX ,Y , 1
PX ,Y , y PX ,Y x, 0

Random Variables 16
Marginal Distributions (1)

Two random variables, X and Y


Ingin diketahui perilaku X tanpa mempertimbangkan nilai
variabel Y
Marginal density:

p X ,Y x, y p X x

p X x p X ,Y x, t d t

Random Variables 17
Marginal Distributions (2)

Two random variables, X and Y


Cumulative marginal distribution:
PX ,Y x, y PX x

PX x PX x, prob X x dan Y
prob X x
x
p X ,Y s, t d t d s

x
p X s d s

Random Variables 18
Marginal Distributions (3)

Untuk variabel Y
Marginal density
p X ,Y x, y pY y

pY y p X ,Y s, y d s

Cumulative marginal distribution:


PY y PY , y prob X dan Y y probY y
y
pY t d t

Random Variables 19
Conditional Distributions

Two random variables, X and Y


Ingin diketahui perilaku X yang bergantung pada Y
Distribusi X jika Y = y0
Distribusi Y jika x1 X x2

p x, t d t
p X ,Y xi y di dalam S S X ,Y

S pY t d t
probx di dalam R y di dalam S p X Y x y di dalam S d x
R
p X ,Y x, y0
p X Y x y y0 yang lebih sering dituliskan
pY y0
p X ,Y x, y
p X Y x y
pY y

Random Variables 20
Independence

Two random variables, X dan Y


Kedua variabel independence jika
p X Y x y bukan fungsi y
p X Y x y p X x

Joint probabilities: perkalian density marginal kedua


variabel adalah
p X ,Y x, y p X x pY y

Random Variables 21
Contoh

ST Contoh bivariate probability distribution

Random Variables 22
Random Variables

Properties of Random Variables


Populasi

Samples Samples
Observasi statistik estimasi (belum diukur)

Properties of Random Variables 24


Statistik

Langkah
1. Pengambilan sampel
2. Observasi (analisis) terhadap sampel
3. Penyimpulan tentang perilaku sampel
4. Estimasi tentang perilaku populasi berdasarkan
butir (3)
5. Estimasi tentang sampel lain (yang belum
diambil) berdasarkan butir (3)

Properties of Random Variables 25


Statistik

Contoh
Data debit suatu sungai selama 50 yang telah lalu
dipakai sebagai dasar untuk melakukan estimasi
debit sungai tersebut selama periode tak terbatas
(estimasi tentang perilaku populasi).
Informasi tersebut dapat pula dipakai untuk
estimasi debit sungai tersebut selama periode
tertentu pada masa yang akan datang (sampel
yang belum diambil).

Properties of Random Variables 26


Moment and Expectation:
Univariate Distributions

Y A
Moment pertama terhadap O
dA d 1 x d A
x 1 x d A
A

O X
p X x pdf Untuk suatu random variable

1 x d A
A

d A p X x d x
x p X x d x

dx X
Properties of Random Variables 27
Moment and Expectation:
Univariate Distributions

Secara umum berlaku bahwa momen ke-i


terhadap O adalah
continuous random variables

i p X x d x
i
x

discrete random variables

i x j i f X x j
j

Properties of Random Variables 28


Moment and Expectation:
Univariate Distributions

Momen sentral ke-i: momen ke-i terhadap mean


(nilai rata-rata)

i x i
p X x d x

Properties of Random Variables 29


Moment and Expectation:
Univariate Distributions

Nilai expektasi suatu random variable X



EX x p X x d x X continuous

EX x j f X x j X discrete
j

Dengan demikian:
E X i

E X i i
Properties of Random Variables 30
Statistical Measures

Common statistical measures


Measure of central tendency
Mean
Mode
Median
Measure of variability
Range
Variance
Standard deviation
Measure of an individual in a population
z score
Percentile rank

Properties of Random Variables 31


Measure of Central Tendency (1)

Nilai rata-rata (average)


rata-rata (mean)
mode score yang paling sering muncul
median score yang berada di tengah dari suatu
rangkaian score urut (dari nilai kecil ke besar atau
sebaliknya)

Properties of Random Variables 32


Measure of Central Tendency (2)

Contoh
Jumlah hari hujan selama 11 bulan terakhir
adalah sbb.
21, 21, 21, 20, 18, 16, 12, 12, 6, 2, 1
rata-rata = 14 =AVERAGE(...)
MSExcel
mode = 21 =MODE(...)
median = 16 =MEDIAN(...)
Dari ketiga ukuran statistik tersebut,
manakah yang paling baik menceritakan
tentang pola jumlah hari hujan dalam 11
bulan tersebut?
Properties of Random Variables 33
Measure of Central Tendency (3)

Contoh
Carilah contoh sejenis, yang berhubungan
dengan pengelolaan sumberdaya air; misal:
perilaku penduduk dalam pemakaian air (waktu, volume,
debit, dsb.)
data klimatologi (temperatur udara, kelembaban udara,
lama penyinaran matahari, dsb.)
Diskusikan
nilai rata-rata
mode
median

Properties of Random Variables 34


Measure of Central Tendency (4)

Contoh
Cari dan diskusikan contoh-contoh yang
berhubungan dengan bencana alam
debit dan tinggi muka air banjir sungai
lama genangan banjir di suatu kawasan
banjir lahar, debris flow
tanah longsor

Properties of Random Variables 35


Measure of Central Tendency (5)

Simbol dan rumus


Nilai rata-rata (variabel random kontinu)

X E X 1

x p X x d x

Properties of Random Variables 36


Measure of Central Tendency (6)

Simbol dan rumus


Rata-rata (variabel random diskrit) estimasi
nilai rata-
rata
1
X X
populasi
Nilai rata-rata sampel
n n = jumlah anggota sampel

1
X X Nilai rata-rata populasi
n n = jumlah anggota populasi
parameter: berdasarkan seluruh anggota populasi
besaran statistik: hanya berdasarkan sebagian anggota populasi

Properties of Random Variables 37


Measure of Central Tendency (6)

Beberapa sifat nilai rata-rata

1
CX
n
CX

C X C X
1
n

C = konstanta

Properties of Random Variables 38


Measure of Central Tendency (7)

Nilai rata-rata
1
Arithmetic mean X X =AVERAGE(...)
n

X X
Geometric mean 1n
=GEOMEAN(...)

Harmonic mean n
X =HARMEAN(...)
1
X
Weighted mean
XW
wX
w
Properties of Random Variables 39
Measure of Central Tendency (8)

Nilai rata-rata
Root mean square

1 n 2
X RMS
n i 1
xi

Properties of Random Variables 40


Measure of Central Tendency (9)

Median
Variabel random kontinu
md
md p X x d x 0.5

Variabel random diskrit

md x p dalam hal ini xp ditentukan dari


p
f X xi 0.5
i 1

Properties of Random Variables 41


Measure of Central Tendency (10)

Mode, nilai yang paling sering muncul/terjadi


Variabel random kontinu
mo mode populasi, dihitung sedemikian hingga
d p X x d 2 p X x
0 dan 2
0
dx dx
Variabel random diskrit

mode adalah suatu nilai X sedemikian hingga


n
max f X xi
i 1

Properties of Random Variables 42


Measure of Variability (1)

Keragaman
Variability, scatter, spread
menunjukkan apakah angka dalam distribusi saling
berdekatan atau berjauhan
Range beda antara nilai tertinggi dan terendah
dalam distribusi
mungkin biasa digunakan dalam permasalahan sehari-
hari
Standard deviation (simpangan baku)
biasa dipakai dalam permasalahan teknis

Properties of Random Variables 43


Measure of Variability (2)

Simbol dan rumus


Variance (ragam) variabel random kontinu
merupakan momen kedua terhadap nilai rata-rata

var X 2 2

E X 2

E X 2 E 2 X

Properties of Random Variables 44


Measure of Variability (3)

Simbol dan rumus


Variance (ragam) variabel random diskrit

X 2

2 variance populasi
n

s 2

X X
2
variance sampel =VAR(...)
n 1
estimasi nilai
variance
populasi
Properties of Random Variables 45
Measure of Variability (4)

Kenapa penyebut n 1
menghasilkan nilai yang lebih besar daripada dibagi
dengan n; ini untuk mengompensasi kecenderungan
variabilitas sampel yang lebih kecil daripada variabilitas
populasi
dari sisi praktis, hal ini juga menunjukkan variabilitas
dari sampel beranggota 1 adalah tidak ada (tidak ada
variabilitas dari 1 score)

Properties of Random Variables 46


Measure of Variability (5)

s 2

X X
2

n 1

Cobalah s 2

X 2
nX 2

Saudara uraikan n 1

Properties of Random Variables 47


Measure of Variability (6)

X X X
2 2
2 XX X 2
s 2

n 1 n 1
X
2
X
X 2
2 X n
n

X 2
2X X n X 2


n
n 1 n 1
X
2

X 2

n X 2
n X 2


n 1 n 1

Properties of Random Variables 48


Measure of Variability (7)

Simbol dan rumus


Standard deviation (deviasi standar,
simpangan baku)

X
2

deviasi standar populasi


n
=STDEV(...)

X X
2

s deviasi standar sampel


n 1
estimasi nilai
deviasi standar
populasi
Properties of Random Variables 49
Measure of Variability (8)

Coefficient of variation
s
cv
X
catatan

var c 0
var cX c 2 var X
var a bX b 2 var X

Properties of Random Variables 50


Simetri
mode =
median =
mean

simetris

mode
median
mean

positive skew negative skew

Properties of Random Variables 51


Simetri

mo
skewness populasi

X X mo
skewness sampel
s
n2 M3
skewness coefficien t, cs
n 1n 2 s X 3
dalam persamaan di atas:
n = jumlah sampel
M3 = momen ke-3 (sampel)
sX = simpangan baku (sampel)

Properties of Random Variables 52


Peakedness
leptokurtic, k > 3, e > 0
normal, mesokurtic, k = 3, e > 0
platykurtic, k < 3, e < 0

4
kurtosis: k (populasi)
2 2

M4
k 4
(sampel)
sX
e k3

Properties of Random Variables 53


Sample Moments

Lihat catatan: ST Sample moments

Properties of Random Variables 54


Some Measures of An Individual in
A Population (1)

z scores
X X X
zX zX
s untuk menunjukkan
Percentile rank posisi suatu score
dalam populasi

B 12 E B = jumlah score yang bernilai di bawah X


PRX 100 E = jumlah score yang bernilai sama dengan X
n n = jumlah score seluruhnya

untuk populasi
besar

Properties of Random Variables 55


Some Measures of An Individual in
A Population (2)

Beberapa fungsi di dalam MS Excel


=RANK(...)
posisi suatu nilai (angka) pada suatu urutan angka
=PERCENTILE(...)
nilai percentile dalam suatu kisaran angka
=PERCENTRANK(...)
posisi suatu nilai (angka) dalam suatu urutan angka, dalam
persen


B
100 BA == jumlah
jumlah score yang bernilai lebih kecil daripada X
( B A) score yang bernilai lebih besar daripada X

perhatikan perbedaannya
dengan PRX
Properties of Random Variables 56
Properties of Random Variables 57

Anda mungkin juga menyukai