2
$\begingroup$

There is much discussion on this site why the sum of squared deviations is divided by $n - 1$ when computing either the sample variance or the sample standard deviation.

One of the explanations that I heard for this is that we 'used' some of the data to estimate the population mean with the sample mean. Therefore, that cost 1 degree of freedom.

Can someone please explain, then, why, when calculating the standard error of the sample proportions (as part of the z-test for 1 population proportion) we divide by $n$ and not $n - 1$. The first step in that process is to compute $\widehat{p}$. Then, the standard error of the sample proportions is 'built' on the foundation of that first step. I would have thought that estimating the population proportion with the sample proportion would have cost us 1 degree of freedom. I know that when the assumptions are met, the sample proportions are distributed normal (whose shape is not governed by degrees of freedom), but I am left wondering why this calculation (and quite frankly, the calculation for the standard error of the sample mean) is not analogous to what we did for the sample standard deviation. Why are both of these standard errors calculated by dividing by $n$ and not $n - 1$?

$\endgroup$
3
  • $\begingroup$ Also: Welcome to CV! $\endgroup$
    – Alexis
    Commented Sep 20, 2021 at 4:08
  • 1
    $\begingroup$ This is essentially answered at stats.stackexchange.com/questions/294737 (where the sample values are coded $-1$ and $1$ rather than $0$ and $1$). You can also find an answer (for proportions) at stats.stackexchange.com/questions/284160. $\endgroup$
    – whuber
    Commented Sep 20, 2021 at 13:44
  • $\begingroup$ This really isn't a standard error issue, it is a standard deviation issue. You could use $n-1$ in the standard deviation estimate in either case, or you could use $n$ in either case. The difference is just because of historical inertia. On the other hand you do need to use $n$ for the standard error in either case. $\endgroup$ Commented Sep 20, 2021 at 21:21

1 Answer 1

3
$\begingroup$

Each observation in a test for proportion difference has either a 0 or 1 value. These values are assumed to be independent of one another (e.g., the first observation recording a '1' has no bearing on whether the second observation—or any other observation—will or will not record a '1' also).

These two facts mean that the outcome variable in a test for proportion difference is distributed Bernouli, with probability $p$. Unlike the normal distribution, in which the mean ($\mu_{x}$), and standard deviation ($\sigma_{x}$) are independent of one another—for example, normally distributed data can have a mean of 5, but a standard deviation of 2, 20, 200,000, or any (non-negative) value, and vice versa—in a Bernouli distribution the standard deviation, and therefore the standard deviation of sample proportions of size $n$, is purely a function of the mean: $\sigma_{x} = \sqrt{p(1-p)}$ and $\sigma_{\widehat{p}} = \sqrt{\frac{p(1-p)}{n}}$, where the mean of Bernouli data is 'dressed up' with the symbol '$p$'. Since the proportion has already been calculated, you get the standard deviation of the sample proportion 'for free'.

$\endgroup$
3
  • 1
    $\begingroup$ Thank you for this explanation. This makes complete sense. Can you comment on the standard error for the sample mean calculation? Why divide by sqrt(n) and not sqrt(n-1)? Thanks! $\endgroup$
    – Dan
    Commented Sep 20, 2021 at 2:46
  • $\begingroup$ @Dan I could, but you already have it in your question! For a sample mean (say, continuous and normalish-ly distributed), you use information calculating the mean, but then you use the mean to calculate the (variance and the) standard deviation: $s = \sqrt{\frac{\sum_{i}^{n} \left(x_{i}-\overline{x}\right)^{2}}{n-1}} = \sqrt{\frac{\sum_{i}^{n} \left(x_{i}-\frac{\sum_{i}^{n}x_{i}}{n}\right)^{2}}{n-1}}$: that $\overline{x}$ is using $\frac{1}{n}^{\text{th}}$ of the information in each observation… and since you have $n$ observations that's 1 degree of freedom lost from the denominator. $\endgroup$
    – Alexis
    Commented Sep 20, 2021 at 4:05
  • 1
    $\begingroup$ @Dan It's $1/\sqrt{n}$ because the variance of the mean of independent identically distributed variables is $1/n$ times the variance of the individual observations. $\text{var}(\bar{X})=\text{var}(\frac{1}{n}\sum_i X_i)=\frac{1}{n^2}\text{var}(\sum_i X_i)$ (multiplication by a constant) $=\frac{1}{n^2}\sum_i\text{var}(X_i)=\frac{1}{n^2}\,n\,\text{var}(X_i)$ (independence), $=\frac{1}{n}\text{var}(X_i)$. See en.wikipedia.org/wiki/Variance#Basic_properties $\endgroup$
    – Glen_b
    Commented Sep 20, 2021 at 4:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.