Session 09-04 - Probability & Statistics Review
Section 09: Exam Preparation
Warm-Up Quiz
Quick Review Questions
Work individually for 5 minutes, then discuss with the class (5 minutes)
In how many ways can you choose 3 items from 10?
Events \(A\) and \(B\) are independent with \(P(A) = 0.4\) and \(P(B) = 0.3\). Find \(P(A \cup B)\).
An investment of \(10{,}000\text{ EUR}\) earns 4% compound interest. What is it worth after 5 years?
1. We need \(\binom{10}{3}\), the number of combinations of 10 items taken 3 at a time:
\[\binom{10}{3} = \frac{10!}{3! \cdot 7!} = \frac{10 \times 9 \times 8}{3 \times 2 \times 1} = 120\]
Key distinction: This is a combination (order does not matter), not a permutation. If order mattered, the answer would be \(P(10,3) = 10 \times 9 \times 8 = 720\).
2. Since \(A\) and \(B\) are independent:
\[P(A \cap B) = P(A) \cdot P(B) = 0.4 \times 0.3 = 0.12\]
Apply the addition rule:
\[P(A \cup B) = P(A) + P(B) - P(A \cap B) = 0.4 + 0.3 - 0.12 = 0.58\]
Common pitfall: Writing \(P(A \cup B) = P(A) + P(B) = 0.7\). This only works for mutually exclusive events. Independent events can still overlap!
3. Using the compound interest formula \(A = P \cdot (1 + r)^t\):
\[A = 10{,}000 \cdot (1.04)^5\]
Compute \((1.04)^5\):
\[(1.04)^2 = 1.0816\]
\[(1.04)^4 = (1.0816)^2 = 1.16985856\]
\[(1.04)^5 = 1.16985856 \times 1.04 = 1.2166529...\approx 1.2167\]
\[A = 10{,}000 \times 1.2166529 \approx 12{,}166.53\text{ EUR}\]
The investment gained \(2{,}166.53\text{ EUR}\) in interest over 5 years.
Guided Practice A
Practice Problem 1
Committee Selection (Section 07)
Work in pairs
A committee of 5 is to be formed from 8 men and 6 women.
(a) How many committees are possible?
(b) How many committees have exactly 3 women?
(c) What is the probability that exactly 3 women are selected?
(d) What is the probability of at least 1 woman?
(a) We choose 5 people from \(8 + 6 = 14\):
\[\binom{14}{5} = \frac{14!}{5! \cdot 9!} = \frac{14 \times 13 \times 12 \times 11 \times 10}{5 \times 4 \times 3 \times 2 \times 1} = \frac{240{,}240}{120} = 2{,}002\]
(b) Choose 3 women from 6 and 2 men from 8:
\[\binom{6}{3} \times \binom{8}{2} = 20 \times 28 = 560\]
(c) Probability of exactly 3 women:
\[P(\text{exactly 3 women}) = \frac{560}{2{,}002} = \frac{40}{143} \approx 0.2797 \approx 28.0\%\]
(d) Use the complement: \(P(\text{at least 1 woman}) = 1 - P(\text{no women})\).
\(P(\text{no women})\) means all 5 are men:
\[P(\text{no women}) = \frac{\binom{8}{5}}{\binom{14}{5}} = \frac{56}{2{,}002} = \frac{4}{143} \approx 0.0280\]
\[P(\text{at least 1 woman}) = 1 - \frac{4}{143} = \frac{139}{143} \approx 0.9720 \approx 97.2\%\]
Interpretation: It is almost certain that at least one woman will be on the committee, given that women make up nearly half (6 out of 14) of the candidates.
Practice Problem 2
Bayes’ Theorem & Contingency Table (Section 07)
Work in pairs
A medical test has sensitivity (true positive rate) of 95% and specificity (true negative rate) of 90%. In a population with disease prevalence of 2%.
(a) Compute the Positive Predictive Value using Bayes’ theorem.
(b) Construct a contingency table for 10,000 people.
(c) Verify your answer from (a) using the table.
(d) Compute the Negative Predictive Value.
(a) Let \(D\) = has disease, \(+\) = tests positive.
- \(P(D) = 0.02\), \(P(\bar{D}) = 0.98\)
- Sensitivity: \(P(+|D) = 0.95\)
- Specificity: \(P(-|\bar{D}) = 0.90\), so \(P(+|\bar{D}) = 0.10\)
\[\text{PPV} = P(D|+) = \frac{P(+|D) \cdot P(D)}{P(+|D) \cdot P(D) + P(+|\bar{D}) \cdot P(\bar{D})}\]
\[= \frac{0.95 \times 0.02}{0.95 \times 0.02 + 0.10 \times 0.98} = \frac{0.019}{0.019 + 0.098} = \frac{0.019}{0.117} \approx 0.1624 \approx 16.2\%\]
Interpretation: Even with a positive test result, there is only about a 16% chance the person actually has the disease. This surprising result is because the disease is rare (2% prevalence), so false positives from the large healthy population overwhelm the true positives.
(b) Contingency table for 10,000 people:
- Diseased: \(10{,}000 \times 0.02 = 200\)
- Healthy: \(10{,}000 \times 0.98 = 9{,}800\)
| Test \(+\) | Test \(-\) | Total | |
|---|---|---|---|
| Diseased | \(200 \times 0.95 = 190\) | \(200 \times 0.05 = 10\) | 200 |
| Healthy | \(9{,}800 \times 0.10 = 980\) | \(9{,}800 \times 0.90 = 8{,}820\) | 9,800 |
| Total | 1,170 | 8,830 | 10,000 |
(c) Verify PPV from the table:
\[\text{PPV} = \frac{\text{True Positives}}{\text{All Positives}} = \frac{190}{1{,}170} \approx 0.1624 \approx 16.2\% \quad \checkmark\]
This matches the Bayes’ theorem result.
(d) Negative Predictive Value:
\[\text{NPV} = P(\bar{D}|-) = \frac{\text{True Negatives}}{\text{All Negatives}} = \frac{8{,}820}{8{,}830} \approx 0.9989 \approx 99.9\%\]
Interpretation: A negative test result is extremely reliable: there is a 99.9% chance the person is truly healthy. This is because the disease is rare and the test has good sensitivity.
Common pitfall: Confusing sensitivity with PPV. Sensitivity (\(P(+|D) = 95\%\)) answers “If you have the disease, will the test catch it?” while PPV (\(P(D|+) = 16.2\%\)) answers “If the test is positive, do you really have the disease?” These are very different questions!
Practice Problem 3
System of Equations from Probability (Sections 02 & 07)
Work in pairs
For events \(A\) and \(B\): \(P(A) + P(B) = 0.7\), \(P(A \cap B) = 0.1\), and \(P(A|B) = 0.25\).
(a) Use \(P(A|B) = \frac{P(A \cap B)}{P(B)}\) to find \(P(B)\).
(b) Solve the system for \(P(A)\).
(c) Are \(A\) and \(B\) independent?
(d) Find \(P(A \cup B)\).
(a) From the definition of conditional probability:
\[P(A|B) = \frac{P(A \cap B)}{P(B)} \quad \Rightarrow \quad 0.25 = \frac{0.1}{P(B)}\]
\[P(B) = \frac{0.1}{0.25} = 0.4\]
(b) From \(P(A) + P(B) = 0.7\):
\[P(A) = 0.7 - P(B) = 0.7 - 0.4 = 0.3\]
(c) Events \(A\) and \(B\) are independent if and only if \(P(A \cap B) = P(A) \cdot P(B)\).
\[P(A) \cdot P(B) = 0.3 \times 0.4 = 0.12\]
But \(P(A \cap B) = 0.1 \neq 0.12\).
A and B are NOT independent.
(d) Find \(P(A \cup B)\):
\[P(A \cup B) = P(A) + P(B) - P(A \cap B) = 0.3 + 0.4 - 0.1 = 0.6\]
Note: This problem combines two key skills: solving a system of equations (Sec 02) and applying probability rules (Sec 07). On the exam, you may encounter similar setups where you must extract probabilities from given conditions before answering further questions.
Practice Problem 4
Binomial Distribution (Section 07)
Work in pairs
A quality inspector tests 20 items from a production line where the defect rate is 5%.
(a) What distribution models this? State parameters.
(b) Find \(P(X = 0)\) (no defects).
(c) Find \(P(X \leq 2)\).
(d) Find \(E[X]\) and \(\sigma\).
(e) How many items should be tested so that \(P(X \geq 1) > 0.99\)?
(a) Each item is either defective (probability \(p = 0.05\)) or not, independently. With \(n = 20\) trials:
\[X \sim B(20, \, 0.05)\]
(b) \(P(X = 0)\):
\[P(X = 0) = \binom{20}{0} (0.05)^0 (0.95)^{20} = 1 \times 1 \times (0.95)^{20}\]
\[(0.95)^{20} = (0.95)^{10} \times (0.95)^{10}\]
\((0.95)^{10} \approx 0.5987\), so:
\[P(X = 0) \approx (0.5987)^2 \approx 0.3585\]
(c) \(P(X \leq 2)\):
\[P(X \leq 2) = P(X=0) + P(X=1) + P(X=2)\]
\(P(X = 1) = \binom{20}{1}(0.05)^1(0.95)^{19} = 20 \times 0.05 \times (0.95)^{19}\)
\((0.95)^{19} = \frac{(0.95)^{20}}{0.95} \approx \frac{0.3585}{0.95} \approx 0.3774\)
\[P(X = 1) = 20 \times 0.05 \times 0.3774 \approx 0.3774\]
\(P(X = 2) = \binom{20}{2}(0.05)^2(0.95)^{18} = 190 \times 0.0025 \times (0.95)^{18}\)
\((0.95)^{18} \approx \frac{0.3774}{0.95} \approx 0.3972\)
\[P(X = 2) = 190 \times 0.0025 \times 0.3972 \approx 0.1887\]
\[P(X \leq 2) \approx 0.3585 + 0.3774 + 0.1887 \approx 0.9246\]
Interpretation: There is about a 92.5% chance that 2 or fewer items are defective in a sample of 20.
(d) \(E[X]\) and \(\sigma\):
\[E[X] = n \cdot p = 20 \times 0.05 = 1\]
\[\text{Var}(X) = n \cdot p \cdot (1-p) = 20 \times 0.05 \times 0.95 = 0.95\]
\[\sigma = \sqrt{0.95} \approx 0.9747\]
Interpretation: On average, the inspector will find 1 defective item per batch of 20.
(e) Find \(n\) such that \(P(X \geq 1) > 0.99\):
\[P(X \geq 1) = 1 - P(X = 0) = 1 - (0.95)^n > 0.99\]
\[(0.95)^n < 0.01\]
Take the natural logarithm of both sides:
\[n \cdot \ln(0.95) < \ln(0.01)\]
Since \(\ln(0.95) < 0\), dividing flips the inequality:
\[n > \frac{\ln(0.01)}{\ln(0.95)} = \frac{-4.6052}{-0.05129} \approx 89.78\]
\[n \geq 90\]
Interpretation: The inspector must test at least 90 items to be 99% confident of finding at least one defective item (assuming a 5% defect rate).
Common pitfall: Forgetting to flip the inequality sign when dividing by \(\ln(0.95) < 0\). This is a critical step when solving exponential inequalities with logarithms!
Practice Problem 5
Descriptive Statistics (Section 07)
Work in pairs
Monthly salaries (in EUR) of the 11 employees of a small company:
2300, 3100, 2600, 8200, 2800, 3400, 2500, 3900, 3200, 2900, 3600
(a) Find the mean and the median salary.
(b) Find the quartiles, the range and the IQR.
(c) Use the \(1.5 \cdot \text{IQR}\) rule: is there an outlier?
(d) The company claims “the average salary is over 3,200 EUR.” Is that a fair description of a typical salary?
Sort the data first:
\[2300,\ 2500,\ 2600,\ 2800,\ 2900,\ 3100,\ 3200,\ 3400,\ 3600,\ 3900,\ 8200\]
(a) Mean:
\[\bar{x} = \frac{2300 + 2500 + 2600 + 2800 + 2900 + 3100 + 3200 + 3400 + 3600 + 3900 + 8200}{11} = \frac{38{,}500}{11} = 3{,}500 \text{ EUR}\]
Median: \(n = 11\) is odd, so the median is the 6th value:
\[\tilde{x} = 3{,}100 \text{ EUR}\]
(b) With \(n\) odd, the median is not part of either half. The lower half is \(2300, 2500, 2600, 2800, 2900\) and the upper half is \(3200, 3400, 3600, 3900, 8200\).
\[Q_1 = 2{,}600 \text{ EUR}, \qquad Q_3 = 3{,}600 \text{ EUR}\]
\[\text{Range} = 8200 - 2300 = 5{,}900 \text{ EUR}, \qquad \text{IQR} = 3600 - 2600 = 1{,}000 \text{ EUR}\]
(c) Fences:
\[Q_1 - 1.5 \cdot \text{IQR} = 2600 - 1500 = 1{,}100, \qquad Q_3 + 1.5 \cdot \text{IQR} = 3600 + 1500 = 5{,}100\]
The value \(8{,}200\) lies above \(5{,}100\), so it is an outlier. All other values lie inside the fences.
(d) The mean is \(3{,}500\) EUR, so “over \(3{,}200\) EUR” is true for the mean.
- The median is only \(3{,}100\) EUR, below the claimed \(3{,}200\) EUR.
- Without the outlier, the mean of the other 10 employees is \(\frac{30{,}300}{10} = 3{,}030\) EUR.
- The single salary of \(8{,}200\) EUR pulls the mean up by \(470\) EUR.
The claim is misleading. Most employees earn less than \(3{,}200\) EUR.
Note: The median and the IQR are robust against outliers. The mean and the range are not, so the median describes a typical salary better here.
Guided Practice B
Practice Problem 6
Hypergeometric vs Binomial (Section 07)
Work in pairs
A box has 15 items, 3 of which are defective. You draw 5 items without replacement.
(a) Find \(P(X=1)\) using the hypergeometric distribution.
(b) Compare with the binomial approximation \(B(5, 0.2)\).
(c) When is the binomial a good approximation for the hypergeometric?
(a) The hypergeometric distribution models drawing without replacement. We have:
- Population size: \(N = 15\)
- Number of “successes” (defective items) in the population: \(K = 3\)
- Number of draws: \(n = 5\)
\[P(X = k) = \frac{\binom{K}{k} \binom{N-K}{n-k}}{\binom{N}{n}}\]
For \(k = 1\):
\[P(X = 1) = \frac{\binom{3}{1} \binom{12}{4}}{\binom{15}{5}}\]
Compute each binomial coefficient:
\[\binom{3}{1} = 3\]
\[\binom{12}{4} = \frac{12!}{4! \cdot 8!} = \frac{12 \times 11 \times 10 \times 9}{4 \times 3 \times 2 \times 1} = \frac{11{,}880}{24} = 495\]
\[\binom{15}{5} = \frac{15!}{5! \cdot 10!} = \frac{15 \times 14 \times 13 \times 12 \times 11}{120} = \frac{360{,}360}{120} = 3{,}003\]
Combine:
\[P(X = 1) = \frac{3 \times 495}{3{,}003} = \frac{1{,}485}{3{,}003} \approx 0.4945 \approx 49.5\%\]
(b) If we treat each draw as independent with \(p = \frac{3}{15} = 0.2\):
\[P(X = 1) = \binom{5}{1} (0.2)^1 (0.8)^4 = 5 \times 0.2 \times 0.4096 = 0.4096 \approx 41.0\%\]
Comparison: The hypergeometric gives \(0.4945\) while the binomial gives \(0.4096\). The binomial underestimates the probability here. The relative error (the difference as a share of the exact value) is:
\[\frac{|0.4945 - 0.4096|}{0.4945} \approx 17.2\%\]
This is a substantial difference because the sample (\(n = 5\)) is a large fraction of the population (\(N = 15\)).
(c) The binomial approximation to the hypergeometric is good when the sample size is small relative to the population size.
In our problem, \(\frac{n}{N} = \frac{5}{15} \approx 0.333\): the sample is a third of the population, which explains the poor approximation. If instead the box had \(N = 1{,}000\) items with 200 defective (same \(p = 0.2\)), the binomial approximation would be very accurate.
Note: When the population is much larger than the sample, removing one item barely changes the composition of the remaining items, so each draw is approximately independent, which is the key assumption of the binomial distribution.
Practice Problem 7
Compound Interest + Probability (Sections 08 & 07)
Work in pairs
You invest \(1{,}000\text{ EUR}\) per year for 10 years. Each year, the interest rate is 5% with probability 0.7 and 2% with probability 0.3 (independent across years).
(a) What is the expected interest rate?
(b) What is the expected value after 10 years using the expected rate?
(c) Compute the actual expected value after 1 year if the interest rate is 5% with probability 0.7 and 2% with probability 0.3. Compare with the result using the expected rate from (b). Are they the same?
(a) The interest rate \(R\) each year takes the value 0.05 with probability 0.7 and 0.02 with probability 0.3:
\[E[R] = 0.05 \times 0.7 + 0.02 \times 0.3 = 0.035 + 0.006 = 0.041 = 4.1\%\]
(b) Using the annuity formula for annual payments of \(1{,}000\text{ EUR}\) at a constant rate \(r = 0.041\):
\[A_{10} = 1{,}000 \times \frac{(1 + r)^{10} - 1}{r} = 1{,}000 \times \frac{(1.041)^{10} - 1}{0.041}\]
Compute \((1.041)^{10}\):
\[\ln(1.041) \approx 0.04018\]
\[10 \times \ln(1.041) \approx 0.4018\]
\[(1.041)^{10} = e^{0.4018} \approx 1.4946\]
Substitute:
\[A_{10} = 1{,}000 \times \frac{1.4946 - 1}{0.041} = 1{,}000 \times \frac{0.4946}{0.041} \approx 1{,}000 \times 12.063 = 12{,}063\text{ EUR}\]
(c) Using the expected rate (from part a): If we invest \(1{,}000\text{ EUR}\) at the expected rate \(r = 0.041\):
\[A_1(E[R]) = 1{,}000 \times (1 + 0.041) = 1{,}041\text{ EUR}\]
Actual expected value: We compute the expected value directly by considering both scenarios:
\[E[A_1] = 0.7 \times 1{,}000 \times (1.05) + 0.3 \times 1{,}000 \times (1.02)\]
\[E[A_1] = 0.7 \times 1{,}050 + 0.3 \times 1{,}020 = 735 + 306 = 1{,}041\text{ EUR}\]
In this case, the results are the same (\(1{,}041\text{ EUR}\)) because for a single year, the growth function \(f(r) = 1{,}000 \times (1 + r)\) is linear in \(r\).
Practice Problem 8
Two-Way Independence Test (Section 07)
Work in pairs
In a study of 400 employees: 200 work full-time and 200 part-time. Among full-time workers: 140 are satisfied and 60 are dissatisfied. Among part-time workers: 120 are satisfied and 80 are dissatisfied.
(a) Construct the contingency table.
(b) Are satisfaction and work type independent? Compute \(P(\text{Satisfied}|\text{Full-time})\) vs \(P(\text{Satisfied})\).
Practice Problem 8 II
(c) Compute the expected frequencies under independence.
(d) Based on your findings, are work type and satisfaction independent? Justify using conditional probabilities.
(a) Contingency table:
| Satisfied | Dissatisfied | Total | |
|---|---|---|---|
| Full-time | 140 | 60 | 200 |
| Part-time | 120 | 80 | 200 |
| Total | 260 | 140 | 400 |
(b) Independence check using conditional probabilities:
Compute \(P(\text{Satisfied}|\text{Full-time})\):
\[P(\text{Satisfied}|\text{Full-time}) = \frac{140}{200} = 0.700 = 70.0\%\]
Compute \(P(\text{Satisfied})\) (marginal probability):
\[P(\text{Satisfied}) = \frac{260}{400} = 0.650 = 65.0\%\]
Compare:
\[P(\text{Satisfied}|\text{Full-time}) = 0.700 \neq 0.650 = P(\text{Satisfied})\]
Since \(P(\text{Satisfied}|\text{Full-time}) \neq P(\text{Satisfied})\), satisfaction and work type are NOT independent.
Interpretation: Full-time workers are more likely to be satisfied (70%) than the overall population (65%). Knowing someone works full-time changes the probability of them being satisfied, which means the two variables are dependent.
(c) Under independence, the expected frequency for each cell is:
\[E_{ij} = \frac{\text{Row total} \times \text{Column total}}{\text{Grand total}}\]
| Satisfied | Dissatisfied | Total | |
|---|---|---|---|
| Full-time | \(\frac{200 \times 260}{400} = 130\) | \(\frac{200 \times 140}{400} = 70\) | 200 |
| Part-time | \(\frac{200 \times 260}{400} = 130\) | \(\frac{200 \times 140}{400} = 70\) | 200 |
| Total | 260 | 140 | 400 |
(d) From part (b), we already found:
\[P(\text{Satisfied}|\text{Full-time}) = 0.700 \neq 0.650 = P(\text{Satisfied})\]
We can also check the other conditional probability:
\[P(\text{Satisfied}|\text{Part-time}) = \frac{120}{200} = 0.600\]
If work type and satisfaction were independent, all of these should be equal:
\[P(\text{Satisfied}|\text{Full-time}) = P(\text{Satisfied}|\text{Part-time}) = P(\text{Satisfied})\]
But we find \(0.700 \neq 0.600 \neq 0.650\), so work type and satisfaction are NOT independent.
Interpretation: Full-time workers are more likely to be satisfied (70%) than part-time workers (60%), and both differ from the overall satisfaction rate (65%). This confirms that work type and satisfaction are associated: knowing someone’s work type changes the probability of them being satisfied.
Coffee Break
Team Problems A
Practice Problem 9
Insurance & Probability (Sections 07 & 08)
An insurance company covers 1,000 policyholders. Each pays \(200\text{ EUR}\)/month (\(2{,}400\text{ EUR}\)/year). Each policyholder has a 3% probability of filing a claim worth \(15{,}000\text{ EUR}\) per year (independent events).
(a) What is the expected number of claims? (b) What is the expected total payout? (c) What is the expected profit?
(d) What is the probability that the company pays out more than it collects? (i.e., \(P(X > 160)\) where \(X\) is the number of claims.)
(e) What is the probability that the claims exceed a reserve of 600,000 EUR?
(a) \(X \sim B(1000, \, 0.03)\)
\[E[X] = n \cdot p = 1{,}000 \times 0.03 = 30 \text{ claims}\]
(b) Expected total payout:
\[E[\text{Payout}] = E[X] \times 15{,}000\text{ EUR} = 30 \times 15{,}000\text{ EUR} = 450{,}000\text{ EUR}\]
(c) Total premium income: \(1{,}000 \times 2{,}400\text{ EUR} = 2{,}400{,}000\text{ EUR}\)
\[E[\text{Profit}] = 2{,}400{,}000\text{ EUR} - 450{,}000\text{ EUR} = 1{,}950{,}000\text{ EUR}\]
Interpretation: On average, the company expects a substantial profit. However, this does not account for variance. In bad years, the payout could be much higher.
(d) The company collects \(2{,}400{,}000\text{ EUR}\) in total. It loses money when the total payout exceeds this:
\[X \times 15{,}000\text{ EUR} > 2{,}400{,}000\text{ EUR} \quad \Rightarrow \quad X > 160\]
We need \(P(X > 160)\) where \(X \sim B(1000, 0.03)\).
With the cumulative key (MENU → 7 → ▼ → 1 → 2) and \(n = 1000\), \(p = 0.03\), \(x = 160\):
\[P(X \leq 160) \approx 1.0000 \quad \Rightarrow \quad P(X > 160) = 1 - P(X \leq 160) \approx 0\]
Interpretation: It is essentially impossible for the company to lose money under these conditions. The break-even point of 160 claims lies far above the expected 30 claims.
(e) The reserve of \(600{,}000\) EUR covers \(\frac{600{,}000}{15{,}000} = 40\) claims. The claims exceed the reserve if \(X > 40\):
\[P(X > 40) = 1 - P(X \leq 40)\]
With the cumulative key (MENU → 7 → ▼ → 1 → 2) and \(n = 1000\), \(p = 0.03\), \(x = 40\):
\[P(X \leq 40) \approx 0.9698 \quad \Rightarrow \quad P(X > 40) \approx 0.0302 \approx 3\%\]
Interpretation: With a reserve of \(600{,}000\) EUR, the claims exceed the reserve in about 3% of all years. The expected payout is only \(450{,}000\) EUR, but the reserve covers 10 claims more than expected.
Note: In practice, insurance companies also hold reserves for catastrophic events (e.g., when claims are not independent) and regulatory requirements far exceed this simple calculation.
Practice Problem 10
Logarithms & Binomial (Sections 07 & 01)
Think individually (2 min), then work in groups of 3-4
A machine has a probability of \(p = 0.02\) of failing on any given day (independent).
(a) What is the probability that the machine runs for at least 30 days without failure?
(b) Solve for \(n\): how many days until the probability of at least one failure exceeds 99%? (Solve \((1 - 0.02)^n < 0.01\) using logarithms.)
(c) If a backup machine costs \(500\text{ EUR}\)/day and downtime costs \(10{,}000\text{ EUR}\), is it cost-effective to keep a backup permanently?
(a) Each day the machine survives with probability \(1 - 0.02 = 0.98\). Over 30 independent days:
\[P(\text{no failure in 30 days}) = (0.98)^{30}\]
\[(0.98)^{30} = e^{30 \ln(0.98)} = e^{30 \times (-0.02020)} = e^{-0.6061} \approx 0.5455 \approx 54.6\%\]
Interpretation: There is only about a 55% chance the machine runs for a full month without breaking down.
(b) Find \(n\) such that \(P(\text{at least 1 failure}) > 0.99\):
\[P(X \geq 1) > 0.99 \quad \Leftrightarrow \quad 1 - (0.98)^n > 0.99 \quad \Leftrightarrow \quad (0.98)^n < 0.01\]
Take the natural logarithm:
\[n \cdot \ln(0.98) < \ln(0.01)\]
Since \(\ln(0.98) = -0.02020 < 0\), dividing flips the inequality:
\[n > \frac{\ln(0.01)}{\ln(0.98)} = \frac{-4.6052}{-0.02020} \approx 228.0\]
\[n \geq 228 \text{ days}\]
Interpretation: After about 228 days (roughly 7.5 months), it is virtually certain (99% probability) that the machine will have experienced at least one failure.
Common pitfall: Forgetting to flip the inequality sign when dividing by \(\ln(0.98) < 0\). Always check: dividing both sides of an inequality by a negative number reverses the direction!
(c) Cost-effectiveness of a backup machine:
Without backup: Expected cost per day from downtime:
\[E[\text{downtime cost/day}] = p \times 10{,}000\text{ EUR} = 0.02 \times 10{,}000\text{ EUR} = 200\text{ EUR}/\text{day}\]
With backup: The backup costs \(500\text{ EUR}\)/day but eliminates the \(200\text{ EUR}\)/day expected downtime cost (assuming the backup prevents all downtime).
Net cost of backup:
\[500\text{ EUR} - 200\text{ EUR} = 300\text{ EUR}/\text{day extra cost}\]
The backup is NOT cost-effective.
The backup costs \(500\text{ EUR}\)/day but only saves an expected \(200\text{ EUR}\)/day in avoided downtime. The company would spend \(300\text{ EUR}\)/day more than necessary.
Break-even analysis: The backup becomes cost-effective when:
\[p \times 10{,}000\text{ EUR} > 500\text{ EUR} \quad \Rightarrow \quad p > 0.05 = 5\%\]
Interpretation: A permanent backup machine is only justified if the daily failure probability exceeds 5%. At the current 2% rate, the expected savings do not cover the backup cost.
Practice Problem 11
Multi-Step Bayes’ Theorem (Section 07)
A factory has three production lines:
- Line 1 produces 50% of output with 2% defect rate
- Line 2 produces 30% of output with 3% defect rate
- Line 3 produces 20% of output with 5% defect rate
(a) A randomly selected item is defective. Probability it came from Line 3?
(b) Construct a contingency table for 1,000 items.
Practice Problem 11 II
(c) Two items are randomly selected. Probability both are defective?
(d) Given at least one of two is defective. Probability both are defective?
(a) Let \(L_i\) = item from Line \(i\), \(D\) = defective.
Total probability of defect:
\[P(D) = P(D|L_1)P(L_1) + P(D|L_2)P(L_2) + P(D|L_3)P(L_3)\]
\[= 0.02 \times 0.50 + 0.03 \times 0.30 + 0.05 \times 0.20\]
\[= 0.010 + 0.009 + 0.010 = 0.029\]
Apply Bayes’ theorem:
\[P(L_3|D) = \frac{P(D|L_3) \cdot P(L_3)}{P(D)} = \frac{0.05 \times 0.20}{0.029} = \frac{0.010}{0.029} \approx 0.3448 \approx 34.5\%\]
Interpretation: Although Line 3 produces only 20% of the output, it is responsible for about 34.5% of all defects due to its higher defect rate.
(b) Contingency table for 1,000 items:
| Line | Production | Defective | Non-defective |
|---|---|---|---|
| Line 1 | 500 | \(500 \times 0.02 = 10\) | 490 |
| Line 2 | 300 | \(300 \times 0.03 = 9\) | 291 |
| Line 3 | 200 | \(200 \times 0.05 = 10\) | 190 |
| Total | 1,000 | 29 | 971 |
Verification of part (a): \(P(L_3|D) = \frac{10}{29} \approx 0.3448\) \(\checkmark\)
(c) From part (a), \(P(D) = 0.029\).
Assuming the two items are selected independently (or the population is large enough that sampling without replacement is approximately independent):
\[P(\text{both defective}) = P(D)^2 = (0.029)^2 = 0.000841 \approx 0.084\%\]
Interpretation: The chance of drawing two defective items is very small, less than 1 in 1,000.
(d) Let \(A\) = “both defective” and \(B\) = “at least one defective.”
Note that \(A \subset B\), so \(P(A \cap B) = P(A)\).
\[P(A|B) = \frac{P(A \cap B)}{P(B)} = \frac{P(A)}{P(B)}\]
Compute \(P(B)\):
\[P(B) = 1 - P(\text{neither defective}) = 1 - (1 - 0.029)^2 = 1 - (0.971)^2\]
\[= 1 - 0.942841 = 0.057159\]
Compute the conditional probability:
\[P(A|B) = \frac{0.000841}{0.057159} \approx 0.01471 \approx 1.47\%\]
Interpretation: Even knowing that at least one item is defective, the probability that both are defective is still very low (about 1.5%). This is because most of the time “at least one defective” means exactly one is defective.
Common pitfall: Computing \(P(\text{both}|\text{at least one})\) as \(P(D) = 0.029\). This ignores the conditional structure. You must use the definition \(P(A|B) = P(A)/P(B)\), not just \(P(D)\).
Coffee Break
Team Problems B
Practice Problem 12
Reliability Engineering (Sections 07 & 01)
Think individually (2 min), then work in groups of 3-4
A system has 3 components. Each fails independently with probabilities 0.05, 0.03, and 0.02.
(a) If the components are in series (system works only if ALL work), what is the probability the system works?
(b) If the components are in parallel (system works if ANY works), what is the reliability?
(c) How many identical components with \(p = 0.05\) failure rate must be placed in parallel to achieve 99.9% reliability? (Use logarithms!)
(a) In a series system, the system works only if all components work. The probability that each component works is:
- Component 1: \(1 - 0.05 = 0.95\)
- Component 2: \(1 - 0.03 = 0.97\)
- Component 3: \(1 - 0.02 = 0.98\)
Since failures are independent:
\[P(\text{system works}) = 0.95 \times 0.97 \times 0.98\]
\(0.95 \times 0.97 = 0.9215\)
\(0.9215 \times 0.98 = 0.90307\)
\[P(\text{system works}) \approx 0.9031 \approx 90.3\%\]
Interpretation: Even though each individual component is quite reliable, the series arrangement means the system reliability is noticeably lower: each component is a potential point of failure.
(b) In a parallel system, the system fails only if all components fail:
\[P(\text{system fails}) = 0.05 \times 0.03 \times 0.02 = 0.00003\]
\[P(\text{system works}) = 1 - 0.00003 = 0.99997 \approx 99.997\%\]
Interpretation: The parallel arrangement provides extremely high reliability. Even if one or two components fail, the system continues to function as long as at least one component works.
(c) With \(k\) identical components, each with failure probability \(p = 0.05\):
\[P(\text{system fails}) = (0.05)^k\]
We need:
\[P(\text{system works}) \geq 0.999 \quad \Leftrightarrow \quad 1 - (0.05)^{k\,} \geq 0.999\]
\[(0.05)^{k\,} \leq 0.001\]
Take the natural logarithm of both sides:
\[k \cdot \ln(0.05) \leq \ln(0.001)\]
Since \(\ln(0.05) = -2.9957 < 0\), dividing flips the inequality:
\[k \geq \frac{\ln(0.001)}{\ln(0.05)} = \frac{-6.9078}{-2.9957} \approx 2.306\]
\[k \geq 3 \text{ components}\]
Verification: \((0.05)^3 = 0.000125 < 0.001\) \(\checkmark\)
\((0.05)^2 = 0.0025 > 0.001\) (not sufficient) \(\checkmark\)
Interpretation: Just 3 components in parallel are enough to achieve 99.9% reliability, even though each individual component has a 5% failure rate. This demonstrates the power of redundancy in engineering design.
Common pitfall: Forgetting to flip the inequality when dividing by \(\ln(0.05) < 0\). Always check the sign before dividing!
Practice Problem 13
Bayesian Updating with Data (Section 07)
Think individually (2 min), then work in groups of 3-4
A coin is either fair (\(p = 0.5\)) or biased (\(p = 0.8\)). Your prior belief: 50% chance each. You flip the coin 5 times and observe: H, H, H, T, H (4 heads, 1 tail).
(a) Compute \(P(\text{data}|\text{fair})\) and \(P(\text{data}|\text{biased})\).
(b) Use Bayes’ theorem to compute the updated probability \(P(\text{biased}|\text{data})\).
(a) The data is HHHTH, that is, 4 heads and 1 tail in 5 flips.
If the coin is fair (\(p = 0.5\)):
Each flip has probability 0.5 regardless of outcome:
\[P(\text{data}|\text{fair}) = (0.5)^4 \times (0.5)^1 = (0.5)^5 = \frac{1}{32} = 0.03125\]
If the coin is biased (\(p = 0.8\)):
\[P(\text{data}|\text{biased}) = (0.8)^4 \times (0.2)^1\]
\[(0.8)^4 = 0.4096\]
\[P(\text{data}|\text{biased}) = 0.4096 \times 0.2 = 0.08192\]
(b) With equal priors of 0.5:
\[P(\text{biased}|\text{data}) = \frac{0.5 \times 0.08192}{0.5 \times 0.03125 + 0.5 \times 0.08192} = \frac{0.08192}{0.11317} \approx 0.724\]
The data raises the belief that the coin is biased from 50% to about 72%.
Practice Problem 14
Expected Value Decision Problem (Sections 07 & 08)
A company must decide between two investments:
- Project: Invest \(50{,}000\text{ EUR}\). With probability 0.6, it succeeds and returns \(120{,}000\text{ EUR}\). With probability 0.4, it fails and returns \(10{,}000\text{ EUR}\).
- Bonds: Invest \(50{,}000\text{ EUR}\) at a guaranteed 4% annual interest for 2 years.
(a) Compute the expected return of the project.
(b) Compute the bond return after 2 years.
(c) Which should a cautious company choose? Discuss.
(a) The project return \(R\) is a random variable:
\[R = \begin{cases} 120{,}000\text{ EUR} & \text{with probability } 0.6 \\ 10{,}000\text{ EUR} & \text{with probability } 0.4 \end{cases}\]
\[E[R] = 0.6 \times 120{,}000 + 0.4 \times 10{,}000 = 72{,}000 + 4{,}000 = 76{,}000\text{ EUR}\]
The expected profit is:
\[E[\text{Profit}] = E[R] - 50{,}000 = 76{,}000\text{ EUR} - 50{,}000\text{ EUR} = 26{,}000\text{ EUR}\]
(b) Using compound interest:
\[A = 50{,}000 \times (1.04)^2 = 50{,}000 \times 1.0816 = 54{,}080\text{ EUR}\]
The bond profit is:
\[\text{Profit} = 54{,}080\text{ EUR} - 50{,}000\text{ EUR} = 4{,}080\text{ EUR}\]
Comparison of expected profits:
- Project: \(26{,}000\text{ EUR}\) expected profit
- Bonds: \(4{,}080\text{ EUR}\) guaranteed profit
The project has a much higher expected return.
(c) Which should a cautious company choose?
| Criterion | Project | Bonds |
|---|---|---|
| Expected profit | \(26{,}000\text{ EUR}\) | \(4{,}080\text{ EUR}\) |
| Standard deviation | \(53{,}889\text{ EUR}\) | \(0\text{ EUR}\) |
| Worst case | \(-40{,}000\text{ EUR}\) loss | \(+4{,}080\text{ EUR}\) profit |
| Best case | \(+70{,}000\text{ EUR}\) profit | \(+4{,}080\text{ EUR}\) profit |
For a cautious company, the bonds are the better choice.
Reasoning:
Downside risk: The project has a 40% chance of losing \(40{,}000\text{ EUR}\) (\(10{,}000\text{ EUR}\) return on a \(50{,}000\text{ EUR}\) investment). This could be devastating for a small company.
Higher expected profit, higher risk: While the project offers \(21{,}920\text{ EUR}\) more in expected profit, it comes with enormous uncertainty. A cautious decision-maker values certainty and would need a much larger expected profit to accept this level of risk.
Note: Expected value alone is not sufficient for decision-making. Variance (risk) matters too, especially for cautious decision-makers.
Wrap-Up & Next Steps
Key Takeaways
- Combinatorics & probability: apply Bayes’ theorem and verify independence via conditional probabilities
- Binomial & hypergeometric: use the binomial approximation when the sample is small compared with the population
- Descriptive statistics: mean, median, quartiles and IQR from the raw data, and compare mean vs median for skew
- Log equations in probability: flip inequalities when dividing by negative log values
- Decisions under uncertainty: consider variance and risk aversion, not just expected value
Next Session Preview
Session 09-05: Oral Exam Practice IV
- The dress rehearsal: full oral-exam protocol with topic sets from the whole course
- Followed by the final recap sessions for the written FSP
Review the oral-exam feedback you collected in Practice I-III - your focus points return today.