Let $X_1,\ldots X_n\sim Bern(p)$ be Bernoulli random variables and $x_1\ldots x_n$ their realizations. Suppose I want to find the variance of the estimator $\overline X=\frac{X_1+\ldots X_n}{n}$. If we don't know the parameter $p$, one way to do this is using the formula:
$var(\bar X) = \frac{s^2}{n}$, where $s=\frac{\sum_{i=1}^n (x_i-\bar X)^2}{n}$
However, if I understood well, in this slide of this class the professor uses Slutsky theorem to find this formula for the variance replacing the true parameter $p$ by the estimate $\hat p$:
$var(\bar X)=\frac{\hat p(1-\hat p)}{n}$
where $\hat p = \frac{x_1+\ldots x_n}{n}$.
I want to know which formula I should use in this case