- #1

- 22,129

- 3,301

Let's do some simulations. Below are 5 simulation problems that require a computer to solve. Use any language you want. Post the answers (including graphics) and code here!

\hline

\hline

\text{Demand} & \text{Good day} & \text{Fair day} & \text{Poor day}\\

\hline

\hline

40 & 0.03 & 0.1 & 0.44\\

\hline

50 & 0.05 & 0.18 & 0.22\\

\hline

60 & 0.15 & 0.4 & 0.16\\

\hline

70 & 0.2 & 0.2 & 0.12\\

\hline

80 & 0.35 & 0.08 & 0.06\\

\hline

90 & 0.15 & 0.04 & 0\\

\hline

100 & 0.07 & 0 & 0\\

\hline

\hline

\end{array}$$

Thank you all for participating! I hope many of you have fun with this! Don't hesitate to post any feedback in the thread!

More information:

- Any use of outside sources is allowed, but do not look up the question directly. For example, it is ok to go check probability books, but it is not allowed to google the exact question.
- All programming languages are allowed.
- Please reference every source you use.

- SOLVED BY Ibix A clinic has three doctors. Patients come into the clinic at random, starting at 9a.m., according to a Poisson process with time parameter 10 minutes: that is, the time after opening at which the first patient appea follows an exponential distribution with expectation 10 minutes and then, after each patient arrices the waiting time until the next patient is indepdnently exponentially distributed, also with expectation 10 minutes. When a patient arrices, he or she waits until a doctor is available. The amount of time spent by each doctor with each patient is a random variable, uniformly distributed between 5 and 20 minutes. The office stops admitting new patients at 4m and closes when the last patient is with the doctor.

Find the median and 50% interval for the following: the amount of patients coming to the office, the amount of patients having to wait, the average wait, the closing time of the office. Graph the distributions.

- SOLVED BY mfb Write a program to simulate data from the standard normal distribution. The ONLY randomization program you can use is a program which automatically tosses a coin and gives you head or tails. Throughout the program, you cannot know what the probability of heads is (only that it is not 0 or 1). Provide proof that your program simulates the normal distribution.

- SOLVED BY I_am_learning, Ygggdrasil Simulate the distribution from Challenge 5 of the probability challenge:

In a town of 1001 inhabitants, a person tells a rumor to two distinct people, the "first generation". These repeat the performance and generally, each person tells a rumor to two people at random without regard to the past development (a rumor cannot be told to the person who told him this rumor). Find the probability ##P(r)## that the generation ##1,2,...,r## will not contain the person who started the rumor.

- SOLVED BY I_am_learning Repeat (3) but now suppoe that a person can tell the rumor to the person who told him the rumor. Do the result of 3 change significantly?

- SOLVED BY Ibix The newsstand buys papers for 33 dollars each and sells them for 50 dollars each. Newspaper not sold at the end of the day are sold as scrap for 5 dollars each. Newspaper can be purchased in bundles of 10. thus the newsstand can buy 50, 60, and so on. There are three types of newsdays: ‘good’, ‘fair’ and ‘poor’ having probabilities 0.35, 0.45 and 0.20, respectively. The distribution of newspapers demanded on each of these days is given below in the table. Problem: Compute the optimal number of papers the newsstand should purchase.

\hline

\hline

\text{Demand} & \text{Good day} & \text{Fair day} & \text{Poor day}\\

\hline

\hline

40 & 0.03 & 0.1 & 0.44\\

\hline

50 & 0.05 & 0.18 & 0.22\\

\hline

60 & 0.15 & 0.4 & 0.16\\

\hline

70 & 0.2 & 0.2 & 0.12\\

\hline

80 & 0.35 & 0.08 & 0.06\\

\hline

90 & 0.15 & 0.04 & 0\\

\hline

100 & 0.07 & 0 & 0\\

\hline

\hline

\end{array}$$

Thank you all for participating! I hope many of you have fun with this! Don't hesitate to post any feedback in the thread!

More information:

- Gelman et al "Bayesian Data Analysis"

- Invented myself
- Feller "An introduction to probability theory and its applications Vol1" Chapter II "Elements of Combinatorial analysis"
- Feller "An introduction to probability theory and its applications Vol1" Chapter II "Elements of Combinatorial analysis"
- http://www.slideshare.net/praveshnegi/chp-2-simulation-examples

Last edited: