BBy Bot
Jun 09'24

Exercise

In Exercise you proved the following: If you take a stick of unit length and break it into three pieces, choosing the breaks at random (i.e., choosing two real numbers independently and uniformly from [0, 1]), then the probability that the three pieces form a triangle is 1/4. Consider now a similar experiment: First break the stick at random, then break the longer piece at random. Show that the two experiments are actually quite different, as follows:

  • Write a program which simulates both cases for a run of 1000 trials, prints out the proportion of successes for each run, and repeats this process ten times. (Call a trial a success if the three pieces do form a triangle.) Have your program pick [math](x,y)[/math] at random in the unit square, and in each case use [math]x[/math] and [math]y[/math] to find the two breaks. For each experiment, have it plot [math](x,y)[/math] if [math](x,y)[/math] gives a success.
  • Show that in the second experiment the theoretical probability of success is actually [math]2\log 2 - 1[/math].