Model dependenceLesson 25 of 76 · 7 min

Independence changes the answer

Compare a joint outcome under independent and dependent inputs.

Independence means that learning one input does not change the distribution of the other. It is stronger than saying two inputs have different names or came from different spreadsheet columns. A marginal distribution is one variable's distribution considered on its own; matching the two marginals does not specify how they vary together.

Consider the sum of two positive costs. In the independent model each cost gets a separate uniform draw. In the shared model both costs move with the same draw. Their individual distributions are the same, but the distribution of their sum changes.

This distinction is important for budgets and deadline risks. Matching each input’s histogram does not determine the joint outcome. When relationships are uncertain, compare explicit dependency scenarios and identify which part of the decision they affect.

The same mean can hide different tails
405060708000.0150.030.0450.06DensityTotal (model units)
405060708000.0150.030.0450.06DensityTotal (model units)
E[A+B]=60in both modelsE[A+B]=60\quad\text{in both models}
E[A+B]=60in both models\begin{gathered}E[A+B]=60\\\text{in both models}\end{gathered}
  • Independent inputs
  • Shared input
Reference illustration. Exact density references for the two authored models. Independent inputs produce a triangular total; sharing one uniform input produces a uniform total. Both means are 60, but the probability above the line at 70 is 0.125 versus 0.25. These are model calculations, not measured evidence.

If both costs become high together, should a high combined cost become more likely?

Write a prediction (optional)

Seeded teaching simulation

Select Run Python below with the code unchanged.

Tools
About Python ↗

The code is editable. Press Ctrl+Enter or ⌘+Enter to run Python from the editor.

Published example output

This result comes from the original Python. Your runs appear above. Build environment ↗

independent mean: 59.979 P(total > 70): 0.1248
shared mean: 60.014 P(total > 70): 0.2487

Read the first result

The expected totals are similar while the tails differ. Dependence can matter even when an average appears unchanged.

Try an edit

Inside the loop, add print("P(total < 50):", round((total < 50).mean(), 4)) immediately after the existing print line. Indent it by four spaces. Select Run Python again. Compare the two P(total < 50) values and the two P(total > 70) values. Does sharing the draw have a similar effect in both tails?

Back to the Python editor

Scope. Perfectly shared draws are a deliberate stress case, not an estimate of actual dependence.

Try a fresh case

Two models have identical input marginals. Must their total-cost tails match?

Choose an answer
Need a hint?
Hint 1

Ask whether large inputs can occur together.

Hint 2

Compare a shared draw with separate draws.

Your notes