264 words
1 minutes
[CS5340] Introduction to Probabilistic Reasonings

Probability#

Probability space (Ω,E,P)(Ω, E, P)#

  • ΩΩ: sample space, set of all possible outcomes
  • EE: event space, 2Ω⊆ 2^Ω
    • must contain and ΩΩ
    • closed under countable union: αiEαiE\alpha_i ∈ E → \cup \alpha_i ∈ E
    • closed under complements: αEΩαE\alpha ∈ E → Ω - \alpha ∈ E
  • P(α)0,P(Ω)=1P(\alpha) ≥ 0, P(Ω) = 1
  • if αβ=P(αβ)=P(α)+P(β)\alpha \cap \beta = ∅ → P(\alpha \cup \beta) = P(\alpha) + P(\beta)

Probability distribution#

  • Discrete: Probability mass function i=1KP(x=xi)=1\sum_{i=1}^K P(x=x^i) = 1
  • Continuous: Probability density function val(x)p(x)dx=1\int_{val(x)} p(x)dx = 1

Marginalization (sum rule)#

  • given p(x,y)dxdy=1\int \int p(x, y) dx dy =1
    • Eliminate = sum over
    • Continuous case: p(x,y)dy=p(x)\int p(x, y)dy = p(x), p(x,y)dx=p(y)\int p(x, y) dx = p(y)
    • Discrete case: yp(x,y)=p(x)\sum_y p(x, y) = p(x), xp(x,y)=p(y)\sum_x p(x, y) = p(y)

Conditional probability (product rule)#

  • p(xy)=p(x,y)p(y)\boldsymbol {p(x | y) = \frac {p(x, y)} {p(y)}}
  • p(x,y)=p(xy)p(y)p(x,y) = p(x|y)p(y)
  • can be extended to multiple random variable
    • p(w,x,y,z)=p(w,x,yz)p(z)p(w,x,y,z) = p(w,x,y|z)p(z) =p(w,xy,z)p(yz)p(z)= p(w,x | y,z)p(y|z)p(z) =p(wx,y,z)p(xy,z)p(yz)p(z)= p(w|x,y,z)p(x|y,z)p(y|z)p(z)

Baye’s rule#

  • since p(x,y)=p(xy)p(y)=p(yx)p(x)p(x, y) = p(x|y)p(y) = p(y|x)p(x),
  • p(yx)=p(xy)p(y)p(x)\boldsymbol {p(y|x) = \frac {p(x|y)p(y)}{p(x)}}
    • p(yx)p(y|x): posterior
    • p(xy)p(x|y): likelihood
    • p(y)p(y): prior
    • p(x)p(x): evidence

Independence#

  • p(xy)=p(x)p(x|y) = p(x), knowing yy doesn’t give any information on xx
  • therefore, p(x,y)=p(xy)p(y)=p(x)p(y)p(x,y) = p(x|y)p(y) = p(x)p(y)

Expectation#

  • E[f[x]]=f[x]p(x)dxE[f[x]] = \int f[x]p(x) dx
  • R1: E[k]=kE[k] = k (expected value of a constant is a constant)
  • R2: E[k×f[x]]=k×E[f[x]]E[k \times f[x]] = k \times E[f[x]]
  • R3: E[f[x]+g[x]]=E[f[x]]+E[g[x]]E[f[x]+g[x]] = E[f[x]] + E[g[x]]
  • R4: E[f[x]g[x]]=E[f[x]]×E[g[x]]E[f[x]g[x]] = E[f[x]] \times E[g[x]] if X,YX, Y are independent

Conjugate distribution (Conjugate prior)#

  • used for modelling parameter of probability distribution
  • prior and posterior are in the same distribution family
    • if p(xθ)p(x| \theta) is Normal distribution, then p(θx)p( \theta | x) will also be in the same family
    • 如果後驗與先驗是同一個指數族,那就稱那個先驗為共軛先驗
[CS5340] Introduction to Probabilistic Reasonings
https://itsjeremyhsieh.github.io/posts/cs5340-1-introduction-to-probabilistic-reasonings/
Author
Jeremy H
Published at
2024-08-12