diff options
Diffstat (limited to 'info/mathtrip/src/prob.tex')
-rw-r--r-- | info/mathtrip/src/prob.tex | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/info/mathtrip/src/prob.tex b/info/mathtrip/src/prob.tex new file mode 100644 index 0000000000..fa0c8efd5e --- /dev/null +++ b/info/mathtrip/src/prob.tex @@ -0,0 +1,114 @@ +%This command provides the text of the last column (Probability) +%on page 3 +% +%The macro has one parameter: +% 1) The width of the text +% +\newcommand\TThreeProb[1]{% + \parbox[t]{#1}{% + \DisplaySpace{\TThreeDisplaySpace}{\TThreeDisplayShortSpace} + + + %Formula 9 + \TThreeTitle{Normal (Gaussian) distribution:} + \begin{DisplayFormulae}{1}{0pt}{2ex plus 1ex minus 1ex}{\BigChar}{\StyleWithoutNumber} + \Fm{p(x) = \frac{1}{\sqrt{2 \pi} \sigma} e^{-(x-\mu)^2/2\sigma^2}}, + \Fm{\E[X] = \mu} + \end{DisplayFormulae} + + %Formula 10 + \TThreeTitle{Continuous distributions:}% + If $\Pr[a<X<b] = \int_{a}^b p(x)\dx$, + then $p$ is the probability density function of $X$. + + If $\Pr[X<a] = P(a)$, + then $P$ is the distribution function of $X$. + + If $P$ and $p$ both exist then + $P(a) = \int_{-\infty}^a p(x)\dx$. + + %Formula 11 + \TThreeTitle{Expectation:} + If $X$ is discrete + $\E[g(X)] = \sum_x g(x) \Pr[X=x]$. + + \begin{DisplayFormulae}{1}{0pt}{3ex plus 1ex minus 1ex}{\SmallChar}{\StyleWithoutNumber} + \unskip + If $X$ continuous then + \def\FirstPart{\E[g(X)]\mbox{}} + \FmPartA{\FirstPart = \int_{-\infty}^{\infty} g(x) p(x)\dx} + \FmPartB{\FirstPart}{= \int_{-\infty}^{\infty} g(x) \, d P(x)}. + \end{DisplayFormulae} + + %Formula 12 + \TThreeTitle{Variance, standard deviation:} + \begin{DisplayFormulae}{1}{0pt}{3ex plus 1ex minus 1ex}{\BigChar}{\StyleWithoutNumber} + \Fm{\Var[X] = \E[X^2] - \E[X]^2}, + \Fm{\sigma = \sqrt{\Var[X]}} + \end{DisplayFormulae} + + %Formula 13 + \TThreeTitle{For events $A$ and $B$:}% + \begin{DisplayFormulae}{1}{0pt}{3ex plus 1ex minus 1ex}{\BigChar}{\StyleWithoutNumber} + \Fm{\Pr[A \Or B] = \Pr[A] + \Pr[B] - \Pr[A \And B]} + \FmPartA{\MathRemark[\relax]{\text{iff $A$ and $B$ are independent:}}} + %Small initial space to show that the remark is only for + %this equation + \FmPartB{xxxx}{\Pr[A \And B] =\Pr[A] \cdot \Pr[B]} + \Fm{\Pr[A \vert B] = \frac{\Pr[A \And B]}{\Pr[B]}} + \end{DisplayFormulae}% + + %Formula 14 + \TThreeTitle{For random variables $X$ and $Y$:}% + \begin{DisplayFormulae}{1}{0pt}{3ex plus 1ex minus 1ex}{\BigChar}{\StyleWithoutNumber} + \FmPartA{\MathRemark[\relax]{\text{if $X$ and $Y$ are independent:}}} + %Small initial space to show that the remark is only for + %this equation + \FmPartB{xxxx}{\E[X \cdot Y] = \E[X] \cdot \E[Y]} + \Fm{\E[X + Y] = \E[X] + \E[Y]} + \Fm{\E[c X] = c \E[X]} + \end{DisplayFormulae} + + %Formula 15 + \TThreeTitle{Bayes' theorem:}% + \begin{DisplayFormulae}{1}{0pt}{3ex plus 1ex minus 1ex}{\BigChar}{\StyleWithoutNumber} + \Fm{\Pr[A_i\vert B] = + \frac{\Pr[B\vert A_i] \Pr[A_i]}{\sum_{j=1}^n \Pr[A_j] \Pr[B\vert A_j]}} + \end{DisplayFormulae} + + %Formula 16 + \TThreeTitle{Inclusion-exclusion:} + \begin{DisplayFormulae}{1}{0pt}{3ex plus 1ex minus 1ex}{\BigChar}{\StyleWithoutNumber} + \raggedright + \def\FirstPart{\Pr\Big[\bigvee^n_{i=1} X_i \Big] = \mbox{}} + \FmPartA{\FirstPart \sum^n_{i=1} \Pr[X_i] +} + \FmPartB{\FirstPart}{\sum_{k=2}^n (-1)^{k+1} \sum_{\smash{i_i<\cdots <i_k}} + \Pr\Big[\bigwedge^k_{j=1} X_{i_j}\Big]} + \end{DisplayFormulae} + + %Formula 17 + \TThreeTitle{Moment inequalities:} + \begin{DisplayFormulae}{1}{0pt}{3ex plus 1ex minus 1ex}{\BigChar}{\StyleWithoutNumber} + \Fm{\Pr\big[\vert X\vert \geq \lambda \E[X]\big] \leq \frac{1}{\lambda}}, + \Fm{\Pr\Big[\big\vert X - \E[X]\big\vert \geq \lambda \cdot \sigma \Big] + \leq \frac{1}{\lambda^2}} + \end{DisplayFormulae} + + %Formula 18 + \TThreeTitle{Geometric distribution:}% + \begin{DisplayFormulae}{1}{0pt}{3ex plus 1ex minus 1ex}{\BigChar}{\StyleWithoutNumber} + \Fm{\Pr[X = k] = pq^{k-1}\MathRemark{q = 1-p}}, + \Fm{\E[X] = \sum^\infty_{k=1} kpq^{k-1} = \frac{1}{p}} + \end{DisplayFormulae} + + \AdjustSpace{2ex plus 1ex minus .5ex} + \noindent + The ``coupon collector'': + We are given a random coupon each day, + and there are $n$ different types of coupons. + The distribution of coupons is uniform. + + The expected number of days to pass before we to collect all $n$ types is + $n=H_n$. + }% +} |