Basic Probability Concepts
Diego has a 4-digit PIN on his cell phone. If someone tries to guess it at random, how likely is it that they get it right on the first try? To answer precisely, we need to fix a language: what an event is, how events are combined, and how to count the possible cases. At the end of the page we come back to Diego's PIN.
Random experiment, sample space, and events
If the experiment has several stages, the sample space is built from the branches of a tree.
An $8$-sided die in the shape of a regular octahedron, numbered from $1$ to $8$, is rolled. Write down the sample space $E$ associated with this random experiment and…
An $8$-sided die in the shape of a regular octahedron, numbered from $1$ to $8$, is rolled. Write down the sample space $E$ associated with this random experiment and determine the outcomes that make up the following events:
-
$A =$ "Obtaining a prime number".
-
$B =$ "Obtaining a number greater than $5$".
-
$C = A \cap B$.
$3$ fair coins are tossed simultaneously. Write down the complete sample space $E$ using the notation $C$ for heads and $X$ for tails. Next, calculate the probability of…
$3$ fair coins are tossed simultaneously. Write down the complete sample space $E$ using the notation $C$ for heads and $X$ for tails. Next, calculate the probability of getting exactly two heads.
The following game of chance structured in two phases is designed: in the first phase, a card is drawn from a $40$-card Spanish deck. If the drawn card is a picture card…
The following game of chance structured in two phases is designed: in the first phase, a card is drawn from a $40$-card Spanish deck. If the drawn card is a picture card (jack, knight, or king), in the second phase a $6$-sided cubic die is rolled. If the card is not a picture card, in the second phase a coin is tossed ($C$ or $X$).
Calculate the total number of possible outcomes that form the sample space of this compound experiment. If all elementary outcomes of each phase are equally likely in their respective subspace, is the final compound sample space equally likely? Justify your answer.
Laplace's rule
If all the outcomes in $E$ are equiprobable (equally likely), the probability of an event is the proportion of cases that favor it.
Some exercises use a 40-card deck: $4$ suits (oros, copas, espadas, and bastos) with $10$ cards each (from $1$ to $7$, plus sota, caballo, and rey). The face cards are sota, caballo, and rey: $12$ cards.
In the quality control department of an electronic components factory, a component is drawn at random from a test batch. The batch contains $5$ defective red components,…
In the quality control department of an electronic components factory, a component is drawn at random from a test batch. The batch contains $5$ defective red components, $3$ working blue components and $2$ working yellow components.
Using Laplace's rule, calculate the probability of:
- a) Drawing a blue component.
- b) Drawing a working (non-defective) component.
- c) Drawing a component that is not yellow.
Operations with events: union, intersection, complement, and difference
Events are sets, so they are combined like sets.
| Operation | Notation | Meaning |
|---|---|---|
| Union | $A \cup B$ | $A$ occurs, or $B$, or both |
| Intersection | $A \cap B$ | $A$ and $B$ occur at the same time |
| Complement | $\overline{A}$ | $A$ does not occur (it is $E - A$) |
| Difference | $A - B$ | $A$ occurs but not $B$ (it is $A \cap \overline{B}$) |
Let $A$ and $B$ be two events in the same random experiment. The following probabilities are known: $P(A) = 0.5$, $P(B) = 0.4$ and the probability that both occur…
Let $A$ and $B$ be two events in the same random experiment. The following probabilities are known: $P(A) = 0.5$, $P(B) = 0.4$ and the probability that both occur simultaneously is $P(A \cap B) = 0.15$.
Calculate the probability that at least one of the two events occurs, that is, $P(A \cup B)$, and the probability that $A$ does not occur, denoted as $P(\overline{A})$.
A card is drawn at random from a $40$-card Spanish deck. Define the events $A =$ "Drawing a King" and $B =$ "Drawing a Sword card". Determine the probabilities $P(A)$,…
A card is drawn at random from a $40$-card Spanish deck. Define the events $A =$ "Drawing a King" and $B =$ "Drawing a Sword card".
Determine the probabilities $P(A)$, $P(B)$, and $P(A \cap B)$. From them, calculate the probability of drawing a King or a Sword card.
In a technology college with $150$ students, a survey was carried out on the use of programming languages. The results show that $85$ students program in Python ($P$),…
In a technology college with $150$ students, a survey was carried out on the use of programming languages. The results show that $85$ students program in Python ($P$), $60$ program in Java ($J$) and $25$ program in both languages.
If a student is selected at random from this college, find the following probabilities:
- a) That they program in at least one of the two languages.
- b) That they do not program in either of these two languages.
- c) That they program in Python, but not in Java.
In a veterinary clinic, $55\%$ of the dogs treated are vaccinated against rabies ($R$), $40\%$ are vaccinated against parvovirus ($P$) and $25\%$ are vaccinated against…
In a veterinary clinic, $55\%$ of the dogs treated are vaccinated against rabies ($R$), $40\%$ are vaccinated against parvovirus ($P$) and $25\%$ are vaccinated against both diseases. A dog's record is chosen at random. Calculate the probability that it:
- a) Is vaccinated against rabies but not against parvovirus, that is, $P(R - P)$.
- b) Is vaccinated against exactly one of the two diseases.
De Morgan's laws
Negating a union or an intersection follows a fixed rule. It is the same logic as NOT, AND, and OR in programming and in circuits.
In a meteorological study, the probability that it rains on Saturday is $P(S)$ and that it rains on Sunday is $P(D)$. Knowing that the probability that it rains on at…
In a meteorological study, the probability that it rains on Saturday is $P(S)$ and that it rains on Sunday is $P(D)$. Knowing that the probability that it rains on at least one of the two days of the weekend is $P(S \cup D) = 0.85$, use De Morgan's laws or the properties of the complementary event to calculate the probability that it does not rain on either day of the weekend, that is, $P(\overline{S} \cap \overline{D})$.
On an electric motor assembly line, it is known that the probability that a motor has a mechanical defect is $P(M) = 0.06$, the probability that it has an electrical…
On an electric motor assembly line, it is known that the probability that a motor has a mechanical defect is $P(M) = 0.06$, the probability that it has an electrical defect is $P(E) = 0.04$, and the probability that it has both defects simultaneously is $P(M \cap E) = 0.01$. Calculate the probability that a randomly chosen motor:
- a) Has at least one defect.
- b) Has no defects at all.
- c) Has a mechanical defect given that it has no electrical defect, that is, $P(M \mid \overline{E})$ (you can use the fact that $P(M \cap \overline{E}) = P(M) - P(M \cap E)$).
Mutually exclusive events
The random experiment of rolling a fair cubic die numbered from $1$ to $6$ is performed. Consider the events $A =$ "Obtaining an even number" and $B =$ "Obtaining a…
The random experiment of rolling a fair cubic die numbered from $1$ to $6$ is performed. Consider the events $A =$ "Obtaining an even number" and $B =$ "Obtaining a prime number greater than $2$".
Write down the outcomes of each event and determine, justifying your answer, whether events $A$ and $B$ are compatible or incompatible.
Two fair cubic dice are rolled, one red and one blue. The score on the top face of each is recorded. Calculate the probability of the event $A =$ "The sum of the scores…
Two fair cubic dice are rolled, one red and one blue. The score on the top face of each is recorded. Calculate the probability of the event $A =$ "The sum of the scores is exactly $8$" or the event $B =$ "The absolute value of the difference between the scores is exactly $2$" occurring. Are $A$ and $B$ mutually exclusive events?
In an environmental toxicology study in a river, three pollutants are monitored. Let $A$, $B$ and $C$ be the events of finding dangerous levels of the respective…
In an environmental toxicology study in a river, three pollutants are monitored. Let $A$, $B$ and $C$ be the events of finding dangerous levels of the respective pollutant. It is known that $P(A) = \frac{1}{2}$, $P(B) = \frac{1}{3}$ and $P(C) = \frac{1}{4}$.
Furthermore, it is known that pollutants $A$ and $B$ never appear together in dangerous levels (they are mutually exclusive events), and that whenever pollutant $C$ is detected, pollutant $B$ is also detected (that is, $C$ is a subset of $B$, $C \subset B$).
Calculate the probability of finding neither pollutant $A$ nor pollutant $B$, that is, $P(\overline{A} \cap \overline{B})$, and the probability of finding at least one of the three pollutants, $P(A \cup B \cup C)$.
The union of three events
With three events, adding $P(A)+P(B)+P(C)$ overcounts the regions where they overlap. A correction is needed.
On a digital entertainment platform with $500$ subscribers, preferences for three genres are analysed: Action ($A$), Comedy ($C$) and Drama ($D$). The data reveal that:…
On a digital entertainment platform with $500$ subscribers, preferences for three genres are analysed: Action ($A$), Comedy ($C$) and Drama ($D$). The data reveal that:
-
$220$ watch Action, $180$ watch Comedy, $150$ watch Drama.
-
$70$ watch Action and Comedy, $50$ watch Action and Drama, $40$ watch Comedy and Drama.
-
$15$ watch all three genres.
If a subscriber is chosen at random, find the probability that they:
- a) Watch Action movies exclusively.
- b) Watch exactly one of the three genres.
- c) Watch none of these three genres.
Counting techniques for favorable and possible cases
With Laplace's rule, the problem is usually counting. Three tools are enough here.
When an unknown is in the count, the problem leads to an equation.
A computer engineering student is configuring a new server. They can choose between $3$ processor models, $4$ different RAM capacities and $2$ types of hard drive (SSD…
A computer engineering student is configuring a new server. They can choose between $3$ processor models, $4$ different RAM capacities and $2$ types of hard drive (SSD or NVMe). Applying the multiplication principle, how many different server configurations can they create by choosing exactly one component of each type? If they choose a configuration at random, what is the probability that it has an NVMe drive?
To access a secure database, an employee must generate a $4$-digit numeric PIN code (from $0$ to $9$). The system allows digits to be repeated. Calculate the probability…
To access a secure database, an employee must generate a $4$-digit numeric PIN code (from $0$ to $9$). The system allows digits to be repeated. Calculate the probability that a completely randomly generated PIN satisfies the following condition: the first digit is a $7$ and the last digit is even (considering $0$ as even).
A research team consists of $12$ specialists: $7$ biologists and $5$ chemists. A representative committee of $3$ people must be selected at random to attend an…
A research team consists of $12$ specialists: $7$ biologists and $5$ chemists. A representative committee of $3$ people must be selected at random to attend an international conference. Using combinatorial techniques (combinations), calculate the probability that the committee consists exclusively of biologists.
An opaque urn contains $4$ white balls and $6$ black balls. $2$ balls are to be drawn consecutively. a) Calculate the probability that both balls are white if the…
An opaque urn contains $4$ white balls and $6$ black balls. $2$ balls are to be drawn consecutively.
- a) Calculate the probability that both balls are white if the drawing is done with replacement (the first ball is returned to the urn before drawing the second).
- b) Calculate the probability that both balls are white if the drawing is done without replacement.
A database server generates temporary security keys of $6$ characters. Each character is chosen at random from a set consisting of the $26$ letters of the alphabet and…
A database server generates temporary security keys of $6$ characters. Each character is chosen at random from a set consisting of the $26$ letters of the alphabet and the $10$ numerical digits, without allowing any character to be repeated in the same key.
Using combinatorial concepts (permutations and combinations), determine the probability that a randomly generated key contains exactly $2$ letters and $4$ digits, regardless of the order in which they appear.
A robotics components box contains $n$ green LEDs and $5$ red LEDs. Two LEDs are drawn at random from the box without replacement. If it is known that the probability…
A robotics components box contains $n$ green LEDs and $5$ red LEDs. Two LEDs are drawn at random from the box without replacement. If it is known that the probability that both drawn LEDs are green is exactly $\frac{1}{6}$, set up a quadratic equation in terms of $n$ and solve it to determine how many green LEDs were initially in the box.
Other models: geometric, non-equiprobable, and independence
Geometric probability
When the outcome is a point chosen at random in a region, the probability is a proportion of areas (or lengths).
$$P(A)=\frac{\text{favorable area}}{\text{total area}}$$Non-equiprobable outcomes
If $P(x)$ is not the same for all outcomes, Laplace's rule does not work. We use the fact that the sum of all the probabilities in $E$ equals $1$.
Independent events and series and parallel systems
Two events are independent if one does not influence the other, and then $P(X\cap Y)=P(X)\cdot P(Y)$. This is useful for studying the reliability of systems.
Symmetric difference
$A\triangle B$ is "$A$ or $B$, but not both". Since $A\cap B\subseteq A\cup B$, removing the intersection from the union leaves exactly that region:
$$A\triangle B=(A\cup B)-(A\cap B)\ \Rightarrow\ P(A\triangle B)=P(A\cup B)-P(A\cap B)$$With $P(A)=0.5$, $P(B)=0.4$, and $P(A\cap B)=0.15$: $P(A\cup B)=0.75$ and $P(A\triangle B)=0.75-0.15=0.6$.
A biased cubic die has been manufactured such that the probability of each face landing face up is directly proportional to the number on that face. That is,…
A biased cubic die has been manufactured such that the probability of each face landing face up is directly proportional to the number on that face. That is, $P(x) = k \times x$ for $x \in \{1, 2, 3, 4, 5, 6\}$, where $k$ is a real constant.
- a) Calculate the exact value of the constant $k$ knowing that the sum of the probabilities of the sample space must be $1$.
- b) Calculate the probability of obtaining a prime number when rolling this biased die.
A telecommunications antenna has a perfect circular coverage radius of $10\text{ km}$. The antenna is located exactly at the center of a square region with a side length…
A telecommunications antenna has a perfect circular coverage radius of $10\text{ km}$. The antenna is located exactly at the center of a square region with a side length of $20\text{ km}$ (so that the coverage circle is inscribed in the square).
If a signal from a mobile device is detected at a random point within the square region (following a uniform distribution), what is the probability that the device is inside the antenna's coverage area? Express the exact result in terms of $\pi$ and its approximation to two decimal places.
In an aerospace control system, three sensors $A$, $B$ and $C$ are arranged such that sensor $A$ is in series with a block formed by sensors $B$ and $C$ in parallel. The…
In an aerospace control system, three sensors $A$, $B$ and $C$ are arranged such that sensor $A$ is in series with a block formed by sensors $B$ and $C$ in parallel. The system works if the signal can pass through it from left to right.
The individual failure probabilities of each sensor are $P(F_A) = 0.1$, $P(F_B) = 0.2$ and $P(F_C) = 0.2$. Knowing that failures occur independently (that is, the probability of intersection is the product of probabilities: $P(X \cap Y) = P(X) \times P(Y)$), calculate the probability that the overall system functions correctly. (Note: the system functions if $A$ functions and, in addition, $B$ functions or $C$ functions).
The symmetric difference of two events $A$ and $B$, denoted as $A \triangle B$, is defined as the event that $A$ or $B$ occurs, but not both simultaneously.…
The symmetric difference of two events $A$ and $B$, denoted as $A \triangle B$, is defined as the event that $A$ or $B$ occurs, but not both simultaneously. Algebraically, $A \triangle B = (A \cap \overline{B}) \cup (\overline{A} \cap B)$.
Prove the relation $P(A \triangle B) = P(A \cup B) - P(A \cap B)$. Next, knowing that $P(A \cup B) = 0.85$, $P(\overline{A}) = 0.3$ and $P(B) = 0.6$, calculate the numerical value of $P(A \triangle B)$.