alt="image at the top of the page, it serves as decoration">



walking Introduction and Summary of the Session

This session provides an introduction to the fundamental concepts of probabilities, such as events, probability spaces, probability laws, and random variables. The goal of this instruction is to give students a solid understanding of the principles underlying probability calculations while helping them develop practical skills to apply these principles to real-world situations. We will also cover advanced concepts such as the laws of large numbers and the central limit theorem, which are essential for understanding the behavior of samples in surveys and research in the humanities and social sciences.

We have chosen, which is not usual, to precede the instruction on statistical inference with that on hypothesis testing, regression, and other tests related to two-way statistical tables, to give the reader an opportunity to fully understand the concepts of probability, random variables, and combinatorial analysis... which greatly contribute to making the following teachings more comprehensible.

In the second part of the instruction, we will focus on combinatorial analysis, which will help us count the possible configurations in complex situations (probabilities). We will explore basic combinatorial techniques, such as permutations, combinations, arrangements, and partitions. These techniques are particularly useful in probability theory, as they allow us to calculate the number of possible outcomes of a random experiment and thus determine the corresponding probabilities.

To infer results in quantitative analysis, we calculate the probability that a result is attributable to chance. If the probability is too high that the result is due to chance, it means that it should be viewed with caution. The risk of making an error by accepting this result is too great. One can also accept a sample result by allowing a probability of not making a mistake (Laflamme, S., & Zhou, R. M., 2014, p85).

In conclusion, this session aims not only to develop students' analytical skills in probability and combinatorics but also to raise their awareness of the importance of these tools for analyzing and understanding human and social phenomena. The knowledge gained will help you better understand the uncertainties and variabilities inherent in the phenomena studied in the humanities and social sciences, while preparing you for the use of quantitative methods in your future research.

define-location Session Objectives

This session on probabilities and statistical inference procedures aims to achieve the following objectives:

  • Introduce the reader to the vocabulary and calculations of probabilities

    This course serves as an introduction and review of the main concepts related to the vocabulary and calculation of probabilities in a finite universe. This overview, which we consider essential, is the key that will help students better grasp the logic of inference, hypothesis testing, and other topics related to bivariate analysis;

  • Understand the logic of combinatorial analysis

    To grasp the scope of bivariate analysis and statistical inference, we found it useful to include a brief section on combinatorial analysis, which mainly covers the concepts of arrangements, permutations, and combinations. Combinatorial analysis is fundamental to data analysis in surveys and random variables, so this course also aims to better understand random experiments and their role in statistical inference through this section;

  • Master the vocabulary of statistical inference

    This objective is to deepen knowledge in probabilities and combinatorial analysis to apply them in understanding the concepts of estimation and confidence intervals, in order to appreciate the depth of various statistical tests that will be detailed in the upcoming session;

  • Test knowledge on a specific case

    This session also aims to prepare you for using quantitative data analysis software in your research work. We will present a case study and discuss the options, constraints, and conditions that researchers face when conducting their surveys, involving work with Python and more.

concept Concepts and Themes to be Covered During the Session

This session covers the fundamentals of probabilities and combinatorial analysis, based on the following concepts: probability spaces, events, conditional probability, independence, random variables, probability laws, expected value, variance and standard deviation, law of large numbers, central limit theorem, permutations, combinations, arrangements, partitions.


1 Events in a Finite Universe

1.1. Vocabulary of Events

In this section, we will define the basic concepts of probabilities in a finite sample. Sampling and inference procedures largely rely on reasoning in terms of probabilities, which aim to model random experiments.

Definition II.3.1: Random Experiment

A random experiment is an experiment whose outcome cannot be known a priori. The result of this experiment is called an outcome, and the set of all possible outcomes is called the Universe of the random experiment, generally denoted as \(\Omega\).

Note.

The Universe is said to be finite when it contains only a finite number of outcomes (an event is a subset of the Universe). An event is realized if one of the outcomes composing it is realized.

Consequence.

From the above definition and note, the following elements can be derived:

  • The Universe is the certain event;
  • The Empty Set ∅ is an impossible event;
  • An a (which is an outcome) is called the elementary event.

1.2. Operations on Events

Definition: Let \(A\) and \(B\) be two events in a Universe \(\Omega\).

  • The set consisting of all outcomes belonging to both \(A\) and \(B\) is the event denoted by \(A \cap B\), called the intersection of events A and B. (Events \(A\) and \(B\) are said to be incompatible if \(A \cap B = \emptyset\));
  • The set consisting of all outcomes belonging to either \(A\) or \(B\) is the event denoted by \(A \cup B\), called the union (or the join) of events \(A\) and \(B\);
  • The event \(\overline{A}\), consisting of all outcomes in \(\Omega\) not belonging to \(A\), is called the complement of A.

The following figures illustrate the operations of intersection, union, and complement:

Union \(A \cup B\)
Intersection \(A \cap B\)
Complement \(\overline{A \cup B}\)

Note:
\(\overline{\Omega} = \varnothing\) and \(\overline{\varnothing} = \Omega\); more generally, we write \(\overline{\overline{A}} = A\);
\(A\) being an event: \(A \cup \overline{A} = \Omega\) and \(A \cap \overline{A} = \varnothing\) (if \(A\) is distinct from \(\varnothing\) and \(\Omega\), we say that the set \(\{A, \overline{A}\}\) is a partition of the universe).


2Probability Concepts

2.1. Probability Calculation

This section provides a brief explanation of the principles of probability calculation on a finite universe (considering \(\Omega\) as non-empty and finite).

Definition II.3.2 : Probability

The probability of an event \(A\) in a finite space \(\Omega\) is a measure of the certainty or uncertainty of the occurrence of that event. It is defined as the ratio between the number of favorable cases for event \(A\) and the total number of possible cases in the universe \(\Omega\) of the considered events:

\( \forall A \in (\Omega)~~~~ P(A) = \frac{card A}{card \Omega}.\)

More practically, in the Universe \(\Omega = \left\{\omega_{1}, \omega_{2}, \omega_{3}, \omega_{4} ................\omega_{n} \right\}\) (where \(n\) is a positive integer), Probability (also known as the probability law P) refers to the reasoning illustrated in the following table:

Outcome \(\omega\) \(\omega_{1}\) \(\omega_{2}\) \(\omega_{3}\) \(\omega_{4}\) \(...\) \(\omega_{n}\)
\(P \left\{\omega\right\} = \) \( p_{1}\) \( p_{2}\) \( p_{3}\) \( p_{4}\) \(...\) \( p_{n}\)

Note:

  • \(P (\overline{A}) = 1 - P (A)\) ;
  • \( For ~~every~~ i \in [~ 1~ ;~ n~ ] , ~ p_{i} \in [~0~ ;~ 1~ ] \) , otherwise noted as: \( 0 \leq P(A) \leq 1 \) ;
  • \(~ p_{1} ~+~ p_{2} ~+~ p_{3} ~+~ p_{4} ~+~ ... ~ + ~ p_{n} ~ = ~ 1 \) ;
  • \( P \varnothing = 0 \) ;
  • \( A \subset B \rightarrow P(A) \leq P(B) \) ;
  • \( P(A) = P(\left\{w_{1}\right\}) + P(\left\{w_{2}\right\}) + P(\left\{w_{3}\right\}) + .... + P(\left\{w_{k}\right\}) \)
    [where \(A = \left\{ w_{1}, w_{2}, w_{3}, ..., w_{n}\right\}\) is an event defined on \(\Omega\), and \(k\) is a positive integer].
Example and Explanation

Suppose we roll a six-sided die. We want to calculate the probability of getting a 3.
Number of favorable outcomes = 1 (there is only one 3 on the die)
Total number of possible outcomes = 6 (there are six faces on the die)

\( P(\text{getting a 3}) = \frac{1}{6} \approx 0.17 \) or 17%

Other Calculation Rules
Conditional Probability

The conditional probability of event A given B is the probability that A occurs given that B has occurred.

Formula:

P(A|B) = P(A ∩ B) / P(B)

Example and Explanation

Suppose we have a bag containing 3 red balls and 2 blue balls. If we draw a ball at random, the probability of drawing a red ball (A) given that the ball drawn is blue (B) is 0, as there is no intersection between the event of drawing a red ball and the event of drawing a blue ball.

Formally, this is written as:

P(A ∩ B) / P(B) = 0 / 2 = 0

Sum Rule

For two events A and B, the probability that A or B occurs is given by:

Formula:

P(A ∪ B) = P(A) + P(B) − P(A ∩ B)

Example and Explanation

Suppose we have a six-sided die. Event A is "rolling an even number" and event B is "rolling a number greater than 4". The even numbers are {2, 4, 6} and the numbers greater than 4 are {5, 6}.
The probability of A is P(A) = 3/6 = 1/2, and the probability of B is P(B) = 2/6 = 1/3. The probability of the intersection, A ∩ B, is the number {6}, so P(A ∩ B) = 1/6.

Applying the sum rule, we have:

P(A ∪ B) = P(A) + P(B) − P(A ∩ B) = 1/2 + 1/3 − 1/6 = 3/6 + 2/6 − 1/6 = 4/6 = 2/3.

Product Rule

For two independent events A and B, the probability that A and B both occur is the product of their individual probabilities.

Formula:

P(A ∩ B) = P(A) ⋅ P(B)

Example and Explanation

Suppose we roll two six-sided dice. Event A is "rolling a 3 on the first die" and event B is "rolling a 5 on the second die". The probability of A is P(A) = 1/6 and the probability of B is P(B) = 1/6.

Applying the product rule, we have:

P(A ∩ B) = P(A) ⋅ P(B) = (1/6) ⋅ (1/6) = 1/36.

Bayes' Theorem

Bayes' Theorem allows us to find the probability of an event A given another event B.

Formula:

P(A ∣ B) = P(B ∣ A) ⋅ P(A) / P(B)

Example and Explanation

Suppose a disease affects 1% of the population. A screening test for this disease has a sensitivity of 99% (the probability of testing positive if one is sick) and a specificity of 95% (the probability of testing negative if one is not sick).
If a person tests positive, the probability that they are actually sick can be calculated using Bayes' Theorem.

Let:

  • P(A) = 0.01 (probability of being sick)
  • P(B ∣ A) = 0.99 (probability of testing positive if sick)
  • P(B ∣ ¬A) = 0.05 (probability of testing positive if not sick)

P(B) can be calculated as follows:
P(B) = P(B ∣ A) ⋅ P(A) + P(B ∣ ¬A) ⋅ P(¬A)
= 0.99 ⋅ 0.01 + 0.05 ⋅ 0.99
= 0.0099 + 0.0495
= 0.0594

Applying Bayes' Theorem, we have:
P(A ∣ B) = (P(B ∣ A) ⋅ P(A)) / P(B)
= (0.99 ⋅ 0.01) / 0.0594
= 0.0099 / 0.0594
≈ 0.1667

Therefore, if a person tests positive, the probability that they are actually sick is about 16.67%.

Total Probability

The total probability is used to find the probability of an event by considering several partitions of the sample space.

Formula:

P(A) = ∑i P(A ∣ Bi) ⋅ P(Bi)

Example and Explanation

Suppose there are three factories (F1, F2, F3) producing parts. The probability that each factory produces a part is as follows:

  • P(F1) = 0.3
  • P(F2) = 0.5
  • P(F3) = 0.2

The probability that a part is defective given it came from each factory is:

  • P(D ∣ F1) = 0.01
  • P(D ∣ F2) = 0.02
  • P(D ∣ F3) = 0.03

Using the total probability formula, we have:
P(D) = P(D ∣ F1) ⋅ P(F1) + P(D ∣ F2) ⋅ P(F2) + P(D ∣ F3) ⋅ P(F3)
= 0.01 ⋅ 0.3 + 0.02 ⋅ 0.5 + 0.03 ⋅ 0.2
= 0.003 + 0.01 + 0.006
= 0.019

Therefore, the probability that a part is defective is 0.019 or 1.9%.


2.2. The Standard Normal Distribution

Probability calculations are partly based on random variables.

To calculate probabilities, we use the standard normal curve, also known as the Z curve.

The standard normal curve is a graphical representation of the standard normal distribution, where any normal random variable is transformed into a random variable \(Z\) with a mean of \(0\) and a standard deviation of \(1\). The transformation is done using the formula:

$$Z = (X - \mu) / \sigma $$

Where:

  • \(X\): the observed value
  • \(\mu\): the mean of the distribution
  • \(\sigma\): the standard deviation of the distribution
Standard Normal Curve
Figure II.3.1 The Standard Normal Distribution

The standard normal curve is essential in probability calculations because it allows the standardization of different normal distributions, thereby simplifying the calculation of associated probabilities. By using the Z curve, one can determine the probability that a random variable falls within a certain range using standard normal distribution tables.

Example

Suppose we have a random variable \(X\) that follows a normal distribution with a mean \(\mu = 100\) and a standard deviation \(\sigma = 15\). We want to calculate the probability that \(X\) is less than 115.

First, we transform \(X\) into \(Z\) using the formula \(Z = (X - \mu) / \sigma\):

\(Z = (115 - 100) / 15 = 1\)

Next, we use the standard normal distribution table to find the probability that \(Z\) is less than 1 (this refers to Table 2 in the Appendix of Statistical Tables).

Consulting the Standard Normal Distribution Table

The standard normal distribution table gives us the cumulative probability up to a certain value of \(Z\). For \(Z = 1\), the table indicates that \(P(Z < 1) \approx 0.8413\), which means that the probability that \(X\) is less than 115 is approximately \(84.13\%\).

Z Probability P(Z < Z)
0.9 0.8159
1.0 0.8413
1.1 0.8643

Thus, the value of \(Z = 1\) corresponds to a probability of \(0.8413\), which means there is an \(84.13\%\) chance that the variable \(X\) is less than 115 in this normal distribution.

Visualization of the Standard Normal Curve

The chart below represents the standard normal curve. The shaded area under the curve corresponds to the probability that \(Z\) is less than 1.

The transformation of \(X\) into the \(Z\) score allows us to bring the problem into a standardized situation where the mean is 0 and the standard deviation is 1. This standardization process enables the comparison of different normal distributions and their analysis using the same distribution table, regardless of their specific means and standard deviations.

2.3. Exercise Generator

The following code allows you to test your knowledge of the probability concepts covered so far, replacing the Sheets that usually appear at the end of each session's content.

The code is designed to generate an unlimited number of probability exercises on topics such as conditional probability, the sum rule, and the product rule. Each exercise comes with a solution and an explanation that the user can reveal by clicking the appropriate buttons.

How it works: The code uses functions to randomly generate exercises based on predefined templates.

Exercise:

Click "Generate Exercise" to start.


3Introduction to Combinatorial Analysis


3.1. Definition of Combinatorial Analysis

Combinatorial analysis is a branch of mathematics that studies methods for counting, arranging, and combining objects. It allows us to determine the number of different ways a set of elements can be organized while respecting certain rules and constraints.

The basic principles of combinatorial analysis include the addition rule and the multiplication rule.

  • Addition Rule: If a task can be performed in \( n \) ways and another task can be performed in \( m \) ways, and these two tasks cannot be performed at the same time, then there are \( n + m \) ways to choose one of the two tasks.
    Example: If you have 3 types of desserts and 4 types of drinks, you have \( 3 + 4 = 7 \) possible choices for either a dessert or a drink.
  • Multiplication Rule: If a task can be performed in \( n \) ways and another task can be performed in \( m \) ways, and these two tasks can be performed together, then there are \( n \times m \) ways to perform both tasks.
    Example: If you have 3 shirts and 4 pants, you have \( 3 \times 4 = 12 \) possible outfits.
3.2. Permutations
Definition and Formula

A permutation is an arrangement of all the elements of a set in a specific order. The formula for calculating the number of permutations of a set of \( n \) elements is given by:

\( n! = n \times (n-1) \times (n-2) \times ... \times 1 \)

Where \( n! \) is the "factorial" of \( n \).

Permutations without Repetition

Permutations without repetition involve arrangements of elements where each element is unique and appears only once in each arrangement.

Example:

For a set of 3 elements {A, B, C}, the permutations without repetition are:

  • ABC
  • ACB
  • BAC
  • BCA
  • CAB
  • CBA

The total number of permutations is \( 3! = 6 \).

Permutations with Repetition

Permutations with repetition involve arrangements of elements where some elements may appear more than once.

The formula for permutations with repetition is:

\( \frac{n!}{n_1! \times n_2! \times ... \times n_k!} \)

Where \( n \) is the total number of elements, and \( n_1, n_2, ..., n_k \) are the frequencies of the repeated elements.

Example:

For a set of 3 elements {A, A, B}, the permutations with repetition are:

  • AAB
  • ABA
  • BAA

The total number of permutations is \( \frac{3!}{2!} = 3 \).

3.3. Arrangements
Definition and Formula

An arrangement is a selection of \( k \) elements from \( n \) elements of a set, where order matters. The formula for calculating the number of arrangements of \( n \) elements taken \( k \) at a time is given by:

\( A(n, k) = \frac{n!}{(n-k)!} \)

Where \( n! \) is the "factorial" of \( n \) and \( (n-k)! \) is the "factorial" of \( n-k \).

Arrangements without Repetition

Arrangements without repetition involve selections of elements where each element is unique and appears only once in each arrangement.

Example:

For a set of 3 elements {A, B, C} taken 2 at a time, the arrangements without repetition are:

  • AB
  • AC
  • BA
  • BC
  • CA
  • CB

The total number of arrangements is \( A(3, 2) = \frac{3!}{(3-2)!} = 6 \).

Arrangements with Repetition

Arrangements with repetition involve selections of elements where some elements may appear more than once.

The formula for arrangements with repetition is:

\( n^k \)

Where \( n \) is the total number of elements and \( k \) is the number of elements taken at a time.

Example:

For a set of 3 elements {A, B, C} taken 2 at a time, the arrangements with repetition are:

  • AA
  • AB
  • AC
  • BA
  • BB
  • BC
  • CA
  • CB
  • CC

The total number of arrangements is \( 3^2 = 9 \).

3.4. Combinations
Definition and Formula

A combination is a selection of \( k \) elements from \( n \) elements of a set, where order does not matter. The formula for calculating the number of combinations of \( n \) elements taken \( k \) at a time is given by:

\( C(n, k) = \frac{n!}{k! \times (n-k)!} \)

Where \( n! \) is the "factorial" of \( n \), \( k! \) is the "factorial" of \( k \), and \( (n-k)! \) is the "factorial" of \( n-k \).

Combinations without Repetition

Combinations without repetition involve selections of elements where each element is unique and appears only once in each selection.

Example:

For a set of 3 elements {A, B, C} taken 2 at a time, the combinations without repetition are:

  • AB
  • AC
  • BC

The total number of combinations is \( C(3, 2) = \frac{3!}{2! \times 1!} = 3 \).

Combinations with Repetition

Combinations with repetition involve selections of elements where some elements may appear more than once.

The formula for combinations with repetition is:

\( C(n+k-1, k) = \frac{(n+k-1)!}{k! \times (n-1)!} \)

Where \( n \) is the total number of elements and \( k \) is the number of elements taken at a time.

Example:

For a set of 3 elements {A, B, C} taken 2 at a time, the combinations with repetition are:

  • AA
  • AB
  • AC
  • BB
  • BC
  • CC

The total number of combinations is \( C(3+2-1, 2) = \frac{4!}{2! \times 2!} = 6 \).

3.5. Combinatorial Exercise Generator

The following code allows you to test your knowledge on combinatorial analysis concepts. Each exercise is accompanied by a solution and an explanation.

Exercise:

Click "Generate Exercise" to start.

upload-to-cloud Summary

In this lesson, we covered the fundamental concepts of probability theory, combinatorial analysis, and probability calculations. The session aims to help understand and apply these concepts in various contexts.

During this session, we defined probabilities, emphasizing their major trait of studying random phenomena and measuring the likelihood of events. We also introduced the theme of combinatorial analysis as the study of different ways to organize or select objects from a set.

Here is a review of the main concepts from the session:

  • Probability Spaces: Mathematical structure defining a universe of events and their probability;
  • Events: Subsets of the probability space representing possible outcomes;
  • Conditional Probability: Probability of an event given that another event has already occurred;
  • Independence: Two events are independent if the occurrence of one does not affect the probability of the other;
  • Random Variables: Function that assigns a real number to each possible outcome of a random experiment;
  • Probability Distributions: Rules that describe the probability distribution of a random variable;
  • Expected Value: The average value expected of a random variable;
  • Variance and Standard Deviation: Measures of the dispersion of values of a random variable around its expected value;
  • Law of Large Numbers: Theorem stating that the average of results from a large number of trials approaches the expected value;
  • Central Limit Theorem: Theorem indicating that the sum (or average) of independent random variables tends to a normal distribution as the number of variables becomes large;
  • Permutations: Ways to arrange all elements of a set in a specific order;
  • Combinations: Selection of elements from a set without regard to the order;
  • Arrangements: Selection of elements from a set with regard to the order;
  • Partitions: Division of a set into disjoint subsets.

books Bibliography of the Block

The Support does not have a final bibliography (in its online version); references are inserted at the end of each Block.

  • Albers, M. J. (2017). Introduction to Quantitative Data Analysis in the Behavioral and Social Sciences. John Wiley & Sons.
  • Baldi, P. (2024). Probability: An Introduction Through Theory and Exercises. Springer Nature.
  • Courgeau, D. (2012). Probability and Social Science: Methodological Relationships Between the Two Approaches. Dordrecht: Springer.
  • Dress, F. (2007). Les probabilités et la statistique de A à Z: 500 définitions, formules et tests d'hypothèse. Dunod.
  • Hurlin, C., & Mignon, V. (2022). Statistics and Probability in Economics and Management - 2nd Edition. Dunod.
  • Linde, W. (2024). Probability Theory: A First Course in Probability Theory and Statistics. Walter de Gruyter GmbH & Co KG.
  • Suárez, M. (2020). Philosophy of Probability and Statistical Modelling. Cambridge University Press.

ask-question Synthesis Questions

  • What is the difference between a certain event, an impossible event, and a random event?
  • How do you calculate the conditional probability of an event? Give a concrete example.
  • What is the independence of two events? How can it be verified?
  • What is a random variable and how do you distinguish between a discrete and a continuous variable?
  • How do you calculate the expected value of a random variable? What is its interpretation?
  • What does the law of large numbers consist of and why is it important in probability?
  • What are the main differences between permutations, combinations, and arrangements? Give an example for each.
  • How many ways are there to arrange the letters of the word "PROBABILITY"?

test-passed Multiple-Choice Questions

The multiple-choice questions consist of fifteen questions related to probability and combinatorial analysis. To view and test your knowledge, click HERE :)

external-checklist-logistics-flaticons-lineal-color-flat-icons-3 Course & TD Sheets

This session does not have sheets to download. During the directed work session dedicated to this topic, we will revisit probability calculations and combinatorial analysis using exercise generators and the Python compiler.

path Further Reading

To delve further into the concepts related to probability and combinatorial analysis, you can consult the following documents and videos:

  • Book
    This book provides a straightforward overview of topics related to probability and combinatorial analysis in the humanities and social sciences. The book is available for free on cairn.info through your personal account: Lecoutre, J. P. (2019). Statistique et probabilités - 7th ed.: Cours et exercices corrigés. Dunod.

  • Course Material
    This is the course material by Mr. Yves Tillé, widely consulted by students from various fields. It presents probability and combinatorial analysis concepts concisely. The course is available for free download by clicking HERE :) .

  • YouTube Channel
    The channel explains the essentials of probability through a series of episodes. Add it to your list

cell-phone On the Course App

On the Course App, you will find the summary of this Block, as well as series of Directed Work related to it.
You will also find links to multimedia content relevant to the Block.
In the Notifications panel, an update is planned based on the questions raised by students during the Course and Directed Work sessions.
An update will also cover the exams from previous sessions, which will be reviewed during the Directed Work sessions to prepare for the current year's exams.

chat Course Download

By using the link below, you can download the Flipbook in PDF format : bookmark-ribbon

The Python Corner

In this Python corner, a table summarizes the essentials for probability calculations and combinatorial analysis in Python.

Parameter Python Code Example
Simple Probability
p = number_of_events / total_number_of_outcomes
print(p)
Suppose an urn contains 3 red balls and 7 blue balls. What is the probability of drawing a red ball?
Calculation: p = 3 / 10 = 0.3
Explanation: The probability is 0.3 because there are 3 red balls out of a total of 10 balls.
Conditional Probability
p_cond = p(A_and_B) / p(B)
print(p_cond)
Let A be the event "drawing a red ball," and B be the event "drawing a ball." What is the probability of drawing a red ball given that a ball has been drawn?
Calculation: p_cond = 3/10 / 1 = 0.3
Explanation: The probability remains 0.3 because the ball was drawn from the entire set.
Sum Rule
p_sum = p(A) + p(B) - p(A_and_B)
print(p_sum)
Let A be the event "drawing a red ball" and B be the event "drawing a blue ball." What is the probability of drawing either a red ball or a blue ball?
Calculation: p_sum = 0.3 + 0.7 - 0 = 1
Explanation: The probability of drawing a red or blue ball is 1 because these are the only possible outcomes.
Product Rule
p_product = p(A) * p(B)
print(p_product)
Let A be the event "drawing a red ball" and B be the event "drawing a red ball." What is the probability of drawing two red balls in a row?
Calculation: p_product = 0.3 * 0.2 = 0.06
Explanation: The probability of drawing two red balls consecutively is 0.06.
Arrangement
from math import factorial
arrangement = factorial(n) / factorial(n - k)
print(arrangement)
Suppose a group of 5 people. What is the number of ways to arrange 3 of them?
Calculation: arrangement = 5! / (5-3)! = 60
Explanation: There are 60 different ways to choose and arrange 3 people from a group of 5.
Permutation
permutation = factorial(n)
print(permutation)
How many different ways are there to arrange 4 people?
Calculation: permutation = 4! = 24
Explanation: There are 24 different ways to arrange 4 people.
Combination
from math import comb
combination = comb(n, k)
print(combination)
Suppose a group of 5 people. What is the number of ways to choose 3 of them?
Calculation: combination = C(5,3) = 10
Explanation: There are 10 ways to choose 3 people from a group of 5.
chat Discussion Forum

The forum allows you to discuss this session. You will notice a subscription button so you can follow discussions about research in the humanities and social sciences. It is also an opportunity for the instructor to address students' concerns and questions.