What you'll learn
- How a discrete probability distribution describes a random variable.
- How to check whether a proposed probability distribution is valid.
- How to calculate probabilities for single values, ranges and combined events.
- How to recognise and use a discrete uniform distribution.
Random variables and distributions
A random variable is a variable whose numerical value depends on the outcome of a random process. Random variables are usually written using capital letters such as XXX.
For example, if a fair coin is tossed three times, you could define XXX to be the number of heads obtained. The possible values of XXX are then 0, 1, 2 and 3.
Discrete random variable
A discrete random variable can take only separate, countable values. There are gaps between its possible values.
The notation P(X=x)P(X=x)P(X=x) means “the probability that the random variable XXX takes the value xxx”.
A probability distribution gives the probability associated with every possible value of a random variable.
Two rules for a probability distribution
For a discrete probability distribution:
- Every probability must satisfy 0≤P(X=x)≤10\le P(X=x)\le 10≤P(X=x)≤1.
- The probabilities of all possible values must add to 1:
Reading probabilities from a distribution
Suppose the distribution of XXX is given by:
- P(X=0)=0.15P(X=0)=0.15P(X=0)=0.15
- P(X=1)=0.35P(X=1)=0.35P(X=1)=0.35
- P(X=2)=0.30P(X=2)=0.30P(X=2)=0.30
- P(X=3)=0.20P(X=3)=0.20P(X=3)=0.20
You can read off the probability of a single value directly. For an event containing several possible values, add the relevant probabilities.
Calculating a probability from a distribution
For the distribution above, find P(X≥2)P(X\ge 2)P(X≥2).
- The event X≥2X\ge 2X≥2 includes the possible values 2 and 3.
- Add the probabilities belonging to these values:
- Substitute the probabilities:
Treating the values as probabilities
The possible values of XXX and their probabilities are different things. To find P(X≥2)P(X\ge 2)P(X≥2), add the probabilities associated with 2 and 3; do not add the values 2 and 3 themselves.
Finding an unknown probability
Because the probabilities in a complete distribution add to 1, you can use this fact to find a missing probability.
Finding a missing probability
A random variable YYY can take the values 1, 2, 3 and 4. Its probabilities are:
- P(Y=1)=0.18P(Y=1)=0.18P(Y=1)=0.18
- P(Y=2)=0.27P(Y=2)=0.27P(Y=2)=0.27
- P(Y=3)=kP(Y=3)=kP(Y=3)=k
- P(Y=4)=0.31P(Y=4)=0.31P(Y=4)=0.31
Find kkk.
- Form an equation using the fact that all four probabilities add to 1:
- Add the known probabilities:
- Solve for the missing probability:
- Check that kkk lies between 0 and 1. It does, so the completed distribution is valid.
Sometimes probabilities are given as algebraic expressions rather than decimals. The same total-probability rule applies.
Determining a parameter in a distribution
A random variable XXX has possible values 0, 1 and 2, with probabilities aaa, 2a2a2a and 3a3a3a respectively. Find the distribution.
- Add the probabilities and set their total equal to 1:
- Solve the resulting equation:
- Substitute a=16a=\frac{1}{6}a=61 into each expression:
- Check the total:
Keep exact values where possible
If probabilities are given as fractions or algebraic expressions, keep your calculations exact unless the question asks for a decimal. This avoids rounding errors and often makes the structure of the distribution clearer.
Combined events and complements
An event such as X<3X<3X<3 may contain several possible values. Since a discrete random variable takes one value at a time, the events X=0X=0X=0, X=1X=1X=1 and so on are mutually exclusive. Their probabilities can therefore be added.
You can also use the complement of an event. The complement is the event that the original event does not happen.
Complement rule
If AAA is an event, then:
P(A′)=1−P(A)P(A')=1-P(A)P(A′)=1−P(A)For a random variable, this gives results such as:
P(X≠x)=1−P(X=x)P(X\neq x)=1-P(X=x)P(X=x)=1−P(X=x)Using a complement
A machine produces a random number of faults per item. Let FFF be the number of faults, where:
- P(F=0)=0.72P(F=0)=0.72P(F=0)=0.72
- P(F=1)=0.19P(F=1)=0.19P(F=1)=0.19
- P(F=2)=0.07P(F=2)=0.07P(F=2)=0.07
- P(F=3)=0.02P(F=3)=0.02P(F=3)=0.02
Find the probability that an item has at least one fault.
- “At least one fault” means F≥1F\ge 1F≥1. Its complement is the simpler event F=0F=0F=0.
- Apply the complement rule:
- Substitute the given probability:
Misreading inequality signs
For a discrete variable, P(X>2)P(X>2)P(X>2) does not include X=2X=2X=2, whereas P(X≥2)P(X\ge 2)P(X≥2) does. List the included values before adding probabilities if the inequality could be misread.
The discrete uniform distribution
The word uniform means that the probabilities are equal.
Discrete uniform distribution
A discrete uniform distribution is a probability distribution in which every possible value of a discrete random variable has the same probability.
If there are nnn possible values and they are all equally likely, each value has probability:
P(X=x)=1nP(X=x)=\frac{1}{n}P(X=x)=n1for every possible value xxx.
Examples include the score on a fair six-sided die and the number selected by a fair random-number generator from a specified finite list.
Count equally likely outcomes
For a discrete uniform distribution:
P(event)=number of values satisfying the eventtotal number of possible valuesP(\text{event})= \frac{\text{number of values satisfying the event}} {\text{total number of possible values}}P(event)=total number of possible valuesnumber of values satisfying the eventThis method works because every possible value has equal probability.
Selecting a uniform integer
A random number generator selects one integer from 4 to 12 inclusive, with every integer equally likely. Let XXX be the selected integer. Find P(X>9)P(X>9)P(X>9).
- Count all possible values carefully. They are 4, 5, 6, 7, 8, 9, 10, 11 and 12, giving 9 possible values.
- The values satisfying X>9X>9X>9 are 10, 11 and 12, so there are 3 favourable values.
- Use the uniform probability model:
Counting inclusive integers
The number of integers from aaa to bbb, including both endpoints, is b−a+1b-a+1b−a+1. For example, the number of integers from 4 to 12 is 12−4+1=912-4+1=912−4+1=9.
Modelling with a uniform distribution
You should use a discrete uniform model only when there is a reasonable basis for treating all possible values as equally likely.
A fair die supports a uniform model because each face has the same chance of appearing. By contrast, the number of goals scored in a football match is not uniformly distributed: scores such as 0, 1 and 2 are generally more likely than very large scores.
Modelling a fair spinner
A fair spinner has eight equal sectors numbered 1 to 8. Let SSS be the number obtained. Find the probability that SSS is a factor of 8.
- Because the sectors are equal and the spinner is fair, SSS has a discrete uniform distribution over eight values.
- The possible factors of 8 shown on the spinner are 1, 2, 4 and 8, giving 4 favourable values.
- Divide the number of favourable values by the total number of values:
Uniform does not mean consecutive
The possible values in a discrete uniform distribution do not have to be consecutive. For example, choosing equally from 2, 5, 9 and 20 is uniform because each listed value has probability 14\frac{1}{4}41.
Checking whether a distribution is valid
A list of numbers is not automatically a probability distribution. You must check both the range of each probability and their total.
Testing a proposed distribution
A proposed distribution assigns probabilities 0.15, 0.40, 0.35 and 0.20 to four possible values. Decide whether it is valid.
- Each individual number lies between 0 and 1, so the first condition is satisfied.
- Add the probabilities:
- Since the total is greater than 1, the proposed distribution is not valid.
In the exam
- Define the event precisely and list the values of the random variable that satisfy it.
- Add the relevant probabilities, or use a complement when the excluded event is simpler.
- For a uniform distribution, count favourable values and total possible values carefully, including endpoints where appropriate.
- Check that your answer lies between 0 and 1 and that a complete distribution has total probability 1.
Check yourself
- A random variable has probabilities kkk, 2k2k2k, 2k2k2k and 3k3k3k. How would you find kkk?
- An integer is selected uniformly from 6 to 20 inclusive. What is the probability that it is a multiple of 4?
- What two conditions must every discrete probability distribution satisfy?