\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{Hsuzc} \pdfinfo{ /Title (biostat3425.pdf) /Creator (Cheatography) /Author (Hsuzc) /Subject (BioStat3425 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}{8F92E3} \definecolor{LightBackground}{HTML}{F1F1FB} \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{BioStat3425 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Hsuzc} via \textcolor{DarkBackground}{\uline{cheatography.com/171419/cs/35971/}}} \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}Hsuzc \\ \uline{cheatography.com/hsuzc} \\ \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 9th December, 2022.\\ 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} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Comparison Procedures}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{LSD}} Requires knowing the global F test is significant before any testing should be done. More powerful than Bonferroni, but can lead to inflated Type I error rate. Not recommended} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{TUKEY}} Controls experimentwise Type I error rate exactly if sample sizes between groups are equal More powerful than Bonferrroni Use when only interested in all (or most) pairwise comparisons of means(unplanned comparisons)} \tn % Row Count 9 (+ 5) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{BONFERRONI}} Very conservative Use when only interested in a small number of planned comparisons Use when making comparisons other than between pairs.} \tn % Row Count 13 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Individual Vs Family CI}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{**Individual confidence level (comparisonwise,𝛼𝑐𝑀): Success rate of a procedure for constructing a single confidence interval (or conducting a single hypothesis test)} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Familywise confidence level (experimentwise,𝛼𝑒𝑀):}}Success rate of a procedure for constructing a family of confidence intervals (or a family of hypothesis tests) A "successful" usage is one in which ALL intervals in the family capture their parameters} \tn % Row Count 10 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Pairwise Example}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Nematodes in tomato plants How do nematodes affect plant growth? 12 identical pots, Different\# of nematodes per pot; 0, 1000, 5000, Measure increase in tomato seedling height (cm) 16 days after planting} \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Hypothesis Test: Ho:u1=u2=u3 vs Ha: Not all of the u are equal} \tn % Row Count 7 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Overall F test significant (p-value = 0.0027) -{}-\textgreater{} not all of the group means are equal} \tn % Row Count 9 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Hypo for pairwise comparisons H0: ui-uj=0 Ha: ui-ujβ‰ 0 β†’ iβ‰ j} \tn % Row Count 11 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{How many pairwise comparisons are there for this example?} \tn % Row Count 13 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{How many pairwise comparisons are there for this example? K=K=I(I-1)2β†’ 3(3-1)2= 3} \tn % Row Count 15 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Levels not connected by the same letter are significantly different} \tn % Row Count 17 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Ordered Differences Report for lower CL and upper Cl= difference of growth} \tn % Row Count 19 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Which nematode groups have significantly different ang growth? 0-5000 (p -value = 0.0045)and 5000-1000 (0.006) are significantly different Difference in growth between 0 and 5000 will be between 1.83 cm and 8.27 cm more than 5000} \tn % Row Count 24 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Factor Effects Model}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{π‘Œπ‘–π‘—π‘˜ = πœ‡+𝛼𝑖 +𝛽𝑗 \seqsplit{+(𝛼𝛽)𝑖𝑗+πœ€π‘–π‘—π‘˜}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Response = overall avg growth + main effects +interaction effect} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Assumptions: πœ€π‘–π‘—π‘˜\textasciitilde{}N(0,𝜎2) are independent Errors are normal, independent, with constant variance} \tn % Row Count 7 (+ 3) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Constraints: σ𝛼𝑖 =σ𝛽𝑗 =Οƒ(𝛼𝛽)𝑖𝑗 =0 Required to keep model from being over-parameterized} \tn % Row Count 10 (+ 3) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\# of test = factoralevels X factorblevels} \tn % Row Count 11 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.4931 cm} x{3.4839 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Assumptions Errors are}} \tn % Row 0 \SetRowColor{LightBackground} Normal & Normal Probability Plot \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Constant Variance & Predicted Residual vs Fitted and Residual vs Factor Levels \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} \seqsplit{Independence} & Usually Assumed and typically assumed \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Main Effects and Interaction Plot}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{Main Effects Plot}} Separate plot for each factor Plot of mean response for each level of the factor Gives an indication of whether a factor is important Horizontal line indicates means are the same for both levels of the factor and thus factor is not important} \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Interaction Plot}} Plot means for each treatment combination against levels of one factor, with different lines for the other factor Parallel Lines – No Interaction Crossing Lines - Interaction} \tn % Row Count 10 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.9908 cm} x{2.9862 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Simple Liner Regression Vocal}} \tn % Row 0 \SetRowColor{LightBackground} Least Squares Regression & standard approach for estimating the line\{\{nl\}\}The line is chosen, so that the sum of squared vertical distances between points and the line is minimized. \tn % Row Count 7 (+ 7) % Row 1 \SetRowColor{white} correlation coefficient r & A measure of association for two quantitative variables is the \tn % Row Count 10 (+ 3) % Row 2 \SetRowColor{LightBackground} predicted or fitted values. & The points that lie on the regression line vertically above (or below) an observed value Notation \textasciicircum{}yi \tn % Row Count 15 (+ 5) % Row 3 \SetRowColor{white} residuals. & (vertical) distances between observed and predicted values notatio: ei=yi-\textasciicircum{}yi \tn % Row Count 19 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Model}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/hsuzc_1670555320_Screen Shot 2022-12-08 at 9.08.14 PM.png}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{F-Tests}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{First: Test for Interaction β€’ 𝐻0: (𝛼𝛽)𝑖𝑗=0 for all i,j vs. π»π‘Ž: π‘π‘œπ‘‘ π‘Žπ‘™π‘™ (𝛼𝛽)𝑖𝑗 equal zero} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{p-value \textless{}a =Reject HO or p-value\textgreater{}a = fail to reject H0 This means that both factors are important (even if main effects not significant) β€’ We may need to interpret in terms of the interaction since we may not be able to separate out the main effects for individual interpretation} \tn % Row Count 9 (+ 6) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Then: Test Main Effects Factor A 𝐻0:𝛼𝑖 =0 for all i vs. \seqsplit{π»π‘Ž:π‘π‘œπ‘‘π‘Žπ‘™π‘™π›Όπ‘–} equal zero β€’ Main Effect of Factor B 𝐻0:𝛽𝑗 =0 for all j vs. \seqsplit{π»π‘Ž:π‘π‘œπ‘‘π‘Žπ‘™π‘™π›½π‘—equal} zero} \tn % Row Count 14 (+ 5) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{H0: factorAi= 0 for all i (no effect) reject H0 if p-value\textless{}a} \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Model parameters(unknown)}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/hsuzc_1670555370_Screen Shot 2022-12-08 at 9.09.02 PM.png}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.43873 cm} x{2.53827 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Assumprions}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Linear relationship between X and Y} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Model assumes that the error terms are & Independent, Normal, Have constant variance. \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Residuals may be used to explore the legitimacy of these assumptions.} \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}