Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Practice problems 1) Estimate the probability to roll 500 times a 6 out of 10000 trials. P Solution: We use P (X = 1) = 1/6 and then Yn = nj=1 Xj for n = 10000. Then we can use the normal approximation Yn − nEX k − nEX Prob(Yn > k) = Prob(Yn − nEX > k − nEX) = Prob( √ )> √ ) nσ nσ k − nEX ) ≈ Prob(g > √ nσ p p √ , and hence Here g is normal. In our case σ = p(1 − p) = 5/36 = 5/6. nEX = 10000 6 √ 6(500− 10000 ) a = 100√56 = −70/ 5. We say that the probability is very close to one. Indeed, 2 e−a /2 Prob(g ≤ a) ≤ √ 2π|a| 2 /10 and e−70 = e−490 ≈ 10−(490) log10 e is just very very small. 2) What is the probability of waiting more that 600 trials to have at least 50 sixes. Solution: We start with a geometric random variable X, where Prob(X = k) = P 600 successes. p(1−p)k and 1/6. Then we need Y = 600 j=1 Xj independent copies to get n = √ p Recall that EX √ = 1/p and EY = 600 × 6 = 3600 Thus with σ = n 2(1/p − 1) = √ 600 × 10 = 1520. Y − 3600 Prob(Y > m) = Prob(Y − 3600 > −3550) = Prob( √ ) −3550 1520 > − √ 1520 355 ≈ (1 − Prob(g > √ )) . 2 15 √ My calculator says something like 2355 ∼ 45. Now 452 /2 is if the order 1000 and e−1000 = 15 10−(0.44)1000 = 10−500 is super small. 3) Describe how you can use Monte-Carlo method in order to approximate a gammadistribution. Try to write a code in some of your making math exercises. Solution: We assume that the density function is given on a finite interval [a, b] and use Mote-Carlo random points in a grid to draw a histogram. Making math then compares the new random variable given by the frequency distribution of that histogram with cdf of the original random variable and usually gets a good result. Now for gamma we are little bit out of luck because the region is not finite. However, there is exponential decay and 1 2 we can just cut the tail and loose a small percentage. If we give ourselves a small error margin we could decide to make the cut that Prob(X > b) ≤ ε and then proceed as above. 4) Calculate the sum of two independent exponential and gamma distributed random variables. Solutions: Let start with exponential fX (x) = 1/µe−x/µ and then Z z 1 fX+Y (z) = e−x/µ e−(z−x)/ν µν 0 e−z/ν ex(1/ν−1/µ) z = | µν 1/ν − 1/µ 0 e−z/ν z/ν−z/mu (e − 1) µ−ν e−z/µ − e−z/ν = . µ−ν The case µ = ν is slightly different, and we get = ze−z/µ . µ2 Which is another well-known distribution. For the next three solutions see pdf file below: 5) Suppose that the average length of a phone call is 10 minutes. Arriving immediately after a customer of a public phone (oh yes they did exist even without doctor who), what is the probability to wait for 15, 20 minutes respectively. 6) Mr. Smith enters a post office after Mr. Jones and Mr. Browns where two clerks are operating. He is told that he will be served immediately after one of the other tow gentlemen are done. If you assume that the time spent with a customer is exponentially distributed, what is the probability is leaving after Mr. Jones and Mr. Browns? 7) Suppose that number of miles that a car run is before it battery is worn out is exponentially distributed with average 10, 000 miles. For a 5, 000 mile trip what is the probability to achieve it without replacing the battery. What can be said for an arbitrary distribution? 8) For more question see 7.12 Try 10.