Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to calculate the difference between two sets of data

조회 수: 1 (최근 30일)
Shan  Chu
Shan Chu 2017년 6월 30일
마감: John D'Errico 2017년 7월 1일
Hi everyone, I have a problem about calculating the difference (error) between two sets of data. I am a rookie in statistics so could you please help.
For example, I have 2 two of data f1(x) (reference) and f2(x). please note these 2 sets decay from 0.5 and approach zero as their limit. Usually, I would use the relative error abs(f1(x)-f2(x)) / f1(x).
However, as these two is approaching zero so a problem occurs: at x very large, f1(x) for example could be 1e-6 and f2(x) could be 2e-6. So basically the relative error is 200% but actually, we can assume two sets match because the absolute value is very small.
So do you have any idea of a methodology to solve my problem? Thanks
  댓글 수: 1
Adam
Adam 2017년 6월 30일
abs(f1(x)-f2(x)) / max( 1, f1(x) );
might work as an estimate, but it very much depends on your data and what you consider to be significant or not in terms of error. It sounds like you want relative error when it is big and some measure more related to absolute measure when it is 'small'

답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by