SlideShare a Scribd company logo
1 of 4
Download to read offline
Stochastic Section # 6
Linear Estimation, Model Selection & Hypothesis Test
Eslam Adel
April 10, 2018
1 Parameters Estimation of Model
Estimation of model parameters is an optimization problem. There is different methods for parameter estima-
tion. We talked about minimizing mean square error criteria. Here we have another one which is maximum
likelihood criteria.
1.1 Maximum Likelihood method (ML)
• Maximize the likelihood function or joint probability density function (jPDF).
• jPDF f(x) = f(x0, x1, x2, . . . , xN−1)
• For uncorrelated gaussian vector (independent)
f(x) = f(x0, x1, x2, . . . , xN ) = f(x0)f(x1)f(x2) . . . f(xN−1)
• For correlated signals use conditional probability
f(x) = f(x0, x1, x2, . . . , xN ) = f(xn|xn−1)f(xn−1|xn−2) . . . f(x2|x1)f(x1|x0)f(x0)
• We actually maximize the log(f(x)) where log operator converts multiplication to summation.
• Note: Solving optimization problem to find values of unknowns is out of study.
1.1.1 Example 1
Find the jPDF for the following MA(1) model.
x(n) = (n) + b1 (n − 1) (1)
Solution
n = 0, x0 = 0
n = 1, x1 = 1 + b1 0
n = 2, x2 = 2 + b1 1
In Matrix form







x0
x1
x2
...
xN−1







=







1 0 0 . . . 0
b1 1 0 . . . 0
0 b1 1 . . . 0
...
...
...
...
...
0 0 . . . b1 1














0
1
2
...
N−1







B =







1 0 0 . . . 0
b1 1 0 . . . 0
0 b1 1 . . . 0
...
...
...
...
...
0 0 . . . b1 1







1
So the model will be x = B where ∼ N(0, ) (uncorrelated White gaussian noise).
So x ∼ N(mx, x)
mx = E[x] = E[B ] = BE[ ] = 0
x = E[xxT
] − mxmT
x
x = E[B (B )T
] − 0
x = BE[ T
]BT
= B BT
Therefore
x ∼ N(0, x), x = B BT
And jPDF (likelihood function) :
f(x) =
1
(2π)
N
2 (det( x))
1
2
e
−1
2 (xT −1
x x)
(2)
1.1.2 Example 2
Find the jPDF for the following ARMA(1, 1) model.
x(n) = a1x(n − 1) + (n) + b1 (n − 1) (3)
Solution
Let y(n) = x(n) − a1x(n − k)
n = 0, y0 = x0
n = 1, y1 = x1 − a1x0
n = 2, y2 = x2 − a1x1
In Matrix form







y0
y1
y2
...
yN−1







=







1 0 0 . . . 0
−a1 1 0 . . . 0
0 −a1 1 . . . 0
...
...
...
...
...
0 0 . . . −a1 1














x0
x1
x2
...
xN−1







A =







1 0 0 . . . 0
−a1 1 0 . . . 0
0 −a1 1 . . . 0
...
...
...
...
...
0 0 . . . −a1 1







So y = Ax
And also y(n) = (n) + b1 (n − 1)
n = 0, y0 = 0
n = 1, y1 = 1 + b1 0
n = 2, y2 = 2 + b1 1
In Matrix form







y0
y1
y2
...
yN−1







=







1 0 0 . . . 0
b1 1 0 . . . 0
0 b1 1 . . . 0
...
...
...
...
...
0 0 . . . b1 1














0
1
2
...
N−1







B =







1 0 0 . . . 0
b1 1 0 . . . 0
0 b1 1 . . . 0
...
...
...
...
...
0 0 . . . b1 1







2
y = Ax = B → x = A−1
B where ∼ N(0, ) (uncorrelated White gaussian noise).
So x ∼ N(mx, x)
mx = E[x] = E[A−1
B ] = A−1
BE[ ] = 0
x = E[xxT
] − mxmT
x
x = E[A−1
B (A−1
B )T
] − 0
x = A−1
BE[ T
]BT
(A−1
)T
= A−1
B BT
(A−1
)T
Therefore
x ∼ N(0, x), x = A−1
B BT
(A−1
)T
And jPDF (likelihood function) :
f(x) =
1
(2π)
N
2 (det( x))
1
2
e
−1
2 (xT −1
x x)
(4)
2 Model Selection
Model selection is the next step after estimation of different models for the same signal. We will study a method
to compare different models and select best one of them.
2.1 AIC
• Akaik’s Information Criteria
• Gives a measure of relative quality of statistical models.
• It gives an estimate of relative information loss using such model.
• Best model has minimum information loss (Minimum AIC value)
AIC = 2k − 2ln(ˆL) (5)
where k is number of model parameters. ˆL is an estimate value of likelihood.
3 Hypothesis test
We have two or more different classes of signals. Each class is modeled with a specific model. For a new un-
known signal. We need to determine which class it belongs to. The idea is to calculate likelihood (probability)
of this signal given models of all classes and select most probable class (Max likelihood value).
For unknown signal x with N class data calculate
f1(x|Model1), f2(x|Model2), f3(x|Model3) , . . . , fN (x|ModelN )
signal x belongs to class with maximum likelihood value.
4 Demo
This is a simple example that demonstrates how to estimate different models for your signal, select on of
estimated models based on its AIC value, and apply hypothesis test to determine the class of unknown signal
using predefined models. So steps are
• Model estimation
• Model selection
• Hypothesis test
3
1 c l o s e a l l
2 clc , c l e a r
3 %% Load EEG Dataset
4 % t h i s i s a motor imagery dataset . We have two c l a s s e s .
5 % Class 1 where subject imagines moving h i s r i g h t arm .
6 % Class 2 where subject imagines moving h i s l e f t arm .
7 % There i s d i f f e r e n t EEG channels C3 , C4 and Cz
8 % We w i l l s e l e c t only one of them .
9 load ( ’ dataset BCIcomp1 . mat ’ )
10
11 % We w i l l use f i r s t Channel from c l a s s 1
12 % Note : detrend −> makes the s i g n a l zero mean
13 dataClass1 = detrend ( x t r a i n (500:800 ,1 ,1) ) ;
14 %f i r s t Channel from c l a s s 2
15 dataClass2 = detrend ( x t r a i n (500:800 ,1 ,2) ) ;
16 data = [ dataClass1 , dataClass2 ] ;
17 %Test data from c l a s s 1
18 testData = detrend ( x t r a i n (801:1000 ,1 ,1) ) ;
19
20 % Empty c e l l array to be updated with s e l e c t e d models f o r both c l a s s 1 and 2
21 selectedModels = c e l l (2 ,1) ;
22 %% [ 1 ] Models Estimation
23 % MA(2) , AR(2) , ARMA(1 ,2) Models
24 % We have two c l a s s e s so we w i l l estimate models and s e l e c t one f o r each c l a s s .
25 f o r i = 1:2
26 [ model MA2 , ˜ , logL MA2 ] = estimate ( arima (0 ,0 ,2) , data ( : , i ) ) ;
27 [ model AR2 , ˜ , logL AR2 ] = estimate ( arima (2 ,0 ,0) , data ( : , i ) ) ;
28 [ model ARMA12 , ˜ , logL ARMA12 ] = estimate ( arima (1 ,0 ,2) , data ( : , i ) ) ;
29 models = {model MA2 , model AR2 , model ARMA12 };
30
31 %% [ 2 ] Model S e l e c t i o n based on AIC value
32 %Calculte Akiak ’ s information c r i t e r i a f o r a l l models
33 aic MA2 = 2∗2 − 2∗logL MA2 ;
34 aic AR2 = 2∗2 − 2∗logL AR2 ;
35 aic ARMA12 = 2∗3 − 2∗logL ARMA12 ;
36
37 % S e l e c t model with minimum a i c
38 [ ˜ , idx ] = min ( [ aic MA2 , aic AR2 , aic ARMA12 ] ) ;
39 % Update s e l e c t e d models
40 selectedModels { i } = models{ idx };
41 end
42
43 % I n i t i a l i z e an array to be updated with l i k e l i h o o d values f o r each c l a s s
44 l i k e l i h o o d V a l s = zeros (1 ,2) ;
45 %% [ 3 ] Hypothesis t e s t
46 f o r i = 1:2
47 % Calculate l i k e l i h o o d estimate f o r testData using s e l e c t e d model of each
48 % c l a s s
49 [ ˜ , ˜ , logL ] = estimate ( selectedModels { i } , testData ) ;
50 l i k e l i h o o d V a l s ( i ) = logL ;
51 end
52 %S e l e c t c l a s s with maximum l i k e l i h o o d value
53 [ ˜ , testDataClass ] = max( l i k e l i h o o d V a l s ) ;
54 display ( testDataClass )
Listing 1: Section Demo
You can download section demo from repository
5 Useful links
• System Identification Toolbox examples
• Different Model estimation methods
• estimate function
4

More Related Content

What's hot

Ch 06 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Ch 06 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片Ch 06 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Ch 06 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片Chyi-Tsong Chen
 
Numerical analysis using Scilab: Solving nonlinear equations
Numerical analysis using Scilab: Solving nonlinear equationsNumerical analysis using Scilab: Solving nonlinear equations
Numerical analysis using Scilab: Solving nonlinear equationsScilab
 
MATLAB - Aplication of Arrays and Matrices in Electrical Systems
MATLAB - Aplication of Arrays and Matrices in Electrical SystemsMATLAB - Aplication of Arrays and Matrices in Electrical Systems
MATLAB - Aplication of Arrays and Matrices in Electrical SystemsShameer Ahmed Koya
 
ADAPTIVE CONTROL AND SYNCHRONIZATION OF SPROTT-I SYSTEM WITH UNKNOWN PARAMETERS
ADAPTIVE CONTROL AND SYNCHRONIZATION OF SPROTT-I SYSTEM WITH UNKNOWN PARAMETERSADAPTIVE CONTROL AND SYNCHRONIZATION OF SPROTT-I SYSTEM WITH UNKNOWN PARAMETERS
ADAPTIVE CONTROL AND SYNCHRONIZATION OF SPROTT-I SYSTEM WITH UNKNOWN PARAMETERSijscai
 
PCA and LDA in machine learning
PCA and LDA in machine learningPCA and LDA in machine learning
PCA and LDA in machine learningAkhilesh Joshi
 
Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab
 
STABILITY ANALYSIS AND CONTROL OF A 3-D AUTONOMOUS AI-YUAN-ZHI-HAO HYPERCHAOT...
STABILITY ANALYSIS AND CONTROL OF A 3-D AUTONOMOUS AI-YUAN-ZHI-HAO HYPERCHAOT...STABILITY ANALYSIS AND CONTROL OF A 3-D AUTONOMOUS AI-YUAN-ZHI-HAO HYPERCHAOT...
STABILITY ANALYSIS AND CONTROL OF A 3-D AUTONOMOUS AI-YUAN-ZHI-HAO HYPERCHAOT...ijscai
 
The fundamentals of regression
The fundamentals of regressionThe fundamentals of regression
The fundamentals of regressionStephanie Locke
 
Introduction to matlab lecture 2 of 4
Introduction to matlab lecture 2 of 4Introduction to matlab lecture 2 of 4
Introduction to matlab lecture 2 of 4Randa Elanwar
 
Intro matlab and convolution islam
Intro matlab and convolution islamIntro matlab and convolution islam
Intro matlab and convolution islamIslam Alabbasy
 
Psychtoolbox (PTB) practical course by Volodymyr B. Bogdanov, Kyiv 2017, Day 1
Psychtoolbox (PTB) practical course  by Volodymyr B. Bogdanov, Kyiv 2017, Day 1Psychtoolbox (PTB) practical course  by Volodymyr B. Bogdanov, Kyiv 2017, Day 1
Psychtoolbox (PTB) practical course by Volodymyr B. Bogdanov, Kyiv 2017, Day 1Volodymyr Bogdanov
 
Matlab practice
Matlab practiceMatlab practice
Matlab practiceZunAib Ali
 

What's hot (20)

Ch 06 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Ch 06 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片Ch 06 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
Ch 06 MATLAB Applications in Chemical Engineering_陳奇中教授教學投影片
 
Mat lab
Mat labMat lab
Mat lab
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Basic concepts in_matlab
Basic concepts in_matlabBasic concepts in_matlab
Basic concepts in_matlab
 
MATLAB - Arrays and Matrices
MATLAB - Arrays and MatricesMATLAB - Arrays and Matrices
MATLAB - Arrays and Matrices
 
Numerical analysis using Scilab: Solving nonlinear equations
Numerical analysis using Scilab: Solving nonlinear equationsNumerical analysis using Scilab: Solving nonlinear equations
Numerical analysis using Scilab: Solving nonlinear equations
 
MATLAB - Aplication of Arrays and Matrices in Electrical Systems
MATLAB - Aplication of Arrays and Matrices in Electrical SystemsMATLAB - Aplication of Arrays and Matrices in Electrical Systems
MATLAB - Aplication of Arrays and Matrices in Electrical Systems
 
ADAPTIVE CONTROL AND SYNCHRONIZATION OF SPROTT-I SYSTEM WITH UNKNOWN PARAMETERS
ADAPTIVE CONTROL AND SYNCHRONIZATION OF SPROTT-I SYSTEM WITH UNKNOWN PARAMETERSADAPTIVE CONTROL AND SYNCHRONIZATION OF SPROTT-I SYSTEM WITH UNKNOWN PARAMETERS
ADAPTIVE CONTROL AND SYNCHRONIZATION OF SPROTT-I SYSTEM WITH UNKNOWN PARAMETERS
 
statistics assignment help
statistics assignment helpstatistics assignment help
statistics assignment help
 
PCA and LDA in machine learning
PCA and LDA in machine learningPCA and LDA in machine learning
PCA and LDA in machine learning
 
Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2
 
STABILITY ANALYSIS AND CONTROL OF A 3-D AUTONOMOUS AI-YUAN-ZHI-HAO HYPERCHAOT...
STABILITY ANALYSIS AND CONTROL OF A 3-D AUTONOMOUS AI-YUAN-ZHI-HAO HYPERCHAOT...STABILITY ANALYSIS AND CONTROL OF A 3-D AUTONOMOUS AI-YUAN-ZHI-HAO HYPERCHAOT...
STABILITY ANALYSIS AND CONTROL OF A 3-D AUTONOMOUS AI-YUAN-ZHI-HAO HYPERCHAOT...
 
The fundamentals of regression
The fundamentals of regressionThe fundamentals of regression
The fundamentals of regression
 
Introduction to matlab lecture 2 of 4
Introduction to matlab lecture 2 of 4Introduction to matlab lecture 2 of 4
Introduction to matlab lecture 2 of 4
 
Intro matlab and convolution islam
Intro matlab and convolution islamIntro matlab and convolution islam
Intro matlab and convolution islam
 
Psychtoolbox (PTB) practical course by Volodymyr B. Bogdanov, Kyiv 2017, Day 1
Psychtoolbox (PTB) practical course  by Volodymyr B. Bogdanov, Kyiv 2017, Day 1Psychtoolbox (PTB) practical course  by Volodymyr B. Bogdanov, Kyiv 2017, Day 1
Psychtoolbox (PTB) practical course by Volodymyr B. Bogdanov, Kyiv 2017, Day 1
 
Curvefitting
CurvefittingCurvefitting
Curvefitting
 
Statistics Assignment Help
Statistics Assignment HelpStatistics Assignment Help
Statistics Assignment Help
 
Matlab practice
Matlab practiceMatlab practice
Matlab practice
 
Lab 3
Lab 3Lab 3
Lab 3
 

Similar to Section6 stochastic

Maneuvering target track prediction model
Maneuvering target track prediction modelManeuvering target track prediction model
Maneuvering target track prediction modelIJCI JOURNAL
 
Paper computer
Paper computerPaper computer
Paper computerbikram ...
 
Paper computer
Paper computerPaper computer
Paper computerbikram ...
 
Count-Distinct Problem
Count-Distinct ProblemCount-Distinct Problem
Count-Distinct ProblemKai Zhang
 
Principal Components Analysis, Calculation and Visualization
Principal Components Analysis, Calculation and VisualizationPrincipal Components Analysis, Calculation and Visualization
Principal Components Analysis, Calculation and VisualizationMarjan Sterjev
 
Conditional Random Fields
Conditional Random FieldsConditional Random Fields
Conditional Random Fieldslswing
 
Functional Regression Analysis
Functional Regression AnalysisFunctional Regression Analysis
Functional Regression AnalysisNeuroMat
 
2012 mdsp pr06  hmm
2012 mdsp pr06  hmm2012 mdsp pr06  hmm
2012 mdsp pr06  hmmnozomuhamada
 
Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...
Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...
Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...Michael Lie
 
Introduction to Artificial Neural Networks
Introduction to Artificial Neural NetworksIntroduction to Artificial Neural Networks
Introduction to Artificial Neural NetworksStratio
 
Computational Intelligence Assisted Engineering Design Optimization (using MA...
Computational Intelligence Assisted Engineering Design Optimization (using MA...Computational Intelligence Assisted Engineering Design Optimization (using MA...
Computational Intelligence Assisted Engineering Design Optimization (using MA...AmirParnianifard1
 
Vu_HPSC2012_02.pptx
Vu_HPSC2012_02.pptxVu_HPSC2012_02.pptx
Vu_HPSC2012_02.pptxQucngV
 
chapter10
chapter10chapter10
chapter10butest
 
Conference poster 6
Conference poster 6Conference poster 6
Conference poster 6NTNU
 
assignemts.pdf
assignemts.pdfassignemts.pdf
assignemts.pdframish32
 
Rfid presentation in internet
Rfid presentation in internetRfid presentation in internet
Rfid presentation in internetAli Azarnia
 
Chapter_09_ParameterEstimation.pptx
Chapter_09_ParameterEstimation.pptxChapter_09_ParameterEstimation.pptx
Chapter_09_ParameterEstimation.pptxVimalMehta19
 

Similar to Section6 stochastic (20)

Maneuvering target track prediction model
Maneuvering target track prediction modelManeuvering target track prediction model
Maneuvering target track prediction model
 
Paper computer
Paper computerPaper computer
Paper computer
 
Paper computer
Paper computerPaper computer
Paper computer
 
Count-Distinct Problem
Count-Distinct ProblemCount-Distinct Problem
Count-Distinct Problem
 
Principal Components Analysis, Calculation and Visualization
Principal Components Analysis, Calculation and VisualizationPrincipal Components Analysis, Calculation and Visualization
Principal Components Analysis, Calculation and Visualization
 
Conditional Random Fields
Conditional Random FieldsConditional Random Fields
Conditional Random Fields
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
Functional Regression Analysis
Functional Regression AnalysisFunctional Regression Analysis
Functional Regression Analysis
 
2012 mdsp pr06  hmm
2012 mdsp pr06  hmm2012 mdsp pr06  hmm
2012 mdsp pr06  hmm
 
Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...
Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...
Time-Series Analysis on Multiperiodic Conditional Correlation by Sparse Covar...
 
Introduction to Artificial Neural Networks
Introduction to Artificial Neural NetworksIntroduction to Artificial Neural Networks
Introduction to Artificial Neural Networks
 
Quatum fridge
Quatum fridgeQuatum fridge
Quatum fridge
 
Computational Intelligence Assisted Engineering Design Optimization (using MA...
Computational Intelligence Assisted Engineering Design Optimization (using MA...Computational Intelligence Assisted Engineering Design Optimization (using MA...
Computational Intelligence Assisted Engineering Design Optimization (using MA...
 
Vu_HPSC2012_02.pptx
Vu_HPSC2012_02.pptxVu_HPSC2012_02.pptx
Vu_HPSC2012_02.pptx
 
chapter10
chapter10chapter10
chapter10
 
Conference poster 6
Conference poster 6Conference poster 6
Conference poster 6
 
Project2
Project2Project2
Project2
 
assignemts.pdf
assignemts.pdfassignemts.pdf
assignemts.pdf
 
Rfid presentation in internet
Rfid presentation in internetRfid presentation in internet
Rfid presentation in internet
 
Chapter_09_ParameterEstimation.pptx
Chapter_09_ParameterEstimation.pptxChapter_09_ParameterEstimation.pptx
Chapter_09_ParameterEstimation.pptx
 

More from cairo university

Tocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedTocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedcairo university
 
Tocci chapter 12 memory devices
Tocci chapter 12 memory devicesTocci chapter 12 memory devices
Tocci chapter 12 memory devicescairo university
 
Tocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitsTocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitscairo university
 
Tocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xTocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xcairo university
 
Tocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitsTocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitscairo university
 
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...cairo university
 
A15 sedra ch 15 memory circuits
A15  sedra ch 15 memory circuitsA15  sedra ch 15 memory circuits
A15 sedra ch 15 memory circuitscairo university
 
A14 sedra ch 14 advanced mos and bipolar logic circuits
A14  sedra ch 14 advanced mos and bipolar logic circuitsA14  sedra ch 14 advanced mos and bipolar logic circuits
A14 sedra ch 14 advanced mos and bipolar logic circuitscairo university
 
A13 sedra ch 13 cmos digital logic circuits
A13  sedra ch 13 cmos digital logic circuitsA13  sedra ch 13 cmos digital logic circuits
A13 sedra ch 13 cmos digital logic circuitscairo university
 
A09 sedra ch 9 frequency response
A09  sedra ch 9 frequency responseA09  sedra ch 9 frequency response
A09 sedra ch 9 frequency responsecairo university
 
5 sedra ch 05 mosfet revision
5  sedra ch 05  mosfet revision5  sedra ch 05  mosfet revision
5 sedra ch 05 mosfet revisioncairo university
 
Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01cairo university
 
Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01cairo university
 

More from cairo university (20)

Tocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedTocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extended
 
Tocci chapter 12 memory devices
Tocci chapter 12 memory devicesTocci chapter 12 memory devices
Tocci chapter 12 memory devices
 
Tocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitsTocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuits
 
Tocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xTocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified x
 
Tocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitsTocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuits
 
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
 
A15 sedra ch 15 memory circuits
A15  sedra ch 15 memory circuitsA15  sedra ch 15 memory circuits
A15 sedra ch 15 memory circuits
 
A14 sedra ch 14 advanced mos and bipolar logic circuits
A14  sedra ch 14 advanced mos and bipolar logic circuitsA14  sedra ch 14 advanced mos and bipolar logic circuits
A14 sedra ch 14 advanced mos and bipolar logic circuits
 
A13 sedra ch 13 cmos digital logic circuits
A13  sedra ch 13 cmos digital logic circuitsA13  sedra ch 13 cmos digital logic circuits
A13 sedra ch 13 cmos digital logic circuits
 
A09 sedra ch 9 frequency response
A09  sedra ch 9 frequency responseA09  sedra ch 9 frequency response
A09 sedra ch 9 frequency response
 
5 sedra ch 05 mosfet.ppsx
5  sedra ch 05  mosfet.ppsx5  sedra ch 05  mosfet.ppsx
5 sedra ch 05 mosfet.ppsx
 
5 sedra ch 05 mosfet
5  sedra ch 05  mosfet5  sedra ch 05  mosfet
5 sedra ch 05 mosfet
 
5 sedra ch 05 mosfet revision
5  sedra ch 05  mosfet revision5  sedra ch 05  mosfet revision
5 sedra ch 05 mosfet revision
 
Fields Lec 2
Fields Lec 2Fields Lec 2
Fields Lec 2
 
Fields Lec 1
Fields Lec 1Fields Lec 1
Fields Lec 1
 
Fields Lec 5&6
Fields Lec 5&6Fields Lec 5&6
Fields Lec 5&6
 
Fields Lec 4
Fields Lec 4Fields Lec 4
Fields Lec 4
 
Fields Lec 3
Fields Lec 3Fields Lec 3
Fields Lec 3
 
Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01
 
Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01
 

Recently uploaded

SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
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
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
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
 
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
 

Recently uploaded (20)

SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
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
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
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
 
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
 

Section6 stochastic

  • 1. Stochastic Section # 6 Linear Estimation, Model Selection & Hypothesis Test Eslam Adel April 10, 2018 1 Parameters Estimation of Model Estimation of model parameters is an optimization problem. There is different methods for parameter estima- tion. We talked about minimizing mean square error criteria. Here we have another one which is maximum likelihood criteria. 1.1 Maximum Likelihood method (ML) • Maximize the likelihood function or joint probability density function (jPDF). • jPDF f(x) = f(x0, x1, x2, . . . , xN−1) • For uncorrelated gaussian vector (independent) f(x) = f(x0, x1, x2, . . . , xN ) = f(x0)f(x1)f(x2) . . . f(xN−1) • For correlated signals use conditional probability f(x) = f(x0, x1, x2, . . . , xN ) = f(xn|xn−1)f(xn−1|xn−2) . . . f(x2|x1)f(x1|x0)f(x0) • We actually maximize the log(f(x)) where log operator converts multiplication to summation. • Note: Solving optimization problem to find values of unknowns is out of study. 1.1.1 Example 1 Find the jPDF for the following MA(1) model. x(n) = (n) + b1 (n − 1) (1) Solution n = 0, x0 = 0 n = 1, x1 = 1 + b1 0 n = 2, x2 = 2 + b1 1 In Matrix form        x0 x1 x2 ... xN−1        =        1 0 0 . . . 0 b1 1 0 . . . 0 0 b1 1 . . . 0 ... ... ... ... ... 0 0 . . . b1 1               0 1 2 ... N−1        B =        1 0 0 . . . 0 b1 1 0 . . . 0 0 b1 1 . . . 0 ... ... ... ... ... 0 0 . . . b1 1        1
  • 2. So the model will be x = B where ∼ N(0, ) (uncorrelated White gaussian noise). So x ∼ N(mx, x) mx = E[x] = E[B ] = BE[ ] = 0 x = E[xxT ] − mxmT x x = E[B (B )T ] − 0 x = BE[ T ]BT = B BT Therefore x ∼ N(0, x), x = B BT And jPDF (likelihood function) : f(x) = 1 (2π) N 2 (det( x)) 1 2 e −1 2 (xT −1 x x) (2) 1.1.2 Example 2 Find the jPDF for the following ARMA(1, 1) model. x(n) = a1x(n − 1) + (n) + b1 (n − 1) (3) Solution Let y(n) = x(n) − a1x(n − k) n = 0, y0 = x0 n = 1, y1 = x1 − a1x0 n = 2, y2 = x2 − a1x1 In Matrix form        y0 y1 y2 ... yN−1        =        1 0 0 . . . 0 −a1 1 0 . . . 0 0 −a1 1 . . . 0 ... ... ... ... ... 0 0 . . . −a1 1               x0 x1 x2 ... xN−1        A =        1 0 0 . . . 0 −a1 1 0 . . . 0 0 −a1 1 . . . 0 ... ... ... ... ... 0 0 . . . −a1 1        So y = Ax And also y(n) = (n) + b1 (n − 1) n = 0, y0 = 0 n = 1, y1 = 1 + b1 0 n = 2, y2 = 2 + b1 1 In Matrix form        y0 y1 y2 ... yN−1        =        1 0 0 . . . 0 b1 1 0 . . . 0 0 b1 1 . . . 0 ... ... ... ... ... 0 0 . . . b1 1               0 1 2 ... N−1        B =        1 0 0 . . . 0 b1 1 0 . . . 0 0 b1 1 . . . 0 ... ... ... ... ... 0 0 . . . b1 1        2
  • 3. y = Ax = B → x = A−1 B where ∼ N(0, ) (uncorrelated White gaussian noise). So x ∼ N(mx, x) mx = E[x] = E[A−1 B ] = A−1 BE[ ] = 0 x = E[xxT ] − mxmT x x = E[A−1 B (A−1 B )T ] − 0 x = A−1 BE[ T ]BT (A−1 )T = A−1 B BT (A−1 )T Therefore x ∼ N(0, x), x = A−1 B BT (A−1 )T And jPDF (likelihood function) : f(x) = 1 (2π) N 2 (det( x)) 1 2 e −1 2 (xT −1 x x) (4) 2 Model Selection Model selection is the next step after estimation of different models for the same signal. We will study a method to compare different models and select best one of them. 2.1 AIC • Akaik’s Information Criteria • Gives a measure of relative quality of statistical models. • It gives an estimate of relative information loss using such model. • Best model has minimum information loss (Minimum AIC value) AIC = 2k − 2ln(ˆL) (5) where k is number of model parameters. ˆL is an estimate value of likelihood. 3 Hypothesis test We have two or more different classes of signals. Each class is modeled with a specific model. For a new un- known signal. We need to determine which class it belongs to. The idea is to calculate likelihood (probability) of this signal given models of all classes and select most probable class (Max likelihood value). For unknown signal x with N class data calculate f1(x|Model1), f2(x|Model2), f3(x|Model3) , . . . , fN (x|ModelN ) signal x belongs to class with maximum likelihood value. 4 Demo This is a simple example that demonstrates how to estimate different models for your signal, select on of estimated models based on its AIC value, and apply hypothesis test to determine the class of unknown signal using predefined models. So steps are • Model estimation • Model selection • Hypothesis test 3
  • 4. 1 c l o s e a l l 2 clc , c l e a r 3 %% Load EEG Dataset 4 % t h i s i s a motor imagery dataset . We have two c l a s s e s . 5 % Class 1 where subject imagines moving h i s r i g h t arm . 6 % Class 2 where subject imagines moving h i s l e f t arm . 7 % There i s d i f f e r e n t EEG channels C3 , C4 and Cz 8 % We w i l l s e l e c t only one of them . 9 load ( ’ dataset BCIcomp1 . mat ’ ) 10 11 % We w i l l use f i r s t Channel from c l a s s 1 12 % Note : detrend −> makes the s i g n a l zero mean 13 dataClass1 = detrend ( x t r a i n (500:800 ,1 ,1) ) ; 14 %f i r s t Channel from c l a s s 2 15 dataClass2 = detrend ( x t r a i n (500:800 ,1 ,2) ) ; 16 data = [ dataClass1 , dataClass2 ] ; 17 %Test data from c l a s s 1 18 testData = detrend ( x t r a i n (801:1000 ,1 ,1) ) ; 19 20 % Empty c e l l array to be updated with s e l e c t e d models f o r both c l a s s 1 and 2 21 selectedModels = c e l l (2 ,1) ; 22 %% [ 1 ] Models Estimation 23 % MA(2) , AR(2) , ARMA(1 ,2) Models 24 % We have two c l a s s e s so we w i l l estimate models and s e l e c t one f o r each c l a s s . 25 f o r i = 1:2 26 [ model MA2 , ˜ , logL MA2 ] = estimate ( arima (0 ,0 ,2) , data ( : , i ) ) ; 27 [ model AR2 , ˜ , logL AR2 ] = estimate ( arima (2 ,0 ,0) , data ( : , i ) ) ; 28 [ model ARMA12 , ˜ , logL ARMA12 ] = estimate ( arima (1 ,0 ,2) , data ( : , i ) ) ; 29 models = {model MA2 , model AR2 , model ARMA12 }; 30 31 %% [ 2 ] Model S e l e c t i o n based on AIC value 32 %Calculte Akiak ’ s information c r i t e r i a f o r a l l models 33 aic MA2 = 2∗2 − 2∗logL MA2 ; 34 aic AR2 = 2∗2 − 2∗logL AR2 ; 35 aic ARMA12 = 2∗3 − 2∗logL ARMA12 ; 36 37 % S e l e c t model with minimum a i c 38 [ ˜ , idx ] = min ( [ aic MA2 , aic AR2 , aic ARMA12 ] ) ; 39 % Update s e l e c t e d models 40 selectedModels { i } = models{ idx }; 41 end 42 43 % I n i t i a l i z e an array to be updated with l i k e l i h o o d values f o r each c l a s s 44 l i k e l i h o o d V a l s = zeros (1 ,2) ; 45 %% [ 3 ] Hypothesis t e s t 46 f o r i = 1:2 47 % Calculate l i k e l i h o o d estimate f o r testData using s e l e c t e d model of each 48 % c l a s s 49 [ ˜ , ˜ , logL ] = estimate ( selectedModels { i } , testData ) ; 50 l i k e l i h o o d V a l s ( i ) = logL ; 51 end 52 %S e l e c t c l a s s with maximum l i k e l i h o o d value 53 [ ˜ , testDataClass ] = max( l i k e l i h o o d V a l s ) ; 54 display ( testDataClass ) Listing 1: Section Demo You can download section demo from repository 5 Useful links • System Identification Toolbox examples • Different Model estimation methods • estimate function 4