Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relative change formula seems wrong #171

Open
stvno opened this issue Dec 15, 2017 · 0 comments
Open

relative change formula seems wrong #171

stvno opened this issue Dec 15, 2017 · 0 comments

Comments

@stvno
Copy link
Contributor

stvno commented Dec 15, 2017

While testing the application I noticed that lower average speeds have higher percentage changes when compared against the reference speeds. This is counter intuitive: a lower average speed should have a lower percentage change.
I checked the code and noticed that the formula to calculate the percentage change seems weird:

geometry.percentDiff = ((refSpeed - geometry.speed) / mathjs.mean(refSpeed, geometry.speed)) * 100

The way I would assume would be (average-reference)/reference *100 as per https://en.wikipedia.org/wiki/Relative_change_and_difference
Any particular reason we are not using the simple formula?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant