LessonThis is a lesson restated in new words. Any figure in it is an example from the source, not this desk's record.

Roll fair dice and ask how many maximize the chance of exactly one six. The lecture's solution is five or six. Both counts give the same probability, (5/6) to the fifth. A continuous stand-in for the count peaks near 5.48, which is why those two integers are the ones to compare, and why rolling thousands of dice makes exactly one six rare.

Why it matters

The prompt is from an Optiver-style interview in the lecture. The method is the point. Say what you notice out loud. "Maximize" means an optimization. "Exactly one" is not "at least one" and not "the first six." A fair die is a reasonable assumption because its mass function is simple, and the lecture adopts it. The probability you are maximizing is a fixed number for each count of dice. It is deterministic even though the rolls are random.

Start from a case you can compute. One fair die shows a six with probability 1/6. Adding dice and writing "die one is six, or die two is six" immediately double-counts the outcomes where several dice show six. That is the wrong event. Exactly one six is a success-or-failure problem.

The idea in plain words

Translate each die into a Bernoulli trial. Success means that die shows six, with probability 1/6. Failure has probability 5/6. The rolls are independent. The number of successes in n trials is binomial. You do not know n. You are choosing it. The probability of exactly one success is n choose 1, times 1/6, times (5/6) to the power n minus 1.

Treat that expression as a function of a real variable long enough to differentiate. The product rule and the chain rule produce a factor that is never zero, and a second factor 1 plus n times the natural log of 5/6. Set the second factor to zero. Because the log of a number below one is negative, the critical point is the positive count near 5.48. The lecture's spoken fraction dropped the minus sign and the calculator still returned that positive value. The repaired station is one divided by the absolute value of the log of 5/6.

You cannot roll 5.48 dice. The continuous peak only tells you where to look, so you do not waste time comparing 20 or 30. Plug in 5. The binomial expression simplifies to (5/6) to the fifth. Plug in 6. The 6 and the 1/6 cancel, and you get (5/6) to the fifth again. The probabilities match. Either count maximizes the chance of exactly one six.

How to use it

Use the same translation on the next counting interview. Name the event as a success, check that trials are independent, recognize a binomial count of successes, and only then optimize. If the optimum falls between integers, evaluate the integers on each side instead of rounding by habit. Here the two sides tied, which the lecture reads as symmetry around the peak: moving down toward five raises the probability, and moving up toward six raises it, until you pass the peak and further moves lower it.

What usually goes wrong

Silence is the interview failure the lecture leads with. So is jumping to an inclusion of "at least one six," which counts the wrong event and tangles the overlaps. Treating n as continuous and reporting 5.48 as a number of dice is the mathematical failure. The calculus found a region. The binomial probabilities at five and at six are the result.

Another slip is to drop the sign in the log equation and then trust a negative count. The probability of failure is 5/6, its log is negative, and the count that sets the derivative to zero has to be positive. Checking five and six against the original binomial expression catches both the sign and the tie.

Questions people ask

Why do five and six dice tie?

Both plug into the binomial probability of one success and simplify to (5/6) to the fifth. The continuous critical point near 5.48 sits between them.

What probability is being maximized?

The chance of exactly one six, not at least one. Each die is a trial with success probability 1/6, and the count of successes is binomial.

Why differentiate if dice are discrete?

To find the neighborhood. Without the peak near 5.48 you would not know whether to test five and six or some much larger count.