Properties of the sample mode for Bernoulli data Suppose we have a sample $X_1,...,X_n \sim \text{IID Bern}(p)$ of Bernoulli values with probability parameter $p \neq 0.5$.  Denoting the sample proportion $\hat{p}_n$ we define the sample mode as:
$$\widehat{\text{mode}}(\mathbf{x}_n) = \begin{cases}
0 & & \text{if } \hat{p}_n < \tfrac{1}{2}, \\[6pt]
\tfrac{1}{2} & & \text{if } \hat{p}_n = \tfrac{1}{2}, \\[6pt]
1 & & \text{if } \hat{p}_n > \tfrac{1}{2} \\[6pt]
\end{cases}$$
It's easy to see (and show) that this is a consistent estimator of the true mode of the distribution, but I'm unsure on how to 1) prove it is biased, and 2) derive an expression for the MSE.
 A: Fix the sample size $n$ and let $\hat p_n$ be any function of the data whatsoever.
The data are modeled as $n$ independent Bernoulli$(p)$ variables $X_1,\ldots, X_n.$
Suppose $\hat p_n$ gives an unbiased estimator of the mode--let's call it $\tau.$ To state what that means, notice that $\tau$ partitions all possible values of the variables into three (disjoint) sets:
$$\begin{aligned}
\mathcal{E}_0 = \{(x_1,x_2,\ldots,x_n)\mid \hat p_n(x_1,\ldots,x_n) \lt \frac{1}{2}\} &; \quad \tau = 0\\
\mathcal{E}_{1/2} = \{(x_1,x_2,\ldots,x_n)\mid \hat p_n(x_1,\ldots,x_n) = \frac{1}{2}\} &; \quad\tau=\frac{1}{2} \\
\mathcal{E}_1 = \{(x_1,x_2,\ldots,x_n)\mid \hat p_n(x_1,\ldots,x_n) \gt \frac{1}{2}\}; &\quad\tau = 1.\end{aligned}$$
The expectation is the sum of the values of $\tau$ times their chances:
$$\begin{aligned}
Q(p) = E[\tau(X_1,\ldots, X_n);p] &= 0\times \Pr(\mathcal{E}_0; p) + \frac{1}{2} \times \Pr(\mathcal{E}_{1/2}; p) + 1 \times \Pr(\mathcal{E}_1; p) \\
&= \frac{1}{2} \Pr(\mathcal{E}_{1/2}; p) + \Pr(\mathcal{E}_1; p).
\end{aligned}\tag{*}$$
Because the $X_i$ are independent and equal $1$ with probability $p$ and $0$ with probability $1-p,$ the chance of any particular sequence of $n$ values $\mathbf x$ is a product of a power of $p$ (the number of ones among the components of $\mathbf x$) and a power of $(1-p)$ (the number of zeros among the components of $\mathbf x$).  This is a polynomial function of degree at most $n.$  Thus, the chances of each of the $\mathcal{E}_{*}$--which are finite sums of such polynomial values--are also polynomial functions of degree at most $n.$
Consider what it means for $\tau$ to be unbiased.  For all $0\lt p\lt 1/2,$ where the mode is $0,$ the expectation $(*)$ must be zero.  This implies it has more than $n$ roots.  This is impossible for a polynomial of degree $n$ or less unless it is identically zero on this interval.  Thus, $Q$ must be the zero polynomial.
For all $1/2\lt p \lt 1,$ where the mode is $1,$ the expectation of $(*)$ must suddenly equal one.  This is impossible: the zero polynomial evaluates to zero for all real arguments.
Consequently, an unbiased estimator $\tau$ of this form does not exist for any $n.$

Using the $\mathcal{E}_{*}$ notation it straightforward to apply the definition of mean squared error to write an expression for the MSE of $\tau.$  But this will remain abstract until you specify a particular function $\hat p_n.$  Then you can evaluate it and perhaps simplify it.
