When calculating the standard deviation of a set of measurements of $X$, you use the formula $$\sqrt{\frac{1}{n-1}\sum_{i=1}^n(x_i-\bar x)^2}$$ A common explanation I have found for the $n-1$ factor is that it refers to the degrees of freedom. As I understand he degrees of freedom is the number of values you can pick, which is equal to the number of samples minus the number of relations between them.
Let's say $n=3$ and we pick values until our vector is fully determined. $$(x_1,x_2,x_3,\bar x)\\(4,x_2,x_3,\bar x)\\(4,9,x_3,\bar x)\\(4,9,x_3,7)$$ At this point we have enough information to calculate that $x_3=8$. We could also have picked $x_3$ to calculate $\bar x$. So why isn't the degrees of freedom $n$ since we had to pick $n$ values to fully determine the standard deviation?