Copy link to clipboard
Copied
Hello
I look for a simple standard deviation forumula between 2 numbers (called "ResultOldLot1" and "ResultNewLot1"). The equivalent of STDEV in Excel. I know nothing of java and everytime i try one of the formulas i find online it doesnt work.
Copy link to clipboard
Copied
I dont know if its worth mentioning since thats what STDEV does, but it needs to caclulate Sample and not Population so, exemple, with the numbers 5 and 6 i would need the formula to equate 0.7071067812 and not 0.5
Copy link to clipboard
Copied
What's the formula, then?
Copy link to clipboard
Copied
I dont know? Thats what I'm asking
Copy link to clipboard
Copied
You want us to do your work for you, then? Find the formula and then if you can't figure out how to convert it to code we can help you. All the formulas I saw for Standard Deviation result in 0.5 for the example you gave, by the way.
Copy link to clipboard
Copied
How does you get the value 0.5 ?
Copy link to clipboard
Copied
Info: Acrobat uses Javascript, not Java.
Copy link to clipboard
Copied
It's no use looking for info on Java, it's entirely different. You need JavaScript.
Copy link to clipboard
Copied
Here is a detailed discussion of how to do the equivalent. It's pretty complex because STDDEV takes an array. Be sure to read all the little comments as this is a discussion from a programmer who is getting it wrong; one final line gives the necessary correction.
https://stackoverflow.com/questions/27220776/standard-deviation-in-javascript-for-ms-excel-api
Copy link to clipboard
Copied
Also: it's a long ling time since I studied Numerical Analysis but I am not convinced that the concept of standard deviation has any meaning for two numbers. It is a number, sure, but what use is it? From a quick read of Wikipedia It would be the mean of the sum of the square roots of the difference between two numbers and their mean. But the difference between two numbers and their mean is of course the same in both cases; this is just a derivation of the difference between the numbers, which is much more tedious to calculate. For two figures it might just be the square root of their sum. All the math and more: https://en.wikipedia.org/wiki/Standard_deviation
Copy link to clipboard
Copied
I'm not the one using the formula so i can't say why they need it for two numbers, i work document control in a medical lab and we use tables for Quality Control with our machines.
I do know that they use the standard deviation to get the CV (coefficient of variation). I have my formula for the "Mean" and the CV already, the only missing piece is the standard deviation. Here's what that part of the document looks like
Old Result | New Result | MEAN | SD | CV% |
# | # | average between: Old Result and New Result | ? | SD / MEAN |
Thank you for your reply, I'll read through the discussion linked above
Copy link to clipboard
Copied
Is this calculating formula the way you want it?
https://www.youtube.com/watch?v=TSeK_Nm14-s
If you are interested I can adapt formula for your needs for a fee.
Contact me at: nesa.nurani@gmail.com