Standard Deviation comparison between 2 dataset

조회 수: 8 (최근 30일)
Truong Dinh
Truong Dinh 2022년 4월 15일
댓글: Truong Dinh 2022년 4월 27일
Hello,
I would like to ask if there is any funtion in matlab that support to do comparasion between 2 standard deviation from 2 data like in Minitab. The only one i can find is Vartest2, but it compare Variance instead of Standard deviation.
Thank you all.
  댓글 수: 2
Mathieu NOE
Mathieu NOE 2022년 4월 15일
hello
as far as I can remember variance is the squared value of SD. so if you have a solution that works for V you have a solution for SD
Truong Dinh
Truong Dinh 2022년 4월 27일
the final result maybe the same ( reject or not reject) but the P-value is different. I try to do something that similar with minitab function.

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2022년 4월 15일
Maybe you want the ttest() to do a T-test, or anova() to do the "F statistic" test.
  댓글 수: 1
Truong Dinh
Truong Dinh 2022년 4월 27일
sorry for late comment, ttest2 is comparing the different bettwen the mean of 2 sample. However i want to compare the different between the Standard Deviation of 2 sample and i want to compare with Mintab result. F statistis test is not using Bonett test and it cannot test Significant Different of 2 sample. I try to write the function in Matlab using Minitab Formular, however it was not return the same value.
nx= numel(X);
ny= numel(Y);
sx = std(X);
sy= std(Y);
gx = (nx-3)/nx;
gy =(ny-3)/ny;
mx = mean(X) /(2*sqrt(nx-4));
my =mean(Y) /(2*sqrt(ny-4));
cx = nx/(nx-z);
cy = ny/(ny-z);
C =cx/cy;
gamma_p =(nx+ny)*(sum((X-mx).^4) + sum((Y-my).^4)) / (((nx-1)*(sx^2)+(ny-1)*(sy^2))^2);
se = sqrt(((gamma_p- gx)/(nx-1))+((gamma_p- gy)/(ny-1)));
%% estimate z
Z_est =log(C*(sx^2/sy^2))/se;
P = normcdf(Z_est);

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Descriptive Statistics and Visualization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by