Anda di halaman 1dari 57

Jurusan Teknik Sipil dan Lingkungan

Universitas Gadjah Mada

Statistika

Random Variables
Discrete Random Variables
Continuous Random Variables

http://istiarto.staff.ugm.ac.id 1-Sep-14 1
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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 3
Univariate Probability Distributions

X = discrete random variables


= x1, x2, x3, , xn

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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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.

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 8
Continuous Random Variables

Probability

prob A
ni
f xi
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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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 mengingat


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

http://istiarto.staff.ugm.ac.id 1-Sep-14 13
Contoh

ST Contoh univariate probability distribution

http://istiarto.staff.ugm.ac.id 1-Sep-14 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 and Y < y )
+ +

= p ( s,t )dt ds
- -
X ,Y

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 21
Contoh

ST Contoh bivariate probability distribution

http://istiarto.staff.ugm.ac.id 1-Sep-14 22
Random Variables

Properties of Random Variables

http://istiarto.staff.ugm.ac.id 1-Sep-14 23
Populasi

Samples Samples
Observasi statistik estimasi (belum diukur)

http://istiarto.staff.ugm.ac.id 1-Sep-14 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)

http://istiarto.staff.ugm.ac.id 1-Sep-14 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).

http://istiarto.staff.ugm.ac.id 1-Sep-14 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
http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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
http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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)

http://istiarto.staff.ugm.ac.id 1-Sep-14 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?
http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 36
Measure of Central Tendency (6)

Simbol dan rumus


Rata-rata (variabel random diskrit) estimasi
nilai rata-
rata
1

populasi
X X Nilai rata-rata sampel
n n = jumlah anggota sampel

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

http://istiarto.staff.ugm.ac.id 1-Sep-14 37
Measure of Central Tendency (6)

Beberapa sifat nilai rata-rata

1
C X C X
n

C X C X
1
n

C = konstanta

http://istiarto.staff.ugm.ac.id 1-Sep-14 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
http://istiarto.staff.ugm.ac.id 1-Sep-14 39
Measure of Central Tendency (8)

Nilai rata-rata
Root mean square

1 n 2
X RMS
n i 1
xi

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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
http://istiarto.staff.ugm.ac.id 1-Sep-14 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)

http://istiarto.staff.ugm.ac.id 1-Sep-14 46
Measure of Variability (5)

s 2

X X
2

n 1

Cobalah s 2

X 2
n X 2

Saudara uraikan n 1

http://istiarto.staff.ugm.ac.id 1-Sep-14 47
Measure of Variability (6)

s 2

X X

X
2 2
2 XX X 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 48
Measure of Variability (7)

Simbol dan rumus


Standard deviation (deviasi standar,
simpangan baku)

X 2

deviasi standar populasi


n
=STDEV.S(...)

X X
2

s deviasi standar sampel


n 1
estimasi nilai
deviasi standar
populasi
http://istiarto.staff.ugm.ac.id 1-Sep-14 49
Measure of Variability (8)

Coefficient of variation
s
cv
X
catatan

varc 0
varcX c 2 var X
vara bX b 2 var X

http://istiarto.staff.ugm.ac.id 1-Sep-14 50
Simetri
mode =
median =
mean

simetris

mode
median
mean

positive skew negative skew

http://istiarto.staff.ugm.ac.id 1-Sep-14 51
Simetri

mo
skewness populasi

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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 53
Sample Moments

Lihat catatan: ST Sample moments

http://istiarto.staff.ugm.ac.id 1-Sep-14 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

http://istiarto.staff.ugm.ac.id 1-Sep-14 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 score yang bernilai lebih kecil daripada X
( B A) jumlah score yang bernilai lebih besar daripada X

perhatikan perbedaannya dengan PRX

http://istiarto.staff.ugm.ac.id 1-Sep-14 56
http://istiarto.staff.ugm.ac.id 1-Sep-14 57

Anda mungkin juga menyukai