Random Variables & Probability Flashcards
What is a random variable?
It is an association/ mapping between the sample space omega and the target space T
What is the sample space?
The sample space also defined as omega is the set of all possible outcomes
What is the definition of probability?
Witch each event A we associate P(A) that measures the probability that the event will occur, P(A) must be between 0 and 1 (we can use it for checking errors in calculus), 0 <= P(A) <= 1
What is an easy way to compute P(A)
P(A) = number of event occurs / total number of the events
What is conditional probability?
It is a measure that consider the influence of another event which occurs before the event :
P(A|B) = P (A intersection B) / P(B)
Obv we have to consider P(B) > 0 for applying this formula
In which way we can express the conditional probability’and the intersection probability’ if the events are ‘indipendents
NB: int = intersection
So in this special case , which is the basic assumptions of ML applications, we can use this :
P ( A int B) = P(A) * P(B)
P(B) = P(B|A)
Explain the addition rule
So the addition rule is that :
1) In normal case
P(A U B) = P(A) + P(B) - P(A int B)
If the events are mutually exclusive
2)
P(A U B) = P(A) + P(B)
Explain the Conditional Probability with Bayes rule
So we use first of all the basic rule :
P(B|A) = P(A int B) / P(A) = [P(A|B)*P(B)] / P(A)
NB : the bold one is actually the Bayesian rule
What is the joint probability
Given two random variables that are defined on the same probability space, the joint probability is the probability of the intersection of both events :
P (X = xi int Y=yj) = P(X = xi, Y=yj) = nij/N
where nij is the number of events where is satisfied the condition and Nis the total number of events
define a random variable distribution
We say that a random variable X is distributed according to a particular
probability distribution PX , which defines the probability mapping between the
event and the probability of the outcome of the random variable.
The probability distribution for a random variable describes how the
probabilities are distributed over the values of the random variable.
what is a discrete random variables, what is important in the exercises?
When the target space T is discrete, we can specify the probability that a random
variable X takes a particular value x ∈ T, denoted as P(X = x).
The function
f (x) = P(X = x)
for a discrete random variable X is known as the probability mass function (pmf).
what are the two conditions that have to be satisfied in discrete RV
- f(x) must be non negative
- ∑P(X=xi) = 1
where xi represent a specific value in the dataset mentre X è la funzione :
X: Ω → T
where T is the target space
Define rigorously what is a random variable
Let Ω be the sample space of a random experiment, which is the set of all possible outcomes of that experiment.
A random variable X is a function that assigns a real number to each outcome in Ω, such that for any real number x, the set of outcomes {ω ∈ Ω | X(ω) ≤ x} is an event in the sample space.
ω is the outcome of a random experiment
x is the maximum real number associate to the experiment
what is a continuos random variables, what is important in the exercises?
When the target space T is continuous, e.g., the real line R, it is more natural to
specify the probability that a random variable X is in an interval, denoted by
P(a ≤ X ≤ b) for a < b.
The function
F(x) = P(X ≤ x)
for a continuous random variable X is known as the cumulative distribution
function (cdf).
The probability density function (pdf) is f such that
P(a < X ≤ b) = F(b) − F(a) = ∫ a to b f(x) dx , a < b
what are the 2 conditions that have to be satisifed in order to have a PDF
A function f : R
D → R is called a probability density function (pdf) if
1. ∀x ∈ R^D : f (x) ≥ 0
2. Its integral exists and ∫R^D f(x) dx = 1
N:B this intergral is replaced as a sum in the discrete distributions