Comp 1311 Mathematics 1 Flashcards
What is the cardinality of a set?
The number of elements within a set
What is a predicate?
Something that is either true or false about a member of some universe (set)
Which set operations are associative?
Union
Intersection
Which set operations are commutative?
Union
Intersection
T/F The difference set operation is associative and commutative?
False
It is neither
When is a set a subset of another?
When every element of X is also a member of Y
What is a proper subset?
When a subset is strictly larger of smaller than another
When are two sets equal?
When they contain the same elements
What is a powerset of a set?
The set of all subsets of the original set.
What is {a} + {b}?
{(a,0),(b,1)}
What is a function?
A mapping between a domain and codomain where exactly one element of the domain maps to one element of the codomain
What is the range?
A subset of the codomain, for the element of the codomain that are mapped to by a function
What is the formula for the symmetric difference?
A △ B = (A-B) U (B-A)
What is the identity function?
Every value maps uniquely to itself in the codomain
How is a function with multiple inputs handled?
The domain is the Cartesian product of two sets
Is function composition commutative, associative, both or neither?
Just associative
When is a function injective?
for all x, x’ in X, if f(x)=f(x’), then x = x’
Elements can map to the same value in the codomain (0 –> 0) but two elements cannot map back to the same element
When is a function surjective?
If for all values in the codomain, there exists an element in the domain which maps to it.
When is a function bijective?
When a function is both injective and surjective
What is a relation from X to Y?
The set of some ordered pairs made from X and Y’s Cartesian product.
What is the formula for negative binomial distribution
p(k|θ) = <nk>(1 − θ)^n θ^k</nk>
What is the formula for geometric distribution?
p(k|θ) = (1 − θ)^(k−1) θ
What is the expected value and variance for geometric distribution?
E[X] = 1/θ
V[X] = (1 - θ) / θ^2
What is the formula for binomial distribution?
(nCk) θ^k (1 − θ)^(n-k)
What is the formula for Bernoulli distribution?
θ^x (1 − θ)^(1−x)
θ ∈ [0, 1]
What is the expected value formula for Bernoulli and Binomial?
Ber: E[X] = θ
Binomial: E[X] = nθ
E[X^2] = nθ + n(n-1)θ^2
What is the variance formula for Binomial?
V[X]=nθ(1-θ)
What is the expected value and variance of uniform distribution?
E[X] = (a+b)/2
V[X]=((b - a + 1)^2 - 1) / 12
What is the formula for Poisson distribution?
P(X = k|λ) = (λ^k e^−λ) / k!
What is the variance and expected value of Poisson distribution?
λ
What is λ and k in Poisson distribution?
λ is the constant average rate of events
k is the number of events
What is the covariance formula?
cov(X,Y) = E[XY]-E[X]E[Y]