University of Washington
Department of Mathematics
Practice Midterm Solutions
MATH 394: Probability I
Summer 2026
Instructor: Arman Jahangiri
Recommended time: 60 minutes
Total: 60 points
Problem 1. 10 points
A university student ID consists of three uppercase English letters followed by four digits. Letters and digits may repeat. The first letter cannot be X, and at least one of the four digits must be even.
How many such student IDs are possible? Justify your counting.
Solution
There are \(25\) choices for the first letter because it cannot be X. Each of the next two letters has \(26\) choices.
For the four digits, count all digit strings and subtract those containing only odd digits. There are \(10^4\) total digit strings and \(5^4\) strings in which all four digits are odd. Therefore the number of digit strings containing at least one even digit is \[ 10^4-5^4. \] By the multiplication principle, the required number is \[ 25\cdot 26^2\bigl (10^4-5^4\bigr ). \] Since \(10^4-5^4=9375\), this equals \[ 25\cdot 676\cdot 9375=158{,}437{,}500. \]
Problem 2. 10 points
A warehouse receives items from three factories. Factory \(A\) supplies \(40\%\) of the items and has a defect rate of \(2\%\). Factory \(B\) supplies \(35\%\) of the items and has a defect rate of \(5\%\). Factory \(C\) supplies \(25\%\) of the items and has a defect rate of \(8\%\).
An item is selected uniformly at random from the warehouse and is found to be defective.
Solution
Let \(D\) be the event that the selected item is defective. The given probabilities are \[ P(A)=0.40,\qquad P(B)=0.35,\qquad P(C)=0.25, \] and \[ P(D\mid A)=0.02,\qquad P(D\mid B)=0.05,\qquad P(D\mid C)=0.08. \] By the law of total probability, \begin {align*} P(D) &=P(D\mid A)P(A)+P(D\mid B)P(B)+P(D\mid C)P(C)\\ &=(0.02)(0.40)+(0.05)(0.35)+(0.08)(0.25)\\ &=0.008+0.0175+0.020=0.0455. \end {align*}
(a) By Bayes’ rule, \[ P(C\mid D)=\frac {P(D\mid C)P(C)}{P(D)} =\frac {(0.08)(0.25)}{0.0455} =\frac {40}{91}. \]
(b) Since the factories are mutually exclusive, \begin {align*} P(A^c\mid D) &=1-P(A\mid D)\\ &=1-\frac {P(D\mid A)P(A)}{P(D)}\\ &=1-\frac {0.008}{0.0455} =1-\frac {16}{91} =\frac {75}{91}. \end {align*}
Equivalently, one may add \(P(B\mid D)\) and \(P(C\mid D)\).
Problem 3. 10 points
Let \(A\), \(B\), and \(C\) be events.
Solution
(a) Apply the two-event addition rule to \((A\cup B)\) and \(C\): \[ P(A\cup B\cup C)=P(A\cup B)+P(C)-P\bigl ((A\cup B)\cap C\bigr ). \] Now \[ P(A\cup B)=P(A)+P(B)-P(A\cap B), \] and, by distributivity, \[ (A\cup B)\cap C=(A\cap C)\cup (B\cap C). \] Applying the addition rule again, \begin {align*} P\bigl ((A\cup B)\cap C\bigr ) &=P\bigl ((A\cap C)\cup (B\cap C)\bigr )\\ &=P(A\cap C)+P(B\cap C)-P(A\cap B\cap C). \end {align*}
Substitution gives \begin {align*} P(A\cup B\cup C) &=P(A)+P(B)+P(C)\\ &\quad -P(A\cap B)-P(A\cap C)-P(B\cap C)\\ &\quad +P(A\cap B\cap C). \end {align*}
(b) Let \[ N=\mathbf {1}_A+\mathbf {1}_B+\mathbf {1}_C. \] Pointwise, \(\mathbf {1}_{A\cup B\cup C}\leq N\). Taking expectations gives \[ P(A\cup B\cup C)\leq P(A)+P(B)+P(C). \]
(c) Equality holds exactly when no outcome belongs to two or more of the events, except possibly on a probability-zero set. Equivalently, \[ P(A\cap B)=P(A\cap C)=P(B\cap C)=0. \] Indeed, the union bound overcounts an outcome precisely when it lies in at least two of the events.
Problem 4. 15 points
The cumulative distribution function of a continuous random variable \(X\) is \[ F_X(x)= \begin {cases} 0, & x<0,\\[1mm] \dfrac {x^2}{4}, & 0\leq x<1,\\[2mm] \dfrac {2x-1}{4}, & 1\leq x<2,\\[2mm] 1-\dfrac {(3-x)^2}{4}, & 2\leq x<3,\\[2mm] 1, & x\geq 3. \end {cases} \]
Solution
(a) Since \(X\) is continuous, differentiate \(F_X\) on each interval: \[ f_X(x)=F_X'(x)= \begin {cases} \dfrac {x}{2}, & 0<x<1,\\[2mm] \dfrac 12, & 1<x<2,\\[2mm] \dfrac {3-x}{2}, & 2<x<3,\\[2mm] 0, & \text {otherwise}. \end {cases} \] The values at the endpoints do not affect the density.
(b) To verify that \(f_X\) is a probability density function, we must show that
From part (a), \[ f_X(x)= \begin {cases} \dfrac {x}{2}, & 0<x<1,\\[2mm] \dfrac 12, & 1<x<2,\\[2mm] \dfrac {3-x}{2}, & 2<x<3,\\[2mm] 0, & \text {otherwise}. \end {cases} \]
Clearly, \[ f_X(x)\ge 0 \] for every \(x\).
Also, \begin {align*} \int _{-\infty }^{\infty }f_X(x)\,dx &= \int _0^1\frac {x}{2}\,dx +\int _1^2\frac 12\,dx +\int _2^3\frac {3-x}{2}\,dx\\ &= \frac 12\left [\frac {x^2}{2}\right ]_0^1 +\frac 12[x]_1^2 +\frac 12\left [3x-\frac {x^2}{2}\right ]_2^3\\ &= \frac 14+\frac 12+\frac 14\\ &=1. \end {align*}
Hence, \(f_X\) satisfies both conditions of a probability density function.
(c) Because \(X\) is continuous, \begin {align*} P\left (\frac 12<X\leq \frac 52\right ) &=F_X\left (\frac 52\right )-F_X\left (\frac 12\right )\\ &=\left (1-\frac {(3-5/2)^2}{4}\right )-\frac {(1/2)^2}{4}\\ &=\left (1-\frac 1{16}\right )-\frac 1{16} =\frac 78. \end {align*}
(d) Using the density, \begin {align*} \mathbb {E}[X] &=\int _0^1 x\frac {x}{2}\,dx +\int _1^2 x\frac 12\,dx +\int _2^3 x\frac {3-x}{2}\,dx\\ &=\frac 12\int _0^1x^2\,dx +\frac 12\int _1^2x\,dx +\frac 12\int _2^3(3x-x^2)\,dx\\ &=\frac 16+\frac 34+\frac 7{12} =\frac 32. \end {align*}
The symmetry of the density around \(x=3/2\) also gives the same result.
Problem 5. Bike-Share Operations 15 points
A city operates a large bike-share system. Assume that the outcomes of different rides are independent.
Let \(X\) be the number of serious mechanical failures during the day.
Determine whether a Poisson approximation or a Normal approximation to the distribution of \(X\) is more appropriate. Verify the relevant conditions and state the approximating distribution, including its parameter. (3 points)
Let \(Y\) be the number of bikes returned late.
Determine whether a Poisson approximation or a Normal approximation to the distribution of \(Y\) is more appropriate. Verify the relevant conditions and state the approximating distribution, including its mean and variance. (3 points)
Solution
(a)
Each of the \(8000\) rides independently results in a serious mechanical failure with probability \(0.0005\). Therefore, \[ X\sim \operatorname {Bin}(8000,0.0005). \]
For the Normal approximation, we would need both \[ np \qquad \text {and}\qquad n(1-p) \] to be sufficiently large. However, \[ np=8000(0.0005)=4, \] which is less than \(10\). Thus, the usual Normal approximation is not appropriate.
For a Poisson approximation, \(n\) should be large and \(p\) should be small. Here, \[ n=8000 \] is large and \[ p=0.0005 \] is very small. Therefore, the Poisson approximation is appropriate.
Its parameter is \[ \lambda =np=8000(0.0005)=4. \]
Thus, \[ X\approx W, \qquad W\sim \operatorname {Pois}(4). \]
(b)
We want \[ P(X\geq 3). \]
Using the Poisson approximation, \[ P(X\geq 3) \approx P(W\geq 3). \]
It is easier to use the complement: \[ P(W\geq 3) = 1-P(W\leq 2). \]
Therefore, \begin {align*} P(W\geq 3) &= 1-\left [ P(W=0)+P(W=1)+P(W=2) \right ]\\ &= 1-\left [ e^{-4} + e^{-4}\frac {4}{1!} + e^{-4}\frac {4^2}{2!} \right ]\\ &= 1-e^{-4}(1+4+8)\\ &= 1-13e^{-4}\\ &\approx {0.7619}. \end {align*}
(c)
Each of the \(300\) bikes is independently returned late with probability \(0.35\). Therefore, \[ Y\sim \operatorname {Bin}(300,0.35). \]
A Poisson approximation is not appropriate because \[ p=0.35 \] is not small.
For the Normal approximation, we compute \[ np=300(0.35)=105 \] and \[ n(1-p)=300(0.65)=195. \]
Since both quantities are greater than \(10\), the Normal approximation is appropriate.
The mean is \[ \mu =np=105, \] and the variance is \[ \sigma ^2=np(1-p) = 300(0.35)(0.65) = 68.25. \]
Thus, \[ Y\approx V, \qquad V\sim N(105,68.25), \] where \[ \sigma =\sqrt {68.25}\approx 8.26. \]
(d)
We want to approximate \[ P(95\leq Y\leq 115). \]
Using the continuity correction, \[ P(95\leq Y\leq 115) \approx P(94.5<V<115.5). \]
Standardizing, \begin {align*} P(94.5<V<115.5) &= P\left ( \frac {94.5-105}{\sqrt {68.25}} < Z < \frac {115.5-105}{\sqrt {68.25}} \right )\\ &\approx P(-1.27<Z<1.27). \end {align*}
Using the standard Normal table, \[ \Phi (1.27)=0.8980. \]
By symmetry, \[ \Phi (-1.27)=1-\Phi (1.27)=0.1020. \]
Therefore, \begin {align*} P(95\leq Y\leq 115) &\approx \Phi (1.27)-\Phi (-1.27)\\ &= 0.8980-0.1020\\ &= {0.7960}. \end {align*}