\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{Jianmin Feng (taotao)} \pdfinfo{ /Title (ap-stat-01-describe-data.pdf) /Creator (Cheatography) /Author (Jianmin Feng (taotao)) /Subject (AP Stat 01 Describe Data 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}{16630D} \definecolor{LightBackground}{HTML}{F7FAF7} \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{AP Stat 01 Describe Data Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Jianmin Feng (taotao)} via \textcolor{DarkBackground}{\uline{cheatography.com/79308/cs/20351/}}} \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}Jianmin Feng (taotao) \\ \uline{cheatography.com/taotao} \\ \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 17th December, 2019.\\ 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*}{3} \begin{tabularx}{5.377cm}{x{2.04057 cm} x{2.93643 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Collect Data}} \tn % Row 0 \SetRowColor{LightBackground} type of variable & categorical vs quantitative (continuous vs discrete) \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} type of descriptive methods & tabular, graphic, Numberical \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} Tabular & n, f, rf, 100rf,cf, rcf, 100rcf \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} graphical & relations: bar, pie, dot, stem leave, histogram, cumulative freq \tn % Row Count 10 (+ 3) % Row 4 \SetRowColor{LightBackground} numberic & precise/inference, dull, complicated \tn % Row Count 12 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.74195 cm} x{3.23505 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{graph the data}} \tn % Row 0 \SetRowColor{LightBackground} qualitative & bar pie \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} quantitative & dot plot,stemplot; histogram,cumulatice freq charts, boxplot \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} Examining graph & center(mean,median,mode), spread (range, std, variance), shape (symmetric, skewed) \tn % Row Count 8 (+ 4) % Row 3 \SetRowColor{white} \seqsplit{pattern/deviations} & cluster/gap, outliers \tn % Row Count 10 (+ 2) % Row 4 \SetRowColor{LightBackground} dotplot & spread,shape,approx center \tn % Row Count 11 (+ 1) % Row 5 \SetRowColor{white} stemplot & shaped,spread, center \tn % Row Count 12 (+ 1) % Row 6 \SetRowColor{LightBackground} histograph & f vs rf, shape/center, large dataset, error bar for spread \tn % Row Count 15 (+ 3) % Row 7 \SetRowColor{white} cumulative freq charts & S shaped, T(skewed) shape, meaningful order \tn % Row Count 17 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.84149 cm} x{3.13551 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Central tendency - mean, median, mode}} \tn % Row 0 \SetRowColor{LightBackground} summering distribution & population/sample, center/spread/sape \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} mean & mu=population mean,X bar=sample mean \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} median & for skewed data, odd/even sample size \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} mode & number with highest freq \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} symmetrical & mean=median=mode \tn % Row Count 8 (+ 1) % Row 5 \SetRowColor{white} left skewed & mode\textgreater{}median\textgreater{}mean \tn % Row Count 9 (+ 1) % Row 6 \SetRowColor{LightBackground} right skewed & mode\textgreater{}mean\textgreater{}media \tn % Row Count 10 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.59264 cm} x{3.38436 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{variance/spread - range, IQR, STD}} \tn % Row 0 \SetRowColor{LightBackground} variance & spread from mean \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} range & largest-smallest measurement, outliers affect \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} IQR & interquartile range, eg Q3-Q1, not affected by outliers, median / IQR \tn % Row Count 6 (+ 3) % Row 3 \SetRowColor{white} STD & standard deviation, square root of variance, outlier affect, \textgreater{}=0 \tn % Row Count 9 (+ 3) % Row 4 \SetRowColor{LightBackground} variance & average the square of deviation from mean \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} population variance & N, sigma, mu \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} sample variance & n-1, x bar, s \tn % Row Count 15 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{mean/STD, median/IQR} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.9954 cm} x{3.9816 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Position - quartile,percentile,standarded score}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{percentile} & order, divide into 100 equal parts, count kth perncentile Pk \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{quartile} & order, divide into 4 equal parts (median calc), count kth quartile Qk, P25=Q1, P50=Q2.. \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} z score & standardized score, (x-mean)/std, compare datasets with different scales, eg temperature in north vs south city \tn % Row Count 9 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Graphing uni variant data}} \tn % Row 0 \SetRowColor{LightBackground} graphical summaries & Y scale:misleading manipulation \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} box plots & box(Q2-Q3) and whiskers(lower Q1,upper Q4), whiskers \textless{}1.5IQR (Q3-Q1), L=Q1-1.5IQR, U=Q3+1.5IQR. point \textgreater{}U or \textless{}L are outliers \tn % Row Count 8 (+ 6) % Row 2 \SetRowColor{LightBackground} & based on position, identify outlier and general shape(skewed or not) \tn % Row Count 11 (+ 3) % Row 3 \SetRowColor{white} & calc: Q1, Median, Q3, IQR, L, U \tn % Row Count 13 (+ 2) % Row 4 \SetRowColor{LightBackground} shift unit +a & (variance/spread) range, std,IQR not affected \tn % Row Count 15 (+ 2) % Row 5 \SetRowColor{white} enlarge or shrink unit,*b & all stat enlarged or shrinked \tn % Row Count 17 (+ 2) % Row 6 \SetRowColor{LightBackground} Compare distributions & center, spread, shape \tn % Row Count 19 (+ 2) % Row 7 \SetRowColor{white} & outerlier or unusual values,cluster/gap \tn % Row Count 21 (+ 2) % Row 8 \SetRowColor{LightBackground} & context of the question \tn % Row Count 22 (+ 1) % Row 9 \SetRowColor{white} & dot plot, stemplot, histogram, freq polygram \tn % Row Count 24 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Avoid simple list the stat ( center,std and shape), instead, make a clear comparative statement.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.04057 cm} x{2.93643 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Bivariant data}} \tn % Row 0 \SetRowColor{LightBackground} Scatter plot & shape: linear, non-linear, no relation \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & direction: positive or negative linear relation \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} & strength of linear relation: close to the line \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{Numeric methods} \tn % Row Count 8 (+ 1) % Row 4 \SetRowColor{LightBackground} correlation coefficient & degree and direction of linear relation of two quantitative variables (x,y) \tn % Row Count 12 (+ 4) % Row 5 \SetRowColor{white} & rho and r, {[}-1,+1{]} \tn % Row Count 13 (+ 1) % Row 6 \SetRowColor{LightBackground} & 0, 0.1, 0.5,0.85,1 \tn % Row Count 14 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{least squares regression line} \tn % Row Count 15 (+ 1) % Row 8 \SetRowColor{LightBackground} formular & Y = a+ bX +e \tn % Row Count 16 (+ 1) % Row 9 \SetRowColor{white} Y & dependent/response variable \tn % Row Count 18 (+ 2) % Row 10 \SetRowColor{LightBackground} x & \seqsplit{independent/explanatory} variable \tn % Row Count 20 (+ 2) % Row 11 \SetRowColor{white} a & y intercept of line \tn % Row Count 21 (+ 1) % Row 12 \SetRowColor{LightBackground} b & slope of the line \tn % Row Count 22 (+ 1) % Row 13 \SetRowColor{white} e & random error, residual error \tn % Row Count 24 (+ 2) % Row 14 \SetRowColor{LightBackground} predicted vaue & y hat \tn % Row Count 25 (+ 1) % Row 15 \SetRowColor{white} residual error & e \tn % Row Count 26 (+ 1) % Row 16 \SetRowColor{LightBackground} least square regression & minimize the sum of squares of residual error \tn % Row Count 28 (+ 2) % Row 17 \SetRowColor{white} & line of best fit (X bar, Y bar), slope=r(Sy/Sx) \tn % Row Count 31 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.04057 cm} x{2.93643 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Bivariant data (cont)}} \tn % Row 18 \SetRowColor{LightBackground} coefficient of determination & R squared, percent of variance of Y determined by variance X \tn % Row Count 3 (+ 3) % Row 19 \SetRowColor{white} & {[}-1,+1{]} \tn % Row Count 4 (+ 1) % Row 20 \SetRowColor{LightBackground} influential point & point that affect the correlation efficient \tn % Row Count 6 (+ 2) % Row 21 \SetRowColor{white} Outlier & maybe influential point \tn % Row Count 7 (+ 1) % Row 22 \SetRowColor{LightBackground} residual plot & should be random, or else, fit is not the best \tn % Row Count 9 (+ 2) % Row 23 \SetRowColor{white} transformation to fit linear & log, sqrt,reciprocal,square,power \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{1 calc slope, intercept, write formula, plot the linear line \newline 2 make a prediction, calc residual error \newline 3 calc coefficient of determination r = SSxy/sqrt(SSxx * SSyy) \newline \newline stat and interpretation} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{categorical data}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{marginal and joint freq of two way tables} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \seqsplit{contingency(joint)} table & r*c \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} marginal & row col grant total \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{conditional relative frequency} \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} association & compare with row total * col total /grand total \tn % Row Count 7 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}