

Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!


An event/outcome (x) is a proposition which can be either true or false (e.g., will it rain today?)
The probability of an event is the degree of belief in the occurrence of that specific event, and it is denoted with Pr( event ) or P( event ) ;
it can be expressed as a proportion, fraction or percentage
it's measured on a scale from 0 to 1:
A random process is a situation in which we know what outcomes could happen, but we don’t know which particular outcome will
happen (e.g., coin tosses, dice rolls, iTunes/Spotify shuffle, whether the stock market goes up or down tomorrow… )
Events in favour of x
Total number of events
examples:
birth 1 M M F M F M F F
birth 2 M F M M F F F M
birth 3 F M M M F F M F
Pr(X = x) =
∩ = AND, intersection
= OR, union
Probability of a cash sale, Pr(Cash) = 291/
Probability of a sandwich being bought with cash, Pr(Cash ∩ Sandwich) = 87/
Pr(A ∪ B) = [Pr(A) + Pr(B)] – Pr(A ∩ B)
Pr(Debit card payment OR purchase of Fuel) = [(11/500 + 5/500 + 62/500) + (15/500 + 62/500 + 115/500)] − 62/500 = 208/
to avoid double repetition
It's the probability that one outcome occurs given that another one has already occurred.
Pr(Cash is paid given that a Magazine has been purchased):
this is written as Pr(C|M), where | stands for ‘given that’
Pr(C|M) =
Pr(C ∩ M)
Pr(M)
Two events A and B are independent if the conditional probability of the second event is the same as the
simple probability that it occurs.
Pr(B|A) = Pr(B)
If outcomes A and B are independent we can define:
Pr(A and B) = Pr(A ∩
B) = Pr(A) ×
Pr(B)
Example considering the previous table:
Pr(Fuel)=192/500=0.
Pr(Credit card)=131/500=0.
If Fuel and Credit Card are independent, we have: Pr(Fuel) × Pr(Credit card) = 0.384 × 0.262 = 0.101 10.1%
In the real data we have: Pr(Fuel ∩ Credit card) = 115/500 = 0.23 23%
0.23 ≠ 0.101: the two events are not independent / are dependent
It's generated by the conditional probability:
Pr(A|B) =
Pr(A ∩ B) = Pr(A|B) × P(B)
Pr(B ∩ A) = Pr(B|A) × P(A)
So the formula of the Bayes' rule can be written as:
Pr(A|B) =
Pr(A ∩ B)
they're the same, so:
Pr(A|B) × P(B) = Pr(B|A) × P(A)
Pr(B|A) × P(A)
Example: picnic day
A = Rain
B = Cloud
Pr(Rain) is Probability of Rain = 10%
Pr(Cloud|Rain) is Probability of Cloud given that Rain happens = 50%
Pr(Cloud) is Probability of Cloud = 40%
using Bayes’ rule Pr(Rain|Cloud) = Pr(Cloud|Rain) × Pr(Rain) = 0.5 × 0.1 = 0.125 12.5% chance of rain
Pr(Cloud) 0.
It's a numeric quantity (a function) whose value depends on the outcome of a random process.
X = random variable
x = values of the random variable
support SX : the set of possible values which X can take on
e.g. temperature in winter = from - 10°C to 20°C
e.g. number of children per family = from 0 to 5-6 children
probability px (x) = Pr(X=x) : it represents discrete random variables
density fx (x) : it represents continuous random variables
from probability, we "fill" the gaps/empty spaces to find the density
step function
integral (area)
It's the value with the highest probability
It represents the variation around the typical value for the random variable.
σ
2 = Var(X) = E([X − E(X)]
2 ) = E(X
2 ) − E(X)
2
where
σ = SD(X) = Var(X)
A frequency distribution shows how values of a variable are distributed
A probability distribution shows how probable each set of compound outcomes is
e.g. In a population the number of females (F) is equal to the number of males (M).
So Pr(F), Pr(M) = 0.
Selecting three subject at random, we may have:
Pr(F = 0) = Pr(M = 3); applying the multiplication rule: 0.5 × 0.5 × 0.5 = 0.125 (1/8)
Pr(F = 1) = Pr(M = 2); applying the multiplication rule: 0.5 × 0.5 × 0.5 = 0.
this is the probability the female is chosen first; she could be chosen second or third (MFM) or (MMF).
The probability that one female is chosen is the probability that FMM, MFM or MMF occur:
Pr(F = 1) = Pr(M = 2); Pr(FMM) + Pr(MFM) + Pr(MMF) = 0.125 × 3 = 0.375 (3/8)
Pr(F = 2) = Pr(M = 1); Pr(FFM) + Pr(FMF) + Pr(MFF) = 0.125 × 3 = 0.375 (3/8)
Pr(F = 3) = Pr(M = 0); applying the multiplication rule: 0. ×
The probability distribution, defining x as the number of females (i.e. the support) is:
n° females (x) Pr(x)
The mean is the sum of the x multiplied by its respective probabilities:
so the average number of females among all the possible combinations of groups of 3 is 1.
The variance is denoted by = 3 − 1.
2 = 0.
so:
probability density
12 November 2024 10:
so the average number of females among all the possible combinations of groups of 3 is 1.
The variance is denoted by = 3 − 1.
2 = 0.
Where a series we are interested in the count of an event of interest (called "success") the binomial
distribution should be applied. In the previous example, the experiment was picking a team member
and the success was picking a female.
X ∼ Bin(n, p)
n ≥ 1; it's the total number of trials
p ∈
(0, 1); it's the probability of a single "success"
∼
= tide
e.g. tossing a coin:
n = 2 (heads or tails)
p = 0.5 (i.e. 50%)
Pr(X = x) = p
x (1 − p)
n x
expected value E(X) = np (e.g. 10 × 0.5 = 5)
sample variance s
2
or σ
2
= np(1 − p); it explains how the variable is spread around the mean
sample standard deviation σ = σ
2
Fifteen percent of tourists is German. What is the probability to have 4 German tourists among a group
of 20 during a trip?
p = 0.
n = 20; Y = X 1 + … + X 20
1
20
∼ Bin(20, 0.15)
σ
2 = 3(1 − 0.15) = 2.
σ = 2.55 = 1.
Pr(X=x) = 0.
4
(1−0.15)
20 - 4
4
16
4
16
n
x
n!
x!(n − x)!
5
3
n = so large that 's quite impossible to count
p = close to 0
It gives the probabilities of a certain number of outcomes in a given period of time or area of space.
X ∼ Pois(μ)
μ (mi) = mean / expected value in 1-unit of time or space
Pr(X = x) =
e = (Euler’s number 2.718)
● The first aid tent at a music festival can deal with no more than three people requiring treatment in
any one hour. The mean number of people requiring treatment is two per hour. What is the probability
that they will not be able to deal with all the people requiring treatment in an hour?
μ = 2 (average arrivals in a time unit)
● Telephone calls enter a customer service switchboard on the average of two every ten minutes. What
is the probability of more than 1 call arriving in a 10-minute period?
X ∼ Pois(μ = 2)
Pr(X > 1) = Pr(X = 2) + Pr(X = 3) ... + P(X = ∞)
using the complementary rule, if A and B are two complementary and mutually exclusive events
Pr(A) = 1 − Pr(B) with Pr(A) + Pr(B) = 1
Pr(X > 1) = 1 − Pr(X ≤ 1)
= 1 − Pr(X = 0) − Pr(X = 1)
Pr(X = 0) = e
2 2
0 = e
2
Pr(X = 1) = e
2 2
1 = 2e
2
Pr(X > 1) = 1 − Pr(X = 0) − Pr(X = 1)
= 1 − e
2 − 2e
2
= 1 − 3e
2
e
2 × 2
0 = e
2 × 1 = 0.135 = 13.5% probability of having no patients (x=0)
note: 0! = 1
e
2 × 2
3 = e
2 × 8 = 0.180 = 18% probability of having 3 patients (x=3)
e
μ μ
x
x!
by convention:
X ∼ N(μ, σ
2 )
μ = mean, E[X]
σ
2 = sample variance, Var[X]
unimodal : it has a single peak
symmetrical : one side is the mirror image of the other
asymptotic : its tails taper off without actually meeting the horizontal axis
The total area under the distribution is 1 = it is a probability distribution and one of the values is certain to occur.
The distribution can be used to find probabilities of values of normal variables occurring if the population's mean and stand ard
deviation are known. The probability of an exact value of a continuous variable occurring is infinitely small, so the distribution
is used to find the probability of a value within a range occurring: such probabilities are represented by areas under the curve.
X
= R, with x ∈ S X
E(X) = μ, with μ ∈ R
Var(X) = σ
2
SD(X) = σ, with σ > 0
e.g. X ∼ N(10, 2)
a b
to calculate this area (from a probability pov, i.e. without using integrals):
P(X<b ∩ X>a) = P(a<X<b)
Pr(X > 10): easy to calculate, since μ = 10 and the area of half curve is equal to 0.5, so Pr(X > 10) = 0.
Pr(X > 12): not easy because I need to determine the amount of area covered by the curve from 12 to ∞
Special case of the normal distribution, with mean equal to 0 and standard deviation
equal to 1.
standardization: if X ∼ N(μ, σ
2 ), then Z = ∼ N(0, 1)
if Z ∼ N(0, 1), then X = σZ + μ ∼ N(μ, σ
2 )
symmetry: Pr(Z ≤ −z) = 1 − Pr(Z ≤ z) = Pr(Z ≥ z)
X−μ
σ
0
Pr(Z<z)
Pr(Z>z)
these two probabilities are equal
Pr(−z < Z < z) = Pr(μ − σz < X < μ + σz)
− 3 − 1 1 3
Z ∼ N(μ, σ
2
)
Pr(−1 < Z < 1) = Pr(μ − σ < X < μ + σ) ≈ 0.68 (68% falls within 1 SD of the mean)
Pr(−2 < Z < 2) = Pr(μ − 2 σ < X < μ + 2σ) ≈ 0.95 (95% falls within 2 SD of the mean)
Pr( −
3 < Z < 3) = Pr(μ −
3 σ < X < μ + 3σ) ≈
0.997 (99.7% falls within 3 SD of the mean)
e.g. Pr(Z > −
2.44) = 0.9927 high, 99.3%
see distribution tables
According to a bank, the time taken by its customers to use cash dispensing machines (X) is normally
distributed with a mean of 18 seconds and a standard deviation of 3 seconds. What is the probability
that a customer selected at random takes less than 13 seconds?
18
applying the standardization: Pr(X < 13) = Pr <
= Pr(Z < −1.67)
Pr(Z < −
2 )
−1.67 1.
Pr(Z < −1.67) = Pr(Z > 1.67)
1 − Pr(Z < −1.67) = 1 − 0.9525 =
13
The expenditure in a 5-stars hotel in Venice is normally distributed with mean 700 euros and standard
deviation equal to 80 euros. What is the probability to spend more than 860 euros?
2 )
Pr(X > 860) = Pr >
= Pr(Z > 2)
1 − 0.9918 (or look for
its opposite, i.e. 2.40)
if we have to solve Pr(Z > z) = just check the value on the probability table
if we have to solve Pr(Z < z) = 1 − value on the probability table (or its opposite)
It is used to:
standardize normal variables, i.e., to transform them into a variable with
a mean of 0 and a standard deviation of 1
calculate probabilities using standard normal distribution tables
The binomial distribution is ideal when you're dealing with experiments that have only two possible
outcomes (like heads or tails in a coin flip) and you want to know the probability of getting a certain
number of successes in a fixed number of trials. For example, if you flip a coin 10 times, you might want
to calculate the probability of getting exactly 6 heads.
The Poisson distribution comes into play when you need to model the number of events that occur in a
time interval or in a region of space , provided that these events are rare and independent of each other.
A classic example is the number of calls that arrive at a call centre in an hour.
The normal distribution is one of the most famous and versatile in statistics. It's used to model a wide
range of natural and social phenomena , from measuring people's height to test scores. Its characteristic
bell shape makes it particularly useful for describing data that is centred around a mean value.
The standard normal distribution is a special version of the normal distribution, with a mean of 0 and a
standard deviation of 1. Its usefulness lies in the ability to standardize normal variables , thus simplifying
calculations and allowing the use of standard normal distribution tables.