what degree of fredom one should use while calculating standard diviation for standardizing data

I am writing a function to standardize the data and I found out that we can choose either ddof = 0 or ddof = 1, so I got confused that which one to choose and why? Does this make any difference?

Topic statistics data-cleaning

Category Data Science


ddof represents the degrees of freedom adjustment when you subtract from N in the standard deviation formula below. So I suggest that if you are working with a sample from a population, and you want an unbiased estimate then you use ddof=1. If you want to consider it as a population you can use ddof=0.

$$ S= \sqrt{ \dfrac{1}{N-1}\sum_{i=1}^N \bigg( X_i-\bar X \bigg)^2 } $$

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.