Probability and Statistics Practice


Probability and Statistics Practice

Michael
Welcome! We’re working through a broad set of probability and statistics practice problems. Some use calculus, but many rely on probability laws, counting, and discrete distributions, so you can follow along without calculus.

Corey
And the key skill is often recognizing the structure of a problem. A Venn diagram can clarify overlapping events, combinations handle unordered selections, and a probability distribution gives us a ready-made method when we recognize the right random variable.

Michael
Let’s begin with a Venn diagram. Suppose we know that P of A union B is 0.6, P of not A is 0.6, and P of A and not B is 0.3. We want P of A and B.

Corey
Draw the sample space as a rectangle, with overlapping circles for A and B. The four regions are A and not B, A and B, B and not A, and outside both events. Put 0.3 in the A-only region, and call the overlap x.

Michael
Call the B-only region y and the region outside both z. Since the four regions cover the sample space, their probabilities add to one: 0.3 plus x plus y plus z equals one. Also, A union B includes the first three regions, so 0.3 plus x plus y equals 0.6; therefore x plus y is 0.3.

Corey
The complement of A consists of the B-only region and the region outside both, so y plus z equals 0.6. From the total-probability equation, x plus y plus z equals 0.7 after subtracting the known 0.3. Replace y plus z with 0.6, and we get x equals 0.1.

Michael
So P of A and B is 0.1. We can check the other regions: y is 0.2 and z is 0.4. Then all four regions, 0.3, 0.1, 0.2, and 0.4, add to one.

Corey
That’s a useful example of why a diagram can be better than trying to recall a formula immediately. Each region has a clear meaning, and the probability statements translate naturally into equations.

Michael
Next, a contractor has nine suppliers and randomly chooses four to submit bids. How many possible groups of suppliers are there? Since the order of selection doesn’t matter, it’s a combination: nine choose four.

Corey
Using the combination formula, nine choose four equals 9 factorial divided by 4 factorial times 5 factorial. Canceling the 5 factorial and simplifying leaves 9 times 8 times 7 times 6 divided by 4 times 3 times 2 times 1, which equals 126.

Michael
Now suppose your firm is one of the nine. The chance it gets chosen is the number of four-supplier groups that include your firm divided by all 126 groups. If your firm is already included, choose the other three from the remaining eight: eight choose three, or 56.

Corey
So the probability is 56 over 126, which simplifies to 4 over 9. There’s another way to see it: the probability of not being selected in four successive choices is 8 over 9 times 7 over 8 times 6 over 7 times 5 over 6. Those factors cancel to 5 over 9, so the chance of being selected is 1 minus 5 over 9, again 4 over 9.

Michael
That second method highlights conditional probability: after each supplier is chosen, the pool changes, so the probabilities of avoiding selection are conditional, not independent. In this problem the result simplifies to the number selected divided by the total number, but deriving it helps explain why.

Corey
Here’s another counting problem: six soccer players and five football players are on a bus. We select a group of five consisting of exactly three soccer players and two football players. First choose three of the six soccer players, then two of the five football players.

Michael
The number of such groups is six choose three times five choose two. Those values are 20 and 10, so there are 200 qualifying groups. We multiply because making one choice from each category determines a complete group.

Corey
For the probability, the denominator is every possible group of five from all 11 people: 11 choose five, which is 462. Therefore the probability is 200 over 462, or 100 over 231, approximately 0.4329.

Michael
Now let’s identify a binomial setting. A softball player gets a hit with probability 0.3 on each official at-bat. Assume six at-bats are identical and independent, and find the probability of exactly two hits.

Corey
Let X be the number of hits. This is binomial because there’s a fixed number of trials, six; each trial has the same success probability, 0.3; and the trials are independent. The binomial formula is P of X equals x equals n choose x times p to the x times 1 minus p to the n minus x.

Michael
For exactly two hits, that becomes six choose two times 0.3 squared times 0.7 to the fourth. Six choose two is 15, so the probability is 15 times 0.09 times 0.2401, approximately 0.324.

Corey
The expected number of hits is n times p, or six times 0.3, which is 1.8. That’s a long-run average, not a possible result for one set of six at-bats. It does help make two hits seem like a reasonable outcome.

Michael
The next problem shows why a positive test result doesn’t automatically mean someone has a high probability of having a disease. Suppose 1.2 percent of the population has the virus. A test is positive 98 percent of the time when someone has it, and negative 99 percent of the time when someone doesn’t.

Corey
We want the probability a person has the virus given a positive test. Let’s organize the information as a tree: the probability of having the virus is 0.012, and the probability of not having it is 0.988. Given the virus, the positive-test probability is 0.98; without the virus, it’s 0.01, because the test is correctly negative 0.99 of the time.

Michael
Multiply along each relevant branch. The probability of having the virus and testing positive is 0.012 times 0.98, which is 0.01176. The probability of not having the virus and testing positive is 0.988 times 0.01, which is 0.00988.

Corey
A positive result can arise from either of those two branches, so the total probability of a positive test is 0.01176 plus 0.00988, or 0.02164. By the definition of conditional probability, the probability of having the virus given a positive result is 0.01176 divided by 0.02164, approximately 0.5434.

Michael
That’s Bayes’ theorem in action: we combine the test’s conditional accuracy with how common the condition is. Even though the test is fairly accurate, the initial probability of having the virus is low enough that a positive result does not make the probability certain.

Corey
Now consider darts. The probability of a bullseye on any throw is 0.0625, and throws are identical and independent. What’s the probability that the first bullseye happens on throw ten?

Michael
Let X be the number of throws until the first success. That’s a geometric random variable, not a binomial one: we’re counting trials up to the first success. For the first success to occur on throw ten, there must be nine misses followed by one hit.

Corey
So P of X equals 10 is 1 minus p to the ninth power times p. Here that’s 0.9375 to the ninth times 0.0625, approximately 0.03496. The expected waiting time for a geometric random variable is 1 over p, which here is 16 throws.

Michael
Next, a discrete random variable X can take the values 1, 2, 3, and 4, with probabilities 0.22, 0.35, 0.28, and one missing value. Since probabilities must add to one, the missing probability is 1 minus 0.85, or 0.15.

Corey
The cumulative distribution function adds probabilities up through each value. So F of 1 is 0.22; F of 2 is 0.22 plus 0.35, or 0.57; F of 3 is 0.85; and F of 4 is 1.

Michael
The expected value is the sum of each possible value times its probability: 1 times 0.22, plus 2 times 0.35, plus 3 times 0.28, plus 4 times 0.15. That gives 0.22 plus 0.70 plus 0.84 plus 0.60, or 2.36.

Corey
The mean doesn’t have to be one of the values X can actually take. It represents the long-run average if we observe this random variable repeatedly.

Michael
We can also encode this distribution with its moment generating function, defined as the expected value of e to the tX. Here it is 0.22e to the t, plus 0.35e to the 2t, plus 0.28e to the 3t, plus 0.15e to the 4t.

Corey
Differentiate with respect to t, then set t equal to zero to get the expected value. The derivative gives 0.22e to the t, plus 0.70e to the 2t, plus 0.84e to the 3t, plus 0.60e to the 4t. At t equals zero, each exponential is one, leaving 2.36—the same mean we found from the summation.

Michael
Let’s prove a useful variance identity. The variance is the expected value of X minus its mean, squared. If the mean is mu, expand the square inside the expectation: X squared minus 2 mu X plus mu squared.

Corey
Linearity of expectation lets us take the expectation term by term, and constants can be factored out. That gives E of X squared minus 2 mu times E of X plus mu squared. Since E of X equals mu, this becomes E of X squared minus 2 mu squared plus mu squared.

Michael
So the variance equals E of X squared minus mu squared. And because mu is E of X, we get Var of X equals E of X squared minus the square of E of X.

Corey
Now for a Poisson model. Suppose a driver averages three accidents over a five-year period, and an insurer drops coverage if there are at least three accidents during the next five years. Let X be the number of accidents in that period, modeled as Poisson with mean lambda equal to three.

Michael
We want P of X at least three. It’s convenient to use the complement: one minus P of X at most two. A Poisson random variable has probability P of X equals x equal to e to the negative lambda times lambda to the x divided by x factorial.

Corey
With lambda equal to three, the probabilities for zero, one, and two accidents are e to the negative three; 3e to the negative three; and 9 over 2 times e to the negative three. Numerically, they’re about 0.04979, 0.14936, and 0.22404.

Michael
Those add to about 0.42319. Taking one minus that gives about 0.57681, so there’s roughly a 0.577 probability of three or more accidents and therefore of losing coverage under the stated rule.

Corey
The same setting can lead to a continuous random variable: the waiting time until the first accident. Let W be that waiting time. The rate is three accidents per five-year period, so the exponential distribution has rate 3 when time is measured in five-year units.

Michael
One year is one-fifth of a five-year period, so we want P of W at most one-fifth in those units. The exponential density is rate times e to the negative rate times w, which here is 3e to the negative 3w.

Corey
Integrating from zero to one-fifth gives one minus e to the negative three-fifths, approximately 0.451. The unit conversion matters: integrating to one would mean waiting up to a full five-year period, not one year.

Michael
Our final problem gives a continuous density f of x equal to x over 16 between 2 and 6, and zero elsewhere. The cumulative distribution function is the integral of the density from the left endpoint up to x.

Corey
For x between 2 and 6, that’s the integral from 2 to x of t over 16 dt. It equals x squared minus 4, all over 32. Outside the interval, F of x is zero for x less than 2 and one for x greater than 6.

Michael
The endpoint checks confirm the formula: at x equals 2, it gives zero, and at x equals 6, it gives one. To find the probability that X is between 2 and 3, subtract the CDF values: F of 3 minus F of 2 equals 5 over 32, or 0.15625.

Corey
For a continuous random variable, the mean is the integral of x times its density over the interval where the density is positive. Here that’s the integral from 2 to 6 of x squared over 16 dx.

Michael
Evaluating gives x cubed over 48 from 2 to 6: 208 over 48, which simplifies to 13 over 3, or about 4.33. The mean sits a little to the right of four, consistent with the density being larger at larger x values.

Corey
That takes us through the main tools in these problems: partitioning events with a Venn diagram, counting with combinations, recognizing binomial and geometric trials, applying Bayes’ theorem, and working with discrete and continuous distributions.

Michael
And when you’re unsure where to start, define the event or random variable clearly, identify what information is given, and ask what structure fits. Then the diagram, counting method, probability rule, or distribution can guide the calculation.

Ask anything
We've read this whole study set, so questions about it get the best answers.