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

366
Visualizações
STDDEV_POP VS STDDEV_SAMP

Can someone explain to me what is the difference of these two functions in postgres and when to you which?.

I have this data in my table and would like to compute the standard deviation of trips' sampling rate:

  user_id |      trip_id       |       lat        |       lon        | sampling_rate 
---------+--------------------+------------------+------------------+---------------
     126 | 125020080511025052 | 39.9531666666667 | 116.452566666667 |             7
     126 | 125020080511025052 |         39.95305 | 116.452683333333 |            16
     126 | 125020080511025052 | 39.9530666666667 | 116.452916666667 |            44
     126 | 125020080511025052 | 39.9530833333333 | 116.453183333333 |            40
     126 | 125020080511025052 |         39.95335 |        116.45365 |            21
     126 | 125020080511025052 | 39.9532833333333 | 116.453816666667 |            16
     126 | 125020080511025052 | 39.9533166666667 |        116.45405 |            13
     126 | 125020080511025052 | 39.9535666666667 | 116.454383333333 |            24
     126 | 125020080511025052 | 39.9537166666667 |         116.4546 |            16
     126 | 125020080511025052 | 39.9538333333333 | 116.454733333333 |            17
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This is a statistics question rather than a programming or database question.

The short answer is that you use the sample standard deviation unless you have a reason to use the population standard deviation and understand why you are using population standard deviation instead.

The stddev() in Postgreql maps to stddev_samp().

This is a long read, but it covers the basics: https://statistics.laerd.com/statistical-guides/measures-of-spread-range-quartiles.php

As the number of observations in your sample go up, the sample standard deviation converges toward the population standard deviation.

over 4 years ago · Santiago Trujillo Relatório
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