Predicting outcomes using regression models

Having reviewed each of our models, let us now look at how to use them to predict outcomes in R. Before we do so, we must address a few assumptions about our models.

Rating

In order to decide whether a strategy is sufficient or not, we must determine an acceptable Rating value. Assume for the remainder of this book that we consider a Rating value of 80 to be sufficient for predicting victory. After all, Zhuge Liang's rating of the Shu army's performance in each victorious campaign was 80 or higher. As such, a Rating of 80 or above makes us reasonably confident that our strategy will lead to victory. A Rating below 80 will be considered too risky and should be avoided.

Note

Feel free to experiment with your own Rating values. The higher the threshold, the more certain you can be of victory, but the less likely you are to have the resources to achieve it. The lower the required value, the more resource allocation options you will have, but the higher risk your strategy has of failure.

Successfully executed

The outcomes of our surround, ambush, and fire attack regression models depend to a large extent on the successful execution of these battle methods. Yet, successful execution is not something that we can predict with certainty before a battle takes place. One way to handle this conundrum is to use our past battle data to calculate the probability that our battle methods will be successfully executed. Once obtained, we can enter our probability value into our regression equations to make more accurate predictions than we would by merely assuming that our methods were successfully or unsuccessfully executed.

To calculate our probability values, we need to look at the number of times that our methods were successfully executed in the past and divide them by the total number of battles that we have on record. For instance, we know that the Shu army successfully executed a fire attack in 10 out of 30 battles. Therefore, our probability value for successful execution of the fire attack method would be 0.33 (10 divided by 30). Identical steps can be taken to derive probability values for each of the battle methods. These values are displayed in the following table:

Method

Variable Name

Probability

Head to head

probabilitySuccessHeadToHead

1.00

Surround

probabilitySuccessSurround

0.53

Ambush

probabilitySuccessAmbush

0.50

Fire

probabilitySuccessFire

0.33

We will use these probability values for the SuccessfullyExecuted variable when making predictions with our regression models. However, do not hesitate to experiment with hypothetical scenarios. For instance, suppose you feel that your soldiers are better trained today than they have ever been in the past. Perhaps then they are more likely to successfully execute battle plans and deserve a higher probability value.

Number of Wei soldiers

Similarly, we cannot always determine how many soldiers the opposing army will bring into a given battle. However, we do have the history of 120 prior battles that can give us an idea of how many soldiers the Wei army tends to engage in relation to our own. From our past data, we can predict the ratio of Wei soldiers to Shu soldiers for each method by summing the total soldiers engaged for both sides and then dividing them. For example, in previous battles where the surround method was employed, the Wei army engaged a total of 820,000 soldiers, while the Shu army engaged 1,287,000. Accordingly, the ratio of Wei to Shu soldiers engaged was 0.64 (820,000 divided by 1,287,000). When the number of Wei soldiers is unknown, we will assume the following ratios of Wei to Shu soldiers for each type of battle:

Method

Variable name

Ratio

Head to head

ratioWeiShuSoldiersHeadToHead

1.08

Surround

ratioWeiShuSoldiersSurround

0.64

Ambush

ratioWeiShuSoldiersAmbush

1.82

Fire

ratioWeiShuSoldiersFire

6.01

Yet at times, we can indeed predict the number of soldiers that the Wei army will engage in battle. Imagine an ambush attack where we specifically target an enemy city with a known number of soldiers. In this case, it would be better to use the known value than the ratio estimate. When devising your final strategy, the appropriate assumptions will be determined by the particular situation at hand.

Duration of battle

Yet again, the duration of battle is something that is predictable in some cases and unpredictable in others. Our past data show that, on average, surround attacks last for a relatively long time, whereas fire attacks tend to be brief. We can derive the average duration of battle for each of our combat methods for use in instances where a battle's length cannot be predicted beforehand.

Method

Variable name

Average

Head to head

meanDurationHeadToHead

77.9

Surround

meanDurationSurround

105.5

Ambush

meanDurationAmbush

13.6

Fire

meanDurationFire

6.9

Whenever possible, it is best to determine the duration of battle. For example, when issuing a fire attack, you may explicitly set a small window of time in which the army is expected to execute its plans. Should the mission not be completed in time, it may be aborted, thereby remaining within the determined time frame.

A word about assumptions

As noted, these assumptions are not set in stone. In fact, they are our best effort to make the most reasoned and valid predictions in a situation where we cannot control or determine every possible variable. As you progress through this chapter and begin making your own battle predictions and plans, you may want to alter these assumptions to better fit your interpretation of a situation. Along the way, always remain conscious that the assumptions that you choose have important implications for the validity and riskiness of your predictions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.69.53