Project 54NFL Parity

The Green Bay Packers and the Tampa Bay Buccaneers were tied for the best record in 2021, with a record of 13-4. Since the NFL has a hard salary cap, the talent level on NFL teams is fairly evenly distributed.

Project 54: Assume THAT ALL NFL teams have a 50% chance of winning any game played.  We want to estimate the probability that one team out of the 32 NFL teams would result in at least 13 wins out of the 17 played.  There is a working method available called atLeast13Wins.  The method atLeast13Wins() simulates a team playing 17 games and returns true if the team wins at least 13 games and false otherwise.

Example:

atLeast13Wins() returns true or false.  The probability that this method returns true was found in project 53.

Task: Appropriately initialize the value of 'prob' that represents the probability that at least one of the 32 teams wins at least 13 games.  Simulate MANY Trials (about 100,000) to obtain an accurate estimation.  It may take a while for the computer to compute your probability.


Additional Explanation:  1 trial is partially shown below:

atLeast13Wins() returns false

atLeast13Wins() returns false

atLeast13Wins() returns false

atLeast13Wins() returns false

atLeast13Wins() returns false

atLeast13Wins() returns true

atLeast13Wins() returns false

.....

Out of the 32 method calls, two resulted in true (only one was shown for the first 7 teams).  Since at least one team ended up with 13 or more wins, trial one would be considered a success.  We want to estimate the probability of this occurring so we must simulate more than 1 trial (we will do 100,000 trials)

**If your code works for 5 test cases, 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