Finding 95 CI of multiple graphs

1 view (last 30 days)
Me Me
Me Me on 21 Feb 2021
Edited: Me Me on 21 Feb 2021
Hi,
I think i might have confused myself quite a bit with regards to 95%-CI.
I have multiple graphs showing a gradually opening of a fracture. I computed the mean of the graphs by interpolating at the same x-axis.
When i compute the CI-95 do i have to do the same? with interp1?
I have a 19*8 matrix, where the rows correponds to the same x-axis and colums the gradual opening.
This is my code (taking from https://se.mathworks.com/matlabcentral/answers/290707-average-multiple-curves-matlab)
for k1=1:length(theFiles)
xold(:,k1) = M(:,k1);
yold(:,k1)=B(:,k1);
yint(:,k1) = interp1(xold(:,k1), yold(:,k1), xi, 'linear', 'extrap');
end
Then i guess i have to use the yint to compute the confidence interval?
i found this code snippert posted by Star Strider also (https://se.mathworks.com/matlabcentral/answers/159417-how-to-calculate-the-confidence-interval)
x = B; % Create Data
SEM = std(x)/sqrt(length(x)); % Standard Error
ts = tinv([0.025 0.975],length(x)-1); % T-Score
CI = mean(x) + ts*SEM; % Confidence Intervals
Sorry if it may seem like a silly question.
Thanks for the help!

Answers (0)

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!