为什么 LaTeX 告诉我缺少 {?

为什么 LaTeX 告诉我缺少 {?

每当我编译包含以下代码的文档时,它都会在 pdf 上产生令人满意的输出,但却出现错误:

43
Missing { inserted.
<to be read again> 
                   \gdef 
l.43 \item $\mu_\hat{p}
                       $ = mean of all possible values of $\hat{p} = \pi$. \\

\begin{itemize}
\item $\mu_\hat{p}$ = mean of all possible values of $\hat{p} = \pi$. \\
\item $\sigma_\hat{p}$ = standard deviation of all possible values of \^p =     $\sqrt{\frac{\pi(1-\pi)}{n}}$ \\
\item CLT (for \^p): If $n\pi \geq 10$ \underline{AND} $n(1-\pi) \geq to$, then the histogram of all possible values of \^p will be approximately normal. \\
\end{itemize}

我做错了什么?

答案1

下标需要用括号括起来:\mu_{\hat{p}}\sigma_{\hat{p}}

\documentclass{article}
\usepackage{amssymb}
\begin{document}

\begin{itemize}
\item $\mu_{\hat{p}}$ is the mean of all possible values of $\hat{p} = \pi$.
\item $\sigma_{\hat{p}}$ represents the  standard deviation of all possible values of $\hat{p} =     \sqrt{\frac{\pi(1-\pi)}{n}}$
\item CLT (for $\hat{p}$): If $n\pi \geq 10$ \underline{AND} $n(1-\pi) \geq to$, then the histogram of all possible values of $\hat{p}$ will be approximately normal.
\end{itemize}

\end{document}

在此处输入图片描述

为了保持一致性,我还将文本更改\^p为数学,并在每个文本末尾隐藏了(这些会产生 undefull )。也许您指的是?\hat{p}\\\item\hboxes$n(1-\pi) \geq to$$n(1-\pi) \geq t_{0}$

下划线不是一个很好的印刷特性,所以我建议你抑制它。

相关内容