Pengantar Statistika Matematika II Distribusi Sampling
Atina Ahdika, S.Si., M.Si. Prodi Statistika FMIPA Universitas Islam Indonesia
March 20, 2017 atinaahdika.com
Estimasi Titik Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Bila sampling berasal dari populasi yang digambarkan melalui fungsi peluang fX (x|θ), pengetahuan tentang θ menghasilkan karakteristik mengenai keseluruhan populasi. Suatu estimator titik adalah sebarang fungsi T = t(X1 , X2 , . . . , Xn ) dari sampel. Ini berarti bahwa sebarang statistik adalah estimator titik.
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
2/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Terdapat beberapa metode penaksiran parameter: 1
Metode Momen
2
Metode Maksimum Likelihood
3
Metode Bayes
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
3/35
Metode Momen Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Misalkan X1 , X2 , . . . , Xn adalah sampel dari populasi dengan fungsi kepadatan peluang f (x|θ1 , θ2 , . . . , θk ). Estimator metode momen didapat dengan menyamakan j momen sampel pertama dengan j momen populasi dan menyelesaikan sistem persamaan simultan yang dihasilkan. Momen ke-j populasi µj = E(X j ) n 1X j Momen ke-j sampel mj = Xi n i=1
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
4/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Karl Pearson (1800), menyatakan bahwa estimator suatu parameter dengan menggunakan metode momen dapat diperoleh dengan menyelesaikan persamaan µj = mj , j = 1, 2, . . . , k
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
5/35
Contoh 1 Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Misalkan X1 , X2 , . . . , Xn adalah i.i.d N (µ, σ 2 ). Kita akan menentukan estimator untuk µ dan σ 2 dengan menggunakan metode momen. Kita mempunyai n
1X ¯ Xi = X m1 = n i=1
n 1X 2 m2 = Xi n i=1
µ1 = E(X) = µ µ2 = E(X 2 ) = σ 2 + µ2
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
6/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Maka, estimator µ dan σ 2 dengan metode momen adalah ¯ µ1 = m1 ⇒ µ ˆ=X µ2 = m2
n
n
i=1
i=1
X 1X 2 ¯2 = 1 ¯ 2 Xi − X (Xi − X) ⇒ σ ˆ = n n 2
Catatan: σ ˆ 2 berkaitan dengan variansi sampel, yaitu σ ˆ2 =
n−1 2 n S
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
7/35
Contoh 2 Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Misalkan X1 , X2 , . . . , Xn adalah i.i.d dengan fungsi kepadatan peluang fX (x|θ) = θ xθ−1 , 0 < x < 1 Tentukan estimasi parameter untuk θ dengan menggunakan metode momen.
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
8/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Kita mempunyai Z1 xθx
E(X) =
θ−1
Z1 dx = θ
xθ dx =
θ θ+1
0
0
¯ maka Dengan menyamakan E(X) = X, ¯ E(X) = X θ ¯ =X θ+1 ¯ θ = (θ + 1)X ¯ =X ¯ (1 − X)θ θˆ =
¯ X ¯ 1−X
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
9/35
Contoh 3 Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Misalkan X1 , X2 , . . . , Xn adalah i.i.d U (α, β). Tentukan estimasi parameter untuk α dan β dengan menggunakan metode momen.
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
10/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Kita mempunyai µ1 =
α+β ¯ =X 2
(1) n
µ2 =
1X 2 (β − α)2 (α + β)2 + = Xi 12 4 n
(2)
i=1
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
11/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Dengan demikian kita dapat memperoleh 1 Dari persamaan (1) kita peroleh ¯ α ˆ + βˆ = 2X 2
(3)
Substitusikan persamaan (3) ke persamaan (2) sehingga n ¯2 (βˆ − α ˆ )2 4X 1X 2 + = Xi 12 4 n i=1
n (βˆ − α ˆ )2 1X 2 ¯2 = Xi − X 12 n i=1 n X
(βˆ − 12
=
(βˆ − 12
= S 2 ⇒ (βˆ − α ˆ )2 = 12 S 2
α ˆ )2 α ˆ )2
1 n
¯ 2 (Xi − X)
i=1
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
12/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
√ βˆ − α ˆ = S 12
(4)
Dengan menyelesaikan persamaan (3) dan (4) kita peroleh √ ¯ − 1 S 12 α ˆ=X 2 √ ¯ + 1 S 12 βˆ = X 2
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
13/35
Contoh 4 Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Misalkan X1 , X2 , . . . , Xn adalah i.i.d dari distribusi dengan fX (x|θ) = θ e−θx , x > 0 Tentukan estimasi parameter untuk θ dengan menggunakan metode momen.
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
14/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Jawab: 1 θˆ = ¯ X
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
15/35
Contoh 5 Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Misalkan X1 , X2 , . . . , Xn adalah i.i.d dari distribusi dengan fX (x|θ) = (θ + 1) xθ , 0 < x < 1 Tentukan estimasi parameter untuk θ dengan menggunakan metode momen.
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
16/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Jawab: ¯ −1 2X θˆ = ¯ 1−X
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
17/35
Metode Maksimum Likelihood (MLE) Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Sejauh ini, metode maksimum likelihood adalah metode yang paling populer dan menghasilkan estimator paling "baik" dibandingkan metode lain. Misalkan X1 , X2 , . . . , Xn adalah i.i.d sampel dari populasi dengan fungsi kepadatan peluang fX (x|θ). Fungsi kemungkinan (likelihood ) didefinisikan sebagai − L(θ|→ x ) = L(θ|x1 , . . . , xn ) = fX1 ,X2 ,...,Xn (x1 , x2 , . . . , xn |θ) n Y = fXi (xi |θ) i=1
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
18/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Maximum Likelihood Estimator (MLE) n Q − Misalkan L(θ|→ x)= fXi (xi |θ), θ ∈ Ω adalah fungsi i=1
peluang bersama dari X1 , X2 , . . . , Xn . Untuk suatu himpunan observasi (x1 , x2 , . . . , xn ), sebuah nilai θˆ di Ω di − mana L(θ|→ x ) maksimum disebut sebagai maximum likelihood estimator (MLE) dari θ. Yaitu, θˆ adalah sebuah nilai θ yang memenuhi ˆ = max fX ,...,X (x1 , x2 , . . . , xn |θ) fX1 ,...,Xn (x1 , x2 , . . . , xn |θ) n 1 θ∈Ω
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
19/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
− Nilai θ yang memaksimumkan L(θ|→ x ) dapat diperoleh dengan mencari solusi dari persamaan berikut d − L(θ|→ x)=0 dθ − Nilai θ yang memaksimumkan L(θ|→ x ) tersebut dapat diperoleh juga dengan menyelesaikan persamaan d − log L(θ|→ x)=0 dθ
(5)
(6)
Persamaan (6) lebih sering digunakan karena lebih mudah dalam penyelesaian.
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
20/35
Contoh 6 Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Misalkan X1 , X2 , . . . , Xn adalah i.i.d Bernoulli (θ). Tentukan estimasi dari θ dengan menggunakan metode MLE.
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
21/35
Cara 1 Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Karena Xi ∼ Bernoulli(θ) maka − L(θ|→ x)=
n Y
θxi (1 − θ)1−xi = θ
P
xi
P
(1 − θ)n−
xi
i=1
Misalkan y =
P
xi , maka kita mempunyai − L(θ|→ x ) = θy (1 − θ)n−y
− Selanjutnya turunkan L(θ|→ x ) terhadap θ dan diperoleh
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
22/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
d d y − L(θ|→ x)= θ (1 − θ)n−y dθ dθ 0 = y θy−1 (1 − θ)n−y + θy (n − y) (1 − θ)n−y−1 y θy−1 (1 − θ)n−y = θy (n − y) (1 − θ)n−y−1 n−y y = θ 1−θ y − yθ = nθ − yθ y = nθ y θˆ = n
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
23/35
Cara 2 Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
− Kita akan menurunkan fungsi log L(θ|→ x ) terhadap θ. Dari perhitungan sebelumnya, kita mempunyai − − L(θ|→ x ) = θy (1 − θ)n−y , maka fungsi log L(θ|→ x )-nya adalah − Log L(θ|→ x ) = log (θy (1 − θ)n−y ) = log θy + log (1 − θ)n−y = y log θ + (n − y) log (1 − θ)
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
24/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Selanjutnya, d d − Log L(θ|→ x)= [y log θ + (n − y) log (1 − θ)] dθ dθ y n−y 0= − θ 1−θ y n−y = θ 1−θ y − yθ = nθ − yθ y = nθ y θˆ = n
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
25/35
Contoh 7 Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Misalkan X1 , X2 , . . . , Xn adalah i.i.d Poisson (θ). Tentukan estimasi dari θ dengan menggunakan metode MLE.
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
26/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Misalkan Xi ∼ P OI(θ), maka fungsi likelihoodnya adalah − L(θ|→ x)=
n Y
e−θ
i=1
=e
−nθ
θ
θ xi xi !
Pn
i=1
n Q
xi
xi !
i=1
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
27/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
dan fungsi log Likelihoodnya adalah Pn
−nθ θ i=1 xi − log L(θ|→ x ) = log n e Q xi ! i=1
= log e−nθ + log θ
Pn
i=1
xi
− log
n Y
! xi !
i=1
= −nθ +
n X i=1
xi log θ −
n X
log xi
i=1
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
28/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
− Turunkan fungsi log L(θ|→ x ) terhadap θ dan diperoleh " # n n X X d d − log L(θ|→ x)= −nθ + xi log θ − log xi dθ dθ i=1
0 = −n +
i=1
n= θˆ =
i=1
n X xi
θ
n X xi i=1 n X i=1
θ xi n
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
29/35
Contoh 8 Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Misalkan X1 = 3, X2 = 2, X3 = 1, dan X4 = 3 adalah hasil pengamatan dari sampel random ukuran empat dari populasi dengan distribusi geometrik p(x|θ) = (1 − θ)x−1 θ, x = 1, 2, 3, . . . Tentukan MLE dari θ.
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
30/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Fungsi likelihood dari kasus di atas adalah − L(θ|→ x ) = (1 − θ)3−1 θ (1 − θ)2−1 θ (1 − θ)1−1 θ (1 − θ)3−1 θ = (1 − θ)5 θ4 − log L(θ|→ x ) = log (1 − θ)5 θ4 = 5 log (1 − θ) + 4 log θ
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
31/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Selanjutnya, turunkan fungsi log likelihood terhadap θ d 5 4 − log L(θ|→ x)=− + =0 dθ 1−θ θ 5 4 − + =0 1−θ θ 5 4 = 1−θ θ 4 5θ = 4 − 4θ ⇒ θˆ = 9
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
32/35
Contoh 9 Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Misalkan X1 , X2 , . . . , Xn adalah i.i.d dengan fungsi kepadatan peluang fXi (xi |θ) =
1 − xi e θ , x > 0, θ > 0 θ
Tentukan estimasi untuk θ dengan menggunakan metode MLE.
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
33/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
θˆ = x ¯
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
34/35
Contoh 10 Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
Misalkan X1 , X2 , . . . , Xn adalah i.i.d N (θ, σ 2 ) dengan θ dan σ 2 keduanya tidak diketahui. Tentukan estimasi untuk θ dan σ 2 dengan metode MLE.
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
35/35
Estimasi Titik Estimasi Titik Metode Momen Metode Maksimum Likelihood
θˆ = x ¯ σ ˆ2 =
n P i=1
(xi −¯ x) 2 n
Atina Ahdika, S.Si., M.Si. Pengantar Statistika Matematika II March 20, 2017
36/35