Let $\hat{X} = \left( x^0,x^1,\cdots , x^{N-1}\right)$ be the sequence of $N$ i.i.d realizations of a random variable $X$ with pmf $P_1, P_2, \cdots , P_{d}$, where $P_i$ is the probability of appearance of symbol $i$. Can we show that
\begin{align}
\hat{P}_{i} &= \frac{N_i}{N}\\
&= \frac{1}{N}\sum_{k=0}^{N-1} I\left( x^k = i \right)
\end{align}
is a consistent estimator of $P_i$, where $I\left( x^k = i \right)$ is the indicator function (=1 when $x^k = i$, and 0 otherwise)?