Karar Ağaçları Prof.Dr. Aydın Ulucan Karar problemleri şebeke yapısı altında görsel olarak da ifade edilip çözülebilir. Karar analizinde bu yaklaşım karar ağaçları olarak adlandırılmaktadır. Karar ağacı şebekelerinde iki tipte düğüm bulunmaktadır. Bunlar; Karar Düğümleri (kare şeklinde gösterilir), Olasılık (doğa durumu) düğümleridir. (yuvarlak şekilde gösterilir) Karar ağacının hazırlanırken başlangıç noktası (kök), vereceğimiz karara karşılık gelir. Ağaç hazırlanırken her karar düğümünden çıkan dallar karar alternatiflerine karşılık gelmektedir. Bu dallar bir maliyet yada getiri değeri taşırlar. Ağaç hazırlanırken olasılık düğümlerinden çıkan dallar da doğa durumlarına karşılık gelmektedir. Bu dallar doğa durumunun gerçekleşme olasılığı değerini taşırlar. 1
Örnek 1 Luis Ramirez, thedesign engineer at Valves-R-Us has been sittin in his office for a couple of hours, just starting straight ahead, mumbling occasionally to himself, and otherwise looking very frustrated. Martha stuck her head around the corner to ask what was puzzling Luis and heard the following story. Luis had just two weeks for his group to design a new valve component and the design could be handled in routine fashion by using extensive hand calculations and table lookups, but if another similar project came the company s way, this work would be of no future benefit. However, the good thing was that the manual method was surefire and could be done in a week but would take some valuable time away from Luis, as the design would be very labor intensive. But Luis also admitted that his team could probably program the design on a PC and that the program could be used in the future for other similar valve component designs and save both time and money for the company. He wasn t too sure if the group could do the programming, but Luis knew that he could pull out in time and resort to the manual method to meet the contract deadline. 2
A third possibility that really intrigued Luis was to buy off-the-shelf s/w that might do the design job but required at least a week for the team to learn the program before Luis would be sure it could do the job. Even then, if it couldn t, Luis s group would have a week to be able to make changes that probably would save the day and again give the company benefits in the future. If this program worked, it could also be used for future projects. But there was a possibility that the whole thing would crash and burn without any time to resort to the manual method. If the project is not succesfully completed in two weeks, Valves-R-Us would have to pay penalty and would not get any money for doing the project. At this point Martha suggested that Luis use a concept called decision tree analysis to help map out this decision problem. Data Manual -30 Costs Write_Prog -20 Buy_Prog -10 Modify_Prog -15 Prog_Fail -20 Prog_Success 50 Revenue W_Prog_Success 0.9 W. Prog Fail 0.1 Need_Changes 0.25 No Changes 0.75 Change_Success 0.8 Change Fail 0.2 3
2 1 Manual Success -30 20 50 20 0,9 Success Write Program 50 30 20 30-20 27 0,1 1 Fail Manual Success 3 1 0 32,75 0 0-30 0 50 0 Buy Program 0,75 Success 50 40 0,8 Success -10 32,75 Changes 50 25 40 25-15 11 0,2 0,25 Fail Needs Change -45 1-20 -45 0 11 1 Manual Success 10-30 10 50 10 Sensitivity using Data Table Func. Manual 32,75 Buy Program 0 50 Manual -1 49 Manual -2 48 Manual 55-3 47 Manual -4 46 Manual -5 45 Manual 50-6 44 Manual -7 43 Manual -8 42 Manual 45-9 41 Manual -10 40 Manual -11 39 Manual -12 38 Manual 40-13 37 Manual -14 36,5 Buy Program -15 36,25 Buy Program 35-16 36 Buy Program -17 35,75 Buy Program -18 35,5 Buy Program 30-19 35,25 Buy Program -20 35 Buy Program -21 34,75 Buy Program -22 34,5 Buy Program -23 34,25 Buy Program -24 34 Buy Program -25 33,75 Buy Program -26 33,5 Buy Program -27 33,25 Buy Program -28 33 Buy Program -29 32,75 Buy Program -30 32,75 Buy Program 4
Sensitivity using Data Table Func. 5 Buy Program 0,25 0,5 0,75 1 0,1 Buy Program Buy Program Manual Manual 0,2 Buy Program Buy Program Manual Manual 0,3 Buy Program Buy Program Manual Manual 0,4 Buy Program Buy Program Manual Manual 0,5 Buy Program Buy Program Manual Manual 0,6 Buy Program Buy Program Manual Manual 0,7 Buy Program Buy Program Write Program Write Program 0,8 Buy Program Buy Program Write Program Write Program 0,9 Buy Program Write Program Write Program Write Program 1 Buy Program Write Program Write Program Write Program Örnek 2 Little Trykes is considering offering a toy scooter that it will sell for $20 each. The company has two production options: (i) Manufacture the scooters in their existing facilities. (ii) Import the scooters from overseas Little Trykes believes that the demand for the scooters will be between 100 and 300 units per day and has decided to model the situation as a decision analysis problem with three states of nature: demand = 100 units per day; demand = 200 units per day; and demand 300 units per day. This was done because the company will either manufacture or import the units in lot sizes that are multiples of 100. 5
The following table gives the per unit costs for the two production options. Amount Supplied Per Day Option 100 200 300 Use Existing Facilities $18 $14 $10 Import $15 $13 $9 If the company decides to import the scooters, there is a 30% chance that a tariff of $2 per unit will be imposed on the scooters. The company will learn whether there is a tariff only after it has made its decision on the source of its scooter production. The amount produced or imported will correspond to daily demand. The probability distribution for daily demand with no advertising versus spending $1000 a day on advertising is as follows: 6
Daily Demand Probability with No Advertising Probability with Spending $1000 a Day for Advertising 100 0.3 0.1 200 0.5 0.2 300 0.2 0.7 Determine Little Trykes s optimal course of action regarding manufacturing, importing, and advertising the scooters. Our company will give two decisions; Advertise or not and Manufacture or import First of all we should decide to advertise or not, so we create a decision node. If they decide to advertise, they have to spend $1000 to advertising. If they don t, there won t be any cost. After this decision, the company should decide to manufacture or import toy scooters. Because of this, we add decision nodes after advertising and no advertising branches. There is no fixed cost in both conditions (manufacture or import). 7
Ek Bilgi Altında Karar Verme (Bayes İstatistikleri) Gelecekteki doğa durumları hakkında tam bilgiye sahip olmak mümkün olmasa da, doğa durumlarının gerçekleşme olasılıklarını rafine etmek için ek kaynaklardan yararlanabiliriz. Bu ek kaynaklar, pazar araştırmaları, anketler, ürün testleri, uzman görüşleri, örneklemeler, simülasyon çalışmaları olabilir. Örneğin bir şirket yeni ürün geliştirmeden önce potansiyel kullanıcılar üzerinde anket düzenleyebilir ve gelecekteki tüketici eğilimleri hakkında daha detaylı bilgiye sahip olabilir. Böylece doğa durumlarının gerçekleşeme olasılıklarını iyileştirebilir. Bu da vereceği kararı iyileştirececktir. Çoğu zaman bu ek bilginin bir maliyeti vardır. Karar verici de bu maliyete katlanmasının uygun olup olmayacağını bilmek isteyecektir. 8
Örnek 3 Patara Turizm A.Ş. sezonluk kiraladığı yatlarla Ege bölgesi kıyılarında mavi yolculuk turları organize etmektedir. Şirket önümüzdeki sezon için bir yat daha kiralamayı düşünmektedir. 10 kamaralı ve 5 kamaralı olmak üzere kiralayabileceği iki yat bulunmaktadır. Bunlardan büyük olanı için sezonluk kira bedeli 100 bin TL, küçük olanı için ise 60 bin TL dir. Şirket önümüzdeki turizm sezonunun %65 olasılıkla iyi, %35 olasılıkla kötü geçeceğini düşünmektedir. Sezon iyi geçerse ve şirket büyük yatı kiralarsa sezonluk geliri 200 bin TL olacaktır. Öte yandan sezon kötü geçerse ve şirket büyük yatı kiralarsa sezonluk geliri 50 bin TL de kalacaktır. Aynı şekilde şirket küçük yatı kiralar ve sezon iyi geçerse 120 bin TL, sezon kötü geçerse 60 bin TL gelir elde edecektir. Öte yandan Patara A.Ş. 10 bin TL. harcayarak, bu alanda profesyonel bir uzmana sezonla ilgili tahmin raporu hazırlatabilmektedir. Bu uzman geçmişte iyi geçen sezonları %80, kötü geçen sezonları da %70 başarıyla tahmin etmiştir. Şirket yönetimi iki kararla karşı karşıyadır. Kiralayacağı yatın hangisi olacağı ve tahmin raporunu satın alıp almayacağı. Bu kararlardan tahmin raporu satın alınması daha öncve verilecektir. Çünkü şirket hangi yatı kiralayacağına karar verdikten sonra, tahmin raporu satın alıp almamasının önemi kalmamaktadır. 9
Bayes İstatistikleri Ön P(Dj): Ek bilgi olmaması durumunda Dj doğa durumunun gerçekleşme olasılığı. Bizim örneğimizde Patara A.Ş. nin sezonla ilgili tahminleri ön olasılıklardır. D1: sezonun iyi geçmesi, D2: sezonun kötü geçmesi, P(D1) = 0.65 P(D2) = 0.35 Şartlı P(Bi Dj): Dj doğa durumu gerçekleştikten sonra, Bi bilgisinin verilmesi olasılığı. Bizim örneğimizde araştırma şirketinin geçmişteki tahminleri şartlı olasılıklardır. İyi geçen sezonlarda şirketin tahminleri %80 olasılıkla sezonun iyi geçeceği olmuştur. Dolayısıyla iyi geçen sezonlarda şirket %20 olasılıkla sezonun kötü geçeceğini tahmin etmiştir. Kötü geçen sezonlarda şirketin tahminleri %70 olasılıkla sezonun kötü geçeceği olmuştur. Dolayısıyla kötü geçen sezonlarda da şirket %30 olasılıkla sezonun iyi geçeceğini tahmin etmiştir. B1: sezon tahmininin iyi olması B2: sezon tahminin kötü olması P(B1 D1) = 0.80 P(B1 D2) = 0.30 P(B2 D1) = 0.20 P(B2 D2) = 0.70 10
Birleşik P(Bi & Dj): Bi bilgisinin ve Dj doğa durumunun birlikte gerçekleşme olasılığı. P(Bi & Dj) = P(Bi Dj)* P(Dj) P(B1 & D1) = P(B1 D1) * P(D1) = 0.80 * 0.65 = 0.520 P(B1 & D2) = P(B1 D2) * P(D2) = 0.30 * 0.35 = 0.105 P(B2 & D1) = P(B2 D1) * P(D1) = 0.20 * 0.65 =.0130 P(B2 & D2) = P(B2 D2) * P(D2) = 0.70 * 0.35 = 0.245 Marjinal P(Bi): Bi bilgisine ait birleşik olasılıklar toplamı. Sezonu iyi tahmin etmenin marjinal olasılığı, P(B1) = P(B1 & D1) + P(B1 & D2) = 0.520 + 0.105 = 0.625 Sezonu kötü tahmin etmenin marjinal olasılığı, P(B2) = P(B2 & D1) + P(B2 & D2) = 0.130 + 0.245 = 0.375 Marjinal olasılıklar toplamı 1 dir. P(B1) + P(B2) = 0.625 + 0.375 =1 11
Posterior olasılıklar P(Dj Bi): Ek bilgi Bi tahminini gösterdiğinde, Dj doğa durumunda bulunma olasılığı. İyi sezon tahmininde posterior olasılıklar, P 1 (D1 B ) 0.520 0.832 0.625 P(D2 B1) 0.105 0. 168 0.625 Kötü sezon tahmininde posterior olasılıklar, P 2 (D B ) 0.130 0.347 P(D B ) 0.245 0. 653 1 2 2 0.375 0.375 Doğa Durumları Ön Şartlı Birleşik Posterior İyi Sezon 0.65 0.80 0.520 0.832 Kötü Sezon 0.35 0.30 0.105 0.168 Marjinal Olasılık 0.625 Tablo 9.11. İyi sezon tahmininde olasılık hesapları. Doğa Durumları Ön Şartlı Birleşik Posterior İyi Sezon 0.65 0.20 0.130 0.347 Kötü Sezon 0.35 0.70 0.245 0.653 Marjinal Olasılık 0.375 Tablo 9.12. Kötü sezon tahmininde olasılık hesapları. 12
Örnek 4 B. G. D. plans to do a commercial development on a property. Relevant data Asking price for the property is $300,000 Construction cost is $500,000 Selling price is approximated at $950,000 Variance application costs $30,000 in fees and expenses There is only 40% chance that the variance will be approved. If B. G. D. purchases the property and the variance is denied, the property can be sold for a net return of $260,000 A three month option on the property costs $20,000 which will allow B.G.D. to apply for the variance. A consultant can be hired for $5000 P (Consultant predicts approval approval granted) = 0.70 P (Consultant predicts denial approval denied) = 0.90 Construction of the Decision Tree Initially the company faces a decision about hiring the consultant. After this decision is made more decisions follow regarding Application for the variance. Purchasing the option. Purchasing the property. 13
Do nothing 0 0 0 0,4 Variance approved/build/sell 450 120 Buy land/apply for variance Do not hire consultant 3-330 6 0,6 Variance denied/sell 0 10 260-70 120-70 0,4 Variance approved/buy land/build/sell Purchase option/apply for variance 150 100 100-50 10 0,6 Variance denied 0-50 -50 Do nothing -5 2 0-5 65,356 0,82 Variance approved/build/sell 115 0,82 Buy land/apply for variance 450 115 Predicts approval -330 80,8 0,18 2 Variance denied/sell 0 80,8-75 260-75 0,82 Variance approved/buy land/build/sell 95 Purchase option/apply for variance 150 95-50 68 0,18 Hire consultant Variance denied -5 65,356 0-55 -55 Do nothing 0-5 -5 0,18 Variance approved/build/sell 115 0,18 Buy land/apply for variance 450 115 Predicts denial -330-40,8 0,82 1 Variance denied/sell 0-5 -75 260-75 0,18 Variance approved/buy land/build/sell 95 Purchase option/apply for variance 150 95-50 -28 0,82 Variance denied 0-55 -55 14