Algebra 2

The law of total probability

An event can happen in several different situations, and its chance is different in each one. What is its chance overall, before you know which situation you are in?

Where you are 3 in Conditional probability

Why this exists

The general multiplication rule gives the chance that two things both happen: the chance of the first, times the chance of the second given the first. Often, though, the question is about one event on its own. A canteen buys its bread from three bakeries, and each bakery sends a stale loaf now and then, some more often than others. What is the chance that a loaf in the canteen is stale?

No single stale rate answers that, because there are three of them. The answer has to depend on the rates and also on how much of the bread comes from each bakery: a bakery with a high stale rate matters little if it supplies only a few loaves. The law of total probability is the rule that puts those two kinds of information together. It splits the situation into cases that do not overlap, finds the event’s share inside each case, and adds.

Definition

A partition of the possible outcomes is a list of events B_1, B_2, \ldots, B_n such that

  • no two of them can happen together (they are mutually exclusive), and
  • one of them always happens (together they cover every outcome).

So every outcome lies in exactly one of the cases. The bakeries are a partition of the loaves: each loaf came from exactly one bakery. Any event B and its complement “not B” form a partition with two cases.

The law of total probability says that if B_1, B_2, \ldots, B_n is a partition and every P(B_i) > 0, then for any event A,

\begin{aligned} P(A) &= P(B_1)\,P(A \mid B_1) + P(B_2)\,P(A \mid B_2) \\ &\quad + \cdots + P(B_n)\,P(A \mid B_n) \end{aligned}

In words: for each case, multiply the chance of the case by the chance of A in that case, then add the results over all the cases. With the summation sign the same statement reads

P(A) = \sum_{i=1}^{n} P(B_i)\,P(A \mid B_i)

Intuition

A flower market sells tulip bulbs in two sizes. Of all the bulbs it sells, 70\% are large and the rest are small. A large bulb flowers with probability 0.9 and a small one with probability 0.4. Picture all the bulbs as a square of area 1, as in Figure 1. The large bulbs fill a strip 0.7 of the width and the small bulbs fill the remaining 0.3. Inside each strip, the bulbs that flower fill a share of its height: 0.9 of the large strip and 0.4 of the small one.

large
0.7
0.63
0.9
small
0.3
0.12
0.4
Figure 1The bulbs that flower are the two shaded pieces, one in each strip. Their areas are 0.7 \times 0.9 = 0.63 and 0.3 \times 0.4 = 0.12, so 0.75 of the square is shaded.

Every bulb that flowers lies in one of the two shaded pieces, and no bulb lies in both, because no bulb is both large and small. So the share of bulbs that flower is the total shaded area:

\begin{aligned} P(\text{flowers}) &= 0.7 \times 0.9 + 0.3 \times 0.4 \\ &= 0.63 + 0.12 = 0.75 \end{aligned}

Each product is one piece, worked out by the general multiplication rule, and the addition joins pieces that do not overlap. That is the whole law: cut the square into strips, find the event’s piece in each strip, and add the pieces.

The picture also shows why the answer is not simply the average of 0.9 and 0.4, which is 0.65. The large strip is wider, so its flowering rate counts for more. The overall rate 0.75 sits between the two rates, nearer to the rate of the bigger group.

Results

The law of total probability. If B_1, \ldots, B_n is a partition with every P(B_i) > 0, then for any event A,

P(A) = \sum_{i=1}^{n} P(B_i)\,P(A \mid B_i)

Two cases. For any event B with 0 < P(B) < 1,

\begin{aligned} P(A) &= P(B)\,P(A \mid B) \\ &\quad + P(\text{not } B)\,P(A \mid \text{not } B) \end{aligned}

The form without conditional probabilities. For any partition at all, even one with a case of probability 0,

P(A) = \sum_{i=1}^{n} P(A \text{ and } B_i)

The first form is this one with each joint probability written as P(B_i)\,P(A \mid B_i).

On a tree. In a tree diagram whose first fan is the partition, P(A) is the sum of the probabilities of all the paths that end in A.

A weighted average. The weights P(B_1), \ldots, P(B_n) are positive and add to 1, so P(A) is a weighted average of the rates P(A \mid B_1), \ldots, P(A \mid B_n). It always lies between the smallest and the largest of those rates.

Why it is true

Cut A into the pieces “A and B_1”, “A and B_2”, up to “A and B_n”. Two things are true of these pieces.

They do not overlap. An outcome in “A and B_1” and in “A and B_2” would be in both B_1 and B_2, and no outcome is in two cases of a partition. In the same way, no two of the pieces share an outcome.

They fill all of A. Take any outcome in A. It lies in some case B_i, because the cases cover every outcome, so it lies in the piece “A and B_i”. And every piece is inside A.

So the pieces are mutually exclusive events whose union is A, and the addition rule for mutually exclusive events gives

P(A) = P(A \text{ and } B_1) + \cdots + P(A \text{ and } B_n)

That is the form without conditional probabilities. Now apply the general multiplication rule to each piece, P(A \text{ and } B_i) = P(B_i)\,P(A \mid B_i), which is allowed because P(B_i) > 0, and the law follows.

For the weighted average: each P(A \mid B_i) is at least the smallest rate m and at most the largest rate M. Multiplying by P(B_i) \ge 0 and adding,

m \sum_{i=1}^{n} P(B_i) \le P(A) \le M \sum_{i=1}^{n} P(B_i)

and the sums of the weights are 1, since the cases cover everything once. So m \le P(A) \le M.

Worked examples

Example 1

Three bakeries and a stale loaf

A canteen buys its bread from three bakeries: 50\% of its loaves come from the Hill bakery, 30\% from the Mill bakery and 20\% from the Dock bakery. Of the loaves from Hill, 2\% arrive stale; from Mill, 3\%; from Dock, 5\%. Find the probability that a loaf chosen at random is stale, and the probability that it is fresh.

Solution

Each loaf comes from exactly one bakery, so the three bakeries are a partition, with P(\text{Hill}) = 0.5, P(\text{Mill}) = 0.3 and P(\text{Dock}) = 0.2. These add to 1, as the cases of a partition must. Each stale rate is a share of one bakery’s loaves, so it is a conditional probability: P(\text{stale} \mid \text{Hill}) = 0.02, and so on. Figure 2 sets this out as a tree.

0.5
Hill
0.02
stale
0.010
0.98
fresh
0.490
0.3
Mill
0.03
stale
0.009
0.97
fresh
0.291
0.2
Dock
0.05
stale
0.010
0.95
fresh
0.190
Figure 2Three paths end in a stale loaf, one through each bakery. Their probabilities 0.010, 0.009 and 0.010 add to P(\text{stale}) = 0.029.

By the law of total probability,

\begin{aligned} P(\text{stale}) &= 0.5 \times 0.02 + 0.3 \times 0.03 \\ &\quad + 0.2 \times 0.05 \\ &= 0.010 + 0.009 + 0.010 \\ &= 0.029 \end{aligned}

So 2.9\% of the loaves are stale. “Fresh” is the complement of “stale”, so P(\text{fresh}) = 1 - 0.029 = 0.971.

Check by counting. Picture 1000 loaves. Then 500 come from Hill and 2\% of them, 10, are stale; 300 come from Mill and 3\% of them, 9, are stale; 200 come from Dock and 5\% of them, 10, are stale. That is 29 stale loaves in 1000, which is 0.029.

The Dock bakery has the highest stale rate but supplies the fewest loaves, and it ends up adding exactly as much as Hill. Going the other way, from “this loaf is stale” back to “which bakery probably sent it”, uses this total as its denominator; that is Bayes’ rule with a tree diagram.

Example 2

A coin chooses the hat

Hat X holds 4 paper slips, 3 of them green. Hat Y holds 5 paper slips, 1 of them green. A fair coin is tossed: on heads a slip is drawn at random from hat X, on tails from hat Y. Find the probability that the slip is green. Then find it again when a fair die chooses instead, with hat X used only when the die shows a 6.

Solution

The coin gives a partition into two cases, heads and tails, each with probability \displaystyle \frac{1}{2}. Given heads the draw is from hat X, so \displaystyle P(\text{green} \mid \text{heads}) = \frac{3}{4}; given tails, \displaystyle P(\text{green} \mid \text{tails}) = \frac{1}{5}. By the law,

\begin{aligned} P(\text{green}) &= \frac{1}{2} \times \frac{3}{4} + \frac{1}{2} \times \frac{1}{5} \\ &= \frac{3}{8} + \frac{1}{10} \\ &= \frac{15}{40} + \frac{4}{40} = \frac{19}{40} \end{aligned}

With equal weights, this is the plain average of \displaystyle \frac{3}{4} and \displaystyle \frac{1}{5}.

With the die, hat X is used with probability \displaystyle \frac{1}{6} and hat Y with probability \displaystyle \frac{5}{6}, and the green rates inside the hats are unchanged:

\begin{aligned} P(\text{green}) &= \frac{1}{6} \times \frac{3}{4} + \frac{5}{6} \times \frac{1}{5} \\ &= \frac{1}{8} + \frac{1}{6} \\ &= \frac{3}{24} + \frac{4}{24} = \frac{7}{24} \end{aligned}

The hats are the same, but the answer has dropped from \displaystyle \frac{19}{40} = 0.475 to \displaystyle \frac{7}{24} \approx 0.292, because now the hat with few green slips is used most of the time. The chance of each case matters as much as the rate inside it.

Example 3

Finding a missing rate

In a city, 45\% of households rent their home and the rest own it. A survey finds that 31\% of all households have solar panels, and that 40\% of the households that own their home have solar panels. What share of renting households have solar panels?

Solution

Renting and owning form a partition, with P(\text{rent}) = 0.45 and P(\text{own}) = 1 - 0.45 = 0.55. The 31\% is a share of all households, so it is P(\text{solar}), the left side of the law. The 40\% is a share of the owners, so P(\text{solar} \mid \text{own}) = 0.4. Write x for the unknown P(\text{solar} \mid \text{rent}). The law of total probability says

0.31 = 0.45x + 0.55 \times 0.4

so 0.31 = 0.45x + 0.22. Subtracting 0.22 from both sides gives 0.09 = 0.45x, and dividing by 0.45 gives x = 0.2. So 20\% of renting households have solar panels.

Check. 0.45 \times 0.2 + 0.55 \times 0.4 = 0.09 + 0.22 = 0.31. The overall 31\% lies between the two group rates, 20\% and 40\%, as a weighted average must.

Example 4

A lift from one day to the next

An office lift works on Monday with probability 0.8. If it works on one day, it works the next day with probability 0.9. If it is broken on one day, it is repaired and works the next day with probability 0.5. Find the probability that the lift works on Tuesday, and on Wednesday.

Solution

Tuesday depends on Monday, so take Monday’s state as the partition: works, with probability 0.8, or broken, with probability 0.2. The given numbers are the conditional chances for the next day: P(\text{works Tue} \mid \text{works Mon}) = 0.9 and P(\text{works Tue} \mid \text{broken Mon}) = 0.5. So

\begin{aligned} P(\text{works Tue}) &= 0.8 \times 0.9 + 0.2 \times 0.5 \\ &= 0.72 + 0.10 = 0.82 \end{aligned}

Wednesday depends on Tuesday in the same way, so now Tuesday’s state is the partition, with the probabilities just found: works 0.82, broken 1 - 0.82 = 0.18. Then

\begin{aligned} P(\text{works Wed}) &= 0.82 \times 0.9 + 0.18 \times 0.5 \\ &= 0.738 + 0.09 = 0.828 \end{aligned}

The law can be used again and again, each day’s answer becoming the next day’s partition. The chances are settling down: if a day’s chance w were to stay the same the next day, it would solve w = 0.9w + 0.5(1 - w), which gives 0.6w = 0.5 and \displaystyle w = \frac{5}{6} \approx 0.833.

Example 5

A die decides how many coins

A fair die is rolled, and then that many fair coins are tossed. Find the probability that no coin shows heads, and the probability that at least one does.

Solution

The roll gives a partition into six cases, “the die shows k” for k = 1, 2, \ldots, 6, each with probability \displaystyle \frac{1}{6}. Given that the die shows k, there are k independent coins, and all of them show tails with probability \displaystyle \left(\frac{1}{2}\right)^k = \frac{1}{2^k}. By the law,

\begin{aligned} &P(\text{no heads}) \\ &\quad = \frac{1}{6}\Big(\frac{1}{2} + \frac{1}{4} + \frac{1}{8} \\ &\qquad\quad + \frac{1}{16} + \frac{1}{32} + \frac{1}{64}\Big) \\ &\quad = \frac{1}{6} \times \frac{63}{64} \\ &\quad = \frac{63}{384} = \frac{21}{128} \end{aligned}

The bracket adds to \displaystyle \frac{63}{64}: in sixty-fourths it is 32 + 16 + 8 + 4 + 2 + 1 = 63. “At least one head” is the complement, so

P(\text{at least one head}) = 1 - \frac{21}{128} = \frac{107}{128}

which is about 0.836. Here the partition was not given in the question; it came from asking “what would make the coins easy?”. Knowing how many coins there are makes the question easy, so the number on the die is the natural thing to split on.

Example 6

Mixing two sources to hit a target

Two workshops make umbrellas for a shop. Of the umbrellas from the older workshop, 4\% are faulty; from the newer one, 1\%. If the shop takes half its umbrellas from each, what share are faulty? What share must come from the newer workshop for the faulty share to be 2\%? Could any mix give a faulty share of 0.5\%?

Solution

The two workshops are a partition of the umbrellas. With half from each,

\begin{aligned} P(\text{faulty}) &= 0.5 \times 0.04 + 0.5 \times 0.01 \\ &= 0.02 + 0.005 = 0.025 \end{aligned}

so 2.5\% are faulty.

Now let y be the share from the newer workshop, so 1 - y come from the older one. The law gives

P(\text{faulty}) = 0.04(1 - y) + 0.01y = 0.04 - 0.03y

Setting this equal to 0.02 gives 0.03y = 0.02, so \displaystyle y = \frac{2}{3}. Two thirds of the umbrellas must come from the newer workshop. Check: \displaystyle \frac{1}{3} \times 0.04 + \frac{2}{3} \times 0.01 = \frac{0.06}{3} = 0.02.

A faulty share of 0.5\% is impossible. The overall rate is a weighted average of 4\% and 1\%, so it can never be below 1\%. In the algebra, 0.04 - 0.03y = 0.005 would need \displaystyle y = \frac{0.035}{0.03} = \frac{7}{6}, more than all of the umbrellas.

Boundaries

The cases must not overlap. If two cases share outcomes, those outcomes are counted twice. In a club where 60\% of members play chess and 50\% play go, “chess players” and “go players” are not a partition: their chances add to more than 1, which no partition can do. A partition here would be four cases: chess only, go only, both, and neither.

The cases must cover everything. If some outcomes lie in no case, their share of A is left out and the sum comes out too small. The chances of the cases must add to exactly 1.

Each case needs a chance. P(A \mid B_i) is defined only when P(B_i) > 0. A case with probability 0 adds nothing to P(A) and can simply be left out, or the form P(A) = \sum P(A \text{ and } B_i) can be used, which needs no conditional probabilities.

The rates must be given the cases. The law uses P(A \mid B_i), the share of the case B_i in which A happens. A figure such as “40\% of the stale loaves come from Hill” is P(\text{Hill} \mid \text{stale}), a share of the stale loaves, and it cannot go into the law for P(\text{stale}).

The rates do not have to add to 1. The chances of the cases add to 1; the rates P(A \mid B_i) are shares of different groups and can add to anything from 0 to n. The stale rates 0.02, 0.03 and 0.05 add to 0.10, and nothing is wrong.

Where this goes next

The total P(A) is exactly the denominator needed to turn a conditional probability round. Once a loaf is known to be stale, the chance it came from Dock is the Dock path’s share of all the stale paths: Bayes’ rule with a tree diagram works this out, and the division it uses is the one in finding a conditional probability. Both belong to the wider study of conditional probability.

The weighted-average form returns when a random quantity takes several values. The expected value of a quantity is its values weighted by their chances, and computing it by splitting into cases is the same move as here; see expected value as a weighted mean. The lift in Example 4, where each day’s chances come from the day before by the law of total probability, is the starting point of the study of chains of random steps.

Exercises

Two cases

  1. P(B) = 0.4, P(A \mid B) = 0.7 and P(A \mid \text{not } B) = 0.2. Find P(A).
  2. In a choir, 60\% of the singers practice every day. A singer who practices every day sings a concert note-perfect with probability 0.85; one who does not, with probability 0.5. Find the probability that a singer chosen at random sings note-perfect.
  3. A fair four-sided die, with faces 1 to 4, is rolled first. If it shows 1, an ordinary die is rolled and the player wins on a 6; otherwise an ordinary die is rolled and the player wins on a 4, 5 or 6. Find the probability of winning.
  4. On 65\% of mornings the weather is dry. On a dry morning a tram is late with probability 0.1; on a wet morning, with probability 0.3. Find the probability that the tram is late on a morning chosen at random, and the probability that it is on time.

Three or more cases

  1. An office has three printers. The first prints 25\% of the pages, the second 35\% and the third 40\%. Pages from them are smudged with probabilities 0.01, 0.02 and 0.04. Find the probability that a page chosen at random is smudged.
  2. A spinner lands on A with probability \displaystyle \frac{1}{2}, on B with probability \displaystyle \frac{1}{3} and on C with probability \displaystyle \frac{1}{6}. On A one fair coin is tossed, on B two, on C three. Find the probability that every coin tossed shows heads.
  3. The runners in a fun run are 30\% under twelve, 30\% aged twelve to sixteen and 40\% over sixteen. The shares who finish in under half an hour are 20\%, 25\% and 10\%. Find the probability that a runner chosen at random finishes in under half an hour.
  4. The table counts the 400 people at a theater show by ticket type and whether they bought a program.
BoughtNot boughtTotal
Adult66154220
Child2496120
Concession303060
Total120280400

Find P(\text{program}) with the law of total probability, using the ticket types as the partition, and check it against the Total row.

Working backwards

  1. P(A) = 0.5, P(B) = 0.25 and P(A \mid B) = 0.8. Find P(A \mid \text{not } B).
  2. In a quiz, 40\% of the questions are on science. A team answers 90\% of the science questions correctly and 72\% of all the questions correctly. What share of the other questions does it answer correctly?
  3. Two dairies supply a shop’s milk cartons. Of the cartons from the first, 3\% leak; from the second, 8\%. Overall 5\% of the cartons leak. What share of the cartons come from the second dairy?

Chains and hidden partitions

  1. An archer’s first arrow hits the gold with probability 0.3. After an arrow that hits the gold, the next one does with probability 0.4; after one that misses it, with probability 0.2. Find the probability that the second arrow hits the gold, and the probability that the third does.
  2. A box holds 10 batteries, 3 of them flat. Two are taken at random, one after the other, without putting the first back. Use the first battery as the partition to find the probability that the second battery is flat.
  3. A fair die is rolled, and then that many fair coins are tossed. Find the probability that exactly one coin shows heads.

Reasoning

  1. Explain why P(A) always lies between the smallest and the largest of the rates P(A \mid B_1), \ldots, P(A \mid B_n) for a partition B_1, \ldots, B_n.
  2. In a club, 60\% of members play chess and 50\% play go. Of the chess players 30\% enter a tournament, and of the go players 40\%. Someone works out 0.6 \times 0.3 + 0.5 \times 0.4 = 0.38 as the share of members who enter. Explain why the law of total probability does not justify this, and say what information would let you find the share correctly.
  3. Explain why the chances of the cases of a partition must add to 1, while the rates P(A \mid B_i) need not.
  4. Show that if P(A \mid B) = P(A \mid \text{not } B) = r, with 0 < P(B) < 1, then P(A) = r, and explain what this says about whether A and B are independent.
  5. In Exercise 13 the answer equals the chance that the first battery is flat. Explain why this is no accident, both from the law of total probability and without it.
Answers
  1. 0.40. 0.4 \times 0.7 + 0.6 \times 0.2 = 0.28 + 0.12 = 0.40.
  2. 0.71. 0.6 \times 0.85 + 0.4 \times 0.5 = 0.51 + 0.2 = 0.71.
  3. \displaystyle \frac{5}{12}. \displaystyle P(\text{shows } 1) = \frac{1}{4}, so \displaystyle \frac{1}{4} \times \frac{1}{6} + \frac{3}{4} \times \frac{1}{2} = \frac{1}{24} + \frac{9}{24} = \frac{10}{24} = \frac{5}{12}.
  4. Late 0.17, on time 0.83. 0.65 \times 0.1 + 0.35 \times 0.3 = 0.065 + 0.105 = 0.17, and the complement is 1 - 0.17 = 0.83.
  5. 0.0255. The sum 0.25 \times 0.01 + 0.35 \times 0.02 + 0.40 \times 0.04 is 0.0025 + 0.007 + 0.016 = 0.0255.
  6. \displaystyle \frac{17}{48}. Given A, B or C, all heads has probability \displaystyle \frac{1}{2}, \displaystyle \frac{1}{4} or \displaystyle \frac{1}{8}, so the law gives \displaystyle \frac{1}{2} \times \frac{1}{2} + \frac{1}{3} \times \frac{1}{4} + \frac{1}{6} \times \frac{1}{8}, which is \displaystyle \frac{12}{48} + \frac{4}{48} + \frac{1}{48} = \frac{17}{48}.
  7. 0.175. The sum 0.3 \times 0.2 + 0.3 \times 0.25 + 0.4 \times 0.1 is 0.06 + 0.075 + 0.04 = 0.175.
  8. 0.3. The ticket types have chances \displaystyle \frac{220}{400} = 0.55, \displaystyle \frac{120}{400} = 0.3 and \displaystyle \frac{60}{400} = 0.15, and the program rates in the rows are \displaystyle \frac{66}{220} = 0.3, \displaystyle \frac{24}{120} = 0.2 and \displaystyle \frac{30}{60} = 0.5. So 0.55 \times 0.3 + 0.3 \times 0.2 + 0.15 \times 0.5, which is 0.165 + 0.06 + 0.075 = 0.3, and the Total row gives \displaystyle \frac{120}{400} = 0.3.
  9. 0.4. 0.5 = 0.25 \times 0.8 + 0.75x = 0.2 + 0.75x, so 0.75x = 0.3 and x = 0.4.
  10. 60\%. 0.72 = 0.4 \times 0.9 + 0.6x = 0.36 + 0.6x, so 0.6x = 0.36 and x = 0.6.
  11. 40\%. With y from the second dairy, 0.03(1 - y) + 0.08y = 0.05, so 0.03 + 0.05y = 0.05, 0.05y = 0.02 and y = 0.4.
  12. Second 0.26, third 0.252. 0.3 \times 0.4 + 0.7 \times 0.2 = 0.12 + 0.14 = 0.26; then with the second arrow as the partition, 0.26 \times 0.4 + 0.74 \times 0.2 is 0.104 + 0.148 = 0.252.
  13. \displaystyle \frac{3}{10}. First flat: \displaystyle \frac{3}{10}, then 2 flat among 9. First not flat: \displaystyle \frac{7}{10}, then 3 flat among 9. So \displaystyle \frac{3}{10} \times \frac{2}{9} + \frac{7}{10} \times \frac{3}{9} = \frac{6}{90} + \frac{21}{90} = \frac{27}{90} = \frac{3}{10}.
  14. \displaystyle \frac{5}{16}. Given k coins, exactly one head has probability \displaystyle \frac{k}{2^k}, since any one of the k coins can be the head. So the answer is \displaystyle \frac{1}{6}\left(\frac{1}{2} + \frac{2}{4} + \frac{3}{8} + \frac{4}{16} + \frac{5}{32} + \frac{6}{64}\right). In sixty-fourths the bracket is 32 + 32 + 24 + 16 + 10 + 6 = 120, and \displaystyle \frac{1}{6} \times \frac{120}{64} = \frac{120}{384} = \frac{5}{16}.
  15. Call the smallest rate m and the largest M. Each term P(B_i)\,P(A \mid B_i) is between m\,P(B_i) and M\,P(B_i), since P(B_i) \ge 0. Adding over the cases, and using that the P(B_i) add to 1, gives m \le P(A) \le M. In words, P(A) is a weighted average of the rates, and an average cannot leave the range of what it averages.
  16. Chess players and go players are not a partition: 0.6 + 0.5 = 1.1 > 1, so at least 10\% of members play both and are counted twice, and members who play neither are left out. To use the law you need a partition, such as chess only, go only, both and neither, with the share of members in each group and the share of each group who enter.
  17. The cases cover every outcome and no outcome is in two of them, so their chances together count every outcome exactly once, which is 1. Each rate P(A \mid B_i) is a share of a different group, so nothing ties them together: every group could have A happen all the time, making the rates add to n. The bakery stale rates add to 0.10.
  18. P(A) = P(B)\,r + (1 - P(B))\,r = r. So P(A \mid B) = r = P(A): knowing that B happened does not change the chance of A, which means A and B are independent.
  19. From the law, the answer \displaystyle \frac{3}{10} \times \frac{2}{9} + \frac{7}{10} \times \frac{3}{9} is a weighted average of \displaystyle \frac{2}{9} and \displaystyle \frac{3}{9}, and the weights work out to give exactly \displaystyle \frac{27}{90} = \frac{3}{10}. Without it: before any battery is taken, each of the 10 batteries is equally likely to be the one that comes out second, since nothing in the drawing favors one battery over another for that place. Three of the ten are flat, so the chance is \displaystyle \frac{3}{10}, the same as for the first place.
kg1128 · updated 2026-10-19 · CC-BY-SA-4.0