SlideShare a Scribd company logo
1 of 27
Probability and Statistics for Computer Scientists
Third Edition, By Michael Baron
Section 9.1: Parameter
estimation
CIS 2033. Computational Probability and Statistics
Pei Wang
Parameters of distributions
After determining the family of distribution,
the next step is to estimate the parameters
Example 9.1: The number of defects on each
chip is believed to follow Pois(λ)
Since λ = E(X) is the expectation of a Poisson
variable, it can be estimated with a sample
mean X-bar
This correspondence can be extended
Moments
Central moments
Special cases: μ’2 = Var(X), and m’2 ≈ s2
Calculating sample moments
DATA AVG MOMENT
Xi 1 0 3 1 2 -2 1 3 -1 2 1 m1
Xi
2
1 0 9 1 4 4 1 9 1 4 3.4 m2
Xi − X-bar 0 -1 2 0 1 -3 0 2 -2 1 0 m'1
(Xi − X-bar)2
0 1 4 0 1 9 0 4 4 1 2.4 m'2
Given 10 numbers, find m1, m2, m’1, m’2
Method of moments
To estimate k parameters, we may equate the
first k population and sample moments (or
their centralized version), i.e.
μ1 = m1 , … …, μk = mk
where the left-hand sides of these equations
decide the parameters, while the right-hand
sides can be computed from data
The method of moments finds estimators by
solving the above equations
Method of moments example
The CPU time for 30 randomly chosen tasks of
a certain type are (in seconds)
9 15 19 22 24 25 30 34 35 35
36 36 37 38 42 43 46 48 54 55
56 56 59 62 69 70 82 82 89 139
If they are the values of a random variable X,
what is the model?
Method of moments example (2)
The histogram of the data:
Method of moments example (3)
It does not look like any of the following …
Method of moments example (4)
… but this one:
Method of moments example (5)
From data, we compute
and use two equations
Solving them for α and λ, we get
Water-pump simulation revisited
Inter-arrival times: Exp(λ)
Since E[X] = 1/λ, λ can be estimated by 1/m1
Service requirement: U(a, b)
The parameter a and b can be estimated from
m1 ≈ (a + b) / 2, m’2 ≈ (b − a)2 / 12
So [a, b] ≈ [m1 − (3m’2)1/2,m1 + (3m’2)1/2]
Method of maximum likelihood
Maximum likelihood estimator of a parameter
is the value that maximizes the likelihood of
the observed sample, L(x1, …, xn)
L(x1, …, xn) is defined as p(x1, …, xn) for a
discrete distribution, and f(x1, …, xn) for a
continuous distribution
When the variables X1, …, Xn are independent,
L(x1, …, xn) is obtained by multiplying the
marginal pmfs or pdfs
Likelihood
A simple example: You learned that a coin is
biased and the probability for one side is 0.6,
though you don’t know which side, so there are
two hypotheses: Ber(0.6) and Ber(0.4)
You tossed three times and got dataset D: 0 1 0
If it is Ber(0.6), L(D) = 0.4 * 0.6 * 0.4
If it is Ber(0.4), L(D) = 0.6 * 0.4 * 0.6
The so Ber(0.4) explains D better
Maximum likelihood
Maximum likelihood estimator is the parameter
value that maximizes the likelihood L(θ) of the
observed sample, x1, …, xn
When the observations are independent of
each other, L(θ) =
pθ(x1)*...*pθ(xn) for a discrete variable
fθ(x1)*...*fθ(xn) for a continuous variable
Which is a function with θ as variable
Where is the maximum value
We only consider two types of L(θ):
1. If the function always increases or
decreases, the maximum value is at the
boundary, i.e., the min or max of θ
2. If the function first increases then
decreases, the maximum value is at
where its derivative L’(θ) is zero
Example of Type 1
To estimate the θ in U(0, θ) given positive data
x1, …, xn, e.g., 20, 35, 41, 29, 8, 30
L(θ) is 1/θn when θ ≥ max(x1, …, xn), otherwise 0
Since L(θ) is a decreasing function when
θ ≥ max(x1, …, xn), the best estimator is 41
Similarly, if x1, …, xn are generated by U(a, b),
the maximum likelihood estimate is
a = min(x1, …, xn), b = max(x1, …, xn)
Example of Type 2
If the distribution is Ber(p), and m of the n
sample values are 1, e.g., 0, 1, 1, 1, 0, n=5, m=3
L(p) = pm(1 – p)n–m
L’(p) = mpm–1(1 – p)n–m – pm(n – m)(1 – p)n–m–1
= (m – np)pm–1(1 – p)n–m–1
L’(p) is 0 when p = m/n, which also covers the
situation where p is 0 or 1
So the sample mean is a maximum likelihood
estimator of p in Ber(p)
Example of incomplete pmf
Estimate p(5) and p(6) from the given dataset
Let p(5) = θ, then p(6) = 1 – (0.6 + θ) = 0.4 – θ
L(θ) = 0.112× 0.110× 0.219× 0.223×θ9×(0.4–θ)27
L’(θ) = C[9θ8 (0.4–θ)27 – 27θ9 (0.4–θ)26] = 0
9θ8 (0.4–θ)27 = 27θ9 (0.4–θ)26, 0.4–θ = 3θ, θ = 0.1
a 1 2 3 4 5 6
p(a) 0.1 0.1 0.2 0.2 ? ?
count 12 10 19 23 9 27
Log-likelihood
Log function turns multiplication into addition,
and power into multiplication
E.g. ln(f × g) = ln(f) + ln(g)
ln(f g) = g × ln(f)
Log-likelihood function and likelihood function
reach maximum at the same value
Therefore, ln(L(θ)) may be easier for getting
maximum likelihood
Log-likelihood (2)
E. g., L(p) = pm(1 – p)n–m
ln(L(p)) = m(ln(p)) + (n – m)(ln(1 – p))
[ln(L(p))]’ = m/p – (n – m)/(1 – p)
m/p – (n – m)/(1 – p) = 0
m/p = (n – m)/(1 – p)
m – mp = np – mp
p = m/n
Competing estimators
A parameter may have multiple estimators
derived using different methods
For example, variance (also known as μ’2, the
2nd population central moment) has an
unbiased estimator s2 (sample variance), as well
as a maximum likelihood estimator m’2 (the 2nd
sample central moment), and they are different
Comparing estimators
For an estimator T for parameter θ, its standard
error is Std(T), which and the bias of T indicate
the quality of an estimator
Mean squared error
When both the bias and variance of estimators
are known, usually people prefer the estimator
with the smallest mean squared error (MSE)
For estimator T of parameter θ,
MSE(T) = E[(T − θ)2] = E[T2] −2θE[T] + θ2
= Var(T) + (E[T] − θ)2
= Var(T) + Bias(T)2
MSE summarizes variance and bias
MSE example
Let T1 and T2 be two unbiased estimators for
the same parameter θ based on a sample of
size n, and it is known that
Var(T1) = (θ + 1)(θ − n) / (3n)
Var(T2) = (θ + 1)(θ − n) / [(n + 2)n]
Since n + 2 > 3 when n > 1, MSE(T1) > MSE(T2) ,
so T2 is a better estimator for all values of θ
MSE example (2)
Let T1 and T2 be two estimators for the same
parameter, and it is known that
Var(T1) = 5/n2, Bias(T1) = -2/n
Var(T2) = 1/n2, Bias(T2) = 3/n
MSE(T1) = (5 + 4) / n2
MSE(T2) = (1 + 9) / n2
Since MSE(T1) < MSE(T2) for all n values, T1 is a
better estimator for the parameter
Summary
1. The method of moments
2. The method of maximum likelihood
3. Mean-Squared Error

More Related Content

Similar to MLE vs MoM for Parameter Estimation

Conditional Random Fields
Conditional Random FieldsConditional Random Fields
Conditional Random Fieldslswing
 
Random process and noise
Random process and noiseRandom process and noise
Random process and noisePunk Pankaj
 
Complete l fuzzy metric spaces and common fixed point theorems
Complete l fuzzy metric spaces and  common fixed point theoremsComplete l fuzzy metric spaces and  common fixed point theorems
Complete l fuzzy metric spaces and common fixed point theoremsAlexander Decker
 
Application of stochastic lognormal diffusion model with
Application of stochastic lognormal diffusion model withApplication of stochastic lognormal diffusion model with
Application of stochastic lognormal diffusion model withAlexander Decker
 
On problem-of-parameters-identification-of-dynamic-object
On problem-of-parameters-identification-of-dynamic-objectOn problem-of-parameters-identification-of-dynamic-object
On problem-of-parameters-identification-of-dynamic-objectCemal Ardil
 
Confidence Intervals––Exact Intervals, Jackknife, and Bootstrap
Confidence Intervals––Exact Intervals, Jackknife, and BootstrapConfidence Intervals––Exact Intervals, Jackknife, and Bootstrap
Confidence Intervals––Exact Intervals, Jackknife, and BootstrapFrancesco Casalegno
 
SURF 2012 Final Report(1)
SURF 2012 Final Report(1)SURF 2012 Final Report(1)
SURF 2012 Final Report(1)Eric Zhang
 
Finite-difference modeling, accuracy, and boundary conditions- Arthur Weglein...
Finite-difference modeling, accuracy, and boundary conditions- Arthur Weglein...Finite-difference modeling, accuracy, and boundary conditions- Arthur Weglein...
Finite-difference modeling, accuracy, and boundary conditions- Arthur Weglein...Arthur Weglein
 
A short remark on Feller’s square root condition.
A short remark on Feller’s square root condition.A short remark on Feller’s square root condition.
A short remark on Feller’s square root condition.Ilya Gikhman
 
Multivriada ppt ms
Multivriada   ppt msMultivriada   ppt ms
Multivriada ppt msFaeco Bot
 
X01 Supervised learning problem linear regression one feature theorie
X01 Supervised learning problem linear regression one feature theorieX01 Supervised learning problem linear regression one feature theorie
X01 Supervised learning problem linear regression one feature theorieMarco Moldenhauer
 
Estimation Theory, PhD Course, Ghent University, Belgium
Estimation Theory, PhD Course, Ghent University, BelgiumEstimation Theory, PhD Course, Ghent University, Belgium
Estimation Theory, PhD Course, Ghent University, BelgiumStijn De Vuyst
 

Similar to MLE vs MoM for Parameter Estimation (20)

assignment_2
assignment_2assignment_2
assignment_2
 
Conditional Random Fields
Conditional Random FieldsConditional Random Fields
Conditional Random Fields
 
1 6
1 61 6
1 6
 
Random process and noise
Random process and noiseRandom process and noise
Random process and noise
 
Complete l fuzzy metric spaces and common fixed point theorems
Complete l fuzzy metric spaces and  common fixed point theoremsComplete l fuzzy metric spaces and  common fixed point theorems
Complete l fuzzy metric spaces and common fixed point theorems
 
pattern recognition
pattern recognition pattern recognition
pattern recognition
 
Application of stochastic lognormal diffusion model with
Application of stochastic lognormal diffusion model withApplication of stochastic lognormal diffusion model with
Application of stochastic lognormal diffusion model with
 
On problem-of-parameters-identification-of-dynamic-object
On problem-of-parameters-identification-of-dynamic-objectOn problem-of-parameters-identification-of-dynamic-object
On problem-of-parameters-identification-of-dynamic-object
 
Confidence Intervals––Exact Intervals, Jackknife, and Bootstrap
Confidence Intervals––Exact Intervals, Jackknife, and BootstrapConfidence Intervals––Exact Intervals, Jackknife, and Bootstrap
Confidence Intervals––Exact Intervals, Jackknife, and Bootstrap
 
SURF 2012 Final Report(1)
SURF 2012 Final Report(1)SURF 2012 Final Report(1)
SURF 2012 Final Report(1)
 
Stochastic Processes - part 6
Stochastic Processes - part 6Stochastic Processes - part 6
Stochastic Processes - part 6
 
Chang etal 2012a
Chang etal 2012aChang etal 2012a
Chang etal 2012a
 
Finite-difference modeling, accuracy, and boundary conditions- Arthur Weglein...
Finite-difference modeling, accuracy, and boundary conditions- Arthur Weglein...Finite-difference modeling, accuracy, and boundary conditions- Arthur Weglein...
Finite-difference modeling, accuracy, and boundary conditions- Arthur Weglein...
 
farrell1966.pdf
farrell1966.pdffarrell1966.pdf
farrell1966.pdf
 
A short remark on Feller’s square root condition.
A short remark on Feller’s square root condition.A short remark on Feller’s square root condition.
A short remark on Feller’s square root condition.
 
Cmb part3
Cmb part3Cmb part3
Cmb part3
 
Multivriada ppt ms
Multivriada   ppt msMultivriada   ppt ms
Multivriada ppt ms
 
X01 Supervised learning problem linear regression one feature theorie
X01 Supervised learning problem linear regression one feature theorieX01 Supervised learning problem linear regression one feature theorie
X01 Supervised learning problem linear regression one feature theorie
 
M6.pdf
M6.pdfM6.pdf
M6.pdf
 
Estimation Theory, PhD Course, Ghent University, Belgium
Estimation Theory, PhD Course, Ghent University, BelgiumEstimation Theory, PhD Course, Ghent University, Belgium
Estimation Theory, PhD Course, Ghent University, Belgium
 

Recently uploaded

(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 

Recently uploaded (20)

(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 

MLE vs MoM for Parameter Estimation

  • 1. Probability and Statistics for Computer Scientists Third Edition, By Michael Baron Section 9.1: Parameter estimation CIS 2033. Computational Probability and Statistics Pei Wang
  • 2. Parameters of distributions After determining the family of distribution, the next step is to estimate the parameters Example 9.1: The number of defects on each chip is believed to follow Pois(λ) Since λ = E(X) is the expectation of a Poisson variable, it can be estimated with a sample mean X-bar This correspondence can be extended
  • 4. Central moments Special cases: μ’2 = Var(X), and m’2 ≈ s2
  • 5. Calculating sample moments DATA AVG MOMENT Xi 1 0 3 1 2 -2 1 3 -1 2 1 m1 Xi 2 1 0 9 1 4 4 1 9 1 4 3.4 m2 Xi − X-bar 0 -1 2 0 1 -3 0 2 -2 1 0 m'1 (Xi − X-bar)2 0 1 4 0 1 9 0 4 4 1 2.4 m'2 Given 10 numbers, find m1, m2, m’1, m’2
  • 6. Method of moments To estimate k parameters, we may equate the first k population and sample moments (or their centralized version), i.e. μ1 = m1 , … …, μk = mk where the left-hand sides of these equations decide the parameters, while the right-hand sides can be computed from data The method of moments finds estimators by solving the above equations
  • 7. Method of moments example The CPU time for 30 randomly chosen tasks of a certain type are (in seconds) 9 15 19 22 24 25 30 34 35 35 36 36 37 38 42 43 46 48 54 55 56 56 59 62 69 70 82 82 89 139 If they are the values of a random variable X, what is the model?
  • 8. Method of moments example (2) The histogram of the data:
  • 9. Method of moments example (3) It does not look like any of the following …
  • 10. Method of moments example (4) … but this one:
  • 11. Method of moments example (5) From data, we compute and use two equations Solving them for α and λ, we get
  • 12. Water-pump simulation revisited Inter-arrival times: Exp(λ) Since E[X] = 1/λ, λ can be estimated by 1/m1 Service requirement: U(a, b) The parameter a and b can be estimated from m1 ≈ (a + b) / 2, m’2 ≈ (b − a)2 / 12 So [a, b] ≈ [m1 − (3m’2)1/2,m1 + (3m’2)1/2]
  • 13. Method of maximum likelihood Maximum likelihood estimator of a parameter is the value that maximizes the likelihood of the observed sample, L(x1, …, xn) L(x1, …, xn) is defined as p(x1, …, xn) for a discrete distribution, and f(x1, …, xn) for a continuous distribution When the variables X1, …, Xn are independent, L(x1, …, xn) is obtained by multiplying the marginal pmfs or pdfs
  • 14. Likelihood A simple example: You learned that a coin is biased and the probability for one side is 0.6, though you don’t know which side, so there are two hypotheses: Ber(0.6) and Ber(0.4) You tossed three times and got dataset D: 0 1 0 If it is Ber(0.6), L(D) = 0.4 * 0.6 * 0.4 If it is Ber(0.4), L(D) = 0.6 * 0.4 * 0.6 The so Ber(0.4) explains D better
  • 15. Maximum likelihood Maximum likelihood estimator is the parameter value that maximizes the likelihood L(θ) of the observed sample, x1, …, xn When the observations are independent of each other, L(θ) = pθ(x1)*...*pθ(xn) for a discrete variable fθ(x1)*...*fθ(xn) for a continuous variable Which is a function with θ as variable
  • 16. Where is the maximum value We only consider two types of L(θ): 1. If the function always increases or decreases, the maximum value is at the boundary, i.e., the min or max of θ 2. If the function first increases then decreases, the maximum value is at where its derivative L’(θ) is zero
  • 17. Example of Type 1 To estimate the θ in U(0, θ) given positive data x1, …, xn, e.g., 20, 35, 41, 29, 8, 30 L(θ) is 1/θn when θ ≥ max(x1, …, xn), otherwise 0 Since L(θ) is a decreasing function when θ ≥ max(x1, …, xn), the best estimator is 41 Similarly, if x1, …, xn are generated by U(a, b), the maximum likelihood estimate is a = min(x1, …, xn), b = max(x1, …, xn)
  • 18. Example of Type 2 If the distribution is Ber(p), and m of the n sample values are 1, e.g., 0, 1, 1, 1, 0, n=5, m=3 L(p) = pm(1 – p)n–m L’(p) = mpm–1(1 – p)n–m – pm(n – m)(1 – p)n–m–1 = (m – np)pm–1(1 – p)n–m–1 L’(p) is 0 when p = m/n, which also covers the situation where p is 0 or 1 So the sample mean is a maximum likelihood estimator of p in Ber(p)
  • 19. Example of incomplete pmf Estimate p(5) and p(6) from the given dataset Let p(5) = θ, then p(6) = 1 – (0.6 + θ) = 0.4 – θ L(θ) = 0.112× 0.110× 0.219× 0.223×θ9×(0.4–θ)27 L’(θ) = C[9θ8 (0.4–θ)27 – 27θ9 (0.4–θ)26] = 0 9θ8 (0.4–θ)27 = 27θ9 (0.4–θ)26, 0.4–θ = 3θ, θ = 0.1 a 1 2 3 4 5 6 p(a) 0.1 0.1 0.2 0.2 ? ? count 12 10 19 23 9 27
  • 20. Log-likelihood Log function turns multiplication into addition, and power into multiplication E.g. ln(f × g) = ln(f) + ln(g) ln(f g) = g × ln(f) Log-likelihood function and likelihood function reach maximum at the same value Therefore, ln(L(θ)) may be easier for getting maximum likelihood
  • 21. Log-likelihood (2) E. g., L(p) = pm(1 – p)n–m ln(L(p)) = m(ln(p)) + (n – m)(ln(1 – p)) [ln(L(p))]’ = m/p – (n – m)/(1 – p) m/p – (n – m)/(1 – p) = 0 m/p = (n – m)/(1 – p) m – mp = np – mp p = m/n
  • 22. Competing estimators A parameter may have multiple estimators derived using different methods For example, variance (also known as μ’2, the 2nd population central moment) has an unbiased estimator s2 (sample variance), as well as a maximum likelihood estimator m’2 (the 2nd sample central moment), and they are different
  • 23. Comparing estimators For an estimator T for parameter θ, its standard error is Std(T), which and the bias of T indicate the quality of an estimator
  • 24. Mean squared error When both the bias and variance of estimators are known, usually people prefer the estimator with the smallest mean squared error (MSE) For estimator T of parameter θ, MSE(T) = E[(T − θ)2] = E[T2] −2θE[T] + θ2 = Var(T) + (E[T] − θ)2 = Var(T) + Bias(T)2 MSE summarizes variance and bias
  • 25. MSE example Let T1 and T2 be two unbiased estimators for the same parameter θ based on a sample of size n, and it is known that Var(T1) = (θ + 1)(θ − n) / (3n) Var(T2) = (θ + 1)(θ − n) / [(n + 2)n] Since n + 2 > 3 when n > 1, MSE(T1) > MSE(T2) , so T2 is a better estimator for all values of θ
  • 26. MSE example (2) Let T1 and T2 be two estimators for the same parameter, and it is known that Var(T1) = 5/n2, Bias(T1) = -2/n Var(T2) = 1/n2, Bias(T2) = 3/n MSE(T1) = (5 + 4) / n2 MSE(T2) = (1 + 9) / n2 Since MSE(T1) < MSE(T2) for all n values, T1 is a better estimator for the parameter
  • 27. Summary 1. The method of moments 2. The method of maximum likelihood 3. Mean-Squared Error