為什麼 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為數學,並抑制了每個末尾的(這些會產生不完整的結果)\hat{p}\\\item\hboxes )。也許$n(1-\pi) \geq to$你的意思不是這樣的$n(1-\pi) \geq t_{0}$

下劃線這不是一個很好的印刷功能,所以我也建議您取消它。

相關內容