A set of distributions indexed by a parameter θ is a parametric model. Note θ is used to denote any number of parameters, and ; is used to separate the parameters. E.g. P(X,Y;θ) is the joint distribution of X and Y using θ as the parameter. For X∼Exp(θ), the parametric family is
p(x;θ)=θe−θx,x≥0
IID (or i.i.d.) means independent and identically distributed.
Probabilistic View of Data
The data D can be seen as IID random variables with outputs Y. For n data points with k features each,
D=(X,Y)=X11⋮Xn1⋯⋯X1k⋮XnkY1⋮Yn
each row is a data point in Rk with its output Y. If we assume P(X,Y) is parametric, the goal is to estimate the parameter θ in P(X,Y;θ).
Estimators
The estimator is usually notated with a hat, e.g. θ^, and is a function of the data as random variables, i.e. θ^=g(X,Y). When the data is realized (we plug in sampled numbers, not RVs in the theoretical sense), the estimator is realized as the estimate.
E.g. let 3 data points be IID, Xi∼N(μ,σ2), and we want to estimate μ. A reasonable choice is
μ^=31i=1∑3Xi
This estimator is an RV we can analyze. Now imagine we collect 3 data points 90,120,150. We can use the estimator above to get a sample mean
μ^=390+120+150=120
Bias, Variance and MSE
Bias(θ^)=E[θ^]−θ
The variance of an estimator is Var(θ^), and its mean-squared error is
MSE(θ^)=E[(θ^−θ)2]=Var(θ^)+Bias(θ^)2
Frequentist Framework
In the frequentist view, the parameter θ is an unknown constant to be estimated from data. E.g. to estimate the fairness of a coin, let a flip be ∼Bern(θ) and estimate θ.
For data x1,…,xn, the likelihood is the probability (or density) of the data under θ,
L(θ)=i=1∏np(xi;θ)
The maximum likelihood estimator is the constant θ that maximizes the likelihood of the data,
θ^MLE=argmaxθL(θ)
The log-likelihood is ℓ(θ)=logL(θ). Since log is increasing, it has the same maximizer, and turns the product into a sum.
Bayesian Framework
In the Bayesian setting we are naturally uncertain about θ, so θ itself is an RV, usually with a parametric distribution called the prior. E.g. in the coin flipping case, X∼Bern(θ), θ∼Beta(α,β), and we update the distribution of θ given new data.
Using Bayes' Rule to update the distribution of θ given data X,
Since P(X) is a constant with respect to θ, P(X∣θ)P(θ) is enough to express the distribution. The constant is the one that makes P(θ∣X) integrate to 1.