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

Three textbook problems in the lecture are one habit: name the sample space, then the favorable part. A continuous uniform random variable on 0 to 8, with density 1/8, has probability 4/8 of landing between 2 and 6. Two fair dice sum to 7 or 11 in 8 of 36 equally likely outcomes. A binomial count of 8 independent trials with success probability 1/2 equals 4 with probability "8 choose 4" times 1/2 to the eighth. The lecture's larger claim is that interview practice should produce this habit, not a memorized list of prompts.

Why it matters

A question that says "a simulation fails with probability p, how many runs until the first failure" is a geometric waiting time if you recognize the shape. Memorizing a nearby prompt does not help when the wording changes, and it does not help on the job, where the problem is open. The lecture's drill is three probability items, solved in more than one way, so the tool is visible apart from the arithmetic.

The idea in plain words

The density f(x) = 1/8 on 0 to 8 says the randomness is spread evenly. Endpoints do not matter for a continuous law, because single points have probability zero. The first solution integrates the density from 2 to 6: the integral of 1/8 is 4/8. The second builds the cumulative distribution function. Outside 0 to 8 the density is zero, so the CDF at s, for s inside the interval, is s/8. The probability between 2 and 6 is F(6) minus F(2), which is 6/8 minus 2/8, again 4/8. The third solution never writes a density. The favorable length is 6 minus 2, the total length is 8 minus 0, and the ratio is 4/8. The lecture submitted 4/8 and matched a solution that quotes the uniform formula, which is this same increment. Two dice are a counting problem. Each die has six faces, so the sample space has 36 pairs. The sum 11 is only (5,6) and (6,5), two pairs. The sum 7 is (1,6), (2,5), (3,4), (4,3), (5,2), and (6,1), six pairs. The sets do not overlap, so the "or" adds them: 8 pairs out of 36. That is the length-ratio idea again, with counting measure instead of length. A binomial random variable is a sum of independent Bernoulli trials, each a coin with success probability p. The mass at k successes in n trials multiplies three pieces: the number of ways to place the k successes among n trials, which is n choose k, the probability p to the k of all successes, and the probability (1-p) to the n-k of all failures. Order does not matter, which is why (1,0,0) and (0,1,0) are the same binomial outcome and the choose term counts both.

How to use it

For a uniform on an interval, prefer the length ratio until the density stops being flat. The integral and the CDF difference are the checks, and they should match. For dice, list the pairs rather than remembering "7 is the most likely sum." The list is what shows that 7 contributes six outcomes and 11 contributes two, and that a pair cannot sit in both lists. For a binomial count of successes, confirm independence before you use the formula. A streak that changes the next probability is a different model. Free throws and simulation successes are the lecture's everyday readings of the same mass function, provided each trial really does have the same p.

The lecture records a rank increase of three points after these items. That is a scoreboard on a practice site, not a measure of mastery. The transferable part is the three-way agreement on 4/8.

What usually goes wrong

Integrating the uniform density from 0 to 6 and calling it the answer to "between 2 and 6." That integral is 6/8 and includes the unwanted stretch from 0 to 2. On the dice, double-counting (5,6) if you also built it while listing sevens. It is not in the seven-list, which is why the lecture adds 6 and 2 with an empty overlap. On the binomial, forgetting the choose term and reporting only (1/2) to the eighth, which is the probability of one particular string of four heads and four tails, not of every such string.

Questions people ask

Why do all three uniform methods agree?

Because a flat density makes probability proportional to length. Integration, a CDF difference, and a ratio of lengths are three writings of that proportion. Here the lengths are 4 and 8.

How many dice outcomes make 7 or 11?

Six for 7 and two for 11, and no pair is in both sets. Out of 36 ordered outcomes, the probability is 8/36.

What is the binomial expression, not a decimal?

Eight choose four, times one half to the eighth. Since p and 1-p are equal, the two probability powers combine into a single eighth power. The lecture submitted that expression rather than a rounded decimal.