| The DTREE Procedure | 
The president of a petroleum distribution company 
 currently faces a serious problem.  His company supplies refined 
 products to its customers under long-term contracts at guaranteed 
 prices.  Recently, the price for petroleum has risen substantially 
 and his company will lose $ this year because of its 
 long-term contract with a particular customer.  After a great deal 
 of discussion with his legal advisers and his marketing staff, 
 the president learns that the contract contains a clause that may be 
 beneficial to his company.  The clause states that when 
 circumstances are beyond its control, the company may ask its customers 
 to pay the prevailing market prices for up to
 this year because of its 
 long-term contract with a particular customer.  After a great deal 
 of discussion with his legal advisers and his marketing staff, 
 the president learns that the contract contains a clause that may be 
 beneficial to his company.  The clause states that when 
 circumstances are beyond its control, the company may ask its customers 
 to pay the prevailing market prices for up to  of the 
 promised amount.
 of the 
 promised amount.
 
Several scenarios are possible if the clause is invoked. 
 If the customer accepts the invocation of the 
 clause and agrees to pay the higher price for the  , the 
 company would turn a loss of $
, the 
 company would turn a loss of $ into a net profit of $
 into a net profit of $ . 
 If the customer does not accept the invocation, the customer may sue for 
 damages or accept a settlement of $
. 
 If the customer does not accept the invocation, the customer may sue for 
 damages or accept a settlement of $ (resulting in a loss of $
 
 (resulting in a loss of $ ) or 
 simply decline to press the issue. 
 In any case, the distribution 
 company could then sell the
) or 
 simply decline to press the issue. 
 In any case, the distribution 
 company could then sell the  on the open market for an 
 expected value of $
 on the open market for an 
 expected value of $ .  However, the lawsuit would result in 
 one of three possible outcomes: the company wins and pays no 
 damages; the company loses and pays normal damages of $
.  However, the lawsuit would result in 
 one of three possible outcomes: the company wins and pays no 
 damages; the company loses and pays normal damages of $ ; 
 the company loses and pays double damages of $
; 
 the company loses and pays double damages of $ .  The 
 lawyers also feel that this case might last three to five years 
 if the customer decides to sue the company.  The cost of the 
 legal proceedings is estimated as $
.  The 
 lawyers also feel that this case might last three to five years 
 if the customer decides to sue the company.  The cost of the 
 legal proceedings is estimated as $ for the initial 
 fee and $
 for the initial 
 fee and $ per year.  The likelihood of the various 
 outcomes are also assessed and reported as in Table 5.38. 
 Suppose that the company decides to use a 
 discount rate of
 per year.  The likelihood of the various 
 outcomes are also assessed and reported as in Table 5.38. 
 Suppose that the company decides to use a 
 discount rate of  to determine the present value of 
 future funds.
 to determine the present value of 
 future funds.
 
| Uncertainty | Outcome | Probability | 
| Customer's Response | Accept the Invocation | 0.1 | 
| Reject the Invocation | 0.9 | |
| Customer's Action | Press the Issue | 0.1 | 
| if the Invocation | Settle the Case | 0.45 | 
| is being Rejected | Sue for Damages | 0.45 | 
| Case Last | 3 Years | 0.3 | 
| 4 Years | 0.4 | |
| 5 Years | 0.3 | |
| Lawsuit Result | Pay No Damages | 0.15 | 
| Pay Normal Damages | 0.65 | |
| Pay Double Damages | 0.2 | 
The structure for this decision problem is given in the 
 STAGEIN= data set named Stage7.
 
  
       /* -- create the STAGEIN= data set                     -- */ 
    data Stage7; 
       format _OUTCOM1 $14. _OUTCOM2 $14. ; 
       input _STNAME_ $ _STTYPE_ $ _OUTCOM1 $ 
             _SUCC1 $ _OUTCOM2 $ _SUCC2 $ ; 
       datalines; 
    Action    D   Invoking        Response  Not_Invoking    . 
    Response  C   Accept          .         Refuse          Lawsuit 
    Lawsuit   C   Press_Issue     .         Settle          . 
    .         .   Sue             Last      .               . 
    Last      C   3_Years         Result    4_Years         Result 
    .         .   5_Years         Result    .               . 
    Result    C   No_Damages      .         Normal_Damages  . 
    .         .   Double_Damages  .         .               . 
    ;
 
The PROBIN= data set Prob7 contains the probability distributions for the chance nodes.
  
       /* -- create the PROBIN= data set                      -- */ 
    data Prob7; 
       format _EVENT1_ _EVENT2_ $14.; 
       input _EVENT1_ $ _PROB1_ _EVENT2_ $ _PROB2_ ; 
       datalines; 
    Accept          0.1     Refuse          0.9 
    Press_Issue     0.1     Settle          0.45 
    Sue             0.45    .               . 
    3_Years         0.3     4_Years         0.4 
    5_Years         0.3     .               . 
    No_Damages      0.15    Normal_Damages  0.65 
    Double_Damages  0.20    .               . 
    ;
 
The PAYOFFS= data set Payoff7 defines the payoffs for the various scenarios.
  
       /* -- create the PAYOFFS= data set            -- */ 
    data Payoff7(drop=i j k D PCOST); 
       length _ACTION_ _STATE1-_STATE4 $16; 
  
          /* possible outcomes for the case last        */ 
       array YEARS{3}   $16. _TEMPORARY_ ('3_Years', 
                                          '4_Years', 
                                          '5_Years' ); 
  
          /* numerical values for the case last  */ 
       array Y{3}            _TEMPORARY_ (3, 4, 5); 
  
          /* possible outcomes for the size of judgment */ 
       array DAMAGES{3} $16. _TEMPORARY_ ('No_Damages', 
                                          'Normal_Damages', 
                                          'Double_Damages' ); 
  
          /* numerical values for the size of judgment  */ 
       array C{3}            _TEMPORARY_ (0, 1500, 3000); 
  
       D=0.1;                          /* discount rate */ 
  
          /* payoff for the scenario which the          */ 
          /* 10 percent clause is not invoked           */ 
       _ACTION_='Not_Invoking';   _VALUE_=-450;   output; 
  
          /* the clause is invoked */ 
       _ACTION_='Invoking'; 
  
          /* payoffs for scenarios which the clause is  */ 
          /* invoked and the customer accepts the       */ 
          /* invocation                                 */ 
       _STATE1='Accept';           _VALUE_=600;   output; 
  
          /* the customer refuses the invocation        */ 
       _STATE1='Refuse'; 
  
          /* payoffs for scenarios which the clause is  */ 
          /* invoked and the customer refuses the       */ 
          /* invocation but decline to press the issue  */ 
       _STATE2='Press_Issue';   _VALUE_=500;      output; 
  
          /* payoffs for scenarios which the clause is  */ 
          /* invoked and the customer refuses the       */ 
          /* invocation but willing to settle out of    */ 
          /* court for 900K                             */ 
       _STATE2='Settle';        _VALUE_=500-900;   output;
 
  
          /* the customer will sue for damages          */ 
       _STATE2='Sue'; 
       do i=1 to 3; 
          _STATE3=YEARS{i}; 
  
             /* determine the cost of proceedings       */ 
          PCOST=30;  /* initial cost of the proceedings */ 
  
             /* additional cost for every years in      */ 
             /* in present value                        */ 
          do k=1 to Y{i}; 
             PCOST=PCOST+(20/((1+D)**k)); 
          end; 
  
             /* loop for all poss. of the lawsuit result */ 
          do j=1 to 3; 
             _STATE4=DAMAGES{j}; /* the damage have to paid */ 
  
                /* compute the net return in present value  */ 
             _VALUE_=500-PCOST-(C{j}/((1+D)**Y{i})); 
  
                /* output an observation for the payoffs */ 
                /* of this scenario                      */ 
             output; 
          end; 
       end; 
  
    run; 
  
       /* -- print the payoff table                      -- */ 
    title "Petroleum Distributor's Decision"; 
    title3 "Payoff table"; 
  
    proc print; 
    run;
 
The payoff table of this problem is displayed in Output 5.6.1.
Output 5.6.1: Payoffs for the Petroleum Distributor's ProblemNote that the payoffs of the various scenarios in Output 5.6.1 are in thousands of dollars and are net present values (NPV) (Baird 1989). For example, the payoff for the following scenario ``invoking the clause; the customer refuses to accept this and sues for damages; the case lasts four years and the petroleum distribution company loses and pays double damages'' is calculated as



This is because the company can sell the  for $
 for $ immediately 
 and pay the $
 immediately 
 and pay the $ damages four years from now.  The net 
 present value of the proceedings is determined by paying 
 the $
 damages four years from now.  The net 
 present value of the proceedings is determined by paying 
 the $ initial fee now and a fee of $
 initial fee now and a fee of $ after every year 
 up to four years.  The value of 0.1 is the discount rate used.
 after every year 
 up to four years.  The value of 0.1 is the discount rate used.
 
The following statements evaluate the problem and plot the optimal solution.
  
       /* -- define graphics options                         -- */ 
    goptions colors=(green red blue); 
    goptions hsize=8 in vsize=8.4 in; 
  
       /* -- define title                                    -- */ 
    title f=zapfb h=2.5 "Petroleum Distributor's Decision"; 
  
       /* -- PROC DTREE statements                           -- */ 
    proc dtree stagein=Stage7 probin=Prob7 payoffs=Payoff7; 
       evaluate / summary; 
       treeplot / graphics compress nolg name="dt6p1" ftext='Cumberland AMT' 
               ybetween=1 cell lwidth=2 lwidthb=3 hsymbol=3; 
  
    quit;
 
The optimal decision summary in Output 5.6.2 suggests 
 that the president should invoke the  clause because it would 
 turn a loss of $
 clause because it would 
 turn a loss of $ into an expected loss of $
 into an expected loss of $ in 
 present value.
 in 
 present value.
 
| 
 The DTREE Procedure Optimal Decision Summary 
 
 
 
 | ||||||||||||||||||||||||||||||||||||||
The decision tree for this problem is shown in Output 5.6.3. There you can find the expected value of each scenario.
Output 5.6.3: Decision Tree for the Petroleum Distributor's Decision|   | 
The president feels that the estimated likelihood of lawsuit outcomes 
 is fairly reliable.  However, the assessment of the 
 likelihood of the customer's response and reaction 
 is extremely difficult to estimate. 
 Because of this, the president would like to keep the analysis as general 
 as possible.  His staff suggests using the symbols  and
 and  to 
 represent the probability that the customer will accept the 
 invocation and the probability that the customer will decline to 
 press the issue if he refuses the invocation, respectively. 
 The probabilities 
 of the other possible outcomes about the customer's response and 
 reaction to the invocation of the
 to 
 represent the probability that the customer will accept the 
 invocation and the probability that the customer will decline to 
 press the issue if he refuses the invocation, respectively. 
 The probabilities 
 of the other possible outcomes about the customer's response and 
 reaction to the invocation of the  clause are listed 
 in Table 5.39.
 clause are listed 
 in Table 5.39.
 
| Uncertainty | Outcome | Probability | 
| Customer's Response | Accept the Invocation |  | 
| Reject the Invocation |  | |
| Customer's Action | Press the Issue |  | 
| if the Invocation | Settle the Case |  | 
| is being Rejected | Sue for Damages |  | 
Now from the decision tree shown in Output 5.6.3, 
 the expected value of the outcome 'Refuse' is
 

Hence, the expected payoff if the petroleum distribution company invokes the clause is

Therefore, the president should invoke the  clause if
 clause if 
   
 


This result is depicted in Output 5.6.4, which is produced by the following statements:
  
       /* -- create data set for decision diagram        -- */ 
    data Data7(drop=i); 
       P=0.0;                  /* initialize P */ 
  
          /* loop for all possible values of P */ 
       do i=1 to 21; 
  
             /* determine the corresponding Q  */ 
          Q=(86-(1136*P))/(1036*(1.0-P)); 
          if Q < 0.0 then Q=0.0; 
  
             /* output this data point */ 
          output; 
  
             /* set next possible value of P   */ 
          P=P+0.005; 
       end; 
  
    run; 
  
       /* create the ANNOTATE= data set for labels of  */ 
       /* decision diagram                             */ 
    data label; 
       length FUNCTION STYLE COLOR $8; 
       length XSYS YSYS            $1; 
       length WHEN POSITION        $1; 
       length X Y                   8; 
       length SIZE ROTATE           8; 
  
       WHEN = 'A'; 
       POSITION='0'; 
       XSYS='2'; 
       YSYS='2'; 
       input FUNCTION $ X Y STYLE $ SIZE COLOR $ 
             ROTATE TEXT $ & 16.; 
       datalines; 
    label   0.01    0.04    centx   2       black   .    Do Not 
    label   0.01    0.03    centx   2       black   .    Invoke 
    label   0.01    0.02    centx   2       black   .    The Clause 
    label   0.06    0.06    centx   2       black   .    Invoke The 
    label   0.06    0.05    centx   2       black   .    Clause 
    ; 
  
       /* -- set graphics environment             -- */ 
    goptions lfactor=3;
 
  
       /* -- define symbol characteristics for boundary  -- */ 
    symbol1 i=joint v=NONE l=1 ci=black; 
  
       /* -- define pattern for area fill                -- */ 
    pattern1 value=msolid color=cyan; 
    pattern2 value=msolid color=green; 
  
       /* -- define axis characteristics                 -- */ 
    axis1 label=('Pr(Accept the Invocation)') 
          order=(0 to 0.1 by 0.01) minor=none; 
    axis2 label=(angle=90 'Pr(Press the Issue)') 
          order=(0 to 0.1 by 0.01) minor=none; 
  
       /* -- plot decision diagram                       -- */ 
    title h=2.5 "Petroleum Distributor's Decision"; 
    proc gplot data=Data7 ; 
       plot Q*P=1 / haxis=axis1 
                    vaxis=axis2 
                    annotate=label 
                    name="dt6p2" 
                    frame 
                    areas=2; 
    run; 
  
    quit;
 
Output 5.6.4: Decision Diagram for the Petroleum Distributor's Problem
|   | 
The decision diagram in Output 5.6.4 
 is an analysis of the sensitivity of the solution to the 
 probabilities that the 
 customer will accept the invocation and that the customer will 
 decline to press the issue.  He should 
 invoke the clause if he feels the customer's probabilities of 
 outcomes 'Accept' and 'Press_Issue',  and
 and  , are located 
 in the upper-right area marked as
, are located 
 in the upper-right area marked as 'Invoke The Clause' in 
 Output 5.6.4 
 and should not invoke the clause otherwise.  Note that the values 
  and
 and  used in this example are located on the 
 upper right corner on the diagram.
 used in this example are located on the 
 upper right corner on the diagram.
 
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.