9827

Umbrella Quandary

A man walks between home and work. Initially, he has some umbrellas at home and at work. If he is about to walk from home to work or from work to home and it is raining, he picks up an umbrella if such is available; if an umbrella is not available, he gets wet. To his disadvantage, the man does not take an umbrella if it is not raining; thus, it is likely that, sooner or later, all umbrellas will be at one of the locations, and so the man has a risk of getting wet. It is assumed that every time the man is about to walk, it is raining with a given probability, independently of history.
This Demonstration shows sample paths of the number of umbrellas at home and work. The red and blue points on the paths show which location the man currently is leaving; the paths start at home. The black points at the bottom show if it is raining. The man gets wet if it is raining and he has no umbrellas at his current location. The Demonstration also shows the average number of walks until the man first gets wet.

SNAPSHOTS

  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]

DETAILS

Snapshot 1: Let us briefly explain the first few steps in this small sample path. Initially, the man has one umbrella at home and one umbrella at work. The process starts at home (the first red point at level 1). When the man is about to walk from home to work, it is not raining and so he does not take an umbrella with him. When he is about to go back to home, it also does not rain. The next day, when he is leaving home it is raining, and so he takes an umbrella with him; the number of umbrellas at home thus decreases to zero and the number of umbrellas at work increases to two. When he is about to go home, it rains again. The third day, when he is about to go home, it rains. The fourth day, when he is about to go home, it is raining but he does not have any umbrellas at work; thus he gets wet.
Snapshot 2: If the probability of rain is small, the numbers of umbrellas at home and work remain constant for relatively long time intervals, because the man most of the time does not need to take an umbrella with him.
Snapshot 3: If the probability of rain is large, the numbers of umbrellas at home and work change very often, because the man, in most cases, takes an umbrella with him.
Snapshot 4: The average number of walks before getting wet is plotted when the probability of rain varies from 0.01 to 0.99 (in steps of 0.01; 20000 simulations were done for each value of the probability). The average is, of course, infinite when the probability of rain is zero, and it is also infinite when the probability of rain is 1 (because the man always carries an umbrella with him). The average number of walks before getting wet is smallest when the probability of rain is not small or large. For example, when the man initially has one umbrella at home and at work and the probability of rain is somewhere between 0.5 to 0.7, he gets wet, on the average, in about 12 walks.
The Demonstration is based on problem 10 in [1].
Reference
[1] P. J. Nahin, Digital Dice: Computational Solutions to Practical Probability Problems, Princeton: Princeton University Press, 2008.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.









 
RELATED RESOURCES
Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2014 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+