Selected Answers to Problem Set 3


1. I simply checked if June 28, 2030 was a Friday. That's when I turn 50. You can see how I implemented this (everyone's was similar to this one) here.
2. The math approach: if I choose a door at random, it is clear that I have a 33% chance at guessing the right door. Now, if I do not change my guess, then the door I chose still has a 33% chance at being right. If I switch, then that leaves one other door. The door I had guessed at the beginning had a 33% chance of being right and the opened door now has a 0% chance of being right. Therefore, the other unopened door as a 67% chance of being the right door. It is in my best interest to always switch.
Here's a link to a script that I wrote to demonstrate this.
3. The Algebraic Solution: On a stick of length one, the conditions are such:
  i) If I assign c to be the longest, then a + b > c 
 ii) if a + b + c = 1, then a + b = 1 - c 
iii) By substitution, 1 - c > c, or c < 0.5
 iv) Therefore, the longest piece must be shorter than 0.5, and all pieces 
therefore must be shorter than 0.5.
Knowing these to be true, for any cut x that I make on the stick, it denotes a range of possible cuts that will yield three pieces which will make a triangle (that is, three pieces all of which are less than 1/2).
  i) x < 1/2
 ii) y - x < 1/2 implies y < x + 1/2
iii) 1 - y < 1/2 implies y > 1/2
 iv) Therefore, 1/2 < y < x + 1/2 
From this, we can see that if we make a cut x then the odds that y will fall in between 1/2 and (x + 1/2) is exactly x. Of course, we cannot make a cut past one, so when x is past 1/2, y will be between (x - 1/2) and 1/2 (visualize flipping the stick around - if our first cut is past the halfway mark, flip the stick and it's now before the halfway mark). We can instead take the integral of all values of x between 0 and 1/2 and multiply by two (in the picture c1 should be x).

P, then, equals 1/8. Multiplied by two yields the answer, 1/4, or 25%.
Click here for a script to detail this and the two extra credit questions.
4. The expected value is calcualated as (50 * 1/9) + (25 * 3/9) + (10 * 5/9) = 175/9 = 19.44. The standard deviation is calculated as:
SD = sqrt((50 - 175/9)² * 1/9 + (25 - 175/9)² * 3/9 + (10 - 175/9)² * 5/9)
   = sqrt(103.7380 + 10.2881 + 49.5542)
   = sqrt(163.5802)
   = 12.7898

5. Click here for a Perl script demonstrating the Monte Carlo method of finding this area. This script takes a random number between [-3,3] (the x-coordinate), and [-4,4] (the y-coordinate) and sees whether it falls on the ellipse (by checking whether the equation is less than one. If so, it adds one to c. Out of t trials (c/t) we can see the ratio of ellipse area to total area (total area is 6*8, or 48 units). Multipling the ratio, or probability, of the ellipse to the box by the area of the box gives us the approximate area of the ellipse.
Were these answers helpful?
Yes
No
Name (optional):