Tasks 07-02 - Basic Probability
Section 07: Probability & Statistics
A: Skills
Problem 1: Sample Spaces and Events (x)
- Give the sample space \(S\) of each random experiment.
(1) A customer rates a delivery in an app with 1 to 5 stars.
(2) A quality inspector checks two phone cases one after the other and notes for each case whether it is good (\(g\)) or defective (\(d\)).
(3) A cashier notes how the next customer pays (card, cash or app) and whether the customer shows a loyalty card (yes or no).
In experiment (1), let \(A\) = “the customer gives at least 4 stars” and \(B\) = “the customer gives an odd number of stars”. List the outcomes of \(A\) and \(B\). Give an impossible event and the certain event of experiment (1), in words and as sets.
Give \(A \cup B\), \(A \cap B\), \(B \setminus A\) and the complement \(A'\) (also written \(\bar{A}\)) as sets and describe each of them in words.
In experiment (2), let \(E\) = “exactly one case is defective” and \(F\) = “at least one case is defective”. List the outcomes of \(E\), \(F\) and \(\bar{F}\). Decide whether \(E\) and \(\bar{F}\) are mutually exclusive.
(1) \(S = \{1, 2, 3, 4, 5\}\)
(2) \(S = \{gg, gd, dg, dd\}\), where the first letter belongs to the first case. For example, \(gd\) means “first case good, second case defective”.
(3) Each payment method can come with or without a loyalty card:
\[S = \{(\text{card}, \text{yes}), (\text{card}, \text{no}), (\text{cash}, \text{yes}), (\text{cash}, \text{no}), (\text{app}, \text{yes}), (\text{app}, \text{no})\}\]
\(A = \{4, 5\}\) and \(B = \{1, 3, 5\}\).
Impossible event, e.g. “the customer gives 6 stars” \(= \emptyset\): no outcome of \(S\) belongs to it. Certain event: “the customer gives at least 1 star” \(= S\): every outcome belongs to it.
- \(A \cup B = \{1, 3, 4, 5\}\): at least 4 stars or an odd number of stars (or both)
- \(A \cap B = \{5\}\): at least 4 stars and an odd number of stars, i.e. 5 stars
- \(B \setminus A = \{1, 3\}\): an odd number of stars, but fewer than 4 stars
- \(A' = \bar{A} = \{1, 2, 3\}\): not at least 4 stars, i.e. at most 3 stars
\(E = \{gd, dg\}\), \(F = \{gd, dg, dd\}\) and \(\bar{F} = \{gg\}\): both cases are good.
\(E \cap \bar{F} = \emptyset\), so \(E\) and \(\bar{F}\) are mutually exclusive: if exactly one case is defective, the two cases cannot both be good.
Typical mistake: in (2), writing \(S = \{gg, gd, dd\}\). The two cases are checked one after the other, so “first good, second defective” (\(gd\)) and “first defective, second good” (\(dg\)) are two different outcomes, as with two coin flips.
Problem 2: Classical Probability (x)
In a café’s loyalty app, every customer spins a prize wheel once per visit. The wheel has 20 fields of equal size: 9 fields show “discount on the next drink”, 6 fields “free cookie”, 4 fields “free coffee” and 1 field “free lunch”.
Give probabilities as fractions or decimals. Where a decimal has to be rounded, round to four decimal places and keep all intermediate results unrounded. This rule holds for the whole sheet.
The sample space of one spin can be written as \(S = \{\text{discount}, \text{cookie}, \text{coffee}, \text{lunch}\}\). Explain why \(P(\text{lunch}) = \frac{1}{4}\) is wrong. Compute the probability of each of the four prizes and check that they meet the axioms.
Compute the probability that a customer wins a free item (cookie, coffee or lunch). Name the rule you use.
Compute the probability that a customer does not win the free lunch with the complement rule.
Give the probability of the event “the customer wins a free cake” and of the event “the customer wins one of the four prizes”. Name both events.
The formula \(P(A) = \frac{|A|}{|S|}\) only holds for equally likely outcomes. The four prizes cover different numbers of fields, so they are not equally likely. The 20 fields are equally likely, so count fields:
\[P(\text{discount}) = \frac{9}{20} = 0.45, \quad P(\text{cookie}) = \frac{6}{20} = 0.30, \quad P(\text{coffee}) = \frac{4}{20} = 0.20, \quad P(\text{lunch}) = \frac{1}{20} = 0.05\]
Axioms: every probability is \(\geq 0\), and \(0.45 + 0.30 + 0.20 + 0.05 = 1 = P(S)\) \(\checkmark\)
One spin shows exactly one field, so the prizes are mutually exclusive. Special addition rule:
\[P(\text{free item}) = P(\text{cookie}) + P(\text{coffee}) + P(\text{lunch}) = 0.30 + 0.20 + 0.05 = 0.55 = \frac{11}{20}\]
Check: “free item” is the complement of “discount”, and \(1 - 0.45 = 0.55\) \(\checkmark\)
\[P(\text{no free lunch}) = 1 - P(\text{lunch}) = 1 - \frac{1}{20} = \frac{19}{20} = 0.95\]
No field shows a free cake, so “free cake” is the impossible event \(\emptyset\) with probability 0. Every field shows one of the four prizes, so “one of the four prizes” is the certain event \(S\) with probability 1.
Typical mistake: using \(\frac{|A|}{|S|}\) with the four prizes as outcomes. Then every prize would have the probability \(\frac{1}{4}\), although the discount covers 9 fields and the free lunch only 1.
Problem 3: Addition Rule (x)
A car rental station had 200 rentals last month. For 76 rentals, the customer booked extra insurance (\(I\)). For 58 rentals, the customer booked a navigation device (\(N\)). 30 rentals had both extras. One of the 200 rentals is chosen at random.
Compute \(P(I)\), \(P(N)\) and \(P(I \cap N)\).
Compute the probability that the rental had extra insurance or a navigation device.
Compute the probability that the rental had neither of the two extras.
Compute \(P(I \setminus N)\) and the probability that the rental had exactly one of the two extras. Sketch a Venn diagram with the probabilities of its four regions and check that they add up to 1.
Decide whether \(I\) and \(N\) are mutually exclusive.
\[P(I) = \frac{76}{200} = 0.38, \qquad P(N) = \frac{58}{200} = 0.29, \qquad P(I \cap N) = \frac{30}{200} = 0.15\]
General addition rule:
\[P(I \cup N) = P(I) + P(N) - P(I \cap N) = 0.38 + 0.29 - 0.15 = 0.52\]
“Neither” is the complement of “at least one of the two”:
\[P(\overline{I \cup N}) = 1 - P(I \cup N) = 1 - 0.52 = 0.48\]
\[P(I \setminus N) = P(I) - P(I \cap N) = 0.38 - 0.15 = 0.23, \qquad P(N \setminus I) = 0.29 - 0.15 = 0.14\]
Exactly one extra: \(0.23 + 0.14 = 0.37\) (or \(P(I \cup N) - P(I \cap N) = 0.52 - 0.15 = 0.37\)).
Venn diagram: only \(I\): \(0.23\), both: \(0.15\), only \(N\): \(0.14\), outside both circles: \(0.48\).
Check: \(0.23 + 0.15 + 0.14 + 0.48 = 1\) \(\checkmark\)
\(P(I \cap N) = 0.15 \neq 0\): 30 rentals had both extras, so \(I\) and \(N\) are not mutually exclusive.
Typical mistake: \(P(I \cup N) = 0.38 + 0.29 = 0.67\). The 30 rentals with both extras are then counted twice, once in \(I\) and once in \(N\).
Problem 4: Independent Events (xx)
A travel agency sells package holidays with a flight and a hotel. The flight is on time with probability 0.85. The hotel room is ready at the check-in time with probability 0.94. The flight and the hotel room do not influence each other, so the two events are independent.
Compute the probability that the flight is on time and the room is ready.
Compute the probability that the flight is late and the room is not ready.
Compute the probability that at least one of the two goes wrong.
Compute the probability that exactly one of the two goes wrong.
The agency books 5 customers on 5 different flights. Each flight is on time with probability 0.85, independently of the others. Compute the probability that at least one of the 5 flights is late.
Let \(F\) = “the flight is on time” and \(R\) = “the room is ready”, with \(P(F) = 0.85\), \(P(\bar{F}) = 0.15\), \(P(R) = 0.94\) and \(P(\bar{R}) = 0.06\).
Independent events, so multiply:
\[P(F \cap R) = P(F) \cdot P(R) = 0.85 \cdot 0.94 = 0.799\]
\[P(\bar{F} \cap \bar{R}) = 0.15 \cdot 0.06 = 0.009\]
“At least one goes wrong” is the complement of “both work out”:
\[P(\text{at least one goes wrong}) = 1 - P(F \cap R) = 1 - 0.799 = 0.201\]
Exactly one goes wrong: flight on time and room not ready, or flight late and room ready. These two cases are mutually exclusive:
\[P(F \cap \bar{R}) + P(\bar{F} \cap R) = 0.85 \cdot 0.06 + 0.15 \cdot 0.94 = 0.051 + 0.141 = 0.192\]
Check: at least one minus both, \(0.201 - 0.009 = 0.192\) \(\checkmark\)
Complement: no flight is late, i.e. all 5 flights are on time. The flights are independent, so
\[P(\text{at least one late}) = 1 - 0.85^5 \approx 1 - 0.4437 = 0.5563\]
Although each flight is on time with 85 %, at least one of the 5 flights is late with a probability of more than 50 %.
Typical mistake: in c), adding \(0.15 + 0.06 = 0.21\). This counts the case “both go wrong” twice: \(0.21 - 0.009 = 0.201\).
Problem 5: PMF and CDF (xx)
A copy shop counts the number \(X\) of paper jams in its large-format printer per day. \(X\) has the probability mass function (PMF)
| \(x\) | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| \(P(X = x)\) | 0.18 | 0.34 | 0.26 | \(p\) | 0.07 |
Determine \(p\).
Complete the table of the cumulative distribution function (CDF) \(F_X(x) = P(X \leq x)\).
| \(x\) | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| \(F_X(x)\) |
Compute \(P(X \leq 2)\), \(P(X > 2)\), \(P(X < 2)\) and \(P(1 \leq X \leq 3)\). Write each of them in words.
Decide for each table whether it is a valid PMF and give a reason.
| \(y\) | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| Table 1: \(P(Y = y)\) | 0.45 | 0.35 | 0.25 | 0.05 |
| Table 2: \(P(Y = y)\) | 0.60 | \(-0.10\) | 0.30 | 0.20 |
| Table 3: \(P(Y = y)\) | 0.25 | 0.25 | 0.25 | 0.25 |
The probabilities of a PMF add up to 1:
\[p = 1 - (0.18 + 0.34 + 0.26 + 0.07) = 1 - 0.85 = 0.15\]
\(p = 0.15 \geq 0\), so the PMF is valid.
Add the PMF values up to \(x\):
\(x\) 0 1 2 3 4 \(F_X(x)\) 0.18 0.52 0.78 0.93 1.00 - \(P(X \leq 2) = F_X(2) = 0.78\): at most 2 paper jams
- \(P(X > 2) = 1 - F_X(2) = 1 - 0.78 = 0.22\): more than 2, i.e. at least 3 paper jams
- \(P(X < 2) = P(X \leq 1) = F_X(1) = 0.52\): fewer than 2, i.e. at most 1 paper jam
- \(P(1 \leq X \leq 3) = 0.34 + 0.26 + 0.15 = 0.75\): at least 1 but at most 3 paper jams
Check: \(F_X(3) - F_X(0) = 0.93 - 0.18 = 0.75\) \(\checkmark\)
- Table 1: not valid. All values are \(\geq 0\), but \(0.45 + 0.35 + 0.25 + 0.05 = 1.10 \neq 1\).
- Table 2: not valid. The values add up to 1, but \(P(Y = 1) = -0.10 < 0\), and a probability is never negative.
- Table 3: valid. All values are \(\geq 0\) and \(4 \cdot 0.25 = 1\).
Typical mistake: computing \(P(X \leq 2)\) as \(P(X = 2) = 0.26\). “At most 2” contains the days with 0, 1 and 2 paper jams, so it is the CDF value, not the PMF value.
B: Set Up & Check
Problem 6: From Words to Probabilities (xx)
Translate each statement into probability notation. Then answer the check question: it tells you whether your translation works.
A wedding planner books 4 service providers for a wedding: a florist, a band, a caterer and a photographer. Each of them cancels at short notice with probability 4 %, independently of the others. Write the probability that at least one provider cancels with the complement rule and compute it.
Check: A classmate computes \(4 \cdot 0.04 = 0.16\). Explain why adding the four probabilities is wrong. What would this method give for 30 providers?
At a ski rental shop, 64 % of the customers rent skis (\(S\)), 45 % rent a helmet (\(H\)), and 38 % rent both. Write the probability that a customer rents skis or a helmet and compute it.
Check: A classmate adds \(0.64 + 0.45 = 1.09\). Explain why this number cannot be a probability and what went wrong.
In a café, every customer pays once per visit: by card (\(C\)) with probability 0.65, in cash (\(M\)) with probability 0.20, or in another way. Two customers who do not know each other each order a cake with probability 0.35 (\(A_1\) for the first, \(A_2\) for the second customer). Decide which pair of events cannot happen together and which pair does not influence each other. Write the matching condition for each pair and compute \(P(C \cup M)\) and \(P(A_1 \cap A_2)\).
Check: A classmate says: “\(C\) and \(M\) are independent, because paying by card has nothing to do with paying in cash.” Check the claim with \(P(C \cap M) = P(C) \cdot P(M)\).
Of the passengers of a ferry line, 52 % take a car on board (\(V\)), 30 % book a cabin (\(K\)), and 18 % do both. Write “the passenger takes a car on board but books no cabin” as a set and compute its probability.
Check: A classmate computes \(0.52 - 0.30 = 0.22\). Draw a Venn diagram with the probabilities of its four regions and explain the mistake.
A florist delivers bouquets. \(X\) is the number of deliveries per day that fail because nobody is at home:
\(x\) 0 1 2 3 4 \(P(X = x)\) 0.32 0.29 0.21 0.12 0.06 The florist says: “On most days, at most 2 deliveries fail.” Write “at most 2 deliveries fail” with the CDF, compute it and decide whether the florist is right.
Check: A classmate computes \(P(X < 2) = 0.61\). Explain the difference between “at most 2” and “fewer than 2”.
The complement of “at least one provider cancels” is “no provider cancels”, i.e. all 4 providers come. They are independent, so
\[P(\text{at least one cancels}) = 1 - 0.96^4 \approx 1 - 0.8493 = 0.1507\]
Check: adding the four probabilities counts the cases in which two or more providers cancel more than once. For 30 providers, the method would give \(30 \cdot 0.04 = 1.2 > 1\), which is not a probability. The complement gives \(1 - 0.96^{30} \approx 0.7061\).
Typical mistake: \(1 - 0.04^4\). This is the complement of “all four cancel”, i.e. the probability that at least one provider comes.
General addition rule:
\[P(S \cup H) = P(S) + P(H) - P(S \cap H) = 0.64 + 0.45 - 0.38 = 0.71\]
Check: by the axioms, every probability lies between 0 and 1, so 1.09 is impossible. The 38 % of the customers who rent both are counted twice, once in \(S\) and once in \(H\).
Typical mistake: subtracting the overlap twice, \(0.64 + 0.45 - 2 \cdot 0.38 = 0.33\). This is the probability that a customer rents exactly one of the two.
\(C\) and \(M\) cannot happen together (one payment per visit), so they are mutually exclusive: \(C \cap M = \emptyset\) and \(P(C \cap M) = 0\). Special addition rule:
\[P(C \cup M) = 0.65 + 0.20 = 0.85\]
\(A_1\) and \(A_2\) do not influence each other, so they are independent: \(P(A_1 \cap A_2) = P(A_1) \cdot P(A_2)\).
\[P(A_1 \cap A_2) = 0.35 \cdot 0.35 = 0.1225\]
Check: \(P(C) \cdot P(M) = 0.65 \cdot 0.20 = 0.13 \neq 0 = P(C \cap M)\), so \(C\) and \(M\) are not independent. If a customer pays by card, you know for sure that the customer does not pay in cash. So one event strongly influences the other.
Typical mistake: reading “cannot happen together” as “independent”. Mutually exclusive events with \(P(C) > 0\) and \(P(M) > 0\) are never independent.
“Car but no cabin” is \(V \setminus K = V \cap \bar{K}\):
\[P(V \setminus K) = P(V) - P(V \cap K) = 0.52 - 0.18 = 0.34\]
Check: the Venn diagram has the regions only \(V\): \(0.34\), both: \(0.18\), only \(K\): \(0.30 - 0.18 = 0.12\), outside both circles: \(1 - 0.34 - 0.18 - 0.12 = 0.36\). From the \(V\) circle you remove only the overlap with \(K\), not the whole \(K\) circle. The classmate’s \(0.22\) is not one of the regions.
Typical mistake: computing \(P(V \setminus K)\) as \(P(V) - P(K)\). The passengers with a cabin but without a car were never in \(V\), so there is nothing to remove for them.
“At most 2” means 0, 1 or 2 failed deliveries:
\[P(X \leq 2) = F_X(2) = 0.32 + 0.29 + 0.21 = 0.82\]
The florist is right: on about 82 % of the days, at most 2 deliveries fail.
Check: “fewer than 2” does not include 2, so \(P(X < 2) = P(X \leq 1) = 0.32 + 0.29 = 0.61\). “At most 2” includes 2, so the classmate has left out the days with exactly 2 failed deliveries (\(0.21\)).
Typical mistake: computing \(P(X = 2) = 0.21\). “At most” asks for the CDF, not for a single PMF value.
Problem 7: One Paragraph, All Events (xx)
An online stationery shop looks at its orders. 6 % of the orders contain an item with an engraving (\(E\)), 9 % are shipped abroad (\(A\)), and 2 % have both. An order is a standard order if it has neither. Each morning, the shipping team picks 5 orders at random, independently of each other, for a packing check. \(X\) is the number of the 5 picked orders that are not standard orders. The manager wants to know the probability that an order has at least one of the two features, the probability that an order is a standard order and the probability that at least one of the 5 picked orders is not a standard order. The manager also asks whether engravings and orders abroad are independent.
List every event and every given probability in this paragraph as a mathematical statement. Do not solve anything.
Check: An assistant writes “the order is a standard order” as \(\overline{E \cap A}\). Explain what this set means and give the correct one.
- Random experiment: one randomly chosen order with the events \(E\) = “contains an engraving” and \(A\) = “is shipped abroad”
- \(P(E) = 0.06\)
- \(P(A) = 0.09\)
- \(P(E \cap A) = 0.02\)
- At least one of the two features: \(E \cup A\) with \(P(E \cup A) = P(E) + P(A) - P(E \cap A)\)
- Standard order (neither feature): \(\overline{E \cup A}\) with \(P(\overline{E \cup A}) = 1 - P(E \cup A)\)
- \(X\) = number of the 5 picked orders that are not standard orders, with the values \(0, 1, 2, 3, 4, 5\)
- At least one of the 5 orders is not a standard order: \(X \geq 1\). The orders are picked independently, so \(P(X \geq 1) = 1 - P(X = 0) = 1 - P(\overline{E \cup A})^5\)
- Independence of the two features: check whether \(P(E \cap A) = P(E) \cdot P(A)\)
Check: \(\overline{E \cap A}\) contains every order that does not have both features. It also contains the orders with only an engraving or only shipped abroad, and these orders are not standard orders. The correct set is \(\overline{E \cup A}\): the orders outside both circles of the Venn diagram.
Typical mistake: writing “at least one of the 5 orders is not a standard order” as \(5 \cdot P(E \cup A)\). As in Problem 6, this counts the mornings with two or more such orders more than once. Use the complement “all 5 orders are standard orders”.
C: Applied
Problem 8: Talks and Orders at a Trade Fair (xx)
A trade fair for bakery equipment surveys 800 visitors on its last day. 280 visitors attended at least one talk in the lecture hall (\(L\)), 200 visitors placed an order at one of the stands (\(O\)), and 84 visitors did both. One of the 800 visitors is chosen at random.
- Sketch a Venn diagram for \(L\) and \(O\) and give the number of visitors in each of its four regions.
(for verification: 404 visitors did neither)
Compute \(P(L)\), \(P(O)\) and \(P(L \cap O)\). Compute the probability that the visitor attended a talk or placed an order, and the probability that the visitor placed an order without attending a talk.
Check whether \(L\) and \(O\) are independent and whether they are mutually exclusive. The organiser wants to know whether talks and orders are connected. Explain what your result means for the organiser.
A colleague claims: “With 280 talk visitors and 200 orders, \(L\) and \(O\) would be independent if fewer visitors had done both.” Determine the number of visitors with both that would make \(L\) and \(O\) independent. Compare it with the survey.
Next year, the organiser expects 1,600 visitors with the same probabilities as in the survey. The exhibitors want to send a catalogue to every visitor who attends a talk but places no order. Estimate the number of catalogues.
a) Start with the overlap:
- both (\(L \cap O\)): \(84\)
- only a talk (\(L \setminus O\)): \(280 - 84 = 196\)
- only an order (\(O \setminus L\)): \(200 - 84 = 116\)
- neither (\(\overline{L \cup O}\)): \(800 - 196 - 84 - 116 = 404\)
Check: \(196 + 84 + 116 + 404 = 800\) \(\checkmark\)
b) Classical probability, every visitor is equally likely to be chosen:
\[P(L) = \frac{280}{800} = 0.35, \qquad P(O) = \frac{200}{800} = 0.25, \qquad P(L \cap O) = \frac{84}{800} = 0.105\]
General addition rule:
\[P(L \cup O) = 0.35 + 0.25 - 0.105 = 0.495\]
Order without a talk:
\[P(O \setminus L) = P(O) - P(L \cap O) = 0.25 - 0.105 = 0.145 = \frac{116}{800}\]
c) Independence test:
\[P(L) \cdot P(O) = 0.35 \cdot 0.25 = 0.0875 \neq 0.105 = P(L \cap O)\]
So \(L\) and \(O\) are not independent. They are not mutually exclusive either, because \(P(L \cap O) = 0.105 \neq 0\): 84 visitors did both.
For the organiser: talks and orders are connected. Attending a talk and placing an order happen together more often (\(0.105\)) than they would if the two did not influence each other (\(0.0875\)). The survey alone does not show whether the talks cause the orders. Visitors who already plan to buy may also be more interested in the talks.
d) With \(x\) visitors who did both, independence means \(P(L \cap O) = P(L) \cdot P(O)\):
\[\frac{x}{800} = 0.35 \cdot 0.25 = 0.0875 \iff x = 0.0875 \cdot 800 = 70\]
The colleague is right: with 70 visitors with both, \(L\) and \(O\) would be independent. The survey has \(84 - 70 = 14\) visitors more with both.
e) Talk but no order:
\[P(L \setminus O) = \frac{196}{800} = 0.245\]
The exhibitors need about \(0.245 \cdot 1600 = 392\) catalogues.
Typical mistake: in c), concluding “not mutually exclusive, so not independent”. The two properties are checked separately: mutual exclusivity with \(P(L \cap O) = 0\), independence with \(P(L \cap O) = P(L) \cdot P(O)\).
Problem 9: Cargo Bikes for Rent (xx)
A bike rental in a city has 5 cargo bikes (bikes with a large box for shopping or children). On 50 randomly chosen days, the owner noted the number \(X\) of cargo bikes that were rented out at noon:
| Rented cargo bikes \(x\) | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| Number of days | 2 | 5 | 8 | 12 | 13 | 10 |
Use the relative frequencies as probabilities.
Explain why \(X\) is a random variable. Give the PMF of \(X\) and check that it is valid.
Complete the table of the CDF \(F_X(x) = P(X \leq x)\) for \(x = 0, 1, \ldots, 5\).
(for verification: \(F_X(3) = 0.54\))
Compute the probability that at noon at most 2 cargo bikes are rented out, that at least 4 are rented out, and that at least 2 but at most 4 are rented out. Write \(F_X(3) = 0.54\) as a sentence about the days.
\(Y\) is the number of cargo bikes that are still available at noon. Give \(Y\) in terms of \(X\) and give the PMF of \(Y\). Compute \(P(Y \geq 2)\) and explain why it equals one of the values from b).
The rental is open on 150 days in the coming season. Estimate the number of days on which all 5 cargo bikes are rented out at noon. On such a day, the owner turns customers away and loses 40 EUR on average. A sixth cargo bike costs 1,250 EUR for the season. Decide with your estimate whether the sixth cargo bike pays off.
a) The random experiment is choosing a day. \(X\) assigns a number to every day, the number of cargo bikes rented out at noon. So \(X\) is a random variable with the values \(0, 1, \ldots, 5\).
Relative frequency ≈ probability, e.g. \(P(X = 0) = \frac{2}{50} = 0.04\):
| \(x\) | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| \(P(X = x)\) | 0.04 | 0.10 | 0.16 | 0.24 | 0.26 | 0.20 |
Valid: all values are \(\geq 0\), and \(0.04 + 0.10 + 0.16 + 0.24 + 0.26 + 0.20 = 1\) (all 50 days) \(\checkmark\)
b) Add the PMF values up to \(x\):
| \(x\) | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| \(F_X(x)\) | 0.04 | 0.14 | 0.30 | 0.54 | 0.80 | 1.00 |
c)
- At most 2: \(P(X \leq 2) = F_X(2) = 0.30\)
- At least 4: \(P(X \geq 4) = 1 - F_X(3) = 1 - 0.54 = 0.46\) (or \(0.26 + 0.20\))
- At least 2 but at most 4: \(P(2 \leq X \leq 4) = 0.16 + 0.24 + 0.26 = 0.66\)
\(F_X(3) = 0.54\): on 54 % of the days, at most 3 cargo bikes were rented out at noon.
d) \(Y = 5 - X\). Each value of \(Y\) belongs to one value of \(X\), e.g. \(Y = 0\) exactly when \(X = 5\):
| \(y\) | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| \(P(Y = y)\) | 0.20 | 0.26 | 0.24 | 0.16 | 0.10 | 0.04 |
\[P(Y \geq 2) = 0.24 + 0.16 + 0.10 + 0.04 = 0.54\]
This equals \(F_X(3)\), because \(Y \geq 2 \iff 5 - X \geq 2 \iff X \leq 3\): at least 2 free cargo bikes means at most 3 rented cargo bikes.
e) \(P(X = 5) = 0.20\), so on about \(0.20 \cdot 150 = 30\) days all 5 cargo bikes are rented out at noon.
Estimated lost revenue: \(30 \cdot 40 = 1200\) EUR \(< 1250\) EUR. The sixth cargo bike does not pay off. It would need at least \(\frac{1250}{40} = 31.25\), i.e. 32 such days.
Typical mistake: in c), computing “at least 4” as \(1 - F_X(4) = 0.20\). \(1 - F_X(4)\) is the probability of more than 4. “At least 4” is the complement of “at most 3”, so it needs \(F_X(3)\).
Problem 10: Cracked Eggs at an Egg Farm (xxx)
An egg farm packs its eggs in boxes of 10. On the packing line, each egg is cracked with probability 2 %, independently of the other eggs. A supermarket chain buys 3,000 boxes per week. For every box with at least one cracked egg, the chain charges the farm 1.80 EUR.
- Explain why “no egg in the box is cracked” is the complement of “at least one egg in the box is cracked”. Compute the probabilities of both events.
(for verification: \(P(\text{at least one cracked egg}) \approx 0.1829\))
Estimate the number of boxes with at least one cracked egg per week and the weekly charge.
A customer buys two boxes. Compute the probability that exactly one of the two boxes contains a cracked egg.
A discounter wants smaller boxes and accepts a box size only if at least 88 % of the boxes contain no cracked egg. The probability that an egg is cracked stays 2 %. Determine the largest number of eggs per box that the discounter accepts.
Hint: Take the logarithm of both sides (this keeps the inequality sign), or try box sizes one after the other. The logarithm of a number between 0 and 1 is negative.
- The supermarket chain keeps the boxes of 10 and demands that at least 96 % of them contain no cracked egg. Determine the largest probability \(p\) that an egg is cracked for which the demand is met. Compare it with the current 2 %.
Hint: Both sides of the inequality are positive, so taking the tenth root keeps the inequality sign.
a) A box has either no cracked egg or at least one cracked egg. The two events cannot happen together, and together they contain every possible box, so each is the complement of the other.
No egg is cracked: all 10 eggs are intact, each with probability \(0.98\), independently:
\[P(\text{no cracked egg}) = 0.98^{10} \approx 0.8171, \qquad P(\text{at least one cracked egg}) = 1 - 0.98^{10} \approx 0.1829\]
b) Relative frequency ≈ probability, so about
\[3000 \cdot \left(1 - 0.98^{10}\right) \approx 548.78, \text{ i.e. about 549 boxes per week}\]
have at least one cracked egg. Weekly charge with the unrounded probability: \(548.78 \cdot 1.80 \approx 987.81\) EUR.
c) Let \(q = 1 - 0.98^{10}\) be the probability that a box contains a cracked egg. The two boxes contain different eggs, so they are independent. Exactly one box: the first box or the second box, two mutually exclusive cases:
\[q \cdot (1 - q) + (1 - q) \cdot q = 2 \cdot q \cdot (1 - q) \approx 2 \cdot 0.1829 \cdot 0.8171 \approx 0.2989\]
d) A box of \(n\) eggs contains no cracked egg with probability \(0.98^n\) (all \(n\) eggs intact, independently). The discounter’s demand:
\[0.98^n \geq 0.88\]
Take the logarithm and use the power law \(\ln(a^n) = n \ln(a)\):
\[n \cdot \ln(0.98) \geq \ln(0.88)\]
\(\ln(0.98) < 0\), so dividing by it flips the inequality sign:
\[n \leq \frac{\ln(0.88)}{\ln(0.98)} \approx \frac{-0.12783}{-0.02020} \approx 6.33\]
\(n\) must be a whole number, and larger boxes make the demand harder to meet, so round down: the discounter accepts at most 6 eggs per box.
Check: \(0.98^6 \approx 0.8858 \geq 0.88\), but \(0.98^7 \approx 0.8681 < 0.88\) \(\checkmark\) Trying box sizes one after the other gives the same answer.
e) A box contains no cracked egg with probability \((1 - p)^{10}\). The demand:
\[(1 - p)^{10} \geq 0.96\]
Tenth root (both sides positive, the sign stays):
\[1 - p \geq 0.96^{\frac{1}{10}} \approx 0.995926 \iff p \leq 1 - 0.96^{\frac{1}{10}} \approx 0.004074\]
The rate is a maximum, so round down: the probability that an egg is cracked may be at most 0.40 %. Today it is 2 %, five times as much, so the farm meets the demand only if it cuts the share of cracked eggs to a fifth.
Check: with 0.40 %, \(0.996^{10} \approx 96.07 \% \geq 96\) % of the boxes contain no cracked egg, with 0.41 % only \(0.9959^{10} \approx 95.97 \% < 96\) %.
Typical mistake: in a), computing \(P(\text{at least one cracked egg}) = 10 \cdot 0.02 = 0.2\). Adding the probabilities of the 10 eggs counts the boxes with two or more cracked eggs several times. For boxes of 60 eggs, this method would even give \(60 \cdot 0.02 = 1.2 > 1\).
D: FSP Problem
Work on this problem as in the exam: write down every step. The points show what each part is worth.
FSP Problem: Visitors of an Amusement Park [20 pts. total]
An amusement park surveys 600 randomly chosen visitors at the exit. 270 visitors bought a fast-track pass (\(T\)), which lets them skip the queues at the rides. 120 visitors bought the photo package (\(F\)) with all photos taken of them on the rides. 54 visitors bought both. Use the relative frequencies as probabilities. Give probabilities as decimals with four decimal places.
Part a)
Sketch a Venn diagram for \(T\) and \(F\) and give the number of visitors in each of its four regions. Compute \(P(T)\), \(P(F)\) and \(P(T \cap F)\). [3 pts.]
Venn diagram regions, starting with the overlap:
- both (\(T \cap F\)): \(54\)
- only a fast-track pass (\(T \setminus F\)): \(270 - 54 = 216\)
- only the photo package (\(F \setminus T\)): \(120 - 54 = 66\)
- neither (\(\overline{T \cup F}\)): \(600 - 216 - 54 - 66 = 264\)
Check: \(216 + 54 + 66 + 264 = 600\) \(\checkmark\)
Probabilities (relative frequencies):
\[P(T) = \frac{270}{600} = 0.45, \qquad P(F) = \frac{120}{600} = 0.2, \qquad P(T \cap F) = \frac{54}{600} = 0.09\]
Grading: 1 Pt. overlap and the two “only” regions, 1 Pt. “neither” with the check, 1 Pt. the three probabilities.
Part b)
Compute the probability that a visitor bought at least one of the two offers and the probability that a visitor bought neither of them. [3 pts.]
At least one offer (general addition rule, the overlap is subtracted once):
\[P(T \cup F) = P(T) + P(F) - P(T \cap F) = 0.45 + 0.2 - 0.09 = 0.56\]
Neither offer (complement rule):
\[P(\overline{T \cup F}) = 1 - P(T \cup F) = 1 - 0.56 = 0.44\]
Check with part a): \(\frac{264}{600} = 0.44\) \(\checkmark\)
Grading: 1 Pt. addition rule with the overlap, 1 Pt. \(0.56\), 1 Pt. complement \(0.44\).
Part c)
State the businesslike meaning of the quantities \(\bar{T} \cap F\) and \(\overline{T \cap F}\). Compute their probabilities. [3 pts.]
- \(\bar{T} \cap F\): the visitors who bought the photo package but no fast-track pass. These visitors queued normally and still wanted the photos.
- \(\overline{T \cap F}\): the visitors who did not buy both offers, i.e. who bought at most one of the two (one offer or none).
\[P(\bar{T} \cap F) = \frac{66}{600} = 0.11, \qquad P(\overline{T \cap F}) = 1 - P(T \cap F) = 1 - 0.09 = 0.91\]
Grading: 1 Pt. per meaning, 1 Pt. both probabilities.
Part d)
The marketing manager claims: “Visitors with a fast-track pass buy the photo package more often than the other visitors, so we should sell the two offers as a bundle.” Check whether \(T\) and \(F\) are independent and whether they are mutually exclusive. Assess the manager’s claim. [4 pts.]
Independence test:
\[P(T) \cdot P(F) = 0.45 \cdot 0.2 = 0.09 = P(T \cap F)\]
So \(T\) and \(F\) are independent.
Mutually exclusive: no, because \(P(T \cap F) = 0.09 \neq 0\): 54 visitors bought both offers.
Assessment: independent means that buying a fast-track pass does not change the probability of buying the photo package. The survey therefore does not support the claim that fast-track visitors buy the photo package more often. The bundle cannot be justified with this argument.
Grading: 1 Pt. \(P(T) \cdot P(F) = 0.09\), 1 Pt. comparison and “independent”, 1 Pt. not mutually exclusive with reason, 1 Pt. assessment of the claim.
Part e)
On another day, the photo team talks to 6 randomly chosen visitors at the exit, independently of each other. Compute the probability for the following events:
(1) none of the 6 visitors bought the photo package
(2) at least one of the 6 visitors bought the photo package
(3) all 6 visitors bought a fast-track pass
[3 pts.]
The 6 visitors are independent, so the probabilities multiply. A visitor bought no photo package with probability \(P(\bar{F}) = 1 - 0.2 = 0.8\).
(1) \[P(\text{none}) = 0.8^6 \approx 0.2621\]
(2) “At least one” is the complement of “none”:
\[P(\text{at least one}) = 1 - 0.8^6 \approx 0.7379\]
(3) \[P(\text{all six}) = 0.45^6 \approx 0.0083\]
Grading: 1 Pt. per event.
Part f)
Determine the number of visitors which need to be asked to find at least one visitor who bought both a fast-track pass and the photo package with a likelihood (probability) of at least 97 %.
Hint: Taking the logarithm of both sides keeps the inequality sign. The logarithm of a number between 0 and 1 is negative. [4 pts.]
A visitor bought both offers with probability \(P(T \cap F) = 0.09\) (part a), and not both with \(0.91\) (part c). For \(n\) independent visitors:
Complement: “at least one” \(= 1 -\) “none”:
\[1 - 0.91^n \geq 0.97 \iff 0.91^n \leq 0.03\]
Take the logarithm and use the power law \(\ln(a^n) = n \ln(a)\):
\[n \cdot \ln(0.91) \leq \ln(0.03)\]
\(\ln(0.91) < 0\), so dividing by it flips the inequality sign:
\[n \geq \frac{\ln(0.03)}{\ln(0.91)} \approx \frac{-3.5066}{-0.09431} \approx 37.18\]
\(n\) must be a whole number, so round up: the park has to ask at least 38 visitors.
Check: \(1 - 0.91^{37} \approx 0.9695 < 0.97\), but \(1 - 0.91^{38} \approx 0.9722 \geq 0.97\) \(\checkmark\)
Grading: 1 Pt. complement inequality with \(0.91\), 1 Pt. logarithm with the power law, 1 Pt. sign flip and \(n \geq 37.18\), 1 Pt. rounding up to 38 with the check of 37 and 38.