Docsity

STATS 200: Introduction to Statistical Inference, Exercises of Computer Science

Partial preview of the text

Download STATS 200: Introduction to Statistical Inference and more Exercises Computer Science in PDF only on Docsity!

STATS 200: Introduction to Statistical Inference

Lecture 29: Course review

Course review

We started in Lecture 1 with a fundamental assumption:

Data is a realization of a random process.

The goal throughout this course has been to use the observed data to draw inferences about the underlying process or probability distribution.

Hypothesis testing

Goal: Accept or reject a null hypothesis H 0 based on the value of an observed test statistic T.

Question #1: How to choose a test statistic T?

Question #2: How to decide whether H 0 is true/false based on T?

Hypothesis testing

Goal: Accept or reject a null hypothesis H 0 based on the value of an observed test statistic T.

Question #1: How to choose a test statistic T?

Question #2: How to decide whether H 0 is true/false based on T?

In a simple-vs-simple testing problem, there is a “best” answer to Question #1, which is the likelihood ratio statistic

L(X 1 ,... , Xn) =

f 0 (X 1 ,... , Xn) f 1 (X 1 ,... , Xn)

We can equivalently use any monotonic 1-to-1 transformation of this statistic, which is simpler to understand in many examples (e.g. the total count for Bernoulli coin flips).

Hypothesis testing

In problems with composite alternatives, there is oftentimes not a single most powerful test against all of the alternative distributions. We instead discussed popular choices of T for several examples:

I (^) Testing goodness of fit: Histogram methods (Pearson’s chi-squared statistic), QQ-plot methods (one-sample Kolmogorov-Smirnov statistic)

Hypothesis testing

In problems with composite alternatives, there is oftentimes not a single most powerful test against all of the alternative distributions. We instead discussed popular choices of T for several examples:

I (^) Testing goodness of fit: Histogram methods (Pearson’s chi-squared statistic), QQ-plot methods (one-sample Kolmogorov-Smirnov statistic) I (^) Testing if a distribution is centered at 0: One-sample t-statistic, signed-rank statistic, sign statistic

Hypothesis testing

In problems with composite alternatives, there is oftentimes not a single most powerful test against all of the alternative distributions. We instead discussed popular choices of T for several examples:

I (^) Testing goodness of fit: Histogram methods (Pearson’s chi-squared statistic), QQ-plot methods (one-sample Kolmogorov-Smirnov statistic) I (^) Testing if a distribution is centered at 0: One-sample t-statistic, signed-rank statistic, sign statistic I (^) Testing if two samples have the same distribution or mean: Two-sample t-statistic, rank-sum statistic I (^) Testing if the parameters of a model satisfy additional constraints (i.e. belong to a sub-model): Generalized likelihood ratio statistic

Hypothesis testing

Question #2: How to decide whether H 0 is true/false based on T?

We adopted the frequentist significance testing framework: Control the probability of type I error (falsely rejecting H 0 ) at a target level α, by considering the distribution of T if H 0 were true.

Estimation

Goal: Fit a parametric probability model to the observed data. For IID data X 1 ,... , Xn ∼ f (x|θ), we discussed three methods:

I (^) Method of moments: Equate the sample mean of Xi , X (^) i^2 , etc. to the theoretical mean of X , X 2 , etc., and solve for θ

Estimation

Goal: Fit a parametric probability model to the observed data. For IID data X 1 ,... , Xn ∼ f (x|θ), we discussed three methods:

I (^) Method of moments: Equate the sample mean of Xi , X (^) i^2 , etc. to the theoretical mean of X , X 2 , etc., and solve for θ I (^) Maximum likelihood: Pick θ to maximize

∏n i=1 f^ (Xi^ |θ), or equivalently

∑n i=1 log^ f^ (Xi^ |θ)

Estimation

Goal: Fit a parametric probability model to the observed data. For IID data X 1 ,... , Xn ∼ f (x|θ), we discussed three methods:

I (^) Method of moments: Equate the sample mean of Xi , X (^) i^2 , etc. to the theoretical mean of X , X 2 , etc., and solve for θ I (^) Maximum likelihood: Pick θ to maximize

∏n i=1 f^ (Xi^ |θ), or equivalently

∑n i=1 log^ f^ (Xi^ |θ) I (^) Bayesian inference: Postulate a prior distribution fΘ(θ) for θ, compute the posterior

fΘ|X (θ|X 1 ,... , Xn) ∝ fΘ(θ)

∏^ n

i=

f (Xi |θ),

and estimate θ by e.g. the posterior mean

We illustrated how the method of maximum likelihood generalizes to regression models with covariates, where the data Y 1 ,... , Yn are independent but not identically distributed.

Estimation

We discussed the accuracy of estimators in terms of several finite-n properties:

I (^) The bias Eθ[θˆ] − θ I (^) The variance Varθ[θˆ] I (^) The MSE Eθ[(θˆ − θ)^2 ] = bias^2 + variance

Estimation

The definition of asymptotic efficiency was motivated by the Cramer-Rao lower bound: Under mild smoothness conditions, for any unbiased estimator ˆθ of θ, its variance is at least (^1) n I (θ)−^1.

Estimation

The definition of asymptotic efficiency was motivated by the Cramer-Rao lower bound: Under mild smoothness conditions, for any unbiased estimator ˆθ of θ, its variance is at least (^1) n I (θ)−^1.

A major result was that the MLE is asymptotically efficient:

√ n(θˆ − θ) → N (0, I (θ)−^1 )

We showed informally that Bayes estimators, asymptotically for large n, approach the MLE—an implication is that Bayes estimators are usually also asymptotically efficient.

On the other hand, method-of-moments estimators are oftentimes not asymptotically efficient and have a larger mean-squared error than the other two procedures for large n.