隐藏(留出空间)“解决方案”的最佳方法是什么?

隐藏(留出空间)“解决方案”的最佳方法是什么?

抱歉,如果我的上一个问题不太清楚。稍后我会删除它。

这是一个 MVE。

\documentclass[12pt,a4paper]{report}

\usepackage{amsmath,amsthm,amssymb}
\usepackage{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Example and Solution

\usepackage{thmtools}

\declaretheoremstyle[
    spaceabove=6pt, spacebelow=6pt,
    headfont=\normalfont\bfseries,
    notefont=\mdseries, notebraces={(}{)},
    bodyfont=\normalfont\itshape,
    postheadspace=1em,
    numberwithin=section
]{exstyle}
%
\declaretheoremstyle[
    spaceabove=6pt, spacebelow=6pt,
    headfont=\normalfont\bfseries,
    notefont=\mdseries, notebraces={(}{)},
    bodyfont=\normalfont,
    postheadspace=1em,
    headpunct={},
    qed=$\blacktriangleleft$,
    numberwithin=section
    %numbered=no
]{solstyle}
\declaretheorem[style=exstyle]{example}
\declaretheorem[style=solstyle]{solution}



\begin{document}
\chapter{ABCDEFGH}
\section{DDDDDDDDDDDDDDDDD}


\begin{example}
    Cars pass a particular point at a rate of 5 cars per minute.
    \begin{enumerate}[(a)]
        \item Find the probability that exactly 4 cars pass the point in a minute.
        \item Find the probability that between at least 3 but fewer than 8 cars pass in a particular minute.
        \item Find the probability that more than 8 cars pass in 2 minutes.
        \item Find the probability that more than 3 cars pass in each of two separate minutes.
    \end{enumerate}


\begin{solution}
    Let $X$ be the number of cars passing in a minute, then $X \sim \text{Po}(5)$.
    \begin{enumerate}[(a)]
        \item
            \begin{equation}
                P(X=4) = \frac{5^4\mathrm{e}^{-5}}{4!} \approx 0.175
            \end{equation}
        \item
            \begin{equation}
                P(3 \leq X \leq 8) 
                = 
                P(X \leq 7) - P(X \leq 2)
                =
                0.8666 - 0.1247
                =
                0.7419
            \end{equation}
        \item
        Poisson distribution assumes a constant rate of occurrence. So in two minutes' time, the rate would be 10. Let $Y$ be the number of cars passing in two minutes. Then $Y \sim \text{Po}(10)$, and
            \begin{equation}
                P(Y>8) = 1 - P(Y \leq 8) = 1 - 0.3328 = 0.6672
            \end{equation}
        \item
            For each one separate minute, we have
            \begin{equation}
                P(X>3) = 1 - P(X \leq 3) = 1 - 0.2650 = 0.7350.
            \end{equation}  \end{enumerate}
            So the probability that more than 3 cars pass in each of two separate minutes is \begin{equation}
                0.7350^2=0.540
            \end{equation}
            to 3.s.f.
\end{solution}
\end{example}




\section{Mean and variance of the Poisson distribution}
We do the same trick as we did in Section~\ref{sec:binom-proof}.
\begin{align}
    \operatorname{E}(X)
    &= \sum_{x=0}^\infty x P(X=x) \\
    &= \sum_{x=1}^\infty x \frac{\mu^x\mathrm{e}^{-\mu}}{x!} \\
    &= \sum_{x=1}^\infty \frac{\mu^x\mathrm{e}^{-\mu}}{(x-1)!} \\
    &= \mu \sum_{x=1}^\infty \frac{\mu^{x-1}\mathrm{e}^{-\mu}}{(x-1)!} \\
    &= \mu \sum_{y=0}^\infty \frac{\mu^y\mathrm{e}^{-\mu}}{y!} \\
    &= \mu.
\end{align}
The expectation of a Poisson distribution is the parameter $\mu$. \\

It can be shown that
\begin{equation}
    \operatorname{E}(X(X-1)) = \mu^2,
\end{equation}
it follows that
\begin{equation}
    \operatorname{Var}(X) 
    = \operatorname{E}[X(X-1)]+\operatorname{E}(X)-\operatorname{E}(X)^2
    = \mu^2 + \mu - \mu^2
    = \mu.
\end{equation}
For a Poisson distribution, the mean equals the variance.


\begin{example}
In producing rolls of cloth there are on average 4 flaws in every 10 metres of cloth.
    \begin{enumerate}[(a)]
        \item Find the mean number of flaws in a 30 metre length.
        \item Find the probability of fewer than 3 flaws in a 6 metre length.
        \item Find the variance of the number of flaws in a 15 metre length.
    \end{enumerate}


    \begin{solution}
    Assuming a Poisson distribution -- flaws in the cloth occur singly, independently, uniformly and randomly.
    \begin{enumerate}[(a)]
        \item If the mean number of flaws in 10 metres is 4, then the mean number of flaws in 30 metre lengths is $3\times4 = 12$.
        \item If there are 4 flaws on average in a 10 metre length there will be $\frac{6}{10}\times4=2.4$ flaws on average in a 6 metre length. If $X$ is the number of flaws in a 6 metre length then $X \sim \text{Po}(2.4)$.
            \begin{align}
                 & P(X<3) \\
                =& P(X=0) + P(X=1) + P(X=2) \\
                =& \mathrm{e}^{-2.4} + 2.4 \times \mathrm{e}^{-2.4} + \frac{2.4^2\times\mathrm{e}^{-2.4}}{2!} \\
                =& (1+2.4+2.4\times1.2)\mathrm{e}^{-2.4} \\
                \approx& 0.570
            \end{align}
        \item If the mean number of flaws in 10 metre lengths is 4, then the mean number of flaws in 15 metre lengths will be
        \begin{equation}
            \mu = \frac{15}{10}\times4=6.
        \end{equation}
        Since, in a Poison distribution, the variance equals the mean the variance is 6.
    \end{enumerate}
    \end{solution}
\end{example}




\end{document}

编译成功,我希望版本号为 1。teachers'我想要的students'版本号如下所示:

在此处输入图片描述 在此处输入图片描述 在此处输入图片描述

总体看法

在此处输入图片描述

  1. 基本上,只是隐藏解决方案中的内容。
  2. 但保留所有方程计数器/标签,例如,1.2 节中的第一个方程是 (1.6),等等...
  3. 如果可能的话,我想保持现状exstylesolstyle然后我可以稍后对其进行自定义。这些来自这里

相关内容