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.
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
What's the formula, then?
I dont know? Thats what I'm asking
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.
How does you get the value 0.5 ?
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.
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
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%|
Old Result and New Result
|?||SD / MEAN|
Thank you for your reply, I'll read through the discussion linked above