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.
- Independent inputs
- Shared input
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.
A saved draft is open. To run the published example, open Tools and select Restore example. Recover draft brings your code back.
Execution error
Technical error details
Your result
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?
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?
Need a hint?
Hint 1
Ask whether large inputs can occur together.
Hint 2
Compare a shared draw with separate draws.