DEV Community

王凯
王凯

Posted on

How to Use Decision Trees in Real Life

How to Use Decision Trees in Real Life

In 2018, a friend of mine was agonizing over whether to leave her corporate law job to start a legal tech company. She'd been going back and forth for months, trapped in a loop of "what ifs" and "buts."

I asked her to draw a decision tree on a whiteboard. Forty-five minutes later, she had mapped out every major decision point, probability, and outcome. The answer was obvious on paper in a way it never was in her head.

She started the company. It's now doing $3 million in annual revenue.

The decision tree didn't make the decision for her. It organized the complexity into a structure her brain could actually process.

What a Decision Tree Is

A decision tree is a visual map of a decision that includes:

  • Decision nodes (squares): Points where you choose between options
  • Chance nodes (circles): Points where an uncertain outcome occurs
  • End nodes (triangles): Final outcomes with their values

You read it left to right. At each decision node, you choose. At each chance node, probability determines the path. At each end node, you assess the outcome.

The power isn't in the math (though the math helps). It's in the completeness. A decision tree forces you to enumerate every option, every uncertainty, and every outcome -- including the ones your brain conveniently ignores.

Step-by-Step: Building a Real Decision Tree

Let's walk through a concrete example: deciding whether to accept a job offer.

Step 1: Define the Decision

The root decision node: Accept the offer or stay at current job?

Two branches: Accept, Stay.

Step 2: Map the Uncertainties

For each branch, identify the key uncertainties.

Accept branch:

  • Will I like the new role? (estimate: 70% yes, 30% no)
  • Will the company succeed? (estimate: 60% yes, 40% no)

Stay branch:

  • Will I get the promotion I've been promised? (estimate: 50% yes, 50% no)
  • Will I still feel fulfilled here in a year? (estimate: 40% yes, 60% no)

Step 3: Define the Outcomes

At the end of each path, describe the outcome and assign it a value (1-10 satisfaction score or a dollar value).

Accept + Like it + Company succeeds: Score 9 (new skills, equity upside, fulfillment)
Accept + Like it + Company fails: Score 5 (good experience, need a new job, no equity)
Accept + Don't like it + Company succeeds: Score 4 (stuck in a role you dislike but financially fine)
Accept + Don't like it + Company fails: Score 2 (bad experience, need a new job, wasted time)

Stay + Get promotion + Feel fulfilled: Score 7 (safe, growing, comfortable)
Stay + Get promotion + Not fulfilled: Score 5 (more money but restless)
Stay + No promotion + Feel fulfilled: Score 5 (stable but plateaued)
Stay + No promotion + Not fulfilled: Score 2 (stuck, resentful, stagnant)

Step 4: Calculate Expected Values

Multiply each outcome's score by the probability of reaching it.

Accept expected value:
(0.70 × 0.60 × 9) + (0.70 × 0.40 × 5) + (0.30 × 0.60 × 4) + (0.30 × 0.40 × 2)
= 3.78 + 1.40 + 0.72 + 0.24 = 6.14

Stay expected value:
(0.50 × 0.40 × 7) + (0.50 × 0.60 × 5) + (0.50 × 0.40 × 5) + (0.50 × 0.60 × 2)
= 1.40 + 1.50 + 1.00 + 0.60 = 4.50

The expected value of accepting (6.14) is significantly higher than staying (4.50).

Step 5: Sensitivity Analysis

Change the probabilities and see if the answer changes. What if the company only has a 40% chance of success instead of 60%? What if the promotion is 80% likely instead of 50%?

If the answer stays the same across reasonable ranges of probability, you have a robust decision. If it flips with small changes, the decision is genuinely close, and other factors (values, gut feeling, personal situation) should weigh more heavily.

Common Real-Life Applications

Should I Buy or Rent?

Decision node: Buy vs. Rent
Chance nodes: Home appreciation rate, interest rate changes, how long you'll stay, maintenance costs
End nodes: Total wealth after 10 years under each scenario

Most people make this decision based on emotion ("owning is the American dream") or anecdote ("my friend made a fortune on their house"). A decision tree forces you to account for all the scenarios, including the ones where buying is clearly worse.

Should I Go Back to School?

Decision node: Enroll vs. Don't enroll
Chance nodes: Will you complete the program? Will the credential increase your earning power? Will the field be growing when you graduate?
End nodes: Career trajectory and total lifetime earnings under each scenario

The tree often reveals that the expected value of the degree depends heavily on completion rates and field growth -- factors most applicants don't research.

Should I Start a Business?

Decision node: Start vs. Don't start
Chance nodes: Product-market fit, funding success, team quality, market timing
End nodes: Financial outcome, career outcome, personal satisfaction

Mapping these scenarios systematically -- using frameworks like those on KeepRule to structure your analysis -- often reveals that the expected downside of starting is much lower than feared (you can always get another job) while the expected downside of not starting is higher than assumed (permanent regret, missed timing).

Advanced Techniques

Value of Information

Before making a decision, ask: "Is there information I could get that would change my decision?" If a single phone call could shift the probabilities enough to change the answer, make the phone call before deciding. If no feasible information would change the outcome, stop researching and decide now.

Option Value

Some decisions create future options. Taking the new job might lead to a startup opportunity in three years that you can't access from your current role. The decision tree can include these secondary decision nodes to capture the option value.

Sequential Decision Trees

For complex life decisions, you may need sequential trees -- where one decision leads to another set of decisions. "If I accept the job, then in two years I'll face a decision about whether to stay or start a business." Map the full sequence.

The Limitations

Decision trees work best when:

  • You can enumerate the key options and uncertainties
  • You can reasonably estimate probabilities (even roughly)
  • The outcomes are somewhat quantifiable

They work less well when:

  • The decision is primarily values-based ("Should I spend more time with family?")
  • The uncertainties are truly unknowable (black swans)
  • The decision is simple enough that formal analysis adds no value

The Real Benefit

The expected value calculation is useful, but it's not the main benefit of decision trees. The main benefit is completeness. The process of building the tree forces you to:

  • Consider options you might have ignored
  • Identify uncertainties you were pretending didn't exist
  • Quantify outcomes you were only vaguely imagining
  • Discover which probabilities actually matter (sensitivity analysis)

My friend's decision to leave law for legal tech wasn't ultimately made by the math. It was made by the clarity that came from seeing her entire decision landscape on a whiteboard, organized and complete, for the first time.

You don't need special software. A whiteboard, a piece of paper, or even a napkin will do. Draw the tree. Estimate the numbers. Calculate. Then decide with your whole brain, not just the anxious part.

Top comments (0)