Probability and Statistics Practice
Probability and Statistics: A Guided Lesson
Probability problems become easier when the situation is matched to the right idea. A diagram can clarify how events overlap, combinations can count groups, and probability distributions can describe repeated trials or waiting times. This lesson develops those tools step by step and shows how they connect.
Events, Complements, and Venn Diagrams
An event is a set of outcomes in a sample space. For events A and B:
- A∪B means that A occurs, or B occurs, or both occur.
- A∩B means that both A and B occur.
- Ac means that A does not occur.
A Venn diagram is useful when a problem gives information about several related events. The rectangle represents all possible outcomes, while overlapping circles represent events. Each separate region corresponds to a distinct combination of events, so the diagram helps prevent parts of the sample space from being counted twice.
Suppose the information is
P(A∪B)=0.6,P(Ac)=0.6,P(A∩Bc)=0.3.The goal is to find P(A∩B). Label the four regions as follows:
- A∩Bc, the part inside A but outside B, has probability 0.3.
- A∩B has probability x.
- B∩Ac has probability y.
- Ac∩Bc, the part outside both events, has probability z.
All four regions make up the sample space, so their probabilities sum to 1:
0.3+x+y+z=1,which gives
x+y+z=0.7.The union A∪B contains the first three regions, so
0.3+x+y=0.6,and therefore
x+y=0.3.The complement Ac consists of the regions outside A, namely B∩Ac and Ac∩Bc. Thus,
y+z=0.6.Since y+z=0.6 and x+y+z=0.7, subtracting gives
x=0.1.So the probability that both events occur is
P(A∩B)=0.1.The other regions can be checked for consistency: y=0.2 and z=0.4. Then all four probabilities sum to 1, as required.
A Venn diagram translates relationships among events into relationships among regions. The probability of the whole sample space is always 1, and the probabilities of disjoint regions add.
Think About It
If P(A∪B) includes the overlap A∩B, why would adding P(A) and P(B) usually count some outcomes twice?
Counting Groups: Combinations and Permutations
Counting problems often ask how many ways a selection can be made. The first decision is whether order matters.
If the selected people or objects form a group and their order is irrelevant, the problem uses a combination. The number of ways to choose r items from n is
(rn)=r!(n−r)!n!,where n! means the product of the positive integers from 1 to n.
If order matters, the problem instead uses a permutation. For example, choosing a president and a treasurer from a group is different from choosing the same two people for the opposite roles. In contrast, selecting four suppliers to invite to bid creates a group, so the order of selection does not matter.
Selecting suppliers
A contractor selects four suppliers from nine. The number of possible groups is
(49)=4!5!9!=126.Suppose one particular supplier wants to know the probability of being selected. Among the groups that include this supplier, three more suppliers must be chosen from the other eight. There are
(38)=56such groups. Assuming all groups of four are equally likely, the probability of being selected is
(49)(38)=12656=94.There is also a useful sequential way to see the same probability. The probability of not being selected in the first draw is 98. Given that the supplier has not been selected, the probability of avoiding selection in the second draw is 87. The next two conditional probabilities are 76 and 65. Therefore,
P(not selected)=98⋅87⋅76⋅65=95.Taking the complement gives
P(selected)=1−95=94.This product works because each factor is a conditional probability: the number of remaining nonselected suppliers changes after each selection.
Selecting from two categories
Suppose a group contains six soccer players and five football players. A five-person group must contain exactly three soccer players and two football players.
The choices happen in two stages:
- Choose three of the six soccer players: (36) ways.
- Choose two of the five football players: (25) ways.
The fundamental counting rule says that the number of ways to carry out both stages is the product:
(36)(25)=20⋅10=200.To find the probability that a randomly chosen group of five has this composition, the denominator must count all five-person groups from the eleven people:
(511)=462.Thus,
P(exactly 3 soccer and 2 football)=462200=231100≈0.4329.The denominator does not need to separate groups by their category composition. It simply counts every possible group of five.
Think About It
When counting a group, what detail determines whether the calculation should use a combination or a permutation?
Independent Trials and the Binomial Distribution
A binomial random variable counts the number of successes in a fixed number of trials. It applies when:
- The number of trials is fixed.
- Each trial has two outcomes of interest, called success and failure.
- The probability of success is the same on every trial.
- The trials are independent.
If X is the number of successes in n trials and each success has probability p, then
P(X=x)=(xn)px(1−p)n−x.The combination factor (xn) counts the different ways to position the x successes among the n trials. The factor px accounts for the successes, and (1−p)n−x accounts for the failures.
Example: hits in at-bats
Suppose a player gets a hit with probability 0.3 on each at-bat, and the at-bats are treated as identical and independent. In six at-bats, the probability of exactly two hits is
P(X=2)=(26)(0.3)2(0.7)4.Here, (26)=15, so
P(X=2)=15(0.09)(0.2401)=0.324135≈0.324.The expected number of hits is
E[X]=np=6(0.3)=1.8.An expected value is a long-run average, not a result that must occur in any one set of trials. The player cannot get 1.8 hits in a single game, but across many comparable sets of six at-bats, the average number of hits would tend toward 1.8.
The binomial distribution is a good fit when the problem counts successes across a fixed number of independent trials with a constant success probability.
Think About It
Why does the binomial formula need the factor (xn) in addition to the probabilities of success and failure?
Conditional Probability and Bayes’s Theorem
A conditional probability describes the chance of one event when another event is already known to have occurred. The definition is
P(A∣B)=P(B)P(A∩B),provided P(B)>0.
This distinction matters in diagnostic testing. The probability that a test is positive when a person has a disease is not the same as the probability that a person has the disease when the test is positive. Those probabilities condition on different information.
Example: interpreting a positive test
Suppose:
- The probability that a person has a virus is P(V)=0.012.
- The test is positive for 98% of people who have the virus: P(+∣V)=0.98.
- The test is negative for 99% of people who do not have the virus, so P(+∣Vc)=0.01.
The probability of a positive result among people who have the virus is
P(V∩+)=P(V)P(+∣V)=0.012(0.98)=0.01176.The probability of a positive result among people who do not have the virus is
P(Vc∩+)=P(Vc)P(+∣Vc)=0.988(0.01)=0.00988.A positive result can happen through either of these two disjoint routes: the person has the virus and tests positive, or the person does not have the virus and tests positive. Therefore,
P(+)=0.01176+0.00988=0.02164.The desired probability is the chance of having the virus given a positive result:
P(V∣+)=P(+)P(V∩+)=0.021640.01176≈0.5434.Thus, in this example, a positive result corresponds to about a 54.34% chance of having the virus. The result is not 98% because 98% describes the test’s positive rate among people known to have the virus, not the probability of infection among those who test positive.
Bayes’s theorem expresses this relationship generally:
P(A∣B)=P(B)P(A)P(B∣A).When B can occur through several mutually exclusive routes, its probability can be found by adding the probabilities of those routes. That is why the denominator in the example included both groups of people who tested positive.
Think About It
How can a very small prevalence of a condition affect the meaning of a positive test, even when the test has high sensitivity and specificity?
The Geometric Distribution: Trials Until the First Success
A geometric random variable counts the number of independent trials needed to get the first success. If the probability of success on each trial is p, then getting the first success on trial x requires x−1 failures followed by one success:
P(X=x)=(1−p)x−1p,x=1,2,3,…The exponent is x−1 because the success occurs on the final trial, after exactly x−1 failures.
Example: first bullseye
Suppose the probability of hitting a bullseye on any throw is 0.0625. The probability that the first bullseye occurs on the tenth throw is
P(X=10)=(1−0.0625)9(0.0625)≈0.03496.The mean, or expected number of trials until the first success, is
E[X]=p1.Since 0.0625=161, the expected wait is
E[X]=0.06251=16throws. This is a long-run average; an individual sequence might take fewer or more than sixteen throws.
The geometric distribution and the binomial distribution both involve repeated trials, but they answer different questions. The binomial distribution counts successes in a fixed number of trials. The geometric distribution counts how many trials are needed to reach the first success.
Think About It
What is the difference between asking for the number of hits in six throws and asking how many throws it takes to get the first hit?
Discrete Random Variables: PMFs, CDFs, and Means
A discrete random variable takes distinct, countable values. Its probability mass function, or PMF, assigns a probability to each possible value:
f(x)=P(X=x).Every probability in a PMF must be nonnegative, and the probabilities over all possible values must sum to 1.
Suppose a random variable takes the values 1,2,3,4 with probabilities
P(X=1)=0.22,P(X=2)=0.35,P(X=3)=0.28.The last probability must make the total equal 1:
P(X=4)=1−(0.22+0.35+0.28)=0.15.The cumulative distribution function, or CDF, is
F(x)=P(X≤x).It accumulates the PMF probabilities up to and including x. At the possible values, the CDF is
F(1)=0.22,F(2)=0.22+0.35=0.57, F(3)=0.57+0.28=0.85,F(4)=1.Expected value
The expected value is the probability-weighted average of the possible values:
E[X]=x∑xf(x).For this distribution,
E[X]=1(0.22)+2(0.35)+3(0.28)+4(0.15)=2.36.The mean does not have to be one of the values the variable can take. Here, X can be only 1, 2, 3, or 4, but its long-run average is 2.36.
Moment-generating functions
A moment-generating function packages information about the moments of a random variable into a function:
MX(t)=E[etX].For a discrete variable, this becomes
MX(t)=x∑etxf(x).For the distribution above,
MX(t)=0.22et+0.35e2t+0.28e3t+0.15e4t.Differentiating and evaluating at t=0 gives the mean:
MX′(0)=E[X].Indeed,
MX′(t)=0.22et+0.70e2t+0.84e3t+0.60e4t,so
MX′(0)=0.22+0.70+0.84+0.60=2.36.Higher derivatives at t=0 give higher moments, such as E[X2] and E[X3].
Think About It
Why does the CDF keep increasing as larger values of x are included, while the PMF assigns separate probabilities to individual values?
Variance and the Linearity of Expected Value
The variance measures how spread out a random variable is around its mean. If μ=E[X], its definition is
Var(X)=E[(X−μ)2].Expanding the square gives
Var(X)=E[X2−2μX+μ2].Expected value is linear: the expectation of a sum is the sum of the expectations, and a constant factor can be taken outside. Since μ is a constant,
Var(X)=E[X2]−2μE[X]+μ2.Because E[X]=μ,
Var(X)=E[X2]−2μ2+μ2=E[X2]−μ2.Replacing μ with E[X] gives the commonly used formula
Var(X)=E[X2]−(E[X])2.This identity follows from expanding the definition and using linearity. Independence is not required for this derivation.
Think About It
Why can the constant μ be treated as a constant when it appears inside an expectation involving X?
The Poisson Distribution: Counting Occurrences
A Poisson random variable counts how many times an event occurs in a specified interval, such as a period of time. Its parameter λ is the mean number of occurrences in that interval. Its probability mass function is
P(X=x)=e−λx!λx,x=0,1,2,…Suppose the average number of accidents over a five-year period is 3. Then λ=3. If insurance coverage is dropped after three or more accidents, the probability of being dropped is
P(X≥3).It is easier to find the complementary probability of having at most two accidents:
P(X≥3)=1−P(X≤2)=1−(P(X=0)+P(X=1)+P(X=2)).Using the Poisson formula,
P(X=0)=e−3,P(X=1)=3e−3,P(X=2)=29e−3.Therefore,
P(X≥3)=1−e−3(1+3+29)≈0.5768.The chance of having at least three accidents is therefore about 0.577.
The Poisson model is for a count of occurrences in an interval. It should be distinguished from a model of the amount of time until an occurrence.
Think About It
Why is the complement rule especially convenient when a problem asks for three or more occurrences?
The Exponential Distribution: Waiting Time Until an Occurrence
An exponential random variable describes a continuous waiting time, such as the time until the first accident. It is related to the Poisson distribution: if occurrences follow a Poisson model with rate λ per unit of time, the waiting time until the first occurrence is exponential with that rate.
For rate λ, the density is
f(w)=λe−λw,w≥0,and the probability of waiting no longer than w is
P(W≤w)=1−e−λw.The mean waiting time is
E[W]=λ1.Keeping the time units consistent
Suppose the mean is three accidents per five-year period. In units of five-year periods, the rate is λ=3. The average wait for one accident is therefore
31of a five-year period, which is 35 years.
One year is 51 of a five-year period. Thus, the probability that the first accident occurs within one year is
P(W≤51)=1−e−3(1/5)=1−e−3/5≈0.4512.The unit conversion matters: using a rate measured per five-year period requires measuring the waiting time in five-year periods too. Equivalently, the rate is 53 accidents per year, and the one-year probability is 1−e−3/5.
Poisson models count how many occurrences happen in an interval. Exponential models describe how long it takes until the first occurrence.
Think About It
If a rate is stated per five-year period, what must happen to the time value before it is substituted into the exponential formula for a one-year wait?
Continuous Random Variables: Densities, CDFs, and Means
A continuous random variable can take values throughout an interval. Its probability density function, or PDF, assigns density rather than probability to individual points. Probabilities are found by integrating the density over intervals.
For a valid density, the function must be nonnegative, and its total area must equal 1:
∫−∞∞f(x)dx=1.Suppose the density is
f(x)=16x,2≤x≤6,and f(x)=0 outside this interval. The total area is
∫2616xdx=32x226=3236−4=1,so it is a valid probability density.
The cumulative distribution function
For a continuous variable, the CDF is the accumulated area to the left of x:
F(x)=P(X≤x)=∫−∞xf(t)dt.For the density above, the CDF is
F(x)=⎩⎨⎧0,32x2−4,1,x<2,2≤x≤6,x>6.Within the interval, the integral begins at 2 because the density is zero below that point:
F(x)=∫2x16tdt=32x2−4.The endpoints provide useful checks: F(2)=0 and F(6)=1.
Probabilities from the CDF
The probability that a continuous random variable lies between a and b is the area under the density between those values. Equivalently, it is the difference between CDF values:
P(a≤X≤b)=F(b)−F(a).For the interval from 2 to 3,
P(2≤X≤3)=F(3)−F(2)=329−4−0=325≈0.15625.For a continuous variable, including or excluding a single endpoint does not change the probability, because any individual point has probability 0.
The mean of a continuous variable
For a continuous random variable, the expected value is found by integrating x times the density over the region where the density is positive:
E[X]=∫−∞∞xf(x)dx.Here,
E[X]=∫26x(16x)dx=∫2616x2dx=48x326=48216−8=313.The mean is about 4.33. It lies to the right of the midpoint of the interval because the density 16x is larger for larger values of x, giving the right side of the interval more weight.
Think About It
Why does a density value describe an area calculation rather than the probability of one exact value of a continuous variable?
Comprehensive Review
The key to solving probability problems is matching the question to the structure of the situation.
- Event relationships can be organized with Venn diagrams. Complements and unions help determine which regions must be added.
- Combinations count groups when order does not matter. If choices happen in stages, the fundamental counting rule multiplies the number of choices at each stage.
- The binomial distribution counts successes in a fixed number of independent trials. The geometric distribution counts trials until the first success.
- Conditional probability asks for a probability after some information is known. Bayes’s theorem reverses the condition, as when a positive test result is used to estimate the probability of disease.
- A discrete random variable uses a PMF to assign probabilities to individual values and a CDF to accumulate them. Its mean is a probability-weighted sum.
- Variance measures spread and can be written as E[X2]−(E[X])2.
- The Poisson distribution models counts of occurrences in an interval. The exponential distribution models waiting time until the first occurrence.
- A continuous random variable uses a density. Integrating the density gives probabilities and the CDF, while integrating xf(x) gives the mean.
The unifying idea is that probability depends on carefully defining what is being counted, what information is known, and whether the variable describes a count, a fixed sequence of trials, or a continuous measurement such as waiting time.

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