\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{lunarorbit} \pdfinfo{ /Title (economic-statistics-midterm-2-2.pdf) /Creator (Cheatography) /Author (lunarorbit) /Subject (Economic Statistics - Midterm 2.2 Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{002147} \definecolor{LightBackground}{HTML}{F7F8F9} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Economic Statistics - Midterm 2.2 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{lunarorbit} via \textcolor{DarkBackground}{\uline{cheatography.com/216484/cs/47304/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}lunarorbit \\ \uline{cheatography.com/lunarorbit} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 6th November, 2025.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{4} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Probability basics (definitions \& rules)}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Probability Basics} \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{{\bf{What probability actually means:}} \newline • Probability is a number that tells you how likely something is to happen. \newline • It's always between 0 and 1: \newline ~ ▸ 0 = impossible \newline ~ ▸ 1 = guaranteed \newline ~ ▸ 0.5 = 50\% chance \newline You can think of probability as the {\bf{long-run frequency}} of something happening if you repeated it a bunch of times. \newline ~ Example: if you flip a fair coin 1,000 times, about half the flips will be heads → P(Heads)=0.5.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Key probability symbols}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{• Event: any outcome or collection of outcomes you're interested in. \newline % Row Count 2 (+ 2) ~ Example: "Rolling an even number" on a die → that's the event A = \{2, 4, 6\}. \newline % Row Count 4 (+ 2) • Sample space (S): all possible outcomes. \newline % Row Count 5 (+ 1) ~ Example: rolling a die → \newline % Row Count 6 (+ 1) ~ S = \{1, 2, 3, 4, 5, 6\}. \newline % Row Count 7 (+ 1) • P(A): "The probability that event A happens." \newline % Row Count 9 (+ 2) ~ Example: P(Even)=3/6=0.5.% Row Count 10 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Types of events}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{• Disjoint / mutually exclusive: can't happen at the same time. \newline % Row Count 2 (+ 2) ~ Example: "Rolling a 3" and "Rolling a 4." \newline % Row Count 4 (+ 2) • Independent: one happening doesn't change the chance of the other. \newline % Row Count 6 (+ 2) ~ Example: Coin toss and rolling a die — they don't affect each other.% Row Count 8 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Example: "At least one"}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{"If there's a 0.004 chance a test gives a false positive, what's the probability that at least one out of 200 tests is a false positive?" \newline % Row Count 3 (+ 3) This uses the {\bf{complement rule}} — it's easier to find the chance that none are false positives, then subtract from 1. \newline % Row Count 6 (+ 3) \{\{ac\}\}P(At least one)=1−P(None) \newline % Row Count 7 (+ 1) Each test has a 0.996 chance of being fine → \newline % Row Count 8 (+ 1) P(None)=0.996\textasciicircum{}200 \newline % Row Count 9 (+ 1) So P(At least one)=1−0.996\textasciicircum{}200% Row Count 10 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Random Variables (RVs)}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{What they are} \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{A random variable is just a number that represents the outcome of something random. \newline Example: \newline Toss a coin twice. \newline X = number of heads. \newline Possible X values: 0, 1, or 2. \newline We can describe all the possible values of X and how likely they are. That list is called a {\bf{probability distribution.}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Probability distribution}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{A table or formula showing: \newline % Row Count 1 (+ 1) Every possible value of X \newline % Row Count 2 (+ 1) The probability of each value \newline % Row Count 3 (+ 1) Must satisfy: \newline % Row Count 4 (+ 1) ~ 1. All probabilities are between 0 and 1. \newline % Row Count 5 (+ 1) ~ 2. They add up to 1.% Row Count 6 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Mean (Expected Value)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{The {\bf{expected value (E{[}X{]})}} or {\bf{mean (μₓ)}} tells you the average outcome in the {\emph{long run.}} \newline % Row Count 2 (+ 2) ~ E{[}X{]}=∑(x×P(X=x)) \newline % Row Count 3 (+ 1) {\emph{Example (from table above):}} E{[}X{]}=0(0.25)+1(0.50)+2(0.25)=1 → On average, 1 head per 2 flips.% Row Count 5 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Variance \& Standard Deviation}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Var(X)=∑(x−μ)$^{\textrm{2}}$ P(X=x) / SD(X)= √Var(X) \newline % Row Count 1 (+ 1) {\emph{Variance}} = average of squared distances from the mean. \newline % Row Count 3 (+ 2) {\emph{Standard deviation}} = average distance. \newline % Row Count 4 (+ 1) If SD is small → values are close to the mean.% Row Count 5 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Useful shortcuts}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{• {\emph{E{[}aX+b{]}=aE{[}X{]}+b}} \newline % Row Count 1 (+ 1) (Multiply and add constants outside the expectation.) \newline % Row Count 3 (+ 2) • {\emph{Var(aX+b)=a$^{\textrm{2}}$ Var(X)}} \newline % Row Count 4 (+ 1) (Adding doesn't affect spread, multiplying stretches it.) \newline % Row Count 6 (+ 2) • {\emph{E{[}X+Y{]}=E{[}X{]}+E{[}Y{]}}} \newline % Row Count 7 (+ 1) • If X and Y independent: {\emph{Var(}}X{\emph{+}}Y{\emph{)=Var(}}X{\emph{)+Var(}}Y{\emph{)}} \newline % Row Count 9 (+ 2) • If correlated: {\emph{Var(}}X{\emph{+}}Y{\emph{)}} = {\emph{Var(}}X{\emph{)+Var(}}Y{\emph{)+2ρσ}}x{\emph{σ}}y \newline % Row Count 11 (+ 2) (ρ = correlation between {\emph{X}} and {\emph{Y}})% Row Count 12 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Example: Lottery}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{You buy a \$1 ticket that pays \$500 if you win (probability = 1/1000). If you lose, you get \$0.} \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{E{[}X{]}=(499)(0.001)+(−1)(0.999)=−0.5 \newline You lose 50$\frac{3}{4}$ on average each play → expected loss.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Sampling \& Sampling Distributions}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{{\bf{Population vs Sample}}} \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{• {\bf{Population:}} the entire group you care about (all students in a school). \newline • {\bf{Sample:}} the smaller group you actually measure (30 students). \newline We use samples to {\bf{estimate}} the truth about populations.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Types of samples}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{• {\bf{Simple Random Sample (SRS):}} every individual has an equal chance of being chosen. \newline % Row Count 2 (+ 2) • {\bf{Stratified sample:}} population divided into groups (strata) → random sample from each. \newline % Row Count 4 (+ 2) • {\bf{Cluster / multistage:}} randomly pick clusters, then pick within them. \newline % Row Count 6 (+ 2) ⚠️ {\bf{Voluntary response or convenience samples are biased!}} (not random → results unreliable).% Row Count 9 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Sampling distribution}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{If you take {\bf{many random samples}} and compute a statistic (like a mean or proportion) for each sample, the {\bf{distribution of those statistics}} is the sampling distribution. \newline % Row Count 4 (+ 4) We study its: \newline % Row Count 5 (+ 1) • {\bf{Center:}} average (should equal population value if unbiased) \newline % Row Count 7 (+ 2) • {\bf{Spread:}} how much sample results vary \newline % Row Count 8 (+ 1) • {\bf{Shape:}} often becomes bell-shaped for large samples% Row Count 10 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Unbiased estimator}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{A statistic is {\bf{unbiased}} if its sampling distribution's center equals the true population parameter. \newline % Row Count 3 (+ 3) {\emph{E{[}X̄{]}= μ}} and {\emph{E{[}p̂​{]}= p}} \newline % Row Count 4 (+ 1) Unbiased means, "on average, it hits the right answer."% Row Count 6 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{How sample size affects variability}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Bigger sample → smaller variability (less spread). \newline % Row Count 2 (+ 2) {\emph{SD(X̄)=σ/√n}} \newline % Row Count 3 (+ 1) As {\emph{n}} increases, denominator gets bigger → SD gets smaller.% Row Count 5 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Law of Large Numbers \& Central Limit Theorem}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{{\bf{Law of Large Numbers}}} \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{When you take more and more samples, the sample mean X̄ will get closer and closer to the population mean μ. \newline ~ Example: the average of 10 coin flips might not be 0.5, but the average of 10,000 flips almost definitely will be close to 0.5.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Central Limit Theorem (CLT)}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{This is {\emph{super important}} for exams.} \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Even if the original population is {\bf{not Normal}}, when you take {\bf{a large enough sample}}, the {\bf{distribution of sample means}} will look {\bf{Normal (bell-shaped)}}. \newline ~ {\emph{X̄ ∼N(μ, σ/√n)}} \newline Meaning: \newline Centered at μ (the true mean) \newline Spread = {\emph{σ/√n}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Why it matters}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{CLT lets you use {\bf{z-scores}} and Normal tables to find probabilities for sample means. \newline % Row Count 2 (+ 2) *z = sample mean - μ / σ/√n) \newline % Row Count 3 (+ 1) Then use the z-table (or calculator) to find probabilities.% Row Count 5 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Example (CLT in action)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{A machine fills cereal boxes. \newline % Row Count 1 (+ 1) μ = 500g, σ = 10g. \newline % Row Count 2 (+ 1) Sample 25 boxes. \newline % Row Count 3 (+ 1) {\emph{SD(X̄)}} = 10/√25 = 2 \newline % Row Count 4 (+ 1) {\emph{P(X̄ \textless{} 496)}} = {\emph{P}} ({\emph{Z}} \textless{} 496-500/2) = {\emph{P}} ({\emph{Z}} \textless{} -2) = 0.0228 \newline % Row Count 6 (+ 2) → 2.28\% chance the sample average weight is below 496g.% Row Count 8 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}