MATLAB HELP STANDARD DEVIATION, MEAN, HISTOGRAMS
7 ビュー (過去 30 日間)
古いコメントを表示
PLEASE LEAVE NOTES SO I M
AY UNDERSTAND THE STEPS ON HOW TO FIND THE STANDARD DEVIATION AND MEAN
AY UNDERSTAND THE STEPS ON HOW TO FIND THE STANDARD DEVIATION AND MEAN0 件のコメント
回答 (2 件)
Meg Noah
2025 年 8 月 5 日
Try this:
force_lbs = [243,236,389,628,143,417,205,404,464,605,137,123,372,439,...
497,500,535,577,441,231,675,132,196,217,660,569,865,725,547,347];
mean_lbs = mean(force_lbs);
std_lbs = std(force_lbs);
fprintf(1,'Mean force = %f [lbs]\nStandard Deviation force=%f [lbs]\n' ,...
mean_lbs,std_lbs);
edges_lbs = linspace(-3*std_lbs+mean_lbs,3*std_lbs+mean_lbs,13);
histogram(force_lbs,edges_lbs);
% 68% of the population is approx within 1 standard deviation of the mean
x = norminv([(1-0.68)/2 (1-0.68)/2+0.68]);
upper_limit_68 = mean_lbs + x(2)*std_lbs;
lower_limit_68 = mean_lbs + x(1)*std_lbs;
percentage_in_limit_68 = 100* ...
sum(lower_limit_68 <= force_lbs & force_lbs <= upper_limit_68)/numel(force_lbs);
fprintf(1,'%.4f%s are within the normal 68%s limits [%.4f,%.4f] lbs\n', ...
percentage_in_limit_68, ...
'%','%',lower_limit_68,upper_limit_68);
% 96% of the population is approx within 2.1 standard deviation of the mean
x = norminv([(1-0.96)/2 (1-0.96)/2+0.96]);
upper_limit_96 = mean_lbs + x(2)*std_lbs;
lower_limit_96 = mean_lbs + x(1)*std_lbs;
percentage_in_limit_96 = 100* ...
sum(lower_limit_96 <= force_lbs & force_lbs <= upper_limit_96)/numel(force_lbs);
fprintf(1,'%.4f%s are within the normal 96%s limits [%.4f,%.4f] lbs\n', ...
percentage_in_limit_96, ...
'%','%',lower_limit_96,upper_limit_96);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
