Bir istatistikçi bir Bernoulli dağılımının \(\theta\) katsayısının 0 mı, ½ mi yoksa 1 mi olduğunu tek bir gözleme bakarak karar verecektir. Dolar cinsinden (ücretinden düşülecek) zararı, hatasınının mutlak değerinin 100 katıdır.
\(\theta\) katsayısı 0 ise ‘Doğa’nın Durumu’ \(\theta_1\), \(\theta\) katsayısı ½ ise ‘Doğa’nın Durumu’ \(\theta_2\) ve \(\theta\) katsayısı 1 ise ‘Doğa’nın Durumu’ \(\theta_3\)’tür. Öte yandan, \(a_1\) istatistikçinin \(\theta\) katsayısının 0 seçme kararı, \(a_2\) istatistikçinin \(\theta\) katsayısının ½ seçme kararı ve \(a_1\) istatistikçinin \(\theta\) katsayısının 1 seçme kararıdır.
| İstatistikçi | ||||
|---|---|---|---|---|
| \(a_1\) | \(a_2\) | \(a_3\) | ||
| Doğa | \(\theta_1\) | 0 | 50 | 100 |
| \(\theta_2\) | 50 | 0 | 50 | |
| \(\theta_3\) | 100 | 50 | 0 |
\[L(a_1,\theta_1) = 0\] \[L(a_2,\theta_1) = 50\] \[L(a_3,\theta_1) = 100\] \[L(a_1,\theta_2) = 50\] \[L(a_2,\theta_2) = 0\] \[L(a_3,\theta_2) = 50\] \[L(a_1,\theta_3) = 100\] \[L(a_2,\theta_3) = 50\] \[L(a_3,\theta_3) = 0\]
Bernoulli Dağılımı başarı ve başarısızlık durumunu ifade ettiği için, X rassal değişkeninin x = 1 (başarı durumu) ya da x = 0 (başarısızlık tahmin) değerlerini aldığını bildiğimizden, \(a_1\), \(a_2\) ve \(a_3\) arasından seçim yaparken karar fonksiyonumuzu aşağıdaki gibi oluşturabiliriz. \[d_1(x) = \left\{ \begin{array}{c l} a_1 & x = 0\ ise\\ a_1 & x = 1\ ise \end{array}\right. \] Diğer bir gösterimle \(d_1(0) = a_1\), \(d_1(1) = a_1\) diye yazılabilir. Gözlem sonucunda sonucumuz ne olursa olsun \(a_1\) seçeceğimiz anlamına gelir. Bu şekilde 9 olanaklı karar fonksiyonumuzu oluşturursak:
\[d_2(0) = a_1,\ d_2(1) = a_2\] \[d_3(0) = a_1,\ d_3(1) = a_3\] \[d_4(0) = a_2,\ d_4(1) = a_1\] \[d_5(0) = a_2,\ d_5(1) = a_2\] \[d_6(0) = a_2,\ d_6(1) = a_3\] \[d_7(0) = a_3,\ d_7(1) = a_1\] \[d_8(0) = a_3,\ d_8(1) = a_2\] \[d_9(0) = a_3,\ d_9(1) = a_3\] Karar fonksiyonundan yola çıakrak risk fonksiyonunu oluşturursak,
\[ R(d_i,\theta_j) = E\{L[d_i(X),\theta_j]\}\] Beklenen değer, X rassal değişkenine göre alınmaktadır buna göre, \(x = 0\) ve \(x = 1\)’in \(\theta\) parametresine göre olasıklıklarını bulalım.
Bernoulli Olasılık Fonksiyonu aşağıdaki gibidir \[f(x,\theta) = \left\{ \begin{array}{c l} 1-\theta & x = 0\ ise\\ \theta & x = 1\ ise\\ 0 & diger\ durumlar \end{array}\right. \] Buna göre
\(x = 0\) ve \(x = 1\)’in olasılıkları sırasıyla \(\theta_1\) için 1 ve 0, \(\theta_2\) için ½ ve ½, \(\theta_3\) için de 0 ve 1’dir.
Risk fonksiyonları:
\[R(d_1,\theta_1) = 1\cdot L(a_1,\theta_1) + 0\cdot L(a_1,\theta_1) = 1\cdot 0 +0\cdot 0 = 0\] \[R(d_1,\theta_2) = \dfrac{1}{2}\cdot L(a_1,\theta_2) + \dfrac{1}{2}\cdot L(a_1,\theta_2) = \dfrac{1}{2}\cdot 50 +\dfrac{1}{2}\cdot 50 = 50\] \[R(d_1,\theta_3) = 0\cdot L(a_1,\theta_3) + 1\cdot L(a_1,\theta_3) = 0\cdot 100 +1\cdot 100 = 100\] \[R(d_2,\theta_1) = 1\cdot L(a_1,\theta_1) + 0\cdot L(a_2,\theta_1) = 1\cdot 0 +0\cdot 50 = 0\] \[R(d_2,\theta_2) = \dfrac{1}{2}\cdot L(a_1,\theta_2) + \dfrac{1}{2}\cdot L(a_2,\theta_2) = \dfrac{1}{2}\cdot 50 +\dfrac{1}{2}\cdot 0 = 25\] \[R(d_2,\theta_3) = 0\cdot L(a_1,\theta_3) + 1\cdot L(a_2,\theta_3) = 0\cdot 100 +1\cdot 50 = 50\] \[R(d_3,\theta_1) = 1\cdot L(a_1,\theta_1) + 0\cdot L(a_3,\theta_1) = 1\cdot 0 +0\cdot 100 = 0\] \[R(d_3,\theta_2) = \dfrac{1}{2}\cdot L(a_1,\theta_2) + \dfrac{1}{2}\cdot L(a_3,\theta_2) = \dfrac{1}{2}\cdot 50 +\dfrac{1}{2}\cdot 50 = 50\] \[R(d_3,\theta_3) = 0\cdot L(a_1,\theta_3) + 1\cdot L(a_3,\theta_3) = 0\cdot 100 +1\cdot 0 = 0\] \[R(d_4,\theta_1) = 1\cdot L(a_2,\theta_1) + 0\cdot L(a_1,\theta_1) = 1\cdot 50 +0\cdot 0 = 50\] \[R(d_4,\theta_2) = \dfrac{1}{2}\cdot L(a_2,\theta_2) + \dfrac{1}{2}\cdot L(a_1,\theta_2) = \dfrac{1}{2}\cdot 0 +\dfrac{1}{2}\cdot 50 = 25\] \[R(d_4,\theta_3) = 0\cdot L(a_2,\theta_3) + 1\cdot L(a_1,\theta_3) = 0\cdot 50 +1\cdot 100 = 100\] \[R(d_5,\theta_1) = 1\cdot L(a_2,\theta_1) + 0\cdot L(a_2,\theta_1) = 1\cdot 50 +0\cdot 50 = 50\] \[R(d_5,\theta_2) = \dfrac{1}{2}\cdot L(a_2,\theta_2) + \dfrac{1}{2}\cdot L(a_2,\theta_2) = \dfrac{1}{2}\cdot 0 + \dfrac{1}{2}\cdot 0 = 0\] \[R(d_5,\theta_3) = 0\cdot L(a_2,\theta_3) + 1\cdot L(a_2,\theta_3) = 0\cdot 50 +1\cdot 50 = 50\] \[R(d_6,\theta_1) = 1\cdot L(a_2,\theta_1) + 0\cdot L(a_3,\theta_1) = 1\cdot 50 +0\cdot 100 = 50\] \[R(d_6,\theta_2) = \dfrac{1}{2}\cdot L(a_2,\theta_2) + \dfrac{1}{2}\cdot L(a_3,\theta_2) = \dfrac{1}{2}\cdot 0 +\dfrac{1}{2}\cdot 50 = 25\] \[R(d_6,\theta_3) = 0\cdot L(a_2,\theta_3) + 1\cdot L(a_3,\theta_3) = 0\cdot 50 +1\cdot 0 = 0\] \[R(d_7,\theta_1) = 1\cdot L(a_3,\theta_1) + 0\cdot L(a_1,\theta_1) = 1\cdot 100 +0\cdot 0 = 100\] \[R(d_7,\theta_2) = \dfrac{1}{2}\cdot L(a_3,\theta_2) + \dfrac{1}{2}\cdot L(a_1,\theta_2) = \dfrac{1}{2}\cdot 50 +\dfrac{1}{2}\cdot 50 = 50\] \[R(d_7,\theta_3) = 0\cdot L(a_3,\theta_3) + 1\cdot L(a_1,\theta_3) = 0\cdot 0 +1\cdot 100 = 100\] \[R(d_8,\theta_1) = 1\cdot L(a_3,\theta_1) + 0\cdot L(a_2,\theta_1) = 1\cdot 100 +0\cdot 50 = 100\] \[R(d_8,\theta_2) = \dfrac{1}{2}\cdot L(a_3,\theta_2) + \dfrac{1}{2}\cdot L(a_2,\theta_2) = \dfrac{1}{2}\cdot 50 +\dfrac{1}{2}\cdot 0 = 25\] \[R(d_8,\theta_3) = 0\cdot L(a_3,\theta_3) + 1\cdot L(a_2,\theta_3) = 0\cdot 0 +1\cdot 50 = 50\] \[R(d_9,\theta_1) = 1\cdot L(a_3,\theta_1) + 0\cdot L(a_3,\theta_1) = 1\cdot 100 +0\cdot 100 = 100\] \[R(d_9,\theta_2) = \dfrac{1}{2}\cdot L(a_3,\theta_2) + \dfrac{1}{2}\cdot L(a_3,\theta_2) = \dfrac{1}{2}\cdot 50 +\dfrac{1}{2}\cdot 50 = 50\] \[R(d_9,\theta_3) = 0\cdot L(a_3,\theta_3) + 1\cdot L(a_3,\theta_3) = 0\cdot 0 +1\cdot 0 = 0\]
Böylece, ödüleri risk fonksiyonunun değerleri olan, sıfır toplamlı \(3 \times 9\)luk iki kişilik oyuna ulaşmış oluyoruz.
| \(d_1\) | \(d_2\) | \(d_3\) | \(d_4\) | \(d_5\) | \(d_6\) | \(d_7\) | \(d_8\) | \(d_9\) | |
|---|---|---|---|---|---|---|---|---|---|
| \(\theta_1\) | 0 | 50 | 0 | 50 | 50 | 50 | 100 | 100 | 100 |
| \(\theta_2\) | 50 | 25 | 50 | 25 | 0 | 25 | 50 | 25 | 50 |
| \(\theta_3\) | 100 | 50 | 0 | 100 | 50 | 0 | 100 | 50 | 0 |
Biraz incelediğimizde, \(d_6\)’nın \(d_4\)’e baskın olduğunu, \(d_3\)’ün \(d_1\) ve \(d_9\)’a baskın olduğunu görüyoruz. Diğer yandan, \(d_1\) ve \(d_9\)’un \(d_7\)’ye ve \(d_2\)’nin \(d_8\)’e baskın olduğunu görüyoruz. Buna bakarak, \(d_1\), \(d_4\), \(d_7\), \(d_8\) \(d_9\)’un kabul edilemez olduğunu söyleyebiliriz.
| \(d_2\) | \(d_3\) | \(d_5\) | \(d_6\) | |
|---|---|---|---|---|
| \(\theta_1\) | 50 | 0 | 50 | 50 |
| \(\theta_2\) | 25 | 50 | 0 | 25 |
| \(\theta_3\) | 50 | 0 | 50 | 0 |
Burada her bir karar için en yüksek risk 50 dolar kaybetmektir buna göre, kalan karar fonksiyonları eşit derecede iyidir.
Bayes ölçütüne göre, \(\theta\) katsayısının gerçekleşme olasılığı \(\dfrac{1}{3}\)’tür. Buna göre, \(d_2\) için \[\dfrac{1}{3}\cdot 50 + \dfrac{1}{3}\cdot 25 + \dfrac{1}{3}\cdot 50 = 41.6\] \(d_3\) için \[\dfrac{1}{3}\cdot 0 + \dfrac{1}{3}\cdot 50 + \dfrac{1}{3}\cdot 0 = 16.6 \]
\(d_5\) için \[\dfrac{1}{3}\cdot 50 + \dfrac{1}{3}\cdot 0 + \dfrac{1}{3}\cdot 50 = 33.3\] \(d_6\) için \[\dfrac{1}{3}\cdot 50 + \dfrac{1}{3}\cdot 25 + \dfrac{1}{3}\cdot 0 = 25\]
Bayes ölçütüne göre en iyi kararın \(d_3\) olduğunu söyleyebiliriz.
Bir istatistikçi, bir iki terimli dağılımın anakütle katsayısı \(\theta\)’nın 0.25 mi yoksa 0.5 mi olduğuna iki gözleme bakarak karar verecektir. Karar yanlışsa (ücretinden düşülecek olan) zararı 160 $’dır.
\(\theta\) katsayısı 0.25 ise “Doğa’nın Durumu” \(\theta_1\), 0.5 ise \(\theta_2\)’dir. Diğer yandan istatistikçinin \(\theta\) katsayısına 0.25 seçme kararı \(a_1\), 0.5 seçme kararı ise \(a_2\)’dir. Buna göre,
\[L(a_1,\theta_1) = 0\] \[L(a_1,\theta_2) = 160\] \[L(a_2,\theta_1) = 160\] \[L(a_2,\theta_2) = 0\] Zarar fonksiyonlarından yola çıkarak tablo oluştursak:
| İstatistikçi | |||
|---|---|---|---|
| \(a_1\) | \(a_2\) | ||
| Doğa | \(\theta_1\) | 0 | 160 |
| \(\theta_2\) | 160 | 0 |
İki terimli dağılım yani, binom dağılımı bernoulli dağılımındaki başarı ve başarısızlık durumlarının serisi olarak tanımlanabilir. İki gözleme göre, X rassal değişkenimizi \(x = 0\) (Hiç başarılı durum olmaması), \(x = 0\) (bir tane başarı durumu) ve \(x = 2\) (iki gözlemin de başarılı olma durumu) olarak oluşturabiliriz. Buna göre \(a_1\) ve \(a_2\) arasından seçim yaparken karar fonksiyonlarımız aşağıdaki gibidir.
\[d_1(x) = \left\{ \begin{array}{c l} a_1 & x = 0\ ise\\ a_1 & x = 1\ ise\\ a_1 & x = 2\ ise \end{array}\right. \]
Başka bir gösterimle \(d_1(0) = a_1,\ d_1(1) = a_1,\ d_1(2) = a_1\) şeklinde yazılabilir.
\[d_2(0) = a_1,\ d_2(1) = a_1,\ d_2(2) = a_2\] \[d_3(0) = a_1,\ d_3(1) = a_2,\ d_3(2) = a_1\]
\[d_4(0) = a_1,\ d_4(1) = a_2,\ d_4(2) = a_2\] \[d_5(0) = a_2,\ d_5(1) = a_1,\ d_5(2) = a_1\] \[d_6(0) = a_2,\ d_6(1) = a_1,\ d_6(2) = a_2\] \[d_7(0) = a_2,\ d_7(1) = a_2,\ d_7(2) = a_1\] \[d_8(0) = a_2,\ d_8(1) = a_2,\ d_8(2) = a_2\]
R dilinin binom fonksiyonunu kullarak \(\theta_1\) ve \(\theta_2\) için olasılıkları bulabiliriz.
\(\theta_1\) için x = 0 olasılığı,
theta1 <- 0.25
theta2 <- 0.5
dbinom(0,2,theta1)
## [1] 0.5625
Buna göre, \(x = 0\), \(x = 1\) ve \(x = 2\)’nin olasıkları sırasıyla \(\theta_1\) için 0.5625, 0.375, 0.0625 ve \(\theta_2\) için 0.25, 0.5, 0.25tir. Bu olasıklara göre risk fonksiyonlarını oluşturursak,
\[R(d_1,\theta_1) = 0,5625\cdot L(a_1,\theta_1) + 0,375\cdot L(a_1,\theta_1) + 0,0625\cdot L(a_1,\theta_1) = 0,5625\cdot 0 + 0,375\cdot 0 + 0,0625\cdot 0 = 0\] \[R(d_2,\theta_1) = 0,5625\cdot L(a_1,\theta_1) + 0,375\cdot L(a_1,\theta_1) + 0,0625\cdot L(a_2,\theta_1) = 0,5625\cdot 0 + 0,375\cdot 0 + 0,0625\cdot 160 = 10\] \[R(d_3,\theta_1) = 0,5625\cdot L(a_1,\theta_1) + 0,375\cdot L(a_2,\theta_1) + 0,0625\cdot L(a_1,\theta_1) = 0,5625\cdot 0 + 0,375\cdot 160 + 0,0625\cdot 0 = 60\] \[R(d_4,\theta_1) = 0,5625\cdot L(a_1,\theta_1) + 0,375\cdot L(a_2,\theta_1) + 0,0625\cdot L(a_2,\theta_1) = 0,5625\cdot 0 + 0,375\cdot 160 + 0,0625\cdot 160 = 70\] \[R(d_5,\theta_1) = 0,5625\cdot L(a_2,\theta_1) + 0,375\cdot L(a_1,\theta_1) + 0,0625\cdot L(a_1,\theta_1) = 0,5625\cdot 160 + 0,375\cdot 0 + 0,0625\cdot 0 = 90\] \[R(d_6,\theta_1) = 0,5625\cdot L(a_2,\theta_1) + 0,375\cdot L(a_1,\theta_1) + 0,0625\cdot L(a_2,\theta_1) = 0,5625\cdot 160 + 0,375\cdot 0 + 0,0625\cdot 160 = 100\] \[R(d_7,\theta_1) = 0,5625\cdot L(a_2,\theta_1) + 0,375\cdot L(a_2,\theta_1) + 0,0625\cdot L(a_1,\theta_1) = 0,5625\cdot 160 + 0,375\cdot 160 + 0,0625\cdot 0 = 150\] \[R(d_8,\theta_1) = 0,5625\cdot L(a_2,\theta_1) + 0,375\cdot L(a_2,\theta_1) + 0,0625\cdot L(a_2,\theta_1) = 0,5625\cdot 160 + 0,375\cdot 160 + 0,0625\cdot 160 = 160\] \[R(d_1,\theta_2) = 0,25\cdot L(a_1,\theta_2) + 0,5\cdot L(a_1,\theta_2) + 0,25\cdot L(a_1,\theta_2) = 0,25\cdot 160 + 0,5\cdot 160 + 0,25\cdot 160 = 160\] \[R(d_2,\theta_2) = 0,25\cdot L(a_1,\theta_2) + 0,5\cdot L(a_1,\theta_2) + 0,25\cdot L(a_2,\theta_2) = 0,25\cdot 160 + 0,5\cdot 160 + 0,25\cdot 0 = 120\] \[R(d_3,\theta_2) = 0,25\cdot L(a_1,\theta_2) + 0,5\cdot L(a_2,\theta_2) + 0,25\cdot L(a_1,\theta_2) = 0,25\cdot 160 + 0,5\cdot 0 + 0,25\cdot 160 = 80\] \[R(d_4,\theta_2) = 0,25\cdot L(a_1,\theta_2) + 0,5\cdot L(a_2,\theta_2) + 0,25\cdot L(a_2,\theta_2) = 0,25\cdot 160 + 0,5\cdot 0 + 0,25\cdot 0 = 40\] \[R(d_5,\theta_2) = 0,25\cdot L(a_2,\theta_2) + 0,5\cdot L(a_1,\theta_2) + 0,25\cdot L(a_1,\theta_2) = 0,25\cdot 0 + 0,5\cdot 160 + 0,25\cdot 160 = 120\] \[R(d_6,\theta_2) = 0,25\cdot L(a_2,\theta_2) + 0,5\cdot L(a_1,\theta_2) + 0,25\cdot L(a_2,\theta_2) = 0,25\cdot 0 + 0,5\cdot 160 + 0,25\cdot 0 = 80\] \[R(d_7,\theta_2) = 0,25\cdot L(a_2,\theta_2) + 0,5\cdot L(a_2,\theta_2) + 0,25\cdot L(a_1,\theta_2) = 0,25\cdot 0 + 0,5\cdot 0 + 0,25\cdot 160 = 40\] \[R(d_8,\theta_2) = 0,25\cdot L(a_2,\theta_2) + 0,5\cdot L(a_2,\theta_2) + 0,25\cdot L(a_2,\theta_2) = 0,25\cdot 0 + 0,5\cdot 0 + 0,25\cdot 0 = 0\]
Buna göre, ödüleri risk fonksiyonunun değerleri olan, sıfır toplamlı \(2 \times 8\)luk iki kişilik oyuna ulaşmış oluyoruz.
| \(d_1\) | \(d_2\) | \(d_3\) | \(d_4\) | \(d_5\) | \(d_6\) | \(d_7\) | \(d_8\) | |
|---|---|---|---|---|---|---|---|---|
| \(\theta_1\) | 0 | 10 | 60 | 70 | 90 | 100 | 150 | 160 |
| \(\theta_2\) | 160 | 120 | 80 | 40 | 120 | 80 | 40 | 0 |
Biraz incelersek \(d_2\)’nin \(d_5\)’e, \(d_3\)’ün \(d_6\)’ya ve \(d_4\)’ün \(d_7\)’ye baskın olduğunu görüyoruz. \(d_5\), \(d_6\) ve \(d_7\) kabul edilemez.
Tabloyu yeniden düzenliyoruz:
| \(d_1\) | \(d_2\) | \(d_3\) | \(d_4\) | \(d_8\) | |
|---|---|---|---|---|---|
| \(\theta_1\) | 0 | 10 | 60 | 70 | 160 |
| \(\theta_2\) | 160 | 120 | 80 | 40 | 0 |
Minimaks yöntemine göre,
| \(d_1\) | \(d_2\) | \(d_3\) | \(d_4\) | \(d_8\) | |
|---|---|---|---|---|---|
| \(\theta_1\) | 0 | 10 | 60 | 70 | 160 |
| \(\theta_2\) | 160 | 120 | 80 | 40 | 0 |
| max | 160 | 120 | 80 | 70 | 160 |
Burada en yüksek riski en düşüğe indiren karar fonksiyonu \(d_4\)’tür. Minimaks yöntemine göre \(d_4\) seçilmesi gerekli diyebiliriz.
\(\theta_1 = \dfrac{1}{4}\) ve \(\theta_2 = \dfrac{1}{2}\)’y verilen olasılıklar sırasıyla \(\dfrac{2}{3}\) ve \(\dfrac{1}{3}\) ise,
\(d_1\) için, \[\dfrac{2}{3}\cdot 0\ +\ \dfrac{1}{3}\cdot160 = 53,3\] \(d_2\) için, \[\dfrac{2}{3}\cdot 10\ +\ \dfrac{1}{3}\cdot120 = 46,6\] \(d_3\) için, \[\dfrac{2}{3}\cdot 60\ +\ \dfrac{1}{3}\cdot 80 = 66,6\] \(d_4\) için, \[\dfrac{2}{3}\cdot 70\ +\ \dfrac{1}{3}\cdot 40 = 60\] \(d_8\) için, \[\dfrac{2}{3}\cdot 160\ +\ \dfrac{1}{3}\cdot 0 = 106.6\] Bayes ölçütüne göre, en iyi karar \(d_2\) diyebiliriz.