Counting techniques
Until now, in small experiments (one die, one coin) counting the possible outcomes was immediate. But what if the experiment is generating a $6$-character password, choosing a committee of $3$ people from $20$, or picking $6$ numbers from $47$ in a Lotto-style game? Counting one by one is not feasible: we need counting techniques. You will mainly use them to calculate the numerator and the denominator of a probability with equally likely outcomes. At the end of the page you will also meet the other probability tools used in Leaving Cert problems: Venn diagrams, conditional probability, the binomial distribution and the normal distribution.
The fundamental counting principle
Tip: if one position has a restriction (for example, the first digit cannot be $0$), count that position first and then the others.
To improve the security of a mobile app, a developer decides to create access codes consisting of an uppercase letter (from the standard 26-letter alphabet) followed by…
To improve the security of a mobile app, a developer decides to create access codes consisting of an uppercase letter (from the standard 26-letter alphabet) followed by three digits (from 0 to 9).
-
How many different codes can be created if digits can be repeated?
-
How many different codes would there be if the three digits must be distinct from one another?
-
If a code with repeatable digits is generated at random, what is the probability that the letter is a 'Z'?
A vehicle registration system assigns to each car a code consisting of 4 digits (from 0000 to 9999) followed by a block of 3 consonant letters from the alphabet, having…
A vehicle registration system assigns to each car a code consisting of 4 digits (from 0000 to 9999) followed by a block of 3 consonant letters from the alphabet, having excluded the 5 vowels (A, E, I, O, U) to avoid acronyms and offensive words, as well as the letters Ñ and Q due to possible visual confusion. In this way, a set of 20 allowable consonants is available.
- a) Model the assignment of license plates and calculate how many different vehicles can be registered in total. Justify the counting techniques applied to each block of the license plate.
- b) A traffic control camera records an offender's license plate, but the image is partially blurry: the officer verifies that the numerical block is a four-digit palindrome with different first and second digits (for example, 7337), and that the three letters are all distinct and appear in strict ascending alphabetical order (for example, CFX). How many license plates in the system's theoretical vehicle fleet satisfy this pattern?
- c) If a vehicle is chosen at random from among all possible ones in the system, determine the probability that its license plate contains no repeated digit and also contains no repeated consonant. Express the result as an irreducible fraction and to four decimal places.
Arrangements: choosing and ordering
When $r$ elements are chosen from a total of $n$ without repetition and the order matters ($AB$ is not the same as $BA$), they are called arrangements (${}^nP_r$).
To improve the security of an esports platform, users are required to create a 6-character password. The first two characters must be uppercase letters of a 27-letter…
To improve the security of an esports platform, users are required to create a 6-character password. The first two characters must be uppercase letters of a 27-letter alphabet and the remaining four must be digits from $0$ to $9$.
Calculate how many different passwords can be generated if:
- a) Repetitions of letters and numbers are allowed.
- b) Repeating letters is not allowed, but repeating numbers is allowed.
- c) The letters must be distinct and the numbers must form a strictly increasing sequence (for example: $1258$, but neither $1225$ nor $4321$).
Permutations: arranging all the elements
Permutations are the particular case of arrangements in which all the available elements are arranged ($r=n$).
A cybersecurity company generates access keys by permuting the characters of the word BLOCKCHAIN. One of these keys is chosen at random. a) Calculate the probability…
A cybersecurity company generates access keys by permuting the characters of the word BLOCKCHAIN. One of these keys is chosen at random.
- a) Calculate the probability that the chosen key starts and ends with a vowel.
- b) Determine the probability that all the vowels appear together in the key.
- c) Given that the key starts with B, what is the probability that the second letter is an L?
Combinations: choosing when order does not matter
When $r$ elements are chosen from $n$ and the order does not matter (choosing $\{A,B\}$ is the same as choosing $\{B,A\}$), they are called combinations.
An engineering class has to choose a committee of 3 representatives. If there are 20 students in the class, calculate: In how many ways can the committee be chosen if…
An engineering class has to choose a committee of 3 representatives. If there are 20 students in the class, calculate:
-
In how many ways can the committee be chosen if the three roles (class representative, deputy representative, and secretary) are distinct?
-
In how many ways can it be chosen if the three representatives have equal rank and order does not matter?
-
If there are 12 men and 8 women, what is the probability that the committee (without distinct roles) consists entirely of women? (Express the fraction using combinations).
In a secondary school, the Student Council for 6th Year (Leaving Certificate) consists of 10 students: 6 girls and 4 boys. To form a coexistence committee, a group of 3…
In a secondary school, the Student Council for 6th Year (Leaving Certificate) consists of 10 students: 6 girls and 4 boys. To form a coexistence committee, a group of 3 delegates must be chosen by lottery.
Cian wants to calculate the probability that the committee consists of exactly 2 girls and 1 boy, and reasons as follows:
"For the first girl there are 6 options, for the second there are 5 options, and for the boy there are 4 options. Therefore, the favorable outcomes are $6 \times 5 \times 4 = 120$. Since the possible outcomes of choosing 3 people in order out of 10 are $10 \times 9 \times 8 = 720$, the required probability is $\frac{120}{720} = \frac{1}{6}$".
- a) Accurately identify Cian's conceptual error when calculating the favorable outcomes and explain why his approach distorts the calculation of the sample space.
- b) Solve the problem correctly using combinations $\binom{n}{r}$ by Laplace's rule and compare your result with the one obtained by Cian.
A rural health centre in County Galway has a staff of 11 emergency professionals, including family doctors and nursing staff. To organize the weekend night shift, a duty…
A rural health centre in County Galway has a staff of 11 emergency professionals, including family doctors and nursing staff. To organize the weekend night shift, a duty team of 3 professionals is randomly selected from the total of 11.
It is known with certainty that the probability that the duty team consists of 2 doctors and 1 nurse is exactly twice the probability that it consists of 1 doctor and 2 nurses.
- a) If we denote by $m$ the number of doctors on staff (with $2 \le m \le 9$), write the combinatorial equation that models the given condition using Laplace's rule.
- b) Solve this equation algebraically to find the exact composition of the staff (how many doctors and how many nurses there are at the center).
- c) With the staff now determined, calculate the probability that the night shift is composed exclusively of professionals from the same healthcare group.
Counting to calculate probabilities
The ultimate aim of these techniques, in this unit, is to calculate probabilities of equally likely outcomes when the favourable or possible outcomes are too many to list by hand.
When the condition is 'at least $2$ of each kind' there are only a few cases. Count each case as a product of selections (for example $2$ of one kind and $3$ of the other: ${}^aC_2 \cdot {}^bC_3$), then add the cases or use the complement.
An urn contains 12 glass balls for an optics experiment: 5 are blue, 4 are red, and 3 are yellow. If we draw a ball at random, calculate the following probabilities…
An urn contains 12 glass balls for an optics experiment: 5 are blue, 4 are red, and 3 are yellow. If we draw a ball at random, calculate the following probabilities using Laplace's rule:
-
That the ball is red or yellow.
-
That the ball is not blue.
-
That the ball is white.
In a group of 15 students in 6th Year taking Leaving Certificate Higher Level Mathematics, there are three inseparable friends: Aoife, Seán, and Niamh. The department…
In a group of 15 students in 6th Year taking Leaving Certificate Higher Level Mathematics, there are three inseparable friends: Aoife, Seán, and Niamh. The department will randomly select a team of 4 students to represent the school in the Irish Mathematical Olympiad at the local university.
- a) Before carrying out any mathematical calculations, make a qualitative and intuitive estimate: do you think the probability that at least two of the three friends are together in the 4-person team is greater than $50\,\%$, around $15\,\%-20\,\%$, or is it a very unlikely event (less than $5\,\%$)? Briefly justify the intuition on which you rely.
- b) Model the problem using combinatorial techniques and calculate the exact value of this probability as an irreducible fraction and as a percentage.
- c) Compare the obtained value with your initial estimate and argue why human intuition about group coincidences often fails in this type of draw.
To form an examination board for teaching civil service examinations in a county council, the administration calls 5 board members by strict lottery from a closed list…
To form an examination board for teaching civil service examinations in a county council, the administration calls 5 board members by strict lottery from a closed list of 30 qualified applicants, consisting of 18 women and 12 men. Public service regulations require the principle of balanced representation: the board cannot have more than $60\,\%$ of members of the same sex (that is, the board must have at least 2 women and at least 2 men).
- a) Model the selection of the board using combinations and calculate the probability that a board drawn at random directly complies with the balanced representation regulations.
- b) Suppose that the list of 30 people includes two specific teachers (a man and a woman) who are first-degree relatives, so administrative law prohibits both from being on the same board. If the administration rules out in advance through the draw the possibility of both coinciding, restricting the sample space solely to boards where the two relatives do not coincide, determine whether the probability that the board meets parity increases or decreases compared to that obtained in section a). Quantitatively justify your conclusion.
- c) As an alternative, it is proposed to modify the draw procedure: instead of a single draw of 5 people from the 30 candidates, use two separate ballot boxes (one for women and one for men) and randomly draw 3 women and 2 men with probability $0.5$, or 2 women and 3 men with probability $0.5$. Mathematically justify whether this new mechanism maintains or alters the individual probability of each teacher being selected compared to the original equiprobable draw.
Venn diagrams, addition rule and independence
Counting also helps when the data come as groups that overlap. A Venn diagram keeps track of the overlap.
To test independence, compare $P(A \cap B)$ with $P(A) \cdot P(B)$. For example, if $P(A) = 0.5$, $P(B) = 0.4$ and $P(A' \cup B') = 0.8$, then $P(A \cap B) = 1 - 0.8 = 0.2 = 0.5 \times 0.4$, so $A$ and $B$ are independent.
In an electronic sports (eSports) club, the specialization of its 100 members is analyzed. It is known that 65 of them regularly play League of Legends* (event $L$), 40…
In an electronic sports (eSports) club, the specialization of its 100 members is analyzed. It is known that 65 of them regularly play League of Legends (event $L$), 40 play Valorant (event $V$) and 15 play both video games.
Calculate the probability that, when a member is chosen at random:
- a) They play at least one of the two video games ($L \cup V$).
- b) They play neither of the two.
- c) They play only League of Legends.
Illustrate the situation with a Venn diagram. Here is the starting outline, which you must complete with the number of members in each region:
A student has two exams on the same day: Mathematics and English. Based on their past marks, they estimate that the probability of passing Mathematics ($M$) is $0.7$,…
A student has two exams on the same day: Mathematics and English. Based on their past marks, they estimate that the probability of passing Mathematics ($M$) is $0.7$, passing English ($I$) is $0.8$, and passing both is $0.6$.
-
Are the events "Passing Mathematics" and "Passing English" independent? Justify your answer mathematically.
-
Calculate the probability that the student passes at least one of the two exams.
In a performance study of a new graphics processor, the events $A$: "the processor exceeds $100$ FPS on ultra settings" and $B$: "the processor maintains a temperature…
In a performance study of a new graphics processor, the events $A$: "the processor exceeds $100$ FPS on ultra settings" and $B$: "the processor maintains a temperature below $70^\circ$C" are defined. The following probabilities are known:
$P(A) = 0.65$
$P(B) = 0.50$
$P(A^c \cup B^c) = 0.70$
Find, with reasoning:
- a) The probability that both events occur simultaneously.
- b) The probability that only event $A$ occurs.
- c) Are the events $A$ and $B$ independent? Justify your answer.
Conditional probability and tree diagrams
Sometimes the second stage depends on the first (a card drawn and not replaced, or a test that is more likely to fail on one machine). Then you need conditional probability.
Without replacement, the second stage changes: from a box with $5$ red and $3$ blue counters, $P(\text{both red}) = \dfrac{5}{8} \cdot \dfrac{4}{7} = \dfrac{5}{14}$. If one stage moves an item to another container (as in a transfer between two urns), draw a separate branch for each case and update the contents before the second draw. If an unknown probability appears, write the total probability equation and solve it. For two components in parallel, the device fails only if both fail: $P(\text{fails}) = P(C_1 \cap C_2) = P(C_1) \cdot P(C_2 \mid C_1)$.
In a robotics laboratory, 8 proximity sensors in perfect working order and 2 defective sensors have been mixed together in a box. A student draws two sensors…
In a robotics laboratory, 8 proximity sensors in perfect working order and 2 defective sensors have been mixed together in a box. A student draws two sensors consecutively and without replacement (without returning the first one to the box).
Calculate the probability that:
-
Both sensors work correctly.
-
The first is defective and the second is in good working order.
A survey was conducted among the 60 2nd Baccalaureate students at a technological secondary school regarding their use of social media to keep up with science news. The…
A survey was conducted among the 60 2nd Baccalaureate students at a technological secondary school regarding their use of social media to keep up with science news. The results are shown in the following contingency table:
| Use X (Twitter) | Use Instagram | Total | |
|---|---|---|---|
| Male students | 18 | 12 | 30 |
| Female students | 10 | 20 | 30 |
| Total | 28 | 32 | 60 |
If we select a student at random, calculate the probability that:
-
The student is female.
-
They use Instagram to stay informed.
-
Given that the student is male, they prefer to stay informed via the social network X.
In a hospital laboratory, two automatic analyzers, $A$ and $B$, process blood samples. Analyzer $A$ processes $60 \%$ of the samples and $B$ processes the remaining…
In a hospital laboratory, two automatic analyzers, $A$ and $B$, process blood samples. Analyzer $A$ processes $60 \%$ of the samples and $B$ processes the remaining $40 \%$. It is known that $2 \%$ of the samples from analyzer $A$ must be repeated due to a reading error, while for $B$ that percentage is $5 \%$.
Draw the corresponding tree diagram and calculate the probability that a randomly chosen sample must be repeated.
You can do it on paper and send a photo with your answer.
Repeated trials: the binomial distribution
A Bernoulli trial has two outcomes, success (probability $p$) and failure ($q = 1 - p$). Repeating it $n$ times independently gives a binomial distribution.
A telecommunications engineer estimates that the probability of a data packet being lost during a wireless transmission under interference conditions is $0.15$. A burst…
A telecommunications engineer estimates that the probability of a data packet being lost during a wireless transmission under interference conditions is $0.15$. A burst of $10$ packets is sent independently.
- a) What is the probability that exactly $3$ packets are lost?
- b) Calculate the probability that at least $2$ packets are lost.
- c) What is the expected number of lost packets and their standard deviation?
The normal distribution
Many measurements (times, heights, marks) have a bell-shaped distribution, symmetric about the mean $\mu$ with spread $\sigma$.
To find $\mu$ and $\sigma$ from two percentages, turn each percentage into a $z$ value with the tables, write $x = \mu + z\sigma$ twice and solve the two equations together.
The compilation time of a complex engineering project follows a normal distribution with a mean of $120$ seconds and a standard deviation of $15$ seconds. a) Calculate…
The compilation time of a complex engineering project follows a normal distribution with a mean of $120$ seconds and a standard deviation of $15$ seconds.
- a) Calculate the probability that the project compiles in under $100$ seconds.
- b) Calculate the probability that the compilation time is between $110$ and $140$ seconds.
- c) What compilation time is exceeded by only $5\%$ of the slowest processes?
A social network detects that $10\%$ of created accounts are "bots". If $400$ new accounts are registered in one hour: a) Explain why the number of bots can be…
A social network detects that $10\%$ of created accounts are "bots". If $400$ new accounts are registered in one hour:
- a) Explain why the number of bots can be approximated using a normal distribution.
- b) Using the normal approximation with continuity correction, calculate the probability that there are between $35$ and $50$ bots (inclusive).
- c) Calculate the probability that the number of bots is greater than $45$.
The response time of an industrial sensor follows a normal distribution $N(\mu, \sigma)$. It is known that $15.87\%$ of response times take more than $82$ milliseconds,…
The response time of an industrial sensor follows a normal distribution $N(\mu, \sigma)$. It is known that $15.87\%$ of response times take more than $82$ milliseconds, and that only $2.28\%$ of response times are faster than $58$ milliseconds.
- a) Calculate the parameters $\mu$ and $\sigma$ of the response time.
- b) If the manufacturer guarantees that the sensor responds in less than $85$ ms, what percentage of sensors will not satisfy the guarantee?
Continuous random variables
For a continuous variable, probabilities are areas under a probability density function $f(x)$.
A laser aiming system for eye surgery has a deviation error $X$, measured in micrometres, which follows a probability density function given by: $$f(x) = \begin{cases}…
A laser aiming system for eye surgery has a deviation error $X$, measured in micrometres, which follows a probability density function given by:
$$f(x) = \begin{cases} k(4x - x^3) & \text{if } 0 \le x \le 2 \\ 0 & \text{otherwise} \end{cases}$$- a) Determine the value of the constant $k$ so that $f(x)$ is a valid probability density function.
- b) Calculate the probability that the deviation is greater than 1 micrometre.
- c) Obtain the expected value of the deviation. What does this value mean in the context of the surgery?
Back to the start: if the $6$-character password uses lower-case letters and digits ($26 + 10 = 36$ options), there are $36^6 = 2{,}176{,}782{,}336$ possible passwords; for the committee of $3$ from $20$, the order does not matter and there are ${}^{20}C_3 = 1{,}140$ different groups; and in the Lotto-style game there are ${}^{47}C_6 = 10{,}737{,}573$ different picks, so your chance of one particular pick is about $1$ in $10.7$ million.