Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

157
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda