Week 2 Flashcards
Probability
A measure of the likelihood that an event occurs, on a scale from 0 to 1.
If B1, B2, B3, …, Bn is a part of event B, then P(B) = :
P(B) = P(B1) + P(B2) + P(B3) + … + P(Bn)
What does the addition rule say?
(probability)
If something can happen in different ways, the probability that it happens is the sum of the probabilities of all the different ways it can happen.
indicator
The outcome of a certain event
Unifrom distribution
Equal probability for all events in the set.
Uniform (a,b) distribution
When a point is picked randomly from the interval (a,b) with equal probabilities for all points. a<b
What is the probability that a point falls within a certain interval (x,y) with a<x<y<b when there is a uniform (a,b) distribution?
(y-x) / (b-a)
Give a formula using only unconditional probabilities for P(A|B) :
P(AB) / P(B)
When are two events A and B called independent?
When P(A|B) = P(A).
For two events A and B, P(AB) is equal to…
P(A) * P(B)
Finish the Bayes’ rule:
For a partition B1, B2, … Bn of all possible outcomes, P(Bi|A) =
P(A|Bi) * P(Bi)
—————————————————-/
P(A|B1)P(B1) + … + P(A|Bn)P(Bn)
Each path through the tree represents a sequence of possible outcomes for the various stages. What do you do to find the probability of a path?
Multiply the conditional probabilities along the branches.
e.g. P(1) * P(2|1) * P(3|2)…
Each path through the tree represents a sequence of possible outcomes for the various stages. What do you do to find the probability of an event?
Identify the corresponding set of paths and sum the probabilities of these paths.
What is the formula for (N/X) in the formula for P(X) with replacement?
(N/X) = N! / (X! * (N-X))
Binomial distribution
with replacement
What is the probability P(X) of a certain amount X of red marbles in the vase in the marbles-vase model WITH replacement?
P(X) = (N/X) * mu^X * ( (1-mu)^(N-X) )
The amount of marbles in the vase divided by X times the proportion of red marbles to the X-th, times the proportion of green marbles to the amount of green marbles in the vase (N-X).
In KNN, what is the training time?
O(1), it is constant.
What is a prerequisite for matrix multiplication?
A of dimensions a x b and B of dimensions c x d can only be multiplied if b=c.
In KNN, what is the test time?
O(n), it depends on the number of test examples.