• kth.se
  • Student web
  • Intranet
  • kth.se
  • Student web
  • Intranet
Login
DA2210 HT21 (vettig21)
Homework 9 HT 2021 - probability and simulation
Skip to content
Dashboard
  • Login
  • Dashboard
  • Calendar
  • Inbox
  • History
  • Help
Close
  • Min översikt
  • DA2210 HT21 (vettig21)
  • Assignments
  • Homework 9 HT 2021 - probability and simulation
  • Home
  • Assignments
  • Modules
  • Quizzes
  • Media Gallery
  • Course Evaluation

Homework 9 HT 2021 - probability and simulation

  • Due 1 Dec 2021 by 17:00
  • Points 1
  • Submitting a file upload
  • Available 22 Nov 2021 at 8:00 - 17 Jan 2022 at 17:00
This assignment was locked 17 Jan 2022 at 17:00.

HOMEWORK 9 - Probability and simulation

Due Wed Dec 1 at 17.00

This homework involves the implementation of two simulations. You can collaborate by discussing the concepts and methods involved in the problems, but you should write code and create diagrams yourself.

Your solutions to this assignment should describe the details of your simulation, and your conclusions need to be well motivated. This means that you should describe in the text how the simulations were done, and you should also add your code or a link to it as an appendix.

Your choices of parameters, such as the length of the simulations in part 1 or the number of days in 2, should be motivated, and sometimes you may need to revise them and redo the simulation if needed to answer the questions. All diagrams should follow the standards of a scientific publication, with labels on axes, figure captions, etc. In part 3, you need to base your conclusion on a quantitative argument, i.e., an estimate from the simulation.

 

1. The St. Petersburg paradox was introduced in lecture 8. It was probably first discussed by Nicolas Bernoulli (one of a famous Swiss family of mathematicians in the 18th century) in 1713 in letters to another mathematician, Pierre Rémond de Montmort. It later appeared in a famous paper by his cousin Daniel Bernoulli submitted to the Imperial Academy of Sciences in Petersburg in 1738 [1], where he also discussed resolutions of the paradox. Here is another contemporary description from a letter by Gabriel Cramer, another 18th-century mathematician:

"For the sake of simplicity I shall assume that A tosses a coin in the air and B commits himself to give A 1 ducat if, at the first throw, the coin falls with its cross upward; 2 if it falls thus only at the second throw, 4 if at the third throw, 8 if at the fourth throw, etc. The paradox consists in the infinite sum which calculation yields as the equivalent which A must pay to B. This seems absurd since no reasonable man would be willing to pay 20 ducats as equivalent."

a. Assuming that you are allowed to play this game once in a casino exactly as stated above, what would you yourself be willing to pay to enter the game? 

b. The formulation of the game and the estimate of its value as infinity makes several unrealistic assumptions, both from the player's point of view and from the casino's point of view. What are these assumptions?

c. One is that even a large casino does not have infinite resources, and would have to decide on a maximum number of rounds in the game to avoid going bankrupt. Assume that the maximum payout of the casino is X, and implement and perform a simulation that estimates the expected value of the game in this case. Yo can use any tools that you prefer.

First, choose a reasonable number of X (in SEK) for a large casino. As a guideline, one of the largest casinos in the world is The Venetian in Macau. Their yearly revenue in 2019 was almost 3 billion USD. So, a maximum payout of 10 million SEK or larger seems quite possible.

Present the result of your simulations as a diagram that shows the average payoff over the last n games as a function of n. Choose a suitable maximal number of games N yourself, repeat the simulation several times, and include the result of all simulations in the diagram.

d. Discuss the convergence properties of your simulation. What value do you expect your simulation to converge to? Can you give a mathematical explanation for this value (voluntary)?

1. Daniel Bernoulli, Specimen Theoriae Novae de Mensura Sortis, Commentarii Academiae Scientiarum Imperialis Petropolitanae, Tomus V, 1738, pp.175-192. Translated as Exposition of a new theory of the measurement of risk, Louise Sommer, transl., Econometrica, 22, 23-36 (1954).

 

The-Venetian-Macau-1.jpg

The Venetian in Macau

 

2. A large emergency department at an inner-city hospital has an average of 300 visitors per day. On one particularly crowded day, there were 369 visitors. Can this be reasonably explained as a random statistical fluctuation, or would you suspect that there may be other causes (such as a beginning epidemic, or a larger accident that day)?

Note - as an approximation, you can assume that patients arrive independently of each other, and with a constant probability per unit time (in reality, the arrival rate varies significantly with the time of day). In probability theory, this is called a Poisson process. In a Poisson process, the time between consecutive arrivals follows an exponential distribution Links to an external site. with a rate parameter lambda given by the number of events per unit time (300 per day in the example below).

Answer the question by performing a simulation of the arrivals during a number of days, creating a histogram of visitors per day, and analyzing the result and the shape of the resulting distribution.

1638374400 12/01/2021 05:00pm
Please include a description
Additional comments:
Rating max score to > Pts
Please include a rating title

Rubric

Find rubric
Please include a title
Find a rubric
Title
You've already rated students with this rubric. Any major changes could affect their assessment results.
 
 
 
 
 
 
 
     
Can't change a rubric once you've started using it.  
Title
Criteria Ratings Pts
This criterion is linked to a learning outcome Description of criterion
threshold: 5 pts
Edit criterion description Delete criterion row
5 to >0 Pts Full marks blank
0 to >0 Pts No marks blank_2
This area will be used by the assessor to leave comments related to this criterion.
pts
  / 5 pts
--
Additional comments
This criterion is linked to a learning outcome Description of criterion
threshold: 5 pts
Edit criterion description Delete criterion row
5 to >0 Pts Full marks blank
0 to >0 Pts No marks blank_2
This area will be used by the assessor to leave comments related to this criterion.
pts
  / 5 pts
--
Additional comments
Total points: 5 out of 5