Course Test · University: first two years

Probability: independent answers

Each answer here was worked out by hand, without RatMath, before the RatMath code was written. Where the arithmetic is long, the working says how it was checked.

  1. 1.Addition rule
    P(A)=0.5P(A) = 0.5, P(B)=0.4P(B) = 0.4, P(A∩B)=0.2P(A \cap B) = 0.2. Find P(A∪B)P(A \cup B) and P(A∣B)P(A \mid B).
    Answer
    0.5+0.4−0.2=0.70.5 + 0.4 - 0.2 = 0.7; 0.2/0.4=0.50.2/0.4 = 0.5.
  2. 2.Birthday problem
    In a group of 23 people, what is the probability that two share a birthday (365 equally likely days)?
    Answer
    1−365⋅364⋯34336523≈0.50731 - \dfrac{365\cdot364\cdots343}{365^{23}} \approx 0.5073.
  3. 3.Hypergeometric
    A box has 8 red and 12 blue balls. Five are drawn without replacement. Find P(exactly 2 red)P(\text{exactly 2 red}).
    Answer
    (82)(123)(205)=28⋅22015504=385969\dfrac{\binom82\binom{12}3}{\binom{20}5} = \dfrac{28\cdot220}{15504} = \dfrac{385}{969}.
  4. 4.Poisson
    Calls arrive at 3 per minute (Poisson). Find P(X=2)P(X = 2) and P(X≥1)P(X \ge 1) in one minute.
    Answer
    92e−3≈0.22404\tfrac92e^{-3} \approx 0.22404; 1−e−3≈0.950211 - e^{-3} \approx 0.95021.
  5. 5.Geometric
    A die is rolled until the first 6. Find the expected number of rolls and the probability the first 6 is on roll 4.
    Answer
    E=6E = 6; (5/6)3(1/6)=125/1296(5/6)^3(1/6) = 125/1296.
  6. 6.Sum of two dice
    Find the mean and variance of the sum of two fair dice.
    Answer
    Mean 7; variance 2⋅3512=3562\cdot\tfrac{35}{12} = \tfrac{35}{6}.
  7. 7.A continuous density
    f(x)=cx2f(x) = cx^2 on [0,2][0, 2]. Find cc, E[X]E[X] and Var⁡X\operatorname{Var} X.
    Answer
    c⋅83=1c\cdot\tfrac83 = 1, c=38c = \tfrac38. E[X]=38⋅4=32E[X] = \tfrac38\cdot4 = \tfrac32; E[X2]=38⋅325=125E[X^2] = \tfrac38\cdot\tfrac{32}{5} = \tfrac{12}{5}; Var⁡=125−94=320\operatorname{Var} = \tfrac{12}{5} - \tfrac94 = \tfrac{3}{20}.
  8. 8.Exponential and memorylessness
    A bulb's life is exponential with mean 10 years. Find P(X>15)P(X > 15), and P(X>25∣X>10)P(X > 25 \mid X > 10).
    Answer
    e−1.5≈0.22313e^{-1.5} \approx 0.22313 for both (memorylessness).
  9. 9.Normal tail
    IQ is normal with mean 100 and SD 15. What fraction score above 130?
    Answer
    P(Z>2)≈0.02275P(Z > 2) \approx 0.02275.
  10. 10.Central limit theorem
    100 fair dice are rolled. Estimate P(sum≥370)P(\text{sum} \ge 370) with the normal approximation, and give the exact value.
    Answer
    Mean 350, SD 100⋅35/12≈17.08\sqrt{100\cdot35/12} \approx 17.08. With continuity correction P(Z≥19.5/17.08)≈0.1268P(Z \ge 19.5/17.08) \approx 0.1268. Exactly (by convolution in Python) 0.126948.
  11. 11.Covariance
    (X,Y)(X, Y) takes (0,0),(0,1),(1,0),(1,1)(0,0), (0,1), (1,0), (1,1) with probabilities 0.4, 0.1, 0.2, 0.3. Find Cov⁡(X,Y)\operatorname{Cov}(X, Y).
    Answer
    E[X]=0.5E[X] = 0.5, E[Y]=0.4E[Y] = 0.4, E[XY]=0.3E[XY] = 0.3: 0.3−0.2=0.10.3 - 0.2 = 0.1.
  12. 12.Conditioning
    Roll a die. If it is even, flip two coins; otherwise flip one. What is the expected number of heads?
    Answer
    12⋅1+12⋅12=34\tfrac12\cdot1 + \tfrac12\cdot\tfrac12 = \tfrac34.
  13. 13.Bayes with urns
    Urn 1 has 3 red and 2 blue balls, urn 2 has 1 red and 4 blue. An urn is chosen at random and a red ball drawn. What is the probability it came from urn 1?
    Answer
    12⋅3512⋅35+12⋅15=34\dfrac{\tfrac12\cdot\tfrac35}{\tfrac12\cdot\tfrac35 + \tfrac12\cdot\tfrac15} = \tfrac34.
  14. 14.Stationary distribution
    Find the stationary distribution of the chain with transition matrix (0.90.10.50.5)\begin{pmatrix} 0.9 & 0.1 \\ 0.5 & 0.5 \end{pmatrix}.
    Answer
    0.1π1=0.5π20.1\pi_1 = 0.5\pi_2: π=(56,16)\pi = (\tfrac56, \tfrac16).
  15. 15.Gambler's ruin
    A gambler with \$3 bets \$1 at a time, winning each bet with probability 0.4, until reaching \$10 or \$0. What is the probability of reaching \$10?
    Answer
    r=q/p=1.5r = q/p = 1.5: 1−1.531−1.510=2.37556.665≈0.04191\dfrac{1 - 1.5^3}{1 - 1.5^{10}} = \dfrac{2.375}{56.665} \approx 0.04191.
  16. 16.Moment generating function
    The MGF of a Poisson(λ\lambda) variable is M(t)=eλ(et−1)M(t) = e^{\lambda(e^t - 1)}. Use it to find E[X2]E[X^2].
    Answer
    M′′(0)=λ+λ2M''(0) = \lambda + \lambda^2.
  17. 17.A transformed variable
    XX is uniform on (0,1)(0, 1) and Y=X2Y = X^2. Find the density of YY and P(Y≤14)P(Y \le \tfrac14).
    Answer
    FY(y)=yF_Y(y) = \sqrt y, so fY(y)=12yf_Y(y) = \tfrac{1}{2\sqrt y} on (0,1)(0, 1); P(Y≤14)=12P(Y \le \tfrac14) = \tfrac12.
  18. 18.Order statistics
    Find the expected maximum of three independent uniform (0,1)(0, 1) variables.
    Answer
    Fmax⁡(x)=x3F_{\max}(x) = x^3, E=∫013x3 dx=34E = \int_0^1 3x^3\,dx = \tfrac34.
  19. 19.Coupon collector
    How many rolls of a die are expected before every face has appeared?
    Answer
    6(1+12+⋯+16)=6⋅4920=14.76\left(1 + \tfrac12 + \cdots + \tfrac16\right) = 6\cdot\tfrac{49}{20} = 14.7.
  20. 20.Matching problem
    Ten letters go into ten envelopes at random. Find the expected number in the right envelope and the probability that none is.
    Answer
    E=10⋅110=1E = 10\cdot\tfrac1{10} = 1. P=D10/10!=1334961/3628800≈0.367879P = D_{10}/10! = 1334961/3628800 \approx 0.367879.