Project 23: Did Lebron Choke?

Lebron James is a career 73.4% free throw shooter.  In a playoff game early in his career, Lebron missed two of three free throws late in the game and his team went on to lose the game.  The headlines claimed “Lebron Chokes!”.

 

If you are not familiar with the term, “Choking” in sports refers to a player coming up less than they normally would due to the pressure of the situation.

 

Although that is one possibility of why Lebron missed two out of the three free throws, another possibility is that it was just chance.  In other words, it would not have been that unlikely for him to miss two or more of these free throws in any situation. 

 

Assuming that Lebron has a 73.4% chance of making a free throw on any attempt, estimate the probability that Lebron would miss two or more free throws with three attempts. 


Note: Assuming the 73.4% chance of making any free throw is essentially representing what he would typically make in the absence of pressure.


Project 23: Simulate MANY trials of Lebron shooting 3 free throws.  Determine the proportion of these MANY trials in which Lebron missed two or more free throws.  Appropriately assign the variable 'proportion' to appropriately estimate the probability.  Proportion should be a number between 0 and 1.


Note: There are two working randomization methods to use.


random() returns a random number from [0,1)


Example: r = random();  //r holds a value between 0 and 1 (not including 1).


randomInt(lower, upper) returns a random integer between lower and upper inclusive


Example: i = randomInt(2,7); //i holds one of the values: 2, 3, 4, 5, 6, 7 and they are all equally likely

**If your code works for 5 test cases in a row, you can enter your e-mail address.

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0