exercise:Bf0ee656d4: Difference between revisions
From Stochiki
(Created page with "<div class="d-none"><math> \newcommand{\NA}{{\rm NA}} \newcommand{\mat}[1]{{\bf#1}} \newcommand{\exref}[1]{\ref{##1}} \newcommand{\secstoprocess}{\all} \newcommand{\NA}{{\rm NA}} \newcommand{\mathds}{\mathbb}</math></div> In Exercise \ref{sec 2.2}. 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 f...") |
No edit summary |
||
Line 1: | Line 1: | ||
In [[exercise:9c079e0f1e|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: | |||
<ul style="list-style-type:lower-alpha"><li> Write a program which simulates both cases for a run of 1000 trials, | |||
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: | |||
<ul><li> 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 | 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.) | ten times. (Call a trial a success if the three pieces do form a triangle.) |
Latest revision as of 23:39, 13 June 2024
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].