Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

159
Views
Get consistency on scale from 0 to 100 from standard deviation js

As the title says I want to convert standard deviation to consistency on a scale from 0 to 100 but I'm unsure of how to accomplish this. So far I have a function to calculate the standard deviation but I don't know where to continue.

JS:

function standardDeviation(numArray) {
  const mean = numArray.reduce((s, n) => s + n) / numArray.length;
  const variance = numArray.reduce((s, n) => s + (n - mean) ** 2, 0) / (numArray.length - 1);
  return Math.sqrt(variance);
}

an example of the data would be like: [1, 0.7193590816692575, 0.5724022479971302, 0.717924189884013, 0.8615329427239031, 0.7186416357766352, 0, 0.2863804854717206, 0.5745545856749971]

output would be the consistency of these numbers perhaps something like 70%

if the input data was [1, 1, 1, 1, 1, 1] the consistency would be 100%

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!