Math Concepts Flashcards
(41 cards)
[2 Brainteasers] Σn=1..N n2 = ?
Σn=1..N n2 = N(N+1)(2N+1)/6 = N3/3 + N2/2 + N/6
[3-1 Calc] ax = e? d ax/dx = ?
ax = ex lna
d ax/dx = axlna
[3-1 Calc] d(lnx)/dx = ?
d(lnx)/dx = 1/x
[3-1 Calc] e
ex = lim? (1+?)?
Taylor series f(x) = ex = ?
ex = limn→inf (1+x/n)n
ex = Σn=0..inf [1/n! xn]
[3-1 Calc] Taylor series: f(x) = ?
f(x)
= f(x0) + f’(x0)(x-x0) + 1/2 f’‘(x0)(x-x0)2 + …
= Σn=0..inf [1/n! f(n)(x0) (x-x0)n]
[3-1 Calc] Newton’s method vs. Secant method
Newton’s method: x[t+1] = x[t] - f(x[t]) / f’(x[t]), quadratic convergence
Secant method: x[t+1] = x[t] - f(x[t]) / (f(x[t])-f(x[t-1]))/(x[t]-x[t-1]), (1+5^0.5)/2 convergence
[3-1 Calc] Gradient descent
Gradient descent: x[t+1] = x[t] - l * g’(x[t]), l = step size, g’ = grad(g)
(Newton’s method equivalent: f = g’; requires 2nd derivative g’’)
[3-1 Calc] Lagrange multipliers
min f(x1,x2) s.t. g1(x1,x2)=0, g2(x1,x2)=0
solve x1, x2
L = f(x1,x2) - l1*g1(x1,x2) + l2*g2(x1,x2)
grad(L) = 0:
dL/dx1 = df/dx1 + l1*dg1/dx1 + l2*dg2/dx1 = 0
dL/dx2 = df/dx2 + l1*dg1/dx2 + l2*dg2/dx2 = 0
dL/dl1 = g1 = 0
dL/dl2 = g2 = 0
[3-2 LinAl] projv(u) = ?
projv(u) = |u| cos(o) v/|v| = |u| u.v/|u||v| v/|v| = u u.v/|v|^2
[3-2 LinAl] eigenvalues (v)
Π v = ?
Σ v = ?
det(A - vI) = ?
Π v = det(A)
Σ v = trace(A) = Σ A[i,i]
det(A - vI) = 0
[3-2 LinAl] determinants
det(A’) ? det(A’)
det(A-1) ? det(A)-1
det(AB) ? det(A)det(B)
A=LR: det(A) ? det(L)det(R) ? (ΠL[i,i]) (ΠR[i,i])
det(A’) = det(A’)
det(A-1) = det(A)-1
det(AB) = det(A)det(B)
A=LR: det(A) = det(L)det(R) = (ΠL[i,i]) (ΠR[i,i])
[3-2 LinAl] pos semi def
x’Ax ? 0
eigval ? 0
det(Ak) ? 0
x’Ax >= 0
eigval >= 0
det(Ak) >= 0 for all k
[3-2 LinAl] matrix derivatives
d/dx a’x = ?
d/dx Ax = ?
d/dx x’Ax = ?
d2/dxdx’ x’Ax = ?
d/dx (Ax+b)’C(Dx+e) = ?
d/dx a’x = a
d/dx Ax = A
d/dx x’Ax = (A’+A)x
d2/dxdx’ x’Ax = A
d/dx (Ax+b)’C(Dx+e) = A’C(Dx+e) + D’C’(Ax+b)
[3-2 LinAl] simulate X ~ N(U,S)
X = U + R’Z, where S = R’R and Z~N(0,1)
[4 Prob] geometric series
Σk=0..n [ark] = ?
Σk=0..n [ark] = a (1-rn+1)/(1-r)
[4 Prob] binomial theorem
(a+b)n = Σ?
(a+b)n = Σk=0..n [nCk an-k bk]
[4 Prob] Distribution discrete/continuous: Uniform distribution Unif(a,b)
pmf P(X=x) = ?
pdf f(x) = ?
E[X] = ?
Var(X) = ?
pmf P(X=x) = 1/(b-a+1)
pdf f(x) = 1/(b-a)
E[X] = (b+a)/2
Var(X) = (b-a)2/12 cont, ((b-a+1)2-1)/12 disc
[4 Prob] Distribution discrete: Bernoulli Bernoulli(p)
pmf P(X=x) = ?
E[X] = ?
Var(X) = ?
Bernoulli: # success in 1 trial
pmf P(X=x) = px(1-p)1-x, x = 0,1
E[X] = p
Var(X) = p(1-p)
[4 Prob] Distribution discrete: Binomial Bin(n,p)
pmf P(X=x) = ?
E[X] = ?
Var(X) = ?
Binomial: # success in n trials
P(X=x) = nCx px (1-p)n-x
E[X] = np
Var(X) = np(1-p)
[4 Prob] Distribution discrete: MultiNomial MultiNomial(p1,..pk)
pmf P(X1=x1,..,Xk=xk) = ?
E[Xi] = ?
Var(Xi) = ?
MultiNomial: a specific combo
P(X1=x1,..,Xk=xk) = (n!/x1!..xk!) p1x1..pkxk, n = Σxi
E[Xi] = npi
Var(Xi) = npi(1-pi)
[4 Prob] Distribution discrete: Hyper Geometric HypGeo(n,N,k)
pmf P(X=x) = ?
E[X] = ?
HypGeo? –> Bin(n, p=k/N)
Hyper Geometric: # success in n trials w/o replacement
P(X=x) = kCx (N-k)C(n-x) / NCn
E[X] = nk/N
HypGeon<5%N –> Bin(n, p=k/N)
[4 Prob] Distribution discrete: Multivariate Hyper Geometric MultiHypGeo(k1,..kk)
pmf P(X1=x1,..Xk=xk) = ?
Multivariate Hyper Geometric: a specific combo w/o replacement
pmf P(X1=x1,..Xk=xk) = (k1Cx1)..(kkCxk)/NCn, N = Σki, n = Σxi
[4 Prob] Distribution discrete: Geometric Geo(p)
pmf P(X=x) = ?
cdf F(x) = ?
E[X] = ?
Var(X) = ?
Geometric: # tries to get 1st success
P(X=x) = (1-p)x-1 p
F(x) = 1-(1-p)x
E[X] = 1/p
Var(X) = (1-p)/p2
[4 Prob] Distribution discrete: Negative Binomial NegBin(r, p)
pmf P(X=x) = ?
E[X] = ?
Var(X) = ?
Negative Binomial: # tries to get rth success
P(X=x) = (x-1)C(r-1) (1-p)x-r pr
E[X] = r/p
Var(X) = r(1-p)/p2