本书暂未推出简体中文版。现有版本:English, Français。
Interviews I: Maths, Probability and Speed · 职业发展
8Conditional Probability and Bayes
Updating a belief correctly: conditioning on what you actually learned, and on how you came to learn it. Bayes by odds makes most of these a one-line sum. The traps are protocols of information, base rates, correlated evidence and selection, and the later questions turn the update into a price or a decision.
Question 8.1 ★ QR, QT, Trader, Analyst, Risk • any • junior
A family has two children, each equally likely to be a boy or a girl, independently. You are told that at least one of them is a girl. What is the probability that both are? And if instead you meet one of the children, picked at random, and that child is a girl?
Answer
Answer to Question 8.1.
Told “at least one is a girl”, the probability is . Having met a random child who is a girl, it is .
The four families BB, BG, GB, GG are equally likely. “At least one girl” removes only BB, and of the three left, one is GG. When you meet a random child, you learn more. Family GG shows you a girl for sure, while BG and GB show you one half of the time, so the weights are , and GG has probability .
Classic wrong answer. Assuming the two statements are the same fact. They differ in how the information reached you: what matters is the probability of hearing this message under each possibility, not merely whether the message is true.
Question 8.2 ★ QR, QT, Trader, Analyst, DS, Risk • any • junior
A disease affects 1% of people. A test detects it in 99% of those who have it, and it wrongly shows positive for 5% of those who do not. You test positive. What is the probability that you have the disease?
Answer
Answer to Question 8.2.
The probability is , about 17%.
Use Bayes by odds. The prior odds of disease are . A positive test is times as likely with the disease as without it, so that is the likelihood ratio. The posterior odds are , which is a probability of .
In people: of 10 000, 100 are ill and 99 of them test positive. Of the 9 900 well, 495 test positive. So 99 of the 594 positives are ill.
Classic wrong answer. Answering 99%, or a figure near it. That confuses with , and it ignores how rare the disease is.
Why it matters. The same sum sets the value of any alert. A signal that is right 99% of the time on rare events still produces mostly false alarms.
Question 8.3 ★ QR, QT, Trader, Analyst • any • junior
A prize is behind one of three doors. You pick a door. The host, who knows where the prize is, always opens a different door with no prize behind it, and offers you the chance to switch to the remaining closed door. Should you switch, and what is your chance of winning if you do? What if there are 100 doors and the host opens 98?
Answer
Answer to Question 8.3.
Switch: you win with probability . With 100 doors, you win with probability .
Your first pick is right with probability . The host’s action tells you nothing about your own door, because the host can always open a door with nothing behind it, whichever door you hold. So that door keeps its , and the remaining door collects the other . Equivalently, switching wins exactly when your first pick was wrong.
The hundred-door version makes this plain: your door is right with probability , and the host, who knows, has shown you where the prize would be in all the other cases.
Classic wrong answer. “Two doors are left, so each has one half.” Two outcomes do not mean equal chances. The host’s knowledge is what makes the update unequal, and a host who opened at random would give a different answer.
Question 8.4 ★ QR, QT, Trader, Analyst, Risk • any • junior
A bag holds 100 coins, of which 99 are fair and one has heads on both sides. You draw one at random and flip 10 heads in a row. How likely is it now that you hold the two-headed coin?
Answer
Answer to Question 8.4.
The probability is .
By odds, the prior odds of the two-headed coin are . Each head is twice as likely under that coin, so each head doubles the odds. After 10 heads, the odds are , which gives .
The belief crosses one half between the sixth and the seventh head, since .
Why it matters. Odds make this a one-line update and show how quickly repeated evidence overwhelms a prior. Ten doublings multiply by about a thousand, so a prior of 1 in 100 falls fast, but a prior of 1 in a million would not.
Question 8.5 ★ QR, QT, Trader, Analyst • any • junior
Three cards lie in a hat: one red on both sides, one blue on both sides, and one red on one side and blue on the other. You draw one at random and put it on the table, and the side you see is red. What is the probability that the other side is red too?
Answer
Answer to Question 8.5.
The probability is .
Count the red sides, not the cards. There are three red sides, and you are equally likely to be looking at any of them. Two of those three belong to the red-red card, and their other side is red. One belongs to the mixed card, and its other side is blue.
Classic wrong answer. One half, because only two cards could be on the table. That treats the two possible cards as equally likely, but the red-red card is twice as likely to show you a red side.
Question 8.6 ★ QR, QT, Analyst, DS, Risk • any • junior
In a city, 85% of taxis are green and 15% are blue. After an accident, a witness says the taxi was blue. Tests show that witnesses identify the colour correctly 80% of the time, for either colour. What is the probability that the taxi was blue?
Answer
Answer to Question 8.6.
The probability is , so the taxi is still more likely to be green.
Use odds. The prior odds of blue are . The witness is 4 times as likely to say blue when it is blue as when it is green (). So the posterior odds are , and that gives .
Classic wrong answer. 80%, the witness’s reliability. That answers “how often is the witness right about any taxi”, not “given this statement about a rare colour, how often is it right”. Green taxis are so common that their mistaken reports outnumber the true reports about blue ones, 17 to 12.
Follow-up. And if the witness were right half of the time? Then the likelihood ratio is 1, and the answer stays at the prior, 15%.
Question 8.7 ★ QR, QT, Trader, Analyst • any • junior
You roll two fair dice, and someone looks at them and tells you that at least one shows a six. What is the probability that both show six? What is the probability that the sum is 7?
Answer
Answer to Question 8.7.
Both six has probability , and sum 7 has probability .
Of the 36 rolls, 11 contain a six: 6 with the first die a six, 6 with the second die a six, with counted twice. Only one of the 11 is , and two of them add up to 7, which are and .
Classic wrong answer. One sixth, by thinking “one die is a six, so the other is an independent die”. That is right only if you are told the first die is a six. “At least one” is not about a particular die, and that changes the count.
Follow-up. And if the speaker looks at one die at random and says it is a six? The chance of both being six is then , as the protocol of information has changed.
Question 8.8 ★ QR, QT, Trader, Analyst • any • junior
A bag holds one ball, equally likely to be red or blue. You add a red ball, shake the bag and draw one ball, which is red. What is the probability that the ball left in the bag is red?
Answer
Answer to Question 8.8.
The probability is .
Say the original ball is red with probability . If it is red, the bag holds two reds and the draw is red for certain. If it is blue, the draw is red with chance . So by Bayes the odds that the original ball was red, given a red draw, are , which is . If the original ball was red, the ball left in the bag is red; if it was blue, the ball left is blue.
It is also possible to count the balls directly. There are three equally likely reds that could have been the drawn ball: the added red, the original red in the red case, and the added red in the blue case. In two of the three, a red ball remains.
Classic wrong answer. One half, by arguing that the draw took out the red you added, so the bag is as it was. The red draw is evidence of the original colour, because it is more likely when the bag held two reds.
Question 8.9 ★★ QR, QT, Trader • hedge fund, market maker • junior
Three prisoners, A, B and C, know that one of them, chosen at random, will be pardoned. A asks the guard, who knows the result, to name one of the other two who will not be pardoned. The guard says “B”. What is A’s probability of being pardoned now, and C’s, if the guard picks at random when there is a choice? What if the guard always names B whenever possible?
Answer
Answer to Question 8.9.
With a random guard, A stays at and C rises to . If the guard always names B whenever possible, A and C are at each.
The likelihood of the guard’s words decides everything. If C is pardoned, the guard must say B. If A is pardoned, the guard has a choice, and a random guard says B half the time. So the weights for A and C are and , and the odds are . A’s chance has not moved, because the guard could say something like this in any case, and the news moves C’s chance.
If the guard always says B whenever possible, then B is certain when A is pardoned, and the weights are equal, so each has . And a guard who names C whenever possible gives a stark result: hearing B then means that C is the one pardoned.
Classic wrong answer. “Two prisoners are left, so one half.” It holds only under one particular rule for the guard. A probability is fixed not only by the list of remaining possibilities but also by the rule that made the message.
Why it matters. When someone tells you a fact selected from what they know, ask how they chose it. This is what separates a filtered report from a neutral sample.
Question 8.10 ★★ QR, QT, Trader • hedge fund, market maker • junior
A prize is behind one of three doors, and you pick door 1. First rule: the host does not know where the prize is, opens door 2 or door 3 at random, and it happens to hide nothing. Should you switch, and how much does it matter? Second rule: the host knows, never opens the prize door, and given a choice always opens door 2. What is your chance if you switch after seeing door 3 opened? After seeing door 2 opened?
Answer
Answer to Question 8.10.
Under the first rule it does not matter: each door has probability . Under the second rule, switching wins for certain after door 3 opens, and with chance after door 2 opens.
First rule. The host has no information, and opening an empty door is itself evidence. If the prize is behind door 1, then an empty door is certain; otherwise it has chance . So the weights are , which is even.
Second rule. If the prize is behind door 2, the host must open door 3. If it is behind door 1 there is a choice, and the host always opens door 2. So seeing door 3 opened tells you that the prize is behind door 2: switching wins with certainty. Seeing door 2 opened leaves door 1 or door 3, with equal weight, and either of them could have led to it, so the chance is .
Averaged over what the host does, door 3 opens a third of the time and door 2 opens two-thirds of the time, so switching still wins , as it must.
Classic wrong answer. Giving under every rule. The famous answer assumes a knowing host with no preference. A preference does not change the average, but it changes what you can infer from what you actually saw.
Question 8.11 ★★ QR, QT, Trader • hedge fund, market maker • junior
A family has two children. Each is a boy or a girl with equal chance, and each is born on any day of the week with equal chance, independently. You learn that at least one of the children is a boy born on a Tuesday. How likely is it that the two children are both boys?
Answer
Answer to Question 8.11.
The probability is .
Count, using 14 types of child, one for each sex and day. There are equally likely families. Those with at least one Tuesday boy have the Tuesday boy first (14 families) or second (14 families), with the one double-counted family removed: 27. Among those, both children are boys in .
The surprising day matters because a more specific description makes it less likely that two different children could fit it, so it moves you from “at least one boy” towards “this particular boy”. With no day stated, the answer is . With a very rare trait, such as a birthday, the answer is , nearly .
Classic wrong answer. Saying the day is irrelevant and answering . The question asks only about the sexes, but a family with two boys has nearly twice the chance ( against ) of containing a Tuesday boy.
Follow-up. Is the answer sensitive to how you came to hear this? Yes. If a parent picks one child at random and reports that child’s sex and day, the answer is . Only a rule that says “report if you have a Tuesday boy” gives .
Question 8.12 ★★ QR, QT, DS, Risk • any • junior
A coin has an unknown probability of heads, and before any flip you think every value between 0 and 1 is equally likely. You see 7 heads in 10 flips. What is the probability that the next flip is heads? Why not ?
Answer
Answer to Question 8.12.
The probability is . It is not because your uniform prior still counts, as if you had seen one head and one tail before you started.
The likelihood of 7 heads in 10 flips with probability is proportional to , so the posterior is a Beta distribution with parameters and . Its mean, which is the chance of a head next, is . In general, Laplace’s rule of succession gives .
With no data it gives , and it never gives 0 or 1 after finitely many flips, which is what you want from a rule used for rare events.
Classic wrong answer. Using the proportion . That is the most likely value of , not its mean, and the posterior is not symmetric around its peak. A heavier prior would shrink further towards one half.
Why it matters. Shrinkage towards a prior is built into any estimate like this. A hit rate from few trades should be pulled back towards a base rate before being trusted.
Question 8.13 ★★ QR, QT, Trader, Risk • any • junior
A bag holds two coins, one fair and one with heads probability . You take one at random, flip it twice, and get two heads. What is the probability that the third flip of the same coin is also heads?
Answer
Answer to Question 8.13.
The probability is .
First update, then predict. The two heads have probability under the biased coin and under the fair one, so by odds the biased coin has , which is . The chance of a third head is then the mix
Before any flips, this mix would be . So each head moves the next forecast up, because you are learning about the coin.
Classic wrong answer. Giving on the ground that flips of a coin are independent. They are independent given the coin, but when you do not know the coin, earlier flips carry information about it.
Follow-up. Is the third flip independent of the first two? Not unconditionally, and that is what makes them useful. Given the coin they are independent.
Question 8.14 ★★ QR, QT, DS, Risk • any • junior
A condition has a prevalence of 1%. A test is right 90% of the time, both on people with the condition and on people without it, and repeated tests are independent given the true state. You test positive twice. What is the probability that you have it? A third test then comes back negative. What now?
Answer
Answer to Question 8.14.
After two positives, the probability is . After a negative third test, it is .
Use odds and likelihood ratios. Prior odds are . A positive result has a likelihood ratio of , and two give , so the odds are , which is . A negative test has a ratio of , and that takes the odds to , which is .
The order of the tests makes no difference. In effect, a positive and a negative cancel, and you are left with one net positive on a rare condition.
Classic wrong answer. Assuming that two positives at 90% must mean about 99%. The base rate of 1% costs you more than two good tests can recover.
Why it matters. Multiplying likelihood ratios needs the tests to be independent given the truth. Repeating the same test on the same sample would give the same mistake twice and add little.
Question 8.15 ★★ QR, QT, DS, Analyst, Risk • any • junior
Over two years, strategy A has a higher fraction of winning trades than strategy B in each year. Can B still have the higher fraction of winning trades over the two years together? Give numbers if it can, and say what you would report.
Answer
Answer to Question 8.15.
Yes, by Simpson’s paradox. For example, A wins 9 of 10 trades in the first year and 30 of 100 in the second, while B wins 80 of 100 and then 2 of 10. A is higher in each year (90% against 80%, and 30% against 20%), yet over the two years A wins 39 of 110 (35%) and B wins 82 of 110 (75%).
The cause is the mix. A traded mostly in the hard year and B mostly in the easy year, so the overall figure mainly compares the years. If each traded the same number in each year, the reversal could not happen, because equal-weighted averages preserve the ordering.
Report the rates by year, with the trade counts. If you must give one number, give an average over a common mix of years, because that compares like with like. Which is right depends on the question: is the year a condition you can control, or an outcome?
Classic wrong answer. Answering “no”, since a higher rate in every group seems to force a higher rate overall. That holds only with the same weights on each group.
Why it matters. Portfolio attribution and performance across regimes run into this all the time. A strategy can look best overall only because it held back in bad periods, or the other way round, and you have to know which.
Question 8.16 ★★ QR, QT, DS, Risk • hedge fund, bank • junior
You test 1 000 trading signals, and 5% of them truly work. A test at the 5% level flags a useless signal 5% of the time, and it flags a working signal 80% of the time. A signal is flagged. What is the probability that it truly works? What should you change first if that is too low?
Answer
Answer to Question 8.16.
The probability is , so a flagged signal is more likely to be false than real.
Count the outcomes. Fifty signals work, and 40 of them are flagged. Of the 950 that do not work, are flagged. So of the flagged ones are real.
Tighten the test first. At the 1% level, keeping the same power for simplicity, the false flags fall to and the true share climbs to about 81%. In practice the power falls too, so you may need more data, but the base rate is rarely something you can change, and the threshold is. If no signals work at all, every flag is false, and the test gives no warning of that by itself.
Classic wrong answer. Saying 95%, since the test is at the 5% level. That number describes what happens to useless signals, not how likely a flagged signal is to be useful. The answer depends on how many ideas you tried and how good they were.
Why it matters. This is the sum behind every research process: with a low base rate of good ideas, most significant results are false unless the test is made much stricter than the usual 5% level.
Question 8.17 ★★ QR, QT, Trader • market maker, hedge fund • junior
A coin either has heads probability or , and you think the two are equally likely. In 10 flips you see 7 heads and 3 tails. What is the fair price of a contract that pays $1 if the next flip is heads?
Answer
Answer to Question 8.17.
The fair price is about , or 57 cents.
Each head moves the odds of the coin by a factor of and each tail by , so only the net count of 4 heads matters: the odds are , or a probability of for the coin. The chance of a head next is
The price must lie between and , whatever you have seen, because the only two possibilities are those. Even at very strong evidence, the price approaches from below.
Classic wrong answer. Quoting , the observed frequency. Your beliefs allow only the two coins, and the frequency has no role beyond its likelihood. The data would fit a third coin better, but you are pricing within the beliefs you stated.
Why it matters. Prices update through this kind of sum. A market maker quoting the next outcome holds a belief over types, not a frequency, and that is why fair value is a weighted average rather than the latest fill.
Question 8.18 ★★ QR, QT, Trader • hedge fund, market maker • junior
A box holds 4 balls, and the number of red ones is equally likely to be 0, 1, 2, 3 or 4. You draw two without replacement, and both are red. What is the probability that the next ball drawn is red?
Answer
Answer to Question 8.18.
The probability is .
Update on the box’s contents. With red balls, two reds without replacement has probability , so the weights on are , out of 20. The third ball is red with probability , namely , and . So the answer is .
This matches Laplace’s rule, , and that is no accident. If the number of reds is uniform on , the sequence of draws is exchangeable, and it has the same law as drawing with replacement from a coin with uniform . The size of the box does not matter.
Classic wrong answer. Guessing a value of and answering one half or one. It is the uncertainty in that does the work.
Follow-up. And after one red and one blue? Then , by the same rule.
Question 8.19 ★★ QR, QT, Analyst, DS, Risk • any • junior
A DNA profile matches one person in a million, at random. A city has 5 million people, one of whom committed a crime, and nothing else points to anyone. A person picked at random from the city is tested and matches the profile. A lawyer says the chance of a match by accident is one in a million, so the person is almost surely guilty. What is the probability of guilt?
Answer
Answer to Question 8.19.
The probability of guilt is about .
Start from the population. Before the test, this person is the guilty one with probability . Besides the guilty person, about 5 of the other 5 million people match by chance. Of about 6 people in the city who match, one is guilty, so a person who was picked with no other evidence and who matches has probability about .
By odds: prior odds are about , and the likelihood ratio is , so the posterior odds are .
The lawyer computes , and states it as if it were . The two differ because almost everyone is innocent.
Classic wrong answer. Treating one in a million as the chance of innocence. Other evidence changes everything, though: with a prior of one half from other evidence, the match makes guilt nearly certain.
Follow-up. And if the whole city is tested, and one of the matches is picked at random? The count of other matches is then random, about Poisson with mean 5, and the chance is the mean of , which is . It is close to , but not equal, because the protocol differs.
Question 8.20 ★★ QT, Trader, Analyst, Risk • hedge fund, bank • junior
Of all fund managers, 10% are skilled and beat the market in a given year with probability 70%, independently from year to year; the others do so with probability 50%. A manager has beaten the market five years in a row. What is the probability that this manager is skilled? What is the chance of beating it next year?
Answer
Answer to Question 8.20.
The probability of skill is about , and the chance of beating the market next year is about .
Compare the two groups. Skilled managers with five wins make up of all managers, and unskilled ones . So the odds are , and the probability is . The forecast for next year is the mix .
Five straight wins is rarer for a coin flipper, but there are nine times as many coin flippers, and so most managers with this record are still unskilled.
Classic wrong answer. Treating the record as proof of skill, since is only about 3%. Unskilled managers are numerous, and that 3% is applied to all of them.
Why it matters. Selecting managers on past returns is exactly this calculation, and it says how much a track record can move you: not nothing, but less than the raw numbers suggest.
Question 8.21 ★★ QT, Trader, Analyst • hedge fund, market maker, bank • junior
A company is worth an amount to its owner, uniform between 0 and 100. Only the owner knows , and the company would be worth under your management. You make one bid , and the owner sells if . Which bid gives the highest expected profit, and how large is it? What if it were worth to you?
Answer
Answer to Question 8.21.
Bid 0, because every positive bid has a negative expected profit, which is . At , you should bid 100, for an expected profit of 25.
Condition on the owner’s acceptance. A bid of is accepted exactly when , which has chance , and given that, is uniform on with mean . So you get something worth on average, and you pay . Each accepted bid loses on average, and the expected profit is .
At a multiple of 2 the expected value is exactly the bid, and all bids break even. Above that, every bid is profitable, and a higher bid is better. At , the profit is , which at the top bid is 25. A bid of 40 at loses 4 on average.
Classic wrong answer. Bidding on the average value: averages 50, so it is worth 75 to you, so any bid up to 75 looks profitable. This ignores what you learn from the seller saying yes: the deal only happens when is low.
Follow-up. How large must the multiple be before a positive bid makes sense? Above 2. For a multiple , a bid of earns on average, which is positive only when .
Why it matters. Every quote you offer is hit selectively. The same conditioning gives the fill price’s true value, and it is why a price that looks good before the trade can look bad straight after it.
Question 8.22 ★★ QR, QT, Trader • hedge fund, market maker • junior
An urn starts with one red and one blue ball. Each time you draw a ball at random, then put it back along with one more of the same colour. What is the probability that the first 10 draws are all red? Given that the tenth draw is red, what is the probability that the first draw was red?
Answer
Answer to Question 8.22.
The first ten are all red with probability . Given a red tenth draw, the first was red with probability .
The chance of all red multiplies as , which telescopes to .
The urn looks like it remembers the past, but it is exchangeable: any sequence with the same number of reds has the same probability, because the numerators and denominators just appear in a different order. So only the number of reds matters, and in fact the count after draws is uniform on . So . The later draw says as much about the first as the first says about the later.
Classic wrong answer. Assuming the future cannot inform the past, and giving . Conditioning looks both ways, because both draws depend on the same hidden share of red.
Follow-up. What is this urn equal to? A coin with a heads probability that is uniform between 0 and 1, and with independent flips given that probability. That is why it matches Laplace’s rule.
Question 8.23 ★★ QR, QT, DS, Risk • any • junior
A coin has a heads probability drawn uniformly between 0 and 1. It is then flipped twice. Are the two flips independent? What is the probability of two heads, and what is the correlation between the two results?
Answer
Answer to Question 8.23.
The flips are not independent. Two heads have probability , and the correlation is .
Condition on : . Each flip alone has probability , so independence would need . They are independent given , but not overall: a head is news about .
The covariance is , and each flip has variance . So the correlation is . A coin with known would have no correlation at all, since its variance of is zero. In this sense the correlation measures how much is unknown.
Follow-up. And with more flips? The same correlation holds between any pair, since the flips are exchangeable, and the pairwise correlation does not die out with distance.
Why it matters. Returns that look correlated across assets, or across time, may all be independent draws given a hidden state such as a volatility regime. A shared unknown creates dependence with no direct link.
Question 8.24 ★★ QR, QT, Risk, DS • any • junior
and are jointly normal, each with mean 0 and variance 1, and correlation . What are the mean and variance of given that ? What is the probability that given that ?
Answer
Answer to Question 8.24.
Given , has mean 1 and variance . And .
Write with independent of . That is the projection of onto . It gives a conditional mean of and a variance of , which does not depend on .
For the sign, use the angle in the plane of . The events and are half-planes, and their normals have an angle between them whose cosine is . The direction of is uniform, so
and . With the arcsine is , which gives . As a check, gives , and gives 1.
Classic wrong answer. Answering by reading the as a linear increase in the sign’s chance. The relation between sign agreement and correlation is not linear: at it is .
Why it matters. That same formula links sign accuracy and correlation for a signal, so an agreement of means a correlation of one half. Correspondingly, 55% sign accuracy means a correlation of only about .
Question 8.25 ★★ QR, QT, Risk, DS • hedge fund, bank • junior
Your belief about a stock’s fair value is a normal distribution, centred on 100, with a standard deviation of 4. A noisy signal then reads 106, where the signal is the fair value plus independent normal noise with standard deviation 3. What is your updated mean and standard deviation?
Answer
Answer to Question 8.25.
The updated mean is and the standard deviation is .
For normal beliefs and normal noise, precisions add up, and the mean is the precision-weighted average. The prior has precision , the signal . So the new precision is , which is a variance of , or a standard deviation of . The signal’s weight is , so the mean moves from 100.
The extreme cases are as you would expect: a perfect signal gets all the weight, and a useless one gets none. And the variance does not depend on what the signal said.
Classic wrong answer. A simple average, 103, which ignores the precisions, or a final standard deviation near 3 or 4. Combining the two gives a value tighter than either.
Follow-up. And after a second, identical signal? Precision becomes , and the mean moves further. In general, precision simply adds per signal, so long as the noises are independent.
Why it matters. This formula underlies the Kalman filter and any shrinkage of a noisy forecast towards a prior.
Question 8.26 ★★ QT, Trader, QR • market maker, crypto • junior
A stock will be worth either 90 or 110, with equal probability. A trader arrives and trades one share with you. With probability 20% the trader is informed, buying at a true value of 110 and selling at 90; otherwise the trader buys or sells with equal chance. What is the lowest price at which you can offer to sell one share and not lose on average? After such a sale, where should that price go for the next trader?
Answer
Answer to Question 8.26.
The lowest safe selling price is 102, and after that sale it should rise to about .
The price must equal the expected value of the stock given that someone buys from you. If the value is 110, a buy has probability , because all informed traders buy. If it is 90, a buy has probability . So , and the expected value given a buy is . By the same reasoning the bid is 98, and the spread of 4 pays for the informed traders.
Each trade is news. After a buy, your belief in 110 is . A further buy has odds , or , and the ask rises to .
Classic wrong answer. Quoting a fair price of 100 plus a markup chosen for profit. A quote at 100 loses on average, because buyers are more likely when the stock is high. The spread comes from conditioning on the trade, not from a fee.
Follow-up. What are the limits? With no informed traders, the ask is 100. With only informed traders, it is 110, and at that price a buyer gains nothing, so no trade is worth making.
Question 8.27 ★★ QR, QT, Trader, Analyst • hedge fund, bank • junior
Two analysts each call the market’s direction correctly 70% of the time, and up and down are equally likely. Both say up. What is the probability that the market goes up if their errors are independent? If they always agree, because they read the same report? If they are both right on 55% of days and both wrong on 15%?
Answer
Answer to Question 8.27.
The probabilities are with independent errors, if they always agree, and with the correlated numbers.
Up and down are equally likely, so all you need is the chance of what you saw given each truth. Both say up in a world that goes up exactly when both are right, and in a world that goes down exactly when both are wrong. So , where and are the chances of both right and both wrong.
Independent errors: and . Always agreeing: and , and the second analyst adds nothing. Correlated: and , giving . These numbers are consistent: the other 30% of days split evenly between the two kinds of disagreement, so each analyst is right on of days, the being the days when that analyst alone is right.
Classic wrong answer. Multiplying the likelihood ratios for the two analysts, which gives every time. That is valid only for independent errors. Sources that repeat each other do not add evidence.
Why it matters. Combining signals by simple addition of their strength overstates confidence if the signals share their data. That is one reason a portfolio of ten similar signals has far less value than ten independent ones.
Question 8.28 ★★★ QR, QT, Trader • hedge fund, market maker • junior, experienced
You are dealt 13 cards from a 52-card deck. Given that you hold at least one ace, what is the probability that you hold at least two? Given that you hold the ace of spades, what is that probability? Why are they different?
Answer
Answer to Question 8.28.
Given at least one ace, the probability of at least two is about . Given the ace of spades, it is about .
Count hands. There are hands, of which have no ace and have exactly one. So
Given the ace of spades, the other 12 cards come from the remaining 51, and having no other ace has chance . So the chance of at least one more is about .
The events differ because “holds the ace of spades” is more specific. A hand with two aces fits “holds the ace of spades” half of the time, while a hand with one ace fits only a quarter of the time. So naming the card favours hands with more aces, exactly as in the case of the boy born on a Tuesday.
Classic wrong answer. Assuming that the suit cannot matter, because aces are symmetric. Each suit has the same chance, but a named suit is less likely to be held, and more so for hands with fewer aces.
Follow-up. What if a player chooses to name their ace’s suit when they hold one? Then the suit is no extra information about the number of aces, and stands. The protocol is what decides it.
Question 8.29 ★★★ QR, QT, Trader • hedge fund, market maker • junior, experienced
A prize is behind one of four doors, and you pick one. Twice in turn, the host, who knows where the prize is, opens a door that is neither your current pick nor the prize, choosing at random when there is a choice. After each opening you may keep your door or switch to any other closed door, at random if there is more than one. After the second opening, the door you then hold is opened. What is the best sequence of decisions, and what is your chance of winning?
Answer
Answer to Question 8.29.
Keep your door at the first opening, and switch at the second. You win with probability .
There are four plans. Keep and keep wins , because the host’s actions tell you nothing about your own door. Keep and switch wins whenever your first pick was wrong, since after two openings the only closed door that is not yours must hold the prize: . Switching first and then keeping wins . Switching both times wins .
The rule is to hold on as long as you can, then switch at the last moment. At each step the host is forced to give you information about the other doors, while your door’s probability is stuck at its initial value of . So you want to hold the door with the lowest probability for as long as possible, and switch only when the switch collects all the rest.
To check the for switching twice: your first switch has chance of holding the prize, the host opens one more door, and you switch to the remaining door. You win unless you held the prize at the point of the second switch, which leaves . Exact enumeration over all paths and all the host’s choices confirms each of the four numbers, and a simulation matches the best one.
Classic wrong answer. Switching as often as possible, because switching once was good in the three-door game. Each early switch leaves the door that the host cannot touch, which is exactly the door whose probability you want to transfer later.
Question 8.30 ★★★ QR, QT, DS, Risk • hedge fund, bank • junior, experienced
In a country, every family has children until the first boy, and then stops. Each child is a boy or a girl with equal chance. What is the average number of children per family? What fraction of children are boys? You meet a child at random from the whole population: how many children, including this one, are in that child’s family on average?
Answer
Answer to Question 8.30.
A family has 2 children on average, half of all children are boys, and a randomly met child comes from a family of 3 children on average.
The family size is geometric on with , so . Each family has exactly one boy, so boys are one child in two: the rule does not change the sex ratio, since every birth is an independent coin.
Picking a child is different from picking a family. A family with children is times as likely to be hit, so this is a size-biased sample:
This is the same effect as the longer bus gap that a random arrival falls into. If all families had exactly 2 children, the two averages would match.
Classic wrong answer. Saying that the stopping rule favours boys, or that a random child’s family averages 2. A stopping rule can never bias a fair coin, but it does change how you see the families when you sample them by child.
Why it matters. Whenever you sample per item rather than per group, the larger groups are overweighted. This is why the average investor’s fund is larger than the average fund, and why the average trade occurs at a busier time than the average minute.
Question 8.31 ★★★ QR, QT, DS, Analyst • hedge fund, bank • junior, experienced
Each applicant has two independent scores, and , uniform between 0 and 1, and is hired only if . What is the correlation between and among the people hired? How could this mislead someone who studies only those people?
Answer
Answer to Question 8.31.
The correlation is , even though the scores are independent in the population.
Those hired are uniform on the triangle above the line . On this triangle, , , so . Integrating gives , so the covariance is , and the correlation is .
The reason is that a person with a low can be hired only with a high . This selection effect appears with any hurdle on the sum. It grows as the hurdle rises to 1, and then stays at exactly , because above 1 those hired form a smaller copy of the same triangle.
So studying only hires can make it seem that the two skills trade off, or that one of them predicts poor performance. It is a property of the filter, not of people.
Classic wrong answer. Assuming that a selection keeps independence. Filtering on a function of both variables creates dependence where there was none.
Why it matters. The same trap appears when a study uses only funds that survived, or trades that were filled. Any filter on outcome can produce a correlation between two inputs that have nothing to do with each other.
Question 8.32 ★★★ QR, QT, Risk • hedge fund, bank • junior, experienced
A market is in one of two regimes: calm, with normal daily returns of mean 0 and volatility 1%, or crisis, with mean 0 and volatility 3%. Your belief today is 5% crisis. Today’s return is . What is your updated probability of crisis? And if today’s return is exactly 0?
Answer
Answer to Question 8.32.
After , the probability of crisis is about . After a return of 0, it falls to about .
The update needs the density ratio at the observed return:
At , with returns in percent, this is . The prior odds are , so the posterior odds are about , which gives . So one single move can do almost all the work, since a move of 4 standard deviations is exceptionally rare in the calm regime.
At , the ratio is , since a return near zero is three times as likely in the calm regime, where the density is more peaked. The odds become , or about . The two densities are equal at , and returns smaller than that actually lower your belief in a crisis.
Classic wrong answer. Treating as “about 1.3 standard deviations under the crisis”, and so not strong evidence. The evidence is the comparison between two models, and a move that is unremarkable under one and extreme under the other is very strong.
Why it matters. This is one step of the filter behind regime models and of GARCH’s behaviour. Quiet days should lower your risk estimate, and one large move should raise it fast.
Question 8.33 ★★★ QR, QT, DS • hedge fund, market maker • junior, experienced
and are independent exponential random variables with mean 1. Given that , what is the distribution of ? How does that change if and are independent standard normals instead?
Answer
Answer to Question 8.33.
For exponentials, given is uniform on . For standard normals, it is normal with mean and variance .
Exponentials: the joint density at is , and this does not depend on . So every split of is equally likely: the mean is and the variance is .
Normals: the density is proportional to , which by completing the square is a normal in with mean and variance . The variance does not depend on at all.
For any independent and identically distributed pair, the mean of given the sum is by symmetry, so that is no test of which law you have. The spread is what tells them apart.
Classic wrong answer. Expecting to be close to in every case. For exponentials, a large sum is equally likely to come from any split, including one big value and one tiny one. For normals, a big sum is shared out.
Why it matters. This distinction matters for tail risk. With fat-tailed returns, a large move over two days most likely came from one extreme day. With normal returns, it came from two moderately large days. Your conclusions about the path depend on which model you hold.
Question 8.34 ★★★ QR, QT, Trader • hedge fund, market maker • junior, experienced
Two envelopes hold money, one twice as much as the other, and you take one at random. It seems that with amount in your envelope, the other holds or with equal chance, for an average of , so you should always switch, and then switch back. Where is the error? Show it with amounts drawn from the pairs , and , each pair with equal probability.
Answer
Answer to Question 8.34.
The error is in treating “the other envelope holds or with equal chance” as true for every . There is no uniform prior over all amounts. Given a proper prior, this fails for some amounts, and those exactly cancel the gain.
Here is the example. The six equally likely cases are: you hold 1 or 2 from the first pair, 2 or 4 from the second, and 4 or 8 from the third. So you hold 1 and 8 with chance each, and 2 and 4 with chance each.
- Holding 1, the other holds 2: a gain of 1.
- Holding 2, the other holds 1 or 4: an average of , a gain of .
- Holding 4, the other holds 2 or 8: an average of 5, a gain of 1.
- Holding 8, the other holds 4: a loss of 4.
The average gain is . Both envelopes average . So switching wins for almost every amount you might see, and the big loss at the top exactly pays for those gains.
Classic wrong answer. “Since it holds for each , you should switch.” It does not hold for each , as the top value shows. If you tried to remove that top value, you would need an unbounded prior, and then the expected amount is infinite, which is where the paradox lives.
Question 8.35 ★★★ QR, QT, Risk, DS • any • junior, experienced
A bus runs on a fixed timetable, either every 15 minutes or every 30 minutes, and you think the two are equally likely. You arrive at a random moment and wait for 10 minutes with no bus. What is the probability that it runs every 30 minutes? On average, how much longer will you wait?
Answer
Answer to Question 8.35.
The probability of the 30-minute timetable is , and you will wait about more minutes on average.
A random arrival waits uniformly up to the gap. Waiting 10 minutes with no bus has chance under the 15-minute timetable and under the 30-minute one. So the odds are for the 30-minute timetable.
Given the 15-minute timetable and no bus yet, the remaining wait is uniform on , for a mean of . Given the 30-minute one, it is uniform on , for a mean of 10. So the expected remaining wait is minutes. Before you waited, the expected wait was , so after 10 minutes the remaining wait is , not : waiting has told you that the buses are less frequent than you hoped.
Classic wrong answer. Using the average of the two timetables without updating, or assuming that you must be close to the bus. Having waited is evidence about the timetable, and that keeps the expected wait high.
Why it matters. Any estimate of “time to next” behaves like this. If an expected fill or a recovery does not come, then the right response is often to lengthen the estimate, not to feel that it must be close.
Question 8.36 ★★★ QR, QT, Trader • hedge fund, market maker • junior, experienced
An urn is of type A or type B, with equal chance. People guess the type one at a time, and each guess is announced. Before guessing, each person sees a private signal, which names the true type with probability , independently of the other signals. Each person also hears all the earlier guesses, but never sees the signals behind them. Each guesses the type that is more likely given all this, and follows their own signal if the two types are equally likely. Eventually, a person’s guess no longer depends on their own signal, and from then on everyone guesses the same type. What is the probability that this type is the wrong one? On average, how many people guess before the first person whose signal no longer matters?
Answer
Answer to Question 8.36.
The chance that everyone settles on the wrong type is , and on average people guess before the first person whose signal no longer matters.
Guess by guess, reduce the state: let be the number of earlier guesses for one type minus those for the other. While , each person’s guess reveals their signal. With they follow their own signal. With a signal that agrees adds a guess, and a signal that disagrees gives a tie, which by the rule they follow. But at even a disagreeing signal leaves a net one signal in favour of the crowd. So they ignore their own signal. Their guess reveals nothing, the next person faces the same state, and the crowd is stuck.
So is a random walk, moving towards the truth with probability and away with , absorbed at . Moving in two-step pairs, the probability of being absorbed at the wrong end is , and the average time to absorption is .
Simulating people who do the full Bayesian update on public guesses gives the same numbers.
Classic wrong answer. Thinking that a crowd must eventually be right because signals are good and there are many people. Once a cascade starts, no new information reaches the public, even though almost all the private signals remain unused.
Why it matters. Prices can stop revealing information when traders copy each other’s orders, and a price held by a cascade can break on small news.
Question 8.37 ★★★ QR, QT, Trader • market maker, hedge fund • junior, experienced
A coin has heads probability or , and you think the two are equally likely. You will bet $1 at even money on three successive flips, choosing heads or tails before each flip and seeing all the earlier results. What is your best expected profit? What would it be if you knew the coin’s type from the start?
Answer
Answer to Question 8.37.
The best expected profit is . Knowing the coin’s type would give .
Do it by rounds, always betting on the likelier side given what you have seen. With even-money $1 bets, a bet with probability of winning earns .
Round 1: either side has , so it earns 0. Round 2: after one flip, the belief in the favoured coin is , and , so it earns . Round 3: after HH or TT, which has total probability , the odds are , and , so the bet earns . After HT or TH, the belief returns to even, and the bet earns 0. The expected earning for round 3 is . In total, this is .
Knowing the coin, you earn a round, so three rounds give . Most of that edge is out of reach, because you must first learn which coin you hold. Exact enumeration and a simulation of the rule both give .
Classic wrong answer. Treating the coin as fair on average and answering zero. The prior average is fair, but you learn as you go, and betting on what you learn has positive value, though it is small early on.
Why it matters. The early rounds are worth almost nothing except as information. That is why a trader might trade small for the sake of learning, and why you must count that value when judging whether a first trade makes sense.
Question 8.38 ★★★★ QR, QT, DS • hedge fund, market maker • experienced
You flip a coin 100 times and get 60 heads. A two-sided test puts the p-value near 5%. You also think that, before you saw the data, there was a 50% chance the coin was exactly fair, and otherwise its heads probability was uniform between 0 and 1. What is your updated probability that it is fair? What about 5 100 heads in 10 000 flips, which has a similar p-value? How can these be reconciled?
Answer
Answer to Question 8.38.
With 60 of 100, the probability of fair is about . With of , it is about , even though the p-value is about the same. This is Lindley’s paradox.
The chance of 60 heads under a fair coin is . Under the uniform prior, every count from 0 to 100 is equally likely, so that chance is . So the data are a little more likely under fairness, which gives .
With 10 000 flips, the fair chance is about (the normal density at divided by 50), and the flat chance is . Now the data favour fairness 11 to 1.
The two-sided p-values are and . Those measure how surprising the count is under the fair coin. The Bayes factor compares two explanations, and a uniform alternative spreads its chance over all values, most of which are nowhere near . So the data are “unlikely under fair, but less likely still under the vague alternative”.
The conclusion depends strongly on the alternative. Against the single alternative , the likelihood ratio is about in favour of , and the probability of fair falls to about .
Classic wrong answer. Saying that a p-value of 5% means a 95% chance of a real effect, or a 5% chance of the null. It means neither of those, and the chance of the null can even rise with more data at the same p-value.
Why it matters. Large samples make any small effect significant. For a strategy with a vast sample and a borderline t-statistic, ask for the size of effect it implies, and not only the p-value.
Question 8.39 ★★★★ QR, QT, DS, Risk • hedge fund • experienced
A hundred managers each have a true annual Sharpe ratio drawn from a normal centred on 0, with a standard deviation of . You measure each with independent normal noise of standard deviation . On average, what measured Sharpe ratio does the best one show? What is its expected true Sharpe ratio? What do the two figures become if no manager has any skill?
Answer
Answer to Question 8.39.
The best shows about , and its expected true Sharpe ratio is about . With no skill at all, the best still shows about , and its expected true Sharpe ratio is 0.
Each measured value is true Sharpe plus noise, with total variance . The expected maximum of 100 standard normals is about , so the best shows .
Now shrink. For normals, the mean of the true value given the measurement is of the measurement, whichever manager you pick. Selecting the best changes nothing in that rule, since the rule holds for each value, so the best one’s expected true Sharpe ratio is . Half of its apparent quality is luck.
With no skill, the noise is all there is: the best shows , and the true value is exactly 0.
Classic wrong answer. Taking the best one’s figure at face value, or subtracting an adjustment for the number of tries. The right correction depends on how much real variation exists, and that needs an estimate of the prior, which you can get from the spread across all 100 managers.
Follow-up. How would you estimate the prior’s spread? The measured variance across managers is the true variance plus the noise variance, so subtract the noise. A measured standard deviation near suggests a true spread near .
Why it matters. Performance fades after selection for this reason, without any change in skill. Expect half of a backtest’s edge to vanish at this level of noise, however many strategies you tried; more if the noise is larger against the true spread.
Question 8.40 ★★★★ QR, QT, Trader • hedge fund, market maker • experienced
Someone writes two different numbers on two cards, by any method they like, and you know nothing about how. You turn over one card, chosen at random, and see its number. You then say whether the other number is larger or smaller. Can you guarantee a chance of being right that is strictly above one half, whatever the two numbers are? How much above if they are 10 and 20 and you use a normal random threshold with mean 15 and standard deviation 10?
Answer
Answer to Question 8.40.
Yes. Choose a random threshold from any distribution that gives positive probability to every interval, and say “larger” if the number you saw is below your threshold. For 10 and 20 with that threshold, your chance is about .
Call the numbers , and let be your threshold. There are three cases. If , you always say “smaller”, and that is right exactly when you saw : a chance of . If , you always say “larger”, and that is right exactly when you saw : also . If , you say the right thing whichever card you turned. So your chance of being right is
which is strictly above as long as has positive probability on every interval. For 10 and 20, with normal with mean 15 and standard deviation 10, , so you get .
The guarantee cannot be made uniform. An opponent who knows your rule can put and very close together, or very far from where your threshold lies, and the excess can be made as small as they like. It is positive for each pair, but it has no positive lower bound.
Classic wrong answer. “You know nothing about how the numbers were chosen, so you can do no better than chance.” This is true of a fixed threshold, because an opponent can place both numbers on one side of it. Randomisation is what removes that weakness.
Why it matters. Having no information about the size of a number does not mean that the observation is useless. A value relative to any reference, however crude, tells you something about the ordering, and that gives a small edge.