XST20051
Supp Exam Questions used in 2011
1 Answer any four of parts (a) to (e). All parts carry equal marks.`
(Total 40 marks)
(a) You have a regular die. How would you use it to simulate the toss of a fair coin? You have a fair coin. Propose a rejection procedure to simulate the roll of a regular die. Rejection can be inefficient. Explain how the Geometric distribution can help to study this.
(b) One way to simulate values from the Normal distribution is to use the EXCEL expression: NORMSINV(RAND()). Using the appended tables and rough sketches, explain:
(i) the cdf for the values generated by RAND();
(ii) the cdf for Normally distributed random values so generated;
(iii) the function NORMSINV(); and
(iv) illustrate the procedure using three random numbers.
(c) You are designing a simple function to generate a random password: The password must be comprised of four of the following characters: 1, 2, 3, 4, 5, a, b, c, d, e. But it must not contain any repeats. Use values taken from the appended table of random numbers to illustrate how to use ranking values of RAND() to sample without replacement and thus to generate random passwords.
(d) Argue that Pr(Q1|Q2) = Pr(Q2|Q1) where the events denote drawing a queen on the first and second draws from a regular deck of cards. Arguments from causation can be used to consider Pr(Q2|Q1) but cannot be used for Pr(Q1|Q2). Discuss.
(e) Students are graded 1, 2, 3 or 4 in each of two exams. What is the marginal distribution of Y? The joint probability distribution is as below. Use and explain the formal connections between Pr(A and B) and Pr(A|B) for events A and B to compute the conditional distribution of Y, when it is known that X=3. What are the corresponding expected value and variance? Contrast with the equivalents from the marginal distribution of Y.
X= grade in exam 11 / 2 / 3 / 4
Y = grade in exam 2 / 1 / 0.03 / 0.05 / 0.10 / 0.12
2 / 0.05 / 0.06 / 0.08 / 0.07
3 / 0.07 / 0.06 / 0.06 / 0.02
4 / 0.07 / 0.09 / 0.05 / 0.02
2 The ‘birthday’ problem discussed in class concerns the probability that a set of n people, each of whose birthdays is equally likely to be on one of 365 days of the year, contains at least one pair with the same birthday. But the logic can also be applied to the problem of duplicate characters in a randomly constructed password, (as for example in 1(c) above).
(a) For simplicity of illustration, consider a password of length four constructed by drawing uniformly at random – with replacement - from the list (1, 2, 3, 4, 5, a, b, c, d, e.). Show how to study the frequency of duplication (that is, there being at least one duplicate within the four characters) using the table of random numbers supplied. In so doing, define explicitly, such that a computer algorithm could render it as TRUE or FALSE, the “duplication event”. Illustrate by repeating the simulation 10 times and measuring the relative frequency. (6 marks)
(b) An alternative formulation considers the frequency with which the same algorithm forms passwords without any duplicates. The event ‘no duplicates’ can be considered in terms of events concerning restrictions on the first, second, third and fourth characters. This leads to an “event identity”. Discuss, with reference to your illustration. (6marks)
(c) Use probability arguments based on (b) to compute this probability of no duplicates, for passwords of length n = 1, 2, 3, 4, 5, and 6. What is the smallest value of n for which the probability of at least one duplicate exceeds 0.5? (6 marks)
(d) Generalise this to passwords of length n built from alphabets of length k. What does your formula imply for k = n? For k > n? What is the connection to the birthday problem? (6 marks)
(e) The probability of at least one common birthday in a group of size 23 is about 0.5. You find yourself in a room with 22 others. Is the probability that none of them shares your birthday greater or less than 0.5? Explain. (6 marks)
3 Suppose that EXCEL’s RAND() were to generate a very large number of realisations, such as that appended to this paper.
(a) It is said that Y follows the Uniform distribution U(0,1). Define and discuss the pdf and cdf of Y in the context of EXCEL’s realisations. Contrast the cdf with a simulation based on 10 uniform random numbers taken from the appended table by computing, for these 10, the proportion which are less than 0.2, 0.5 and 0.8. (5 marks)
(b) Calculus shows that ,where is the pdf for any random variable X. Use this to compute where Y is as in part (a). Contrast with the mean of your sample of size 10. (5 marks)
(c) A new variable X is created from Y in part (a) by X= Y2. Illustrate the simulation of 10 values of X. What is . Hence compute . What are the corresponding values for your 10 samples? (5 marks)
(d) Use an event identity to discuss the cdf G(x) = Pr(X£ x), illustrating this with your simulated values of X. Confirm that G(0.25)=0.5. Use G(x) to determine g(x) the pdf of X. The pdf g(x) corresponds to a frequency histogram of simulated values of X. Discuss. (5 marks)
(d) Large numbers of computer simulations can be used to study E[X] via the means of the first n values of X (a “running” mean). Use your simulations to illustrate this. Use rough sketches to discuss the convergence you would expect from the ‘Law of large Numbers’ (5 marks)
(e) What are the mean and the variance of ? Explain for n =3 and n = 12. According to the Central Limit Theorem the variation in can be described by the Normal distribution. Explain (5 marks)
4 In the Monty Hall dilemma, the host offers three doors to the contestant. Behind two of these doors are goats; behind the other is a car. The contestant wins the car if she nominates the correct door. There are two stages in the game. First she nominates a door chosen at random (equal probabilities); then the host opens one of the other two doors to expose a goat, and offers the contestant the possibility of switching to the third door. The dilemma is whether to switch. Some argue that there is no point; some argue that it is very much in her interest to switch.
(a) The options can be studied by computer simulations. Use the appended table of random numbers to simulate 5 replications of the game. For each, indicate the outcome both with and without switching. For simplicity, suppose that – in these simulations – the car lies behind door 1. On the basis of these simulations what strategy would you recommend?
(6 marks)
(b) Whichever strategy is adopted, there are several possible ‘sequences of events’. What are probabilities to these events? (6 marks)
(c) What, in the light of these probabilities, is the probability that the contestant wins the car if she always switches? What if she never switches? What strategy do you recommend? (6 marks)
(d) If it is to her advantage to switch, it must be on the basis that the she has learned some information from the host’s actions. Explain.
(6 marks)
(e) The game show will run for a season of 10 weeks. What is the probability distribution of the number of cars won, if the contestants all follow the ‘switch’ strategy? What is its expected value?
(6 marks)
(f) The game show will run indefinitely. What is the probability distribution of the number of weeks until the first car is won, if the contestants all follow the ‘switch’ strategy? What is its expected value?
Random numbers from EXCEL's RAND()0.594 / 0.051 / 0.156 / 0.968 / 0.220 / 0.203 / 0.539 / 0.960 / 0.262 / 0.000
0.817 / 0.802 / 0.696 / 0.572 / 0.034 / 0.786 / 0.496 / 0.082 / 0.085 / 0.434
0.090 / 0.094 / 0.088 / 0.597 / 0.329 / 0.778 / 0.142 / 0.384 / 0.248 / 0.489
0.067 / 0.268 / 0.666 / 0.508 / 0.842 / 0.612 / 0.197 / 0.113 / 0.835 / 0.245
0.820 / 0.896 / 0.855 / 0.332 / 0.704 / 0.182 / 0.558 / 0.139 / 0.027 / 0.687
0.133 / 0.235 / 0.055 / 0.985 / 0.342 / 0.506 / 0.980 / 0.715 / 0.917 / 0.268
0.726 / 0.302 / 0.565 / 0.520 / 0.558 / 0.749 / 0.171 / 0.315 / 0.348 / 0.692
0.270 / 0.256 / 0.124 / 0.703 / 0.534 / 0.863 / 0.842 / 0.331 / 0.075 / 0.679
0.844 / 0.982 / 0.931 / 0.460 / 0.374 / 0.462 / 0.197 / 0.044 / 0.592 / 0.522
0.546 / 0.473 / 0.213 / 0.235 / 0.096 / 0.783 / 0.089 / 0.570 / 0.750 / 0.787
0.472 / 0.212 / 0.174 / 0.346 / 0.420 / 0.697 / 0.173 / 0.691 / 0.452 / 0.897
Simplified Table of the standard Normal distribution.
Tabulated using NORMDISTS is Pr(Y £ y) for y = 0, 0.02... Eg, Pr(Y £ 1.64) = 0.9495
0 / 0.020 / 0.040 / 0.060 / 0.080 / 0.100 / 0.120 / 0.140 / 0.160 / 0.180
0 / 0.5000 / 0.5080 / 0.5160 / 0.5239 / 0.5319 / 0.5398 / 0.5478 / 0.5557 / 0.5636 / 0.5714
0.2 / 0.5793 / 0.5871 / 0.5948 / 0.6026 / 0.6103 / 0.6179 / 0.6255 / 0.6331 / 0.6406 / 0.6480
0.4 / 0.6554 / 0.6628 / 0.6700 / 0.6772 / 0.6844 / 0.6915 / 0.6985 / 0.7054 / 0.7123 / 0.7190
0.6 / 0.7257 / 0.7324 / 0.7389 / 0.7454 / 0.7517 / 0.7580 / 0.7642 / 0.7704 / 0.7764 / 0.7823
0.8 / 0.7881 / 0.7939 / 0.7995 / 0.8051 / 0.8106 / 0.8159 / 0.8212 / 0.8264 / 0.8315 / 0.8365
1 / 0.8413 / 0.8461 / 0.8508 / 0.8554 / 0.8599 / 0.8643 / 0.8686 / 0.8729 / 0.8770 / 0.8810
1.2 / 0.8849 / 0.8888 / 0.8925 / 0.8962 / 0.8997 / 0.9032 / 0.9066 / 0.9099 / 0.9131 / 0.9162
1.4 / 0.9192 / 0.9222 / 0.9251 / 0.9279 / 0.9306 / 0.9332 / 0.9357 / 0.9382 / 0.9406 / 0.9429
1.6 / 0.9452 / 0.9474 / 0.9495 / 0.9515 / 0.9535 / 0.9554 / 0.9573 / 0.9591 / 0.9608 / 0.9625
1.8 / 0.9641 / 0.9656 / 0.9671 / 0.9686 / 0.9699 / 0.9713 / 0.9726 / 0.9738 / 0.9750 / 0.9761
2 / 0.9772 / 0.9783 / 0.9793 / 0.9803 / 0.9812 / 0.9821 / 0.9830 / 0.9838 / 0.9846 / 0.9854
2.2 / 0.9861 / 0.9868 / 0.9875 / 0.9881 / 0.9887 / 0.9893 / 0.9898 / 0.9904 / 0.9909 / 0.9913
2.4 / 0.9918 / 0.9922 / 0.9927 / 0.9931 / 0.9934 / 0.9938 / 0.9941 / 0.9945 / 0.9948 / 0.9951
2.6 / 0.9953 / 0.9956 / 0.9959 / 0.9961 / 0.9963 / 0.9965 / 0.9967 / 0.9969 / 0.9971 / 0.9973
2.8 / 0.9974 / 0.9976 / 0.9977 / 0.9979 / 0.9980 / 0.9981 / 0.9982 / 0.9984 / 0.9985 / 0.9986
3 / 0.9987 / 0.9987 / 0.9988 / 0.9989 / 0.9990 / 0.9990 / 0.9991 / 0.9992 / 0.9992 / 0.9993
Simplified Table of the inverted standard Normal distribution.
Tabulated are y such that Pr(Y £ y) for = p for p = 0, 0.01... Eg,. Pr(Y £ -0.151) = 0.44
0.00 / 0.01 / 0.02 / 0.03 / 0.04 / 0.05 / 0.06 / 0.07 / 0.08 / 0.09
0 / -2.326 / -2.054 / -1.881 / -1.751 / -1.645 / -1.555 / -1.476 / -1.405 / -1.341
0.1 / -1.282 / -1.227 / -1.175 / -1.126 / -1.080 / -1.036 / -0.994 / -0.954 / -0.915 / -0.878
0.2 / -0.842 / -0.806 / -0.772 / -0.739 / -0.706 / -0.674 / -0.643 / -0.613 / -0.583 / -0.553
0.3 / -0.524 / -0.496 / -0.468 / -0.440 / -0.412 / -0.385 / -0.358 / -0.332 / -0.305 / -0.279
0.4 / -0.253 / -0.228 / -0.202 / -0.176 / -0.151 / -0.126 / -0.100 / -0.075 / -0.050 / -0.025
0.5 / 0.000 / 0.025 / 0.050 / 0.075 / 0.100 / 0.126 / 0.151 / 0.176 / 0.202 / 0.228
0.6 / 0.253 / 0.279 / 0.305 / 0.332 / 0.358 / 0.385 / 0.412 / 0.440 / 0.468 / 0.496
0.7 / 0.524 / 0.553 / 0.583 / 0.613 / 0.643 / 0.674 / 0.706 / 0.739 / 0.772 / 0.806
0.8 / 0.842 / 0.878 / 0.915 / 0.954 / 0.994 / 1.036 / 1.080 / 1.126 / 1.175 / 1.227
0.9 / 1.282 / 1.341 / 1.405 / 1.476 / 1.555 / 1.645 / 1.751 / 1.881 / 2.054 / 2.326
Formulae for Discrete Dists in Exam / Formulae for Continuous Dists in Exam
© UNIVERSITY OF DUBLIN 2011
Page 7 of 7