Dealing with Uncertainty

Site: Saylor Academy
Course: CS250: Python for Data Science
Book: Dealing with Uncertainty
Printed by: Guest user
Date: Saturday, May 18, 2024, 4:09 PM

Description

A decision tree is a model of decisions and their outcomes. It has found widespread application because of its ease of implementation. Additionally, its compact tree representation is often useful for visualizing the breadth of possible outcomes.

Decision Trees

Sometimes decisions can be complex and require a number of stages to arrive at a final outcome. Such a final outcome may be dependent on earlier, intermediate decisions. Alternatively, the final decision may be dependent on a series of uncertain, intermediate outcomes. Dealing with these types of decisions may appear, on the face of it, quite difficult. However, the technique of decision trees that you are going to explore in this section will help to simplify this process.

The best way to illustrate the technique is by a worked example in Activity 5. Before doing so, it is important to point out the meaning of two symbols that will be used in the decision trees.

Where a branch appears on your tree, this point will be called a node. A node may appear for one of two reasons. The first is that a decision is required. In other words, the node represents a series of choices. This type of node will be called a decision node, and a square will be used to denote it. The second type of node is a chance node. Here, there is a range of possible events or outcomes of varying probabilities. Such nodes are denoted with a circle.

In Videos 3 and 4, you will be introduced to the powerful technique of decision trees. This technique allows you to incorporate probabilities into a range of potential outcomes, which may themselves be conditional on other outcomes.

You may wish to watch the videos a few times and make notes in the text boxes to ensure that you understand the concept of decision trees, as well as to answer the questions.


Part 1
  

A company (MKOU) is assessing two outsourcing bids, A and B. Company A is more expensive but is reckoned to have a higher probability of delivering a high-quality good than B. This is important as the higher the quality the more MKOU can charge and the less it will need to refund dissatisfied customers. The data may be summarised as shown in Table 7.

Table 7 Possible financial benefits of using companies A and B

Company Probability of acceptable service level Net financial benefit if acceptable £M Net financial cost if not acceptable £M
A 80% 120 -30
B 55% 160 -10

Part 2

 
 

A company is considering launching a new product. It can either launch immediately or in one year's time. If it launches immediately, there is a 0.75 chance of the launch being successful. If it is unsuccessful, then the launch will be halted at a cost of £1M and relaunched in a year's time. If the company launches immediately, it may opt to also have a promotion, which has a 0.6 chance of success. If the promotion is successful, the financial benefit is £10M, if not £2M. If the company does not do the promotion, the benefit is £5M. If the company launches in a year's time, the benefit is £6M. What should the company do?

Now that you have watched the videos on decision trees, you will consider potential decisions faced by businesses. In the next section, you will see some more applied examples of how decision trees are used in making business decisions.


Source: The Open University, https://www.open.edu/openlearn/money-business/decision-trees-and-dealing-uncertainty/content-section-4
Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 License.

Decision Trees and Expected Value

You are now at a stage to see how an understanding of expected values and probability can be combined to simplify complex business problems.


Example: decision tree for a business considering a new office location

You are considering opening a new office somewhere in the UK, and you have shortlisted two town councils: A and B. However, a key factor is the impact of local taxes, also called business rates.

Local elections are coming up with two main parties in the running: J and K. Each party has a different view on how business should be treated; however, there is uncertainty as to whether they will increase or decrease business rates.

Table 8 shows the probabilities of each party winning, their possible views towards business, and the impact of each.

Table 8: Probabilities of each party

Council Party Probability of winning Probability of being business friendly Estimated impact of being business friendly/ £M Estimated impact of being business unfriendly/ £M
A J 0.55 0.7 3.0 -0.50
K 0.45 0.4 0.5 -2.00
B J 0.30 0.6 2.5 -0.25
K 0.70 0.35 1.0 -1.00


The probabilities of winning might be based, for example, on the odds currently being offered by a betting website, predicting the chances of that party winning.

The probabilities of being business-friendly would be based on past experience and any announcements being made by the parties.

The final two columns show the estimated monetary impact, positive or negative, in £ millions.

In the fifth column, 'Estimated impact of being business friendly/£M', if, for example, in the first row, in council A, party J has a 0.7 probability of being business-friendly, then it must have a probability of 0.3 of being unfriendly towards business. This is because the total probabilities must total 1.

Table 8 includes estimates of the financial impact. So, for example, in the first row, it has been estimated that in council A, if party J were business-friendly, the company would benefit financially by £3M. On the other hand, if the party were not business-friendly, the company would suffer financially by £0.5M.

The data shown in Table 8 can be mapped in a decision tree as follows.

Creating a decision tree

  1. Put in the main decision and choice nodes (Figure 1).

    Figure 1 Decision tree for which council
    Figure 1 Decision tree for which council

  2. Add the final column (Figure 2). This column leads to the final value for each particular path. In other words, you will add the top branch of the decision tree – the impact if council A wins and it is business-friendly.

    
Figure 2 Decision tree for which council, with 'yes'/'no' chance nodes
    Figure 2 Decision tree for which council, with 'yes'/'no' chance nodes

  3. Put in the impact values (Figure 3).

    
Figure 3 Decision tree for which council, with terminal values added
    Figure 3 Decision tree for which council, with terminal values added

  4. Then add their probabilities. Note that if party J in council A has a 0.7 probability of being business-friendly, then it must have a 0.3 (1 – 0.7) probability of being business unfriendly.

    As the only possibilities are being friendly or unfriendly, the probabilities of these must equal 1 – it is definitely either friendly or unfriendly (Figure 4).

    This example only has one decision node: which town to move to. There are then two sets of chance nodes. The 'chances' are those actions outside of the decision-maker's control. They are: Which party will win? (So you can create a branch for each of the two possibilities) and, is that winning party business-friendly or not?

    Again, you create a branch for each answer. If there were more decisions, at each decision node, you would insert a branch for each option open to the decision-maker.

    
Figure 4 Decision tree for which council, with probabilities added
    Figure 4 Decision tree for which council, with probabilities added

Calculating the expected value

Now you can find the expected value of the financial impact for each party in each council.

  • What is the expected value of the financial impact if party J won in council A?

    There is a 0.7 probability of it being business-friendly and 0.3 of it being unfriendly. If party J won council A, the expected financial impact would be:

    (0.7 × £3M) + (0.3 × -£0.5M) = £1.95M.

    The expected values can be added to the decision tree (Figure 5).

    Figure 5 Decision tree for which council, with expected values added to 'Friendly' nodes
    Figure 5 Decision tree for which council, with expected values added to 'Friendly' nodes
  • What is the financial impact if the company moves to council B?

    There is a 0.3 probability of J winning (with an expected financial impact of £1.4M) and 0.7 of K winning (with an expected impact of -£0.3M). So the expected financial impact of moving to B is:

    (0.3 × £1.4M) + (0.7 × -£0.3M) = £0.21M.

    The probabilities can be added to the decision tree (Figure 6).
     
    Figure 6 Decision tree for which council, with win probabilities and win node expected values added
    Figure 6 Decision tree for which council, with win probabilities and win node expected values added

So now you can step back and see that council A has the higher expected value (£0.62M compared with £0.21M in B), and so, on the grounds of economic impact (there may be other factors), you would select to relocate to A.

This general approach to solving the problem, by analyzing from the last stage back to the first, is a process called dynamic programming. The content of this course will not go beyond decision trees.

In the next subsection, you will consider an example of a complex decision tree related to the launch of a product.

Deciding Whether or Not to Launch a Product Early

From the last worked example, you should now have a good understanding of the basics of how decision trees work. In this next example in Activity 6, you will meet a more complex decision tree with more than just the initial decision node. In other words, more than one decision will be needed. Thus, as well as providing an initial decision (what to do now), the decision tree will also provide a strategy for future decisions depending on the outcomes of various chance events.


Activity 6 Example of a complex decision tree: considering the early launch of a product

A company is planning on launching a new product. It was thinking of launching in June of next year, but it believes that a rival is also considering launching a similar product around that time. The company is considering bringing the launch forward to the end of this year. This will cost an extra €3M to carry out, and the company believes it will have a 0.8 probability of beating the rival to the market. If, however, they wait until June, the probability of beating the rival falls to 0.2.

To make the decision easier, the company assumes that sales will be either high, medium, or low. If the company launches before its rival, the probability of high sales is 0.6, and the probability of medium sales is 0.25. If it launches after its rival, the probability of high sales falls to 0.35, and medium sales rise to 0.45. If the rival launches first, the company could undertake a sales promotion, costing €1.5M, but would change the probabilities of high sales to 0.5 and medium to 0.4.

The financial impacts are that high sales would be worth €9M, medium would be worth €5M and low, €1M.

Using a decision tree analysis, calculate what the company's investment strategy should be. You can use pen and paper, an Excel spreadsheet, or record your calculations in the text box below.

Once you have arrived at a solution, watch Video 5 for the feedback on this activity.

In the next subsection, you will consider another example of a complex decision tree, this time related to the launch of a new pharmaceutical drug.

Developing a New Pharmaceutical Drug

Now that you have watched Video 5, which presents a more complex example of using decision trees, the next activity will give you an opportunity to practice the skill of building and evaluating a decision tree.


Activity 7: Example of a complex decision tree: considering the development of a new pharmaceutical drug

A pharmaceutical company is considering developing a new drug. The key decision criteria are the development time, which the company would like to minimize. There are two approaches to developing the drug. The first is to base it on stem cell research ('stem'). There is a 0.4 probability that this approach would lead to a drug within 5 years. Otherwise, it will take up to 7 years (0.6 probability). Note these times are from the start of the use of this approach.

An alternative approach is based on a method called targeted delivery (‘TD'). This has a 0.3 probability of delivering a drug within 3 years. However, if at the end of 3 years there is no drug, the company would have to choose between switching to stem or carrying on with TD. At that point, the TD will have a 0.8 probability of delivering the drug within a further 2 years.

Although, if the drug has still not been delivered after a further 2 years, the company can still switch to the stem approach. Alternatively, persevering at this stage with TD will definitely yield a drug after a further 7 years.

Given the objective is to minimize development time, use a decision tree to determine what the company's strategy should be.

You can use pen and paper or a spreadsheet.

Conclusion

In this course, you learned how to use probability to quantify uncertainty. Probability enables the decision-maker to calculate a quantity called the expected value, which gives you a quantity that takes account of the differing probabilities of the potential outcomes of an event.

Finally, you learned how to use these ideas in situations where there is a range of possible outcomes, some of which may be dependent on earlier outcomes. The technique used was that of a decision tree.