-
Notifications
You must be signed in to change notification settings - Fork 342
/
stat-cookbook.tex
2628 lines (2197 loc) · 83.3 KB
/
stat-cookbook.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% ----------------------------------------------------------------------------
%
% Probability and Statistics
% Cookbook
%
% ----------------------------------------------------------------------------
%
% Copyright © Matthias Vallentin <[email protected]>, 2017
%
\documentclass[landscape]{article}
\usepackage{array}
\usepackage{amsmath,amssymb}
\usepackage{booktabs}
\usepackage{caption}
\usepackage[nodayofweek]{datetime}
\usepackage{environ}
\usepackage{float}
\usepackage{enumitem}
\usepackage{fancyhdr}
\usepackage[landscape,margin=13mm,footskip=1pt,includefoot]{geometry}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{multicol}
\usepackage{rotating}
\usepackage{tikz}
\usepackage{threeparttable}
\usepackage{url}
\usepackage{xspace}
% Document version, MAJOR.MINOR.PATCH. Please change with any modification
% according to semantic versioning practices:
% - The major version changes when adding a new section or topic, or making a
% substantial content change.
% - The minor version changes for non-trivial fixes, corrections, or
% improvements.
% - The patch version changes for trivial fixes, such as typos in text or
% formulas.
\newcommand{\version}{0.2.7}
% Probability and Statistics LaTeX shortcuts.
\input{probstat}
% TikZ tweaks
\usetikzlibrary{arrows,shapes}
\usetikzlibrary{decorations.pathreplacing}
\tikzstyle{every picture}+=[remember picture]
\tikzstyle{na} = [baseline=-.5ex]
% Move footnotes to the bottom-right corner
\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyhead{}
\fancyfoot[R]{\footnotesize \thepage}
\renewcommand{\headrulewidth}{0pt}
% Further document tweaks.
\parindent=0pt
\setitemize{itemsep=0.2mm,parsep=1pt}
\setenumerate{itemsep=0.2mm,parsep=1pt}
% A type of blue that doesn't look as aggressive as the default 'blue' but also
% distinguishes well from black while not appearing to light.
\definecolor{trueblue}{rgb}{0.0, 0.45, 0.81}
% Link style (hyperref package)
\hypersetup{
colorlinks=true, % false: boxed links; true: colored links
linkcolor=black, % color of internal links
citecolor=trueblue, % color of links to bibliography
filecolor=trueblue, % color of file links
urlcolor=trueblue % color of external links
}
% Personal
\def\email{[email protected]}
\def\web{\url{http://statistics.zone/}}
% An itemize list with a title that avoids a break between title and list.
\newenvironment{titemize}[1]{
\begin{minipage}[h]{\columnwidth}
#1
\begin{itemize}
}{
\end{itemize}
\end{minipage}
}
\begin{document}
\thispagestyle{empty}
\begin{center}
\vspace*{\fill}
\textsc{\Huge Probability and Statistics\\[2ex] \huge Cookbook}
\vfill
\footnotesize{
Version \version\\[1ex]
\today\\[1ex]
\web\\[1ex]
Copyright \copyright{}
\href{http://matthias.vallentin.net}{Matthias Vallentin}\\
}
\end{center}
\newpage
\thispagestyle{empty}
\begin{multicols*}{3}
\tableofcontents
\vfill
\hrule
\vspace{5pt}
{\footnotesize This cookbook integrates various topics in probability theory
and statistics, based on literature~\cite{Hoel72,Wasserman03,Shumway06}
and in-class material from courses of the statistics department at the
University of California in Berkeley but also influenced by others
\cite{Steger01,Steger02}. If you find errors or have suggestions for
improvements, please get in touch at \web.}
\end{multicols*}
\newpage
\section{Distribution Overview}
\subsection{Discrete Distributions}
\begin{center}
\small
\begin{tabular}{@{}l*6{>{\begin{math}\displaystyle}c<{\end{math}}}@{}}
\toprule &&&&&& \\[-2ex]
& \text{Notation}\footnotemark
& F_X(x) & f_X(x) & \E{X} & \V{X} & M_X(s) \\[1ex]
\midrule
Uniform & \unifd & \punifd & \dunifd &
\frac{a+b}{2} & \frac{(b-a+1)^2-1}{12} &
\frac{e^{as}-e^{-(b+1)s}}{s(b-a)} \\[3ex]
Bernoulli & \bern & \pbern & \dbern &
p & p(1-p) &
1-p+pe^s \\[3ex]
Binomial & \bin & I_{1-p}(n-x,x+1) & \dbin &
np & np(1-p) &
(1-p+pe^s)^n \\[3ex]
Multinomial & \mult & & \dmult \quad \sum_{i=1}^k x_i = n&
\left( {\begin{array}{*{20}{c}}
{n{p_1}}\\
\vdots \\
{n{p_k}}
\end{array}} \right) & \left( {\begin{array}{*{20}{c}}
{n{p_1}(1 - {p_1})}&{ - n{p_1}{p_2}}\\
{ - n{p_2}{p_1}}& \ddots
\end{array}} \right) &
\left( \sum_{i=0}^k p_i e^{s_i} \right)^n \\[3ex]
Hypergeometric & \hyper &
\approx \Phi\left(\displaystyle\frac{x-np}{\sqrt{np(1-p)}}\right) &
\dhyper &
\frac{nm}{N} & \frac{nm(N-n)(N-m)}{N^2(N-1)} & \\[3ex]
Negative Binomial & \nbin & \pnbin & \dnbin &
r\frac{1-p}{p} & r\frac{1-p}{p^2} &
\left(\frac{pe^s}{1-(1-p)e^s}\right)^r \\[3ex]
Geometric & \geo &
\pgeo \quad x\in\mathbb N^+ &
\dgeo \quad x\in\mathbb N^+ &
\frac{1}{p} & \frac{1-p}{p^2} &
\frac{pe^s}{1-(1-p)e^s} \\[3ex]
Poisson & \pois & \ppois & \dpois &
\lambda & \lambda &
e^{\lambda(e^s-1)}\\[3ex]
\bottomrule
\end{tabular}
\end{center}
\footnotetext{We use the notation $\gamma(s,x)$ and $\Gamma(x)$ to refer to the
Gamma functions (see \S\ref{sec:math:gamma}), and use $\text{B}(x,y)$ and $I_x$
to refer to the Beta functions (see \S\ref{sec:math:beta}).}
\pagebreak
\begin{figure}[H]
\includegraphics[scale=0.35]{figs/uniform-pmf.pdf}
\includegraphics[scale=0.35]{figs/binomial-pmf.pdf}
\includegraphics[scale=0.35]{figs/geometric-pmf.pdf}
\includegraphics[scale=0.35]{figs/poisson-pmf.pdf}
\includegraphics[scale=0.35]{figs/uniform-cdf-discrete.pdf}
\includegraphics[scale=0.35]{figs/binomial-cdf.pdf}
\includegraphics[scale=0.35]{figs/geometric-cdf.pdf}
\includegraphics[scale=0.35]{figs/poisson-cdf.pdf}
\end{figure}
\subsection{Continuous Distributions}
\begin{threeparttable}
\small
%\newcolumntype{L}{>{\varwidth[c]{\linewidth}}l<{\endvarwidth}}
\newcolumntype{M}{>{\begin{math}\displaystyle}c<{\end{math}}}
\begin{tabular}{@{}l*6{M}@{}}
\toprule &&&&&& \\[-2ex]
& \text{Notation}
& F_X(x) & f_X(x) & \E{X} & \V{X} & M_X(s) \\[1ex]
\midrule
Uniform & \unif & \punif & \dunif &
\frac{a+b}{2} & \frac{(b-a)^2}{12} &
\frac{e^{sb}-e^{sa}}{s(b-a)} \\[3ex]
Normal & \norm &
\Phi(x)=\displaystyle\int_{-\infty}^x \phi(t)\,dt &
\phi(x)=\dnorm &
\mu & \sigma^2 &
\Exp{\mu s + \frac{\sigma^2s^2}{2}}\\[3ex]
Log-Normal & \ln\norm&
\frac{1}{2}+\frac{1}{2} \erf\left[\frac{\ln x-\mu}{\sqrt{2\sigma^2}}\right] &
\frac{1}{x\sqrt{2\pi\sigma^2}} \Exp{-\frac{(\ln x - \mu)^2}{2\sigma^2}} &
e^{\mu+\sigma^2/2} &
(e^{\sigma^2}-1) e^{2\mu+\sigma^2} &
\\[3ex]
Multivariate Normal & \mvn & &
(2\pi)^{-k/2} |\Sigma|^{-1/2} e^{-\frac{1}{2}(x-\mu)^T \Sigma^{-1}(x-\mu)} &
\mu & \Sigma &
\Exp{\mu^T s + \frac{1}{2} s^T \Sigma s}\\[3ex]
Student's $t$ & \text{Student}(\nu)
& I_x\left( \frac{\nu}{2},\frac{\nu}{2} \right)
& \frac{\Gamma\left(\frac{\nu+1}{2}\right)}
{\sqrt{\nu\pi}\Gamma\left(\frac{\nu}{2}\right)}
\left(1+\frac{x^2}{\nu}\right)^{-(\nu+1)/2}
& 0 \quad \nu > 1
& \begin{cases}
\displaystyle\frac{\nu}{\nu-2} & \nu > 2 \\
\infty & 1 < \nu \le 2
\end{cases}
& \\[3ex]
Chi-square & \chisq &
\frac{1}{\Gamma(k/2)} \gamma\left(\frac{k}{2}, \frac{x}{2}\right) &
\frac{1}{2^{k/2} \Gamma(k/2)} x^{k/2-1} e^{-x/2}&
k & 2k &
(1-2s)^{-k/2} \; s<1/2\\[3ex]
F & \text{F}(d_1,d_2) &
I_\frac{d_1x}{d_1x+d_2}\left(\frac{d_1}{2},\frac{d_2}{2}\right) &
\frac{\sqrt{\frac{(d_1x)^{d_1} d_2^{d_2}}{(d_1x+d_2)^{d_1+d_2}}}}
{x\mathrm{B}\left(\frac{d_1}{2},\frac{d_1}{2}\right)} &
\frac{d_2}{d_2-2} %\; d_2 > 2
& \frac{2d_2^2(d_1+d_2-2)}{d_1(d_2-2)^2(d_2-4)} %\; d_2 > 4
& \\[3ex]
Exponential\tnote{$\ast$} & \ex & \pex & \dex &
\beta & \beta^2 &
\frac{1}{1-\frac{s}{\beta}} \left(s<\beta\right) \\[3ex]
Gamma\tnote{$\ast$} & \gam &
\frac{\gamma(\alpha,\beta x)}{\Gamma(\alpha)} & \dgamma &
\frac{\alpha}{\beta} & \frac{\alpha}{\beta^2} &
\left(\frac{1}{1-\frac{s}{\beta}} \right)^\alpha \left(s<\beta\right)\\[3ex]
Inverse Gamma & \invgamma & \pinvgamma & \dinvgamma &
\frac{\beta}{\alpha-1} \; \alpha>1 &
\frac{\beta^2}{(\alpha-1)^2(\alpha-2)} \; \alpha > 2 &
\frac{2(-\beta s)^{\alpha/2}}{\Gamma(\alpha)}K_\alpha
\left( \sqrt{-4\beta s} \right)\\[3ex]
Dirichlet & \dir & & \ddir &
\frac{\alpha_i}{\sum_{i=1}^k \alpha_i} &
\frac{\E{X_i}(1-\E{X_i})}{\sum_{i=1}^k\alpha_i + 1} & \\[3ex]
Beta & \bet & I_x(\alpha,\beta)& \dbeta &
\frac{\alpha}{\alpha+\beta} &
\frac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)} &
1+\sum_{k=1}^{\infty} \left( \prod_{r=0}^{k-1}
\frac{\alpha+r}{\alpha+\beta+r} \right) \frac{s^k}{k!} \\[3ex]
Weibull & \mathrm{Weibull}(\lambda, k) & 1 - e^{-(x/\lambda)^k} & \dweibull &
\lambda \Gamma\left(1 + \frac{1}{k} \right) &
\lambda^2 \Gamma\left(1 + \frac{2}{k}\right) - \mu^2 &
\sum_{n=0}^\infty \frac{s^n \lambda^n}{n!} \Gamma\left(1+\frac{n}{k}\right)
\\[3ex]
Pareto & \mathrm{Pareto}(x_m, \alpha) &
1 - \left(\frac{x_m}{x} \right)^\alpha \; x\ge x_m &
\alpha\frac{x_m^\alpha}{x^{\alpha+1}} \quad x\ge x_m&
\frac{\alpha x_m}{\alpha-1} \; \alpha>1 &
\frac{x_m^2\alpha}{(\alpha-1)^2(\alpha-2)} \; \alpha>2 &
\alpha(-x_m s)^\alpha \Gamma(-\alpha,-x_m s) \; s<0\\[3ex]
\bottomrule
\end{tabular}
\begin{tablenotes}
\item[$\ast$] We use the \emph{rate} parameterization where
$\beta=\frac{1}{\lambda}$. Some textbooks use $\beta$ as \emph{scale}
parameter instead~\cite{Wasserman03}.
\end{tablenotes}
\end{threeparttable}
\begin{figure}[H]
\includegraphics[scale=0.35]{figs/uniform-pdf.pdf}
\includegraphics[scale=0.35]{figs/normal-pdf.pdf}
\includegraphics[scale=0.35]{figs/lognormal-pdf.pdf}
\includegraphics[scale=0.35]{figs/student-pdf.pdf}
\includegraphics[scale=0.35]{figs/chisquare-pdf.pdf}
\includegraphics[scale=0.35]{figs/f-pdf.pdf}
\includegraphics[scale=0.35]{figs/exponential-pdf.pdf}
\includegraphics[scale=0.35]{figs/gamma-pdf.pdf}
\includegraphics[scale=0.35]{figs/invgamma-pdf.pdf}
\includegraphics[scale=0.35]{figs/beta-pdf.pdf}
\includegraphics[scale=0.35]{figs/weibull-pdf.pdf}
\includegraphics[scale=0.35]{figs/pareto-pdf.pdf}
\end{figure}
\begin{figure}[H]
\includegraphics[scale=0.35]{figs/uniform-cdf-continuous.pdf}
\includegraphics[scale=0.35]{figs/normal-cdf.pdf}
\includegraphics[scale=0.35]{figs/lognormal-cdf.pdf}
\includegraphics[scale=0.35]{figs/student-cdf.pdf}
\includegraphics[scale=0.35]{figs/chisquare-cdf.pdf}
\includegraphics[scale=0.35]{figs/f-cdf.pdf}
\includegraphics[scale=0.35]{figs/exponential-cdf.pdf}
\includegraphics[scale=0.35]{figs/gamma-cdf.pdf}
\includegraphics[scale=0.35]{figs/invgamma-cdf.pdf}
\includegraphics[scale=0.35]{figs/beta-cdf.pdf}
\includegraphics[scale=0.35]{figs/weibull-cdf.pdf}
\includegraphics[scale=0.35]{figs/pareto-cdf.pdf}
\end{figure}
\begin{multicols*}{2}
\section{Probability Theory}
Definitions
\begin{itemize}
\item Sample space $\Omega$
\item Outcome (point or element) $\omega \in \Omega$
\item Event $A \subseteq \Omega$
\item $\sigma$-algebra $\mathcal{A}$
\begin{enumerate}
\item $\varnothing \in \mathcal{A}$
\item $A_1,A_2,\dots, \in \mathcal{A}
\imp \bigcup_{i=1}^\infty A_i \in \mathcal{A}$
\item $A \in \mathcal{A} \imp \comp{A} \in \mathcal{A}$
\end{enumerate}
\item Probability Distribution $\prob$
\begin{enumerate}
\item $\Pr{A} \ge 0 \quad \forall A$
\item $\Pr{\Omega} = 1$
\item $\Pr{\displaystyle\bigsqcup_{i=1}^\infty A_i}
= \displaystyle\sum_{i=1}^\infty \Pr{A_i}$
\end{enumerate}
\item Probability space $(\Omega,\mathcal{A},\prob)$
\end{itemize}
Properties
\begin{itemize}
\item $\Pr{\varnothing} = 0$
\item $B = \Omega \cap B = (A \cup \comp{A}) \cap B
= (A \cap B) \cup (\comp{A} \cap B)$
\item $\Pr{\comp{A}} = 1 - \Pr{A}$
\item $\Pr{B} = \Pr{A \cap B} + \Pr{\comp{A} \cap B}$
\item $\Pr{\Omega} = 1 \qquad \Pr{\varnothing} = 0$
\item $\comp{\left(\bigcup_n A_n\right)} = \bigcap_n \comp{A_n}
\quad
\comp{\left(\bigcap_n A_n\right)} = \bigcup_n \comp{A_n}
\qquad$
\textsc{DeMorgan}
\item $\Pr{\bigcup_n A_n}
= 1 - \Pr{\bigcap_n \comp{A_n}}$
\item $\Pr{A \cup B} = \Pr{A} + \Pr{B} - \Pr{A \cap B}\\[1ex]
\imp \Pr{A \cup B} \le \Pr{A} + \Pr{B}$
\item $\Pr{A \cup B}
= \Pr{A \cap \comp{B}} + \Pr{\comp{A} \cap B} + \Pr{A \cap B}$
\item $\Pr{A \cap \comp{B}} = \Pr{A} - \Pr{A \cap B}$
\end{itemize}
Continuity of Probabilities
\begin{itemize}
\item $A_1 \subset A_2 \subset \dots \imp \limn \Pr{A_n} = \Pr{A}
\quad\text{where } A = \bigcup_{i=1}^\infty A_i$
\item $A_1 \supset A_2 \supset \dots \imp \limn \Pr{A_n} = \Pr{A}
\quad\text{where } A = \bigcap_{i=1}^\infty A_i$
\end{itemize}
Independence \ind
\[A \ind B \eqv \Pr{A \cap B} = \Pr{A}\Pr{B}\]
Conditional Probability
\[\Pr{A \giv B} = \frac{\Pr{A \cap B}}{\Pr{B}} \qquad \Pr{B} > 0\]
Law of Total Probability
\[ \Pr{B} = \sum_{i=1}^n \Pr{B|A_i}\Pr{A_i}
\qquad \Omega = \bigsqcup_{i=1}^n A_i\]
\textsc{Bayes' Theorem}
\[\Pr{A_i \giv B}
= \frac{\Pr{B \giv A_i}\Pr{A_i}}{\sum_{j=1}^n \Pr{B \giv A_j}\Pr{A_j}}
\qquad \Omega = \bigsqcup_{i=1}^n A_i\]
Inclusion-Exclusion Principle
\[\biggl|\bigcup_{i=1}^n A_i\biggr| = \sum_{r=1}^n(-1)^{r-1}
\sum_{i \le i_1 < \dots < i_r \le n}\biggl|\bigcap_{j=1}^r A_{i_j}\biggr|\]
\section{Random Variables}
Random Variable (RV)
\[X: \Omega \to \R\]
Probability Mass Function (PMF)
\[f_X(x) = \Pr{X = x} = \Pr{\{\omega\in\Omega:X(\omega) = x\}}\]
Probability Density Function (PDF)
\[\Pr{a \le X \le b} = \int_a^b f(x)\dx\]
Cumulative Distribution Function (CDF)
\[F_X:\R \to [0,1] \qquad F_X(x) = \Pr{X \le x}\]
\begin{enumerate}
\item Nondecreasing: $x_1 < x_2 \imp F(x_1) \le F(x_2)$
\item Normalized: $\lim_{x\to -\infty} = 0$ and $\lim_{x\to \infty} = 1$
\item Right-Continuous: $\lim_{y\downarrow x} F(y) = F(x)$
\end{enumerate}
\[\Pr{a\le Y\le b \giv X=x} = \int_a^b f_{Y|X}(y\giv x) dy \qquad a \le b\]
\[ f_{Y|X}(y\giv x) = \frac{f(x,y)}{f_X(x)} \]
Independence
\begin{enumerate}
\item $\Pr{X \le x, Y \le y} = \Pr{X \le x}\Pr{Y \le y}$
\item $f_{X,Y}(x,y) = f_X(x)f_Y(y)$
\end{enumerate}
\subsection{Transformations}
Transformation function
\[Z = \transform(X)\]
Discrete
\[f_Z(z) = \Pr{\transform(X) = z} = \Pr{\{x:\transform(x) = z\}}
= \Pr{X \in \transform^{-1}(z)} = \sum_{x \in \transform^{-1}(z)} \!\!\!f_X(x)\]
Continuous
\[F_Z(z) = \Pr{\transform(X) \le z} = \int_{A_z} f(x) \dx \quad
\text{with } A_z = \{x:\transform(x) \le z\}\]
Special case if $\transform$ strictly monotone
\[f_Z(z)
= f_X(\transform^{-1}(z))
\left|\frac{d}{dz}\transform^{-1}(z)\right|
= f_X(x)\left|\frac{dx}{dz}\right|
= f_X(x)\frac{1}{|J|}\]
The Rule of the Lazy Statistician
\[\E{Z} = \int \transform(x) \dfx\]
\[\E{I_A(x)} = \int I_A(x) \dfx = \int_A \dfx = \Pr{X \in A}\]
Convolution
\begin{itemize}
\item $ Z:=X+Y \qquad
f_Z(z)=\displaystyle\int_{-\infty}^{\infty} f_{X,Y}(x,z-x)\,dx
\;\stackrel{X,Y \ge 0}{=}\; \int_0^z f_{X,Y}(x,z-x)\,dx$
\item $ Z:=|X-Y| \qquad
f_Z(z)=\displaystyle2\int_0^\infty f_{X,Y}(x,z+x)\,dx$
%\;\stackrel{X,Y \ge 0}{=}\; \int_0^\infty f_{X,Y}(x,z+x)\,dx$
\item $ Z:=\displaystyle\frac{X}{Y} \qquad
f_Z(z)=\displaystyle\int_{-\infty}^{\infty} |y| f_{X,Y}(yz,y)\,dy
\;\stackrel{\ind}{=}\; \int_{-\infty}^{\infty} |y| f_X(yz)f_Y(y)\,dy$
\end{itemize}
% \subsection{Joint Distribution}
% \begin{itemize}
% \item $f(x,y) = \Pr{X \le k, Y \le m)}
% = \displaystyle\int_{-\infty}^k\int_{-\infty}^m f(x,y)\,dy\,dx$
% \item $\Pr{a < X \le b, c < y \le d} = F(b,d) - F(a,d) - F(b,c) + F(a,c)$
% \item $f_X(x) = \displaystyle\int_{-\infty}^\infty f(x,y)\,dy \qquad
% f_Y(y) = \displaystyle\int_{-\infty}^\infty f(x,y)\,dx$
% \end{itemize}
% Order Statistics
% \begin{itemize}
% \item $U_i\ind U_j$ continuous \textsc{RVs} with common density $f$
% \item $X_1(\omega) < \dots < X_n(\omega)$ permuted set of $U_i$'s
% \item $X_k = $ \emph{k$^{th}$ order statistic}
% \item $X_1(\omega) = \min(U_1(\omega),\dots,U_n(\omega))$
% \item $X_n(\omega) = \max(U_1(\omega),\dots,U_n(\omega))$
% \item $R(\omega) = X_n(\omega) - X_1(\omega)$
% \end{itemize}
\section{Expectation}
Definition and properties
\begin{itemize}
\item $\E{X} = \mu_X = \displaystyle \int x \dfx =
\begin{cases}
\displaystyle\sum_x xf_X(x) & \text{X discrete} \\\\
\displaystyle\int xf_X(x)\dx & \text{X continuous}
\end{cases}$
\item $\Pr{X=c}=1 \imp \E{X} = c$
\item $\E{cX} = c\,\E{X}$
\item $\E{X+Y} = \E{X}+\E{Y}$
\item $\E{XY} = \displaystyle\int_{X,Y} xy f_{X,Y}(x,y)\dfx\dfy$
\item $\E{\transform(Y)} \neq \transform(\E{X}) \qquad$
(cf.~\hyperref[jensen]{\textsc{Jensen} inequality})
\item $\Pr{X \ge Y} = 1 \imp \E{X}\ge\E{Y}$
\item $\Pr{X=Y} = 1 \imp \E{X}=\E{Y}$
% \item $\Pr{\lvert Y\rvert\le c} = 1 \imp \E{Y}<\infty
% \wedge \lvert\E{X}\rvert\le c$
\item $\E{X} = \displaystyle\sum_{x=1}^\infty \Pr{X\ge x}$ \qquad X discrete
\end{itemize}
Sample mean
\[\samplemean = \frac{1}{n}\sum_{i=1}^n X_i\]
\begin{titemize}{Conditional expectation}
\item $\E{Y\giv X=x} = \displaystyle\int y f(y\giv x)\dy$
\item $\E{X} = \E{\E{X\giv Y}}$
\item $\E{\transform(X,Y)\giv X=x}
= \displaystyle\int_{-\infty}^\infty \transform(x,y)f_{Y|X}(y\giv x)\dy$
\item $\E{\transform(Y,Z)\giv X=x} =
\displaystyle\int_{-\infty}^\infty\transform(y,z)
f_{(Y,Z)|X}(y,z\giv x)\,dy\,dz$
\item $\E{Y+Z\giv X} = \E{Y\giv X} + \E{Z\giv X}$
\item $\E{\transform(X)Y\giv X} = \transform(X)\E{Y\giv X}$
\item $\E{\transform(X,Y)} = \E[X]{\E{\transform(X,Y)\giv X}}$
\item $\E{Y\giv X} = c \imp \cov{X,Y}=0$
\end{titemize}
\section{Variance}
\begin{titemize}{Definition and properties}
\item $\V{X} = \sigma_X^2 = \E{(X-\E{X})^2} = \E{X^2} - \E{X}^2$
\item $\V{\displaystyle\sum_{i=1}^n X_i} =
\displaystyle\sum_{i=1}^n \V{X_i} + \sum_{i\ne j}\cov{X_i,X_j}$
% \stackrel{X_i \ind X_j}{=}\sum_{i=1}^n\V{X_i}$
\item $\V{\displaystyle\sum_{i=1}^n X_i} =
\displaystyle\sum_{i=1}^n\V{X_i} \quad$ if $X_i \ind X_j$
\end{titemize}
Standard deviation
\[\sd[X] = \sqrt{\V{X}} = \sigma_X\]
Covariance
\begin{itemize}
\item $\cov{X,Y} = \E{(X-\E{X})(Y-\E{Y})} = \E{XY}-\E{X}\E{Y}$
\item $\cov{X,a} = 0$
\item $\cov{X,X} = \V{X}$
\item $\cov{X,Y} = \cov{Y,X}$
\item $\cov{aX,bY} = ab\cov{X,Y}$
\item $\cov{X+a,Y+b} = \cov{X,Y}$
\item $\cov{\displaystyle\sumin X_i, \sumjm Y_j}
= \displaystyle\sumin\sumjm\cov{X_i, Y_j}$
\end{itemize}
Correlation
\[\corr{X,Y} = \displaystyle\frac{\cov{X,Y}}{\sqrt{\V{X}\V{Y}}}\]
Independence
\[X\ind Y \imp \corr{X,Y} = 0 \eqv \cov{X,Y} = 0 \eqv \E{XY}=\E{X}\E{Y}\]
Sample variance
\[\samplevar = \frac{1}{n-1}\sum_{i=1}^n(X_i-\samplemean)^2\]
Conditional variance
\begin{itemize}
\item $\V{Y\giv X} = \E{(Y-\E{Y\giv X})^2\giv X} =\E{Y^2\giv X}-\E{Y\giv X}^2$
\item $\V{Y} = \E{\V{Y\giv X}}+\V{\E{Y\giv X}}$
\end{itemize}
\section{Inequalities}
\textsc{Cauchy-Schwarz}
\[\E{XY}^2 \le \E{X^2}\E{Y^2}\]
\textsc{Markov}
\[\Pr{\transform(X) \ge t}\le\frac{\E{\transform(X)}}{t}\]
\textsc{Chebyshev}
\[\Pr{\lvert X-\E{X}\rvert \ge t} \le \frac{\V{X}}{t^2}\]
\textsc{Chernoff}
\[\Pr{X \ge (1+\delta)\mu}
\le \left(\frac{e^\delta}{(1+\delta)^{1+\delta}}\right) \quad \delta>-1\]
\textsc{Hoeffding}
\[X_1,\ldots,X_n \; \textrm{independent}
\;\wedge\; \Pr{X_i\in[a_i,b_i]} = 1 \;\wedge\; 1 \le i \le n \]
\[\Pr{\Xbar-\E{\Xbar} \ge t} \le e^{-2nt^2} \quad t>0 \]
\[\Pr{|\Xbar-\E{\Xbar}| \ge t} \le 2\Exp{-\frac{2n^2t^2}{\sumin(b_i-a_i)^2}}
\quad t>0\]
\textsc{Jensen}\label{jensen}
\[\E{\transform(X)} \ge \transform(\E{X}) \quad
\transform \text{ convex}\]
\section{Distribution Relationships}
Binomial
\begin{itemize}
\item $X_i \dist \bern \imp \displaystyle\sum_{i=1}^n X_i \dist \bin$
\item $X\dist\bin, Y\dist\bin[m,p] \imp X+Y\dist\bin[n+m,p]$
\item $\limn\bin = \pois[np] \qquad$ ($n$ large, $p$ small)
\item $\limn\bin = \norm[np,np(1-p)] \qquad$
($n$ large, $p$ far from 0 and 1)
\end{itemize}
Negative Binomial
\begin{itemize}
\item $ X\dist \nbin[1,p] = \geo $
\item $ X\dist \nbin[r,p] = \sum_{i=1}^r \geo $
\item $X_i\dist \nbin[r_i,p] \imp \sum X_i\dist \nbin[\sum r_i,p] $
\item $X\dist \nbin[r,p].\; Y\dist \bin[s+r,p] \imp \Pr{X\le s} = \Pr{Y\ge r}$
\end{itemize}
Poisson
\begin{itemize}
\item $X_i\dist\pois[\lambda_i] \wedge X_i \ind X_j
\imp \displaystyle\sumin X_i \dist \pois[\displaystyle\sumin \lambda_i]$
\item $X_i\dist\pois[\lambda_i] \wedge X_i \ind X_j
\imp X_i\,\left|\displaystyle\sumjn X_j\right. \dist
\bin[\displaystyle\sumjn X_j,\displaystyle\frac{\lambda_i}{\sumjn\lambda_j}]$
\end{itemize}
Exponential
\begin{itemize}
% \item $\forall n \in \mathbb N^+: X_i\dist\ex{\lambda}
\item $X_i\dist\ex \wedge X_i \ind X_j
\imp \displaystyle\sumin X_i\dist \gam[n,\beta]$
\item Memoryless property: $\Pr{X>x+y\giv X>y}=\Pr{X>x}$
\end{itemize}
Normal
\begin{itemize}
\item $X\dist \norm[\mu,\sigma^2]
\imp \left(\frac{X-\mu}{\sigma}\right)\dist\norm[0,1] $
\item $X\dist \norm[\mu,\sigma^2] \wedge Z = aX+b
\imp Z\dist\norm[a\mu+b,a^2\sigma^2] $
\item $X_i\dist\norm[\mu_i,\sigma_i^2] \wedge X_i \ind X_j
\imp \sum_i X_i \dist \norm[\sum_i\mu_i,\sum_i\sigma_i^2]$
\item $\Pr{a < X \le b}= \Phi\left(\frac{b-\mu}{\sigma}\right)
- \Phi\left(\frac{a-\mu}{\sigma}\right) $
\item $\Phi(-x) = 1 - \Phi(x) \qquad \phi'(x) = -x\phi(x) \qquad
\phi''(x) = (x^2-1)\phi(x)$
\item Upper quantile of $\norm[0,1]$: $z_{\alpha} = \Phi^{-1}(1-\alpha)$
\end{itemize}
Gamma
\begin{itemize}
\item $X\dist\gam \eqv X/\beta \dist\gam[\alpha,1]$
\item $\gam\dist \sum_{i=1}^\alpha\ex$
\item $X_i\dist\gam[\alpha_i,\beta] \wedge X_i \ind X_j \imp
\sum_i X_i\dist \gam[\sum_i \alpha_i,\beta]$
\item $\displaystyle\frac{\Gamma(\alpha)}{\lambda^\alpha}
= \displaystyle\int_0^\infty x^{\alpha-1} e^{-\lambda x} \dx$
\end{itemize}
Beta
\begin{itemize}
\item $\displaystyle
\frac{1}{\text{B}(\alpha,\beta)}x^{\alpha-1}(1-x)^{\beta-1}
= \frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)}
x^{\alpha-1}(1-x)^{\beta-1} $
\item $\E{X^k}
= \displaystyle\frac{\text{B}(\alpha+k,\beta)}{\text{B}(\alpha,\beta)}
= \displaystyle\frac{\alpha+k-1}{\alpha+\beta+k-1}\E{X^{k-1}}$
\item $\bet[1,1] \dist \unif[0,1]$
\end{itemize}
\section{Probability and Moment Generating Functions}
\begin{itemize}
\item $G_X(t) = \E{t^X} \qquad |t| < 1$
\item $M_X(t) = G_X(e^t) = \E{e^{Xt}}
= \E{ \displaystyle\sum_{i=0}^\infty \frac{(Xt)^i}{i!}}
= \displaystyle\sum_{i=0}^\infty \frac{\E{X^i}}{i!}\cdot t^i$
\item $\Pr{X=0} = G_X(0)$
\item $\Pr{X=1}=G_X'(0)$
\item $\Pr{X=i} = \displaystyle\frac{G_X^{(i)}(0)}{i!}$
\item $\E{X} = G_X'(1^-)$
\item $\E{X^k} = M_X^{(k)}(0)$
\item $\E{\displaystyle\frac{X!}{(X-k)!}} = G_X^{(k)}(1^-)$
\item $\V{X} = G_X''(1^-) + G_X'(1^-)
- \left(G_X'(1^-)\right)^2$
\item $G_X(t) = G_Y(t) \imp X \stackrel{d}{=} Y$
\end{itemize}
\section{Multivariate Distributions}
\subsection{Standard Bivariate Normal}
Let $X,Y\dist\norm[0,1] \wedge X\ind Z$ where
$Y = \rho X + \sqrt{1-\rho^2}Z$\\
Joint density
\[
f(x,y) = \frac{1}{2 \pi \sqrt{1-\rho^2}}
\Exp{-\frac{x^2 + y^2 - 2\rho x y}{2 (1-\rho^2)}}
\]
Conditionals
\[
(Y\giv X=x) \dist \norm[\rho x,1-\rho^2] \qquad\text{and}\qquad
(X\giv Y=y) \dist \norm[\rho y,1-\rho^2]
\]
Independence
\[X \ind Y \eqv \rho = 0\]
\subsection{Bivariate Normal}
% - http://www.athenasc.com/Bivariate-Normal.pdf
% - http://mathworld.wolfram.com/BivariateNormalDistribution.html
Let $X\dist\norm[\mu_x,\sigma_x^2]$
and $Y\dist\norm[\mu_y,\sigma_y^2]$.
\[f(x,y) = \frac{1}{2 \pi \sigma_x \sigma_y \sqrt{1-\rho^2}}
\Exp{-\frac{z}{2 (1-\rho^2)}}\]
\[ z =
\left[
\left(\frac{x-\mu_x}{\sigma_x}\right)^2
+ \left(\frac{y-\mu_y}{\sigma_y}\right)^2
- 2\rho\left(\frac{x-\mu_x}{\sigma_x}\right)
\left(\frac{y-\mu_y}{\sigma_y}\right)
\right]
\]
Conditional mean and variance
\[\E{X\giv Y} = \E{X} + \rho\frac{\sigma_X}{\sigma_Y}(Y-\E{Y})\]
\[\V{X\giv Y} = \sigma_X \sqrt{1-\rho^2}\]
\subsection{Multivariate Normal}
Covariance matrix $\Sigma$ \quad (Precision matrix $\Sigma^{-1}$)
\[\Sigma =
\begin{pmatrix}
\V{X_1} & \cdots & \cov{X_1,X_k} \\
\vdots & \ddots & \vdots \\
\cov{X_k,X_1} & \cdots & \V{X_k}
\end{pmatrix}\]
If $X \dist \norm[\mu,\Sigma]$,
\[f_X(x) = (2\pi)^{-n/2} \left|\Sigma\right|^{-1/2}
\Exp{-\frac{1}{2}(x-\mu)^T\Sigma^{-1}(x-\mu)} \]
Properties
\begin{itemize}
\item $Z \dist \norm[0,1] \wedge X = \mu+\Sigma^{1/2}Z
\imp X \dist \norm[\mu,\Sigma]$
\item $X \dist \norm[\mu,\Sigma] \imp \Sigma^{-1/2}(X-\mu) \dist \norm[0,1]$
\item $X \dist \norm[\mu,\Sigma] \imp AX \dist \norm[A\mu, A\Sigma A^T]$
\item $X \dist \norm[\mu,\Sigma] \wedge \|a\| = k
\imp a^TX \dist \norm[a^T\mu, a^T\Sigma a]$
\end{itemize}
\section{Convergence}
Let $\{X_1,X_2,\ldots\}$ be a sequence of \rv's and let $X$ be another \rv.
Let $F_n$ denote the \cdf of $X_n$ and let $F$ denote the \cdf of $X$.
Types of Convergence
\begin{enumerate}
\item In distribution (weakly, in law): $X_n \dconv X$
\[\limn F_n(t) = F(t) \qquad
\forall t \text{ where } F \text{ continuous}\]
\item In probability: $X_n \pconv X$
\[(\forall \varepsilon > 0) \;
\lim_{n\to\infty} \Pr{|X_n -X| > \varepsilon} = 0\]
\item Almost surely (strongly): $X_n \asconv X$
\[\Pr{\limn X_n=X} = \Pr{\omega\in\Omega: \limn X_n(\omega)=X(\omega)}=1\]
\item In quadratic mean ($L_2$): $X_n \qmconv X$
\[\lim_{n\to\infty} \E{(X_n - X)^2} = 0\]
\end{enumerate}
Relationships
\begin{itemize}
\item $X_n \qmconv X \imp X_n \pconv X \imp X_n \dconv X$
\item $X_n \asconv X \imp X_n \pconv X$
\item $X_n \dconv X \wedge (\exists c \in \R) \; \Pr{X=c} = 1
\imp X_n \pconv X$
\item $X_n \pconv X \wedge Y_n \pconv Y
\imp X_n + Y_n \pconv X + Y$
\item $X_n \qmconv X \wedge Y_n \qmconv Y
\imp X_n + Y_n \qmconv X + Y$
\item $X_n \pconv X \wedge Y_n \pconv Y
\imp X_nY_n \pconv XY$
\item $X_n \pconv X \imp \transform(X_n) \pconv \transform(X)$
\item $X_n \dconv X \imp \transform(X_n) \dconv \transform(X)$
\item $X_n \qmconv b \eqv \lim_{n\to\infty} \E{X_n}=b
\wedge \lim_{n\to\infty} \V{X_n} = 0$
\item $X_1,\dots,X_n\; \iid \wedge \E{X}=\mu \wedge \V{X}<\infty
\eqv \samplemean \qmconv \mu$
\end{itemize}
\textsc{Slutzky's Theorem}
\begin{itemize}
\item $X_n \dconv X \text{ and } Y_n \pconv c
\imp X_n + Y_n \dconv X + c$
\item $X_n \dconv X \text{ and } Y_n \pconv c
\imp X_nY_n \dconv cX$
\item In general: $X_n \dconv X \text{ and } Y_n \dconv Y
\nimp X_n + Y_n \dconv X + Y$
\end{itemize}
\subsection{Law of Large Numbers (LLN)}
Let $\{X_1,\ldots,X_n\}$ be a sequence of \iid \rv's, $\E{X_1}=\mu$.
Weak (WLLN)
\[\samplemean \pconv \mu \qquad n\to\infty\]
Strong (SLLN)
\[\samplemean \asconv \mu \qquad n\to\infty\]
\subsection{Central Limit Theorem (CLT)}
Let $\{X_1,\ldots,X_n\}$ be a sequence of \iid \rv's, $\E{X_1}=\mu$, and
$\V{X_1} = \sigma^2$.\\
\[ Z_n
:= \displaystyle\frac{\samplemean-\mu}{\sqrt{\V{\samplemean}}}
= \displaystyle\frac{\sqrt{n}(\samplemean - \mu)}{\sigma}
\dconv Z \qquad \text{where } Z\dist \norm[0,1]\]
\[\lim_{n\to\infty} \Pr{Z_n \le z} = \Phi(z) \qquad z \in \mathbb R\]
CLT notations
\begin{align*}
Z_n &\approx \norm[0,1] \\
\samplemean &\approx \norm[\mu,\frac{\sigma^2}{n}] \\
\samplemean - \mu &\approx \norm[0,\frac{\sigma^2}{n}] \\
\sqrt{n}(\samplemean - \mu) &\approx \norm[0,\sigma^2] \\
\frac{\sqrt{n}(\samplemean - \mu)}{\sigma} &\approx \norm[0,1] \\
\end{align*}
Continuity correction
\[\Pr{\samplemean \le x} \approx
\Phi\left(\displaystyle\frac{x+\frac{1}{2}-\mu}{\sigma/\sqrt{n}}\right)\]
\[\Pr{\samplemean \ge x} \approx
1-\Phi\left(\displaystyle\frac{x-\frac{1}{2}-\mu}{\sigma/\sqrt{n}}\right)\]
Delta method
\[Y_n \approx \norm[\mu,\frac{\sigma^2}{n}] \imp
\transform(Y_n) \approx
\norm[\transform(\mu),
\left(\transform'(\mu)\right)^2\frac{\sigma^2}{n}]\]
\section{Statistical Inference}
Let $X_1,\cdots,X_n \distiid F$ if not otherwise noted.
\subsection{Point Estimation}
\begin{itemize}
\item Point estimator $\that_n$ of $\theta$ is a \rv:
$\that_n = g(X_1,\dots,X_n)$
\item $\bias(\that_n) = \E{\that_n}-\theta$
\item Consistency: $\that_n \pconv \theta$
\item Sampling distribution: $F(\that_n)$
\item Standard error: $\se(\that_n) = \sqrt{\V{\that_n}}$
\item Mean squared error: $\mse = \E{(\that_n-\theta)^2}
= \bias(\that_n)^2 + \V{\that_n}$
\item $\limn \bias(\that_n) = 0 \wedge \limn\se(\that_n) = 0
\imp \that_n$ is consistent
\item Asymptotic normality:
$\displaystyle\frac{\that_n-\theta}{\se} \dconv \norm[0,1]$
\item \textsc{Slutzky's Theorem} often lets us replace $\se(\that_n)$ by some
(weakly) consistent estimator $\shat_n$.
\end{itemize}
\subsection{Normal-Based Confidence Interval}
Suppose $\that_n \approx \norm[\theta,\sehat^2]$.
Let $\zat = \Phi^{-1}(1-(\alpha/2))$,
i.e., $\Pr{Z > \zat} = \alpha/2$ and $\Pr{-\zat < Z < \zat} = 1-\alpha$
where $Z\dist\norm[0,1]$.
Then \[C_n = \that_n \pm \zat\sehat\]
\subsection{Empirical distribution}
Empirical Distribution Function (ECDF)
\[\Fnhat(x) = \displaystyle\frac{\sumin I(X_i \le x)}{n}\]
\[I(X_i \le x) = \begin{cases}
1 & X_i \le x \\
0 & X_i > x
\end{cases}\]
Properties (for any fixed $x$)
\begin{itemize}
\item $\E{\Fnhat} = F(x)$
\item $\V{\Fnhat} = \displaystyle\frac{F(x)(1-F(x))}{n}$
\item $\mse = \displaystyle\frac{F(x)(1-F(x))}{n} \dconv 0$
\item $\Fnhat \pconv F(x)$
\end{itemize}
\textsc{Dvoretzky-Kiefer-Wolfowitz} (DKW) inequality ($X_1,\dots,X_n\dist F$)
\[\Pr{\sup_x\left|F(x)-\Fnhat(x)\right| > \varepsilon} =
2e^{-2n\varepsilon^2}\]
Nonparametric $1-\alpha$ confidence band for $F$
\begin{align*}
L(x) &= \max\{\Fnhat-\epsilon_n, 0\} \\
U(x) &= \min\{\Fnhat+\epsilon_n, 1\} \\
\epsilon &=
\sqrt{\displaystyle\frac{1}{2n}\log\left( \frac{2}{\alpha} \right)} \\
\end{align*}
\[\Pr{L(x) \le F(x) \le U(x) \;\forall x} \ge 1-\alpha\]
\subsection{Statistical Functionals}
\begin{itemize}
\item Statistical functional: $T(F)$
\item Plug-in estimator of $\theta = (F)$: $\that_n = T(\Fnhat)$
\item Linear functional: $T(F) = \int \transform(x)\dfx$
\item Plug-in estimator for linear functional: \\
\[T(\Fnhat)
= \displaystyle\int \transform(x)\dfhatx
= \frac{1}{n}\sumin \transform(X_i)\]
\item Often: $T(\Fnhat) \approx \norm[T(F),\sehat^2]$ \imp
$T(\Fnhat) \pm \zat\sehat$
\item $p^\mathrm{th}$ quantile: $F^{-1}(p) = \inf\{x:F(x) \ge p\}$
\item $\mhat = \samplemean$
\item $\shat^2 = \displaystyle\frac{1}{n-1}\sumin
(X_i-\samplemean)^2$
\item $\khat =
\displaystyle\frac{\frac{1}{n}\sumin(X_i-\mhat)^3}{\shat^3}$
\item $\rhohat = \displaystyle\frac{\sumin(X_i-\samplemean)(Y_i-\bar{Y}_n)}%
{\sqrt{\sumin(X_i-\samplemean)^2}\sqrt{\sumin(Y_i-\bar{Y}_n)^2}}$
\end{itemize}
\section{Parametric Inference}
Let $\mathfrak{F} = \bigl\{ f(x;\theta) : \theta\in\Theta \bigr\}$ be a
parametric model with parameter space $\Theta \subset \R^k$ and parameter
$\theta = (\theta_1,\dots,\theta_k)$.
\subsection{Method of Moments}
$j^{\mathrm{th}}$ moment
\[\alpha_j(\theta) = \E{X^j} = \displaystyle\int x^j \dfx\]
$j^{\mathrm{th}}$ sample moment
\[\ahat_j = \displaystyle\frac{1}{n}\sumin X_i^j\]
Method of Moments estimator (MoM)
\begin{align*}
\alpha_1(\theta) &= \ahat_1 \\
\alpha_2(\theta) &= \ahat_2 \\
\vdots &= \vdots \\
\alpha_k(\theta) &= \ahat_k
\end{align*}
\begin{titemize}{Properties of the MoM estimator}
\item $\that_n$ exists with probability tending to 1
\item Consistency: $\that_n \pconv \theta$
\item Asymptotic normality:
\[\sqrt{n}(\that-\theta) \dconv \norm[0,\Sigma]\]
where $\Sigma = g\E{YY^T}g^T$, $Y = (X,X^2,\dots,X^k)^T$,\\
$g = (g_1,\dots,g_k)$ and
$g_j = \frac{\partial}{\partial\theta}\alpha_j^{-1}(\theta)$
\end{titemize}
\subsection{Maximum Likelihood}
Likelihood: $\Lln : \Theta \to [0,\infty)$
\[\Lln(\theta) = \displaystyle\prodin f(X_i;\theta)\] \\
Log-likelihood
\[\lln(\theta) = \log \Lln(\theta) = \sumin \log f(X_i;\theta)\]
Maximum likelihood estimator (\mle)
\[\Lln(\that_n) = \sup_\theta \Lln(\theta)\]
Score function
\[s(X;\theta) = \frac{\partial}{\partial\theta}\log f(X;\theta)\]
Fisher information
\[I(\theta) = \V[\theta]{s(X;\theta)}\]
\[I_n(\theta) = nI(\theta)\]
Fisher information (exponential family)
\[I(\theta) = \E[\theta]{-\frac{\partial}{\partial\theta} s(X;\theta)}\]
Observed Fisher information
\[I_n^{obs}(\theta)
= -\frac{\partial^2}{\partial\theta^2} \sumin\log f(X_i;\theta)\]
Properties of the \mle
\begin{itemize}
\item Consistency: $\that_n \pconv \theta$
\item Equivariance:
$\that_n$ is the \mle
\imp $\transform(\that_n)$ is the \mle of $\transform(\theta)$
\item Asymptotic optimality (or efficiency), i.e., smallest variance for
large samples. If $\ttil_n$ is any other estimator, the asymptotic relative
efficiency is:
\begin{enumerate}
\item $\se \approx \sqrt{1/I_n(\theta)}$