<<

Lecture 5: Estimation Goals

• Basic concepts of estimation

• Statistical approaches for estimating

• Parametric

• Nonparametric interval estimation (bootstrap) “Central Dogma” of

Probability Population

Sample

Inferential Statistics Estimation

: whose calculated value is used to estimate a population , "

• Estimate: A particular realization of an estimator, "ˆ ! • Types of : - point estimate: single number that can be regarded! as the most plausible value of " - interval estimate: a of numbers, called a confidence interval indicating, can be regarded as likely containing the true value of " !

! Properties of Good Estimators

• In the Frequentist world view parameters are fixed, statistics are rv and vary from to sample (i.e., have an associated distribution)

• In theory, there are many potential estimators for a population parameter

• What are characteristics of good estimators? Statistical Jargon for Good Estimators

Good Estimators Are:

• Consistent: As the sample size increases "ˆ gets closer to "

lim P $ˆ %$ > & = 0 n "# ( ) ! ! • Unbiased: E["ˆ ] = " !

• Precise: of "ˆ should have a small !stan dard error

! Bias Versus Precision

Precise Imprecise

Biased

Unbiased Methods of

1.Method of Moments

2.Maximum Likelihood

3.Bayesian Methods of Moments

• Advantage: simplest approach for constructing an estimator

• Disadvantage: usually are not the “best” estimators possible

• Principle:

Equate the kth population E[Xk] with the kth sample

1 k moment " X i and solve for the unknown parameter n n

! Method of Moments Example

• How can I estimate the scaled population mutation rate:

" = 4Neµ

• Brief (very brief) expose of coalescent theory:

Coalescent times follow a geometric distribution T2 ! 4N E[T ] T i = time 3 i(i "1) T 4 n

Tc = "iTi ! i= 2

! Method of Moments Example

n

E[Tc ] = "iE[Ti ] i= 2

! Method of Moments Example

n n 4Ni E[Tc ] = "iE[Ti ] =" i= 2 i= 2 i(i #1)

! Method of Moments Example

n n 4Ni n 1 E[Tc ] = "iE[Ti ] =" = 4N" i= 2 i= 2 i(i #1) i= 2 i #1

! Method of Moments Example

n n 4Ni n 1 E[Tc ] = "iE[Ti ] =" = 4N" i= 2 i= 2 i(i #1) i= 2 i #1

E[Sn ] = µE[Tc ] ! n 1 E[Sn ] = µ • 4N# i= 2 i "1 ! n ˆ Sn 1 mom " = n E[Sn ] = "$ 1 i= 2 i #1 $ i 1 ! i= 2 #

! ! Methods of Point Estimation

1. Method of Moments

2.Maximum Likelihood

3. Bayesian Introduction to Likelihood

• Before an is performed the outcome is unknown. allows us to predict unknown outcomes based on known parameters:

P( |")

• For example:

! n x n"x P(x | n, p) = (x )p (1" p)

! Introduction to Likelihood

• After an experiment is performed the outcome is known. Now we talk about the likelihood that a parameter would generate the observed data: L(" | Data) L(" | Data) = P(Data |") • For example: ! n x n"x L(p | n,x) = (x )p (1" p) ! • Estimation proceeds by finding the value of " that makes the observed data most likely ! ! Let’s Play T/F

• True or False: The maximum likelihood estimate (mle) of " gives us the probability of "ˆ

• False - why? ! ! • True or False: The mle of " is the most likely value of "ˆ

• False - why? ! ! • True or False: Maximum likelihood is cool Formal Statement of ML

• Let x1, x2, …, xn be a sequence of n observed variables

• Joint probability:

P(x1, x2, …, xn | " ) = P(X1=x1)P(X2=x2)… P(Xn=xn)

n

= "P(X i = xi ) i=1 ! • Likelihood is then: n

L( " | x1!, x2, …, xn ) = "P(X i = xi ) i=1

n

Log L( " | x1, x2, …, xn ) = "log[P(X i = xi )] i 1 ! ! =

! ! MLE Example

• I want to estimate the recombination fraction between locus A and B from 5 heterozygous (AaBb) parents. I examine 30 gametes for each and observe 4, 3, 5, 6, and 7 recombinant gametes in the five parents. What is the mle of the recombination fraction?

Probability of observing X = r recombinant gametes for a single parent is binomial:

n r n#r P(X = r) = (r )" (1#")

! MLE Example: Specifying Likelihood

Probability:

P(r1, r2, …, rn | " , n) = P(R1 = r1)P(R2 = r2)… P(R5 = r5)

n r1 n#r1 n r1 n#r2 n r1 n#r5 P(r , r , …, r | , n) = r " (1#") • " (1#") •...• " (1#") 1 2 n " ( 1) (r2) (r5) ! Likelihood:

! 5 ! n L( | r , r , …, r , n) = # ri (1$#)n$ri " 1 2 n "(ri) i=1

5 n Log L = log + r •log# + (n $ r )log(1$#) ! " (ri) i i i=1 !

! MLE Example: Maximizing the Likelihood

• Want to find p such that Log L is maximized

5 n Log L = log + r •log# + (n $ r )log(1$#) " (ri) i i i=1

• How?

1. !G raphically 2. Calculus

3. Numerically MLE Example: Finding the mle of p

"

! Methods of Point Estimation

1. Method of Moments

2. Maximum Likelihood

3.Bayesian World View According to Bayesian’s

• The classic philosophy (frequentist) assumes parameters are fixed quantities that we want to estimate as precisely as possible

• Bayesian perspective is different: parameters are random variables with assigned to particular values of parameters to reflect the degree of evidence for that value Revisiting Bayes Theorem

P(B | A)P(A) P(A | B) = P(B)

n Discrete P(B) = P(B | A )P(A ) ! " i i i=1

Continuous P(B) = " P(B | A)P(A)dA !

! Bayesian Estimation

• In order to make probability statements about " given some observed data, D, we make use of Bayes theorem

f (") f (D |") f (")L(" | D) f (" | D) = = f (D) ! f (") f (D |")d" #"

!"#$%&'"&(!()'*%)'+"",(-(.&'"&

! The prior is the probability of the parameter and represents what was thought before seeing the data.

The likelihood is the probability of the data given the parameter and represents the data now available.

The posterior represents what is thought given both prior information and the data just seen. Bayesian Estimation: “Simple” Example

• I want to estimate the recombination fraction between locus A and B from 5 heterozygous (AaBb) parents. I examine 30 gametes for each and observe 4, 3, 5, 6, and 7 recombinant gametes in the five parents. What is the mle of the recombination fraction?

• Tedious to show Bayesian analysis. Let’s simplify and ask what the recombination fraction is for parent three, who had 5 observed recombinant gametes. Specifying The Posterior Density

f (") f (r = 5 |", n = 30) f (" | n = 30, r = 5) = 0.5 # f (r = 5 |", n = 30) f (") d" 0

prior = f (") = uniform[0, 0.5] = 0.5

! 30 ri n#ri likelihood = P(r = 5 |", n = 30) = (5 )" (1#")

!normalizing 0.5 P(r 5 | , n 30) f ( ) d constant = # = " = " " 0 ! 0.5 30! 5 25 0.5 (1- ) d = •(5 ) # " " " ! 6531 0 !

! Specifying The Posterior Density

f (") f (r = 5 |", n = 30) f (" | n = 30, r = 5) = 0.5 # f (r = 5 |", n = 30) f (") d" 0

30 5 25 0.5•(5 )" (1#") f (" | n = 30, r = 5) = 6531 ! Ta da…

!

f (" | n = 30, r = 5)

!

"

! Interval Estimation

• In addition to point estimates, we also want to understand how much uncertainty is associated with it

• One option is to report the

• Alternatively, we might report a confidence interval

• Confidence interval: an interval of plausible values for the parameter being estimated, where degree of plausibility specifided by a “confidence level” Interpreting a 95% CI

• We calculate a 95% CI for a hypothetical sample to be between 20.6 and 35.4. Does this mean there is a 95% probability the true population mean is between 20.6 and 35.4?

• NO! Correct interpretation relies on the long-rang interpretation of probability

µ • Why is this so?