Can't manage to set up an optimization problem in Matlab 2021b from Excel
1 view (last 30 days)
Show older comments
Hi, I will use silly data to explain my problem. I would like to estimate the parameters (mu and sigma in my example) of a statistical distribution with simulations (bootstrap). Let assume that I have the vector x of the observed data, sampled from a distribution with unknown population parameters mu and sigma:
mu = 50;
sigma = 1;
N = 100;
x = norminv(rand(N,1),mu,sigma) % my observations vector – simulated only for only for exemplification purpose
I would like to estimate the population parameters by simulating nSimul = 1000 extractions from the same distribution (in this case normal distribution) where the initial parameters are set equals to mu0and sigma0 by minimizing the sum of the absolute difference between or the sum of the squared difference between the observed vector and the simulated vector.
To explain myself better, in Excel I did like this:
I know that for the normal distribution it does not make sense, BUT I am interested in a more complicated statistical distribution and the main issue I am not able to overcome is the optimization problem setting with matlab, i.e. how to:
Minimize the sum of absolute differences between observations and the simulated vector by changing the parameters mu and sigma, starting from mu0 and sigma0, subject to a constraint (es. non negativity for the variance).
0 Comments
Answers (1)
Cris LaPierre
on 24 Dec 2021
I would look into problem based optimization with MATLAB (requires Optimization Toolbox).
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!