How to use bootstrap technique among multiple data sets by choosing data sets randomly

6 views (last 30 days)
I have two time series of 2,15,000 samples each i.e. one is E and another one H;
I made total samples into 10 sections i.e. 21,500 samples each section for E time series and 10 sections i.e. 21,500 samples each section for H time series
I want to calculate Z=[E/H];
E and H data are stored in one matrix for one section i.e. total 10 matrices for 10 sections.
Now One section (matrix) is chosen randomly among 10 with equal probability i.e. 1/10, and the process is repeated 10 times. This yields 10 sections( or matrices). It should be noted that among them, some sections may be the same section, since each section is chosen independently with equal probability from the entire sampling space. The corresponding E and H data terms of the chosen 10 matrices, are then used in equation Z=[E/H] to obtain one estimate of the impedance Z1.
The whole procedure is repeated 500 times such that 500 estimates of Z1,Z2....Z500 are obtained. The mean values obtained by the bootstrapping are considered as the Z estimates and confidence intervals of 95% are derived from standard deviations.
How to do this. Please anybody help me to solve this.?
  4 Comments
Pradeep Bukke
Pradeep Bukke on 29 Mar 2020
Edited: Adam Danz on 29 Mar 2020
Ameer Hamza...
Have you already divided E and H into 10 matrices? ---- Yes
Do you already have some code?...
EH1=[E1 H1];
EH2=[E2 H2];
EH3=[E3 H3];
EH4=[E4 H4];
EH5=[E5 H5];
EH6=[E6 H6];
EH7=[E7 H7];
EH8=[E8 H8];
EH9=[E9 H9];
EH10=[E10 H10];
TFF=bootstrp(500,@(tf) impten(tf),EH1);
Zfinal=mean(TFF);
function Zxy=impten(TfEH)
Zxy=TfEH(:,1)./TfEH(:,2);
end
You mentioned that in each iteration, 10 sections would be chosen randomly------- In each iteration only 1 section (matrix) is chosen randomly not 10 sections at a time...
Actually 1 section (matrix) of data is enough to calculate the Z. But due to noise problems i collected 10 sections (10 matrices). With these 10 sections i have to use 1 section at a time in bootstrp() function to calculate Z for 500 iterations. i will average these 500 iterations to get Z.
Pradeep Bukke
Pradeep Bukke on 29 Mar 2020
@Adam Danz
EH1=[E1 H1];
EH2=[E2 H2];
EH3=[E3 H3];
EH4=[E4 H4];
EH5=[E5 H5];
EH6=[E6 H6];
EH7=[E7 H7];
EH8=[E8 H8];
EH9=[E9 H9];
EH10=[E10 H10];
TFF=bootstrp(500,@(tf) impten(tf),EH1);
Zfinal=mean(TFF);
function Zxy=impten(TfEH)
Zxy=TfEH(:,1)./TfEH(:,2);
end
Actually EH1 is enough to calculate Zfinal... but i want to use all the 10 sections data i.e. EH1 to EH10 in bootsrtp function for 500 iterations to get Zfinal. Thank you for the reply.

Sign in to comment.

Accepted Answer

Adam Danz
Adam Danz on 29 Mar 2020
Edited: Adam Danz on 31 Mar 2020
"... i want to use all the 10 sections data i.e. EH1 to EH10 in bootsrtp function for 500 iterations to get Zfinal."
Why split them up in the first place? The best solution is to not split up the data.
But if you want the split data to be combined,
EHall = [EH1; EH2; EH3; . . .; EH10];
TFF=bootstrp(500,@(tf) impten(tf),EHall);

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!