hi all, i tabulated out my data residual and i do a boxplot on the residual, what i find is the median line is closer to the 75th percentile so by right it should be positively skewed and i use matlab function skewness(data) and got a positive value which validate the residual boxplot as positively skewed. However, if its positively skewed it should mean there are more observation on the positive side, but of all the residual that i have(124 of them) only 30+ of them is positive. I wondering if it still considered as positively skewed ? or is there something i missed out ? (and yes, my mean is smaller than median)

 채택된 답변

Image Analyst
Image Analyst 2015년 3월 24일

0 개 추천

Please post a screenshot, and attach your data file and m-code to read it in and plot it, if you can.
Be aware that skewness is determined not only by how many data points are to the right and left of the mode but also how far away they are . So more points that are on the left but close to the mode, may not overwhelm a few points that are on the right but much farther away, giving an overall positive skewness even though more points are on the left. Here is the formula for an image:
% Get the skew.
skewness = sum((GLs - meanGL) .^ 3 .* pixelCounts) / ((numberOfPixels - 1) * stdDev^3);

댓글 수: 5

crixus
crixus 2015년 3월 24일
thanks for your reply! so the points of the 124 residual looks like this, there's only negative and positive values. I tried to do a summation of both negative and positive value and sum together, the result is negative and Skewness(data) gives a value of 0.0872
Image Analyst
Image Analyst 2015년 3월 24일
Again, attach your 124 data values so people can try things.
crixus
crixus 2015년 3월 24일
thanks for your help ! is there anything else required ?
I did it manually - not using skewness() function. I get -1.22.
s=load('matlab.mat')
array = s.err_sptb
referenceValue = 0;
numElements = length(array)
stdDev = std(array)
skewness = sum((array - referenceValue) .^ 3) / ((numElements - 1) * stdDev^3)
numElements =
123
stdDev =
345.66713081467
skewness =
-1.22297782162426
crixus
crixus 2015년 3월 25일
thanks for your help ! really appreciate it.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

질문:

2015년 3월 24일

댓글:

2015년 3월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by