Qm

A coin of random bias, then twenty flips

A coin is manufactured so that its probability of heads, pp, is a random number spread evenly between 00 and 11 (uniform on [0,1][0,1]). Once pp is fixed, you flip that coin 2020 times.

How many heads should you expect? As a follow-up, what if pp is instead spread evenly between 0.20.2 and 0.60.6?

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

Random defect rate, then inspect twelve itemsEach archer's accuracy is random, then sixteen shotsPick a coin from a mixed bag, then flip ten timesA die picks the bias, then eight flipsAn amoeba that dies, stays, or splits each minute
All questions →