I came across this formula for the standard error of the mean in a book and wondered how I might be misunderstanding it?
$$\widehat{SE} = \sqrt{\sum_{i=1}^n \frac{(x_i-\bar{x})^2}{n(n-1)}}$$
I would have thought it should be
$$\widehat{SE} = \frac{\sigma_x}{\sqrt{n}}$$
Could it be that the above refers the variance of the mean rather than the standard error? Is the standard error the same as the standard deviation?
Where is $\sigma_x$ is the standard deviation of the sample:
$$\sigma_x = \sqrt{\sum_{i=1}^n \frac{(x_i-\bar{x})^2}{n}}$$
The first formula $$\widehat{SE} = \sqrt{\sum_{i=1}^n \frac{(x_i - \bar x)^2}{n(n-1)}}$$ is a point estimator of the standard error of the sample mean. It is a statistic, and it estimates the standard error.
The true standard error of the sample mean is $$SE = \frac{\sigma}{\sqrt{n}},$$ where $\sigma$ is the population standard deviation, and $n$ is the sample size. This is because for independent and identically distributed $X_1, \ldots, X_n$ with common variance $\sigma^2$, $$\operatorname{Var}[\bar X] = \operatorname{Var}\left[\frac{1}{n} \sum_{i=1}^n X_i\right] \overset{\text{iid}}{=} \frac{1}{n^2} \sum_{i=1}^n \operatorname{Var}[X_i] = \frac{1}{n^2} \cdot n \sigma^2 = \frac{\sigma^2}{n}.$$ Thus the standard deviation of the sampling distribution of the sample mean--i.e., the standard error--is $$SE = \sqrt{\operatorname{Var}[\bar X]} = \frac{\sigma}{\sqrt{n}}.$$ But $\sigma$ is a parameter. If it is unknown, then we can only estimate the standard error through observing a sample. This is why the first equation is $\widehat{SE}$ instead of $SE$.
The notation $\sigma_x$ is sometimes used to denote the sample standard deviation $$\sigma_x = \sqrt{\frac{1}{n-1} \sum_{i=1}^n (x - x_i)^2}.$$ So both expressions are equivalent.