1MA01: Mathematical Methods Tutorial Sheet 1 1. Suppose the frequency of a dominant gene (A) in a population is 0.1 (ie 1 in 10). Now, consider drawing 5 members of this population at random. What is the probability that 3 of them will display the dominant phenotype? Note: you may assume the population is large enough that drawing without replacement still results in a binomial experiment and also that the population is in Hardy-Weinberg equilibrium). In H-W equilibrium the probability of two dominant genes is P (AA) = p2 = 0.12 = 0.01 and the probability of one dominant gene is P (Aa) = 2pq = 2(0.1)(0.9) = 0.18. Therefore the frequency of occurance of the dominant phenotype is P (AAorAa) = P (AA) + P (Aa) = 0.19. Now, the selection of 5 people at random from this population is a binomial experiment (check!) given the assumption mentioned earlier. Then ! 5 P (A = 3) = (0.19)3 (0.81)5−3 = 0.045. 3 2. Find the expected value, the variation and the standard deviation for the binomial (n,p) distributions (a) n=2,p=0.25 (b) n=3, p=0.5 (c) n=2, p=1/3 (d) n=3, p=0.25 Note that since these are binomial distributions we can use the easy formula E(X) = np (see notes) giving (a) n = 2, p = 0.25 ⇒ E(X) = np = 0.5; √ V ar(X) = npq = √ 2(0.25)(0.75) = 0.375 and SD(X) = npq = 0.375 = 0.612. (b) n = 3, p = 0.5 ⇒ E(X) = np√= 1.5 V ar(X) = npq = 3(0.5)(0.5) = √ 0.75 and SD(X) = npq = 0.75 = 0.866. 1 Sinéad Ryan, ryan@maths.tcd.ie, see also http://www.maths.tcd.ie/ ryan/123.html (c) n = 2, p = 1/3 ⇒ E(X) = np q = 2/3 V ar(X) = npq = 2(1/3)(2/3) = √ 4/9 and SD(X) = npq = 4/9 = 2/3. (d) n = 3, p = 0.25 ⇒ E(X) = np = 0.75 V√ar(X) = npq = √ 3(0.25)(0.75) = 0.5625 and SD(X) = npq = 0.5625 = 0.75. 3. A laser production facility(!) has a 75% yield ie 75% of the lasers produced pass a quality test. Suppose today, 15 lasers are produced. (a) What is the expected number of lasers to pass the test? (b) What is the variance? (c) What is the standard deviation? (d) What is the probability that at least 14 lasers will pass the quality test? Once again applying the straightforward formulae found in the notes gives (a) Mean = E(X) = np = 15 × 0.75 = 11.25 lasers (b) Variance = V ar(X) = npq = np(1 − p) = 15 × 0.75 × 0.25 = 2.812 (c) Standard Deviation = σ = q Var(X) = 1.677 lasers (d) P(14 or more) = P (14) + P (15) = 0.067 + 0.013 = 0.08 where P (X = 14) = 15! (0.75)14 (0.25)(15−14) = 15(0.75)14 (0.25) = 0.67. 14!(15 − 14)! and P (X = 15) = 15! (0.75)15 (0.25)(15−15) = (0.75)15 = 0.013. 15!(15 − 15)! 4. Sites in a nature reserve are given a habitat complexity score, evaluating their fitness as habitats for ground-dwelling animals. Let X be the habitat complexity score of a randomly chosen site. The scores can range from 0 for uninhabitable to 12 for ideal. X can be modelled by a binomial distribution. Immediately after a fire, p=0.346. E(X), and standard deviation. Determine the expected value, Eighteen years after the fire, p = 0.638. Find E(X) and the standard deviation. Verify that any two of the three definitions for E(X) and the standard deviation lead to the same results. I’ll give all three versions for E(X) and σ here. First, considering the binomial (n, p) = (12, 0.346) distribution. E(X) = Σk kP (X = k) = Σk k n k ! pk q n−k In this question, n = 12, k = 0, . . . , 12, p = 0.346, q = 1 − p = 1 − 0.346 = 0.654 For each value of k between 0 and 12 you need to work out 12 k P (X = k) = ! (0.346)k (0.654)12−k for example, P (X = 0) = 12 0 ! (0.346)0 (0.654)12−0 = 0.006122. Table 1 lists the values. From this we have that E(X) = 4.14 Using the simpler formula for binomial experiments: E(X) = np = 12(0.346) = 4.15. Now for the standard deviation: there are 3 possible formula to use k P (X = k) 0 0.006122 1 0.038869 2 0.113102 3 0.199457 4 0.234428 5 0.2009786 6 0.124049 7 0.056253 8 0.018600 9 0.004373 10 0.0006941 11 0.00006677 12 0.000002944 TOTAL kP (X = k) 0 0.038869 0.226204 0.598371 0.937711 1.004893 0.744294 0.393771 0.1488 0.039357 0.006941 0.0007345 0.000035323 ∼4.14 Table 1: table of all values √ (a) σ = npq q √ √ gives σ = npq = 12(0.346)(1 − 0.346) = 2.7154 = 1.648 (b) † σ= q Σ(k − µ)2 P (X = k) q σ = Σ(k − µ)2 P (X = k) is determined again from the data in the table for P (X = k) for each k and (k − µ)2 similarly, giving σ 2 = 0 + 0.383233 + 0.51796 + 0.25921 + 0.004595 + 0.14864 +0.42916 + 0.460127 + 0.27713 + 0.10329 + 0.02383 + 0.003142 + 0.00018188 √ σ = 2.6105 = 1.616. (c) † σ= q E(X 2 ) − µ2 = q Σk 2 P (X = k) − µ2 . q σ = Σk 2 P (X = k) − µ2 is calculated by taking entries from the last column in the table above, multiplying by k, subtracting µ2 = E(X)2 = 17.225 and summing up, to get σ 2 = 0 + 0.038869 + 0.452408 + 1.795113 + 3.750844 + 5.024465 + 4.465764 +2.756397 + 1.1904 + 0.354213 + 0.06891 + 0.0080795 + 0.000423876 − 17.1396 = 19.905886 − 17.1396 √ σ = 2.766286 = 1.663. † Note: In the 2nd and 3rd case I take µ = E(X) = 4.14 as determined in the table. 5. Consider a data sent via a communications channel. Bits (of data) are sent in packets of 12. The probability of a bit being corrupted over the channel is 0.15 and these errors are independent. What is the probability that no more than 2 bits in a packet are corrupted? If 6 packets are sent over the same channel, what is the probability that at least 1 packet will contain 3 or more corrupted bits? Let X be the number of packets containing 3 or more corrupted bits. What is the probability that X exceeds its mean by more than 2 standard deviations? Let C be the number of corrupted bits in a packet. We want P (C ≤ 2) = P (C = 0) + P (C = 1) + P (C = 2). ! P (C = 0) = 12 0 ! P (C = 1) = 12 1 ! P (C = 2) = 12 2 (0.15)0 (0.85)12 = 0.1422 (0.15)1 (0.85)11 = 0.3012 (0.15)2 (0.85)10 = 0.2924 So, P (C ≤ 2) = 0.1422 + 0.3012 + 0.2924 = 0.7358. If the probability that no more than two bits are corrupt is 0.7358. The probability that three or more are corrupt is 1 − 0.7358 = 0.2642. Let X be the number of packets with 3 or more corrupted bits. X can be modelled with a binomial distribution with n = 6, p = 0.2642. So, P (X ≥ 1) = 1−P (X = 0) = 1− 6 0 ! (0.2642)0 (0.7358)6 = 1−0.15869 = 0.8413. Now, the last part. Since it is binomial the mean or expected value of X is E(X) q = np = 6(0.2642) = 1.5852 and its standard deviation is √ npq = 6(0.2642)(0.7358) = 1.08. Therefore the probability that X exceeds its mean by more than 2 SD is P (X − µ > 2σ) = P (X > 3.745). Since X is discrete this is equal to P (X ≥ 4). Now, ! P (X = 1) = 6 1 ! P (X = 2) = 6 2 ! P (X = 3) = 6 3 (0.2642)1 (0.7358)5 = 0.3419 (0.2642)2 (0.7358)4 = 0.3069 (0.2642)3 (0.7358)3 = 0.1469 And P (X ≥ 4) = 1−(P (X = 0) + P (X = 1) + P (X = 2) + P (X = 3)) = 1 − (0.15869 + 0.3419 + 0.3069 + 0.1469) = 0.04561