\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{MADdogz43} \pdfinfo{ /Title (stats-layout-practice.pdf) /Creator (Cheatography) /Author (MADdogz43) /Subject (Stats layout practice 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}{A3A3A3} \definecolor{LightBackground}{HTML}{F3F3F3} \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{Stats layout practice Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{MADdogz43} via \textcolor{DarkBackground}{\uline{cheatography.com/19662/cs/3728/}}} \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}MADdogz43 \\ \uline{cheatography.com/maddogz43} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 18th March, 2015.\\ Updated 13th May, 2016.\\ 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*}{2} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Test 2 Q\&A}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{True or False : \newline {\bf{Q1) The probability which comes from the fact that you believe that you have a 1/2 chance of drawing a red card from a standard deck of cards is empirical probability.}} FALSE \newline {\bf{Q) The events "not shitting off the water in the kitchen sink" and "receiving a high water bill" are not independent.}} TRUE \newline {\bf{Q)The vents "choosing a student who is male or a finance major from a nearby university to participate in a research study", are mutually exclusive.}} FALSE \newline {\bf{Q)8!= 20160.}} False \newline {\bf{Q2)Suppose the local shop makes dining room tables in three shapes and in three different finishes. Their production of the last six months is summarized in the following table:}} \newline Suppose one table is selected at random, Find the following: \newline {\bf{A) P(the table is oval) =}} 177/400 {\bf{B) P(the table is pine or rectangular) =}} 101+47+26/400 = 177/400 {\bf{C) P(the table is round and mahogany) =}} 43/400 {\bf{D) P(the table is oak | it is round) =}} 52/129 {\bf{E)P(the table is oval | it is mahogany) =}} 62/152. \newline {\bf{Q3)A coordinator will select 7 songs from a list of 13 songs to compose an event's musical entertainment lineup. How many different lineups are possible?}}A: 13vPv7 = 8648640 \newline {\bf{Q6) A box contains 16 white marbles and 12 green marbles. If two are drawn without replacement, what is the probability that they are both green?}} - 12/28 {\emph{ 11/27 = 132/756. \newline {\bf{Q7) The local restaurant is offering a dinner special that includes an appetizer, an entree, and a dessert. If there are 5 different appetizers to choose from, 11 different entrees, and 4 different desserts, how many different specials are possible?}} - 5}}11*4 = 220} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{info}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{Empirical Rule (68-95-99.7\%)}} - Use the empirical rule to estimate the probability of a porcupine living between 20.5 \& 27.4 years with an average lifespan of 22.8, the standard deviation is 2.3 years. Chart 1.0 {\bf{Step 1)}} The average lifespan 22.8(mean).{\bf{2)}} SD is 2.3 years so 1 SD below is 20.5 \& 1 above is 25.1 yrs. {\bf{3)}}Two SD's below the mean is 18.2, two above is 27.4. {\bf{4)}}Three SDs below is 15.9yrs \& above is 29.7yrs. {\bf{5)}} Looking for prob of porcupine living between 20.5-27.4 years. {\bf{6)}} Empirical Rule tells us 95\% of the porcupines will have lifespans within 2 SD's of the avg. Also 68\% will have lifespans within 1 SD of the mean. {\bf{7)}} That leaves 95\% - 68\% = 27\% of porcupines between 1\&2 SD's or 13.5\%(each side). {\bf{8)}} The probability is 68\% + 13.5\% or 81.5\% \newline {\bf{STANDARD SCORE (Z-SCORE)}} \newline A z-score is defined as the number of standard deviations a specific point is away from the mean. \newline Q) The grades on a physics midterm at Santa Rita are normally distributed with M = 78 \& O = 3.5. Ishaan scored 79\% on the exam. Find the Z-Score \newline Steps 1) Z = 79 - 78 / 2.5 -{}-{}-\textgreater{} Z = 0.29. Ishaan's score was 0.29 SD's above the mean. \newline {\bf{PERCENTILE}} \newline The median is the 50th percentile; the point in data where 50\% of the data falls below that point and 50\% fall above it.Steps to calculate the K percentile {\bf{1)}} Order all the values in the data set from smallest to largest. {\bf{2)}} Multiply K\% by the total number of values, n(index). {\bf{3)}} IF the index or n is not a whole number, round up to the nearest whole number. Count the values in your data set from left to right(smallest -\textgreater{} largest) until you reach the index. The corresponding value is your K \%ile. {\bf{4)}}Count the values in your data set from the left until you reach the index. The K \&ile is the average of that corresponding value in your data set \& the value that directly follows it. \newline {\bf{IE:}} 25 test scores in order \{43,54,56,61,62,66,68,69,69,70,71,72,77,78,79,85,87,88,89,93,95,96,98,99,99\} To find the 90th \%ile {\bf{1)}} Multiply 0.90 {\emph{ 25(amount of data) = 22.5(index). {\bf{2)}}Rounding up to you get 23, so counting from L-\textgreater{}R go until you reach the 23rd value (98) that is the 90th \%ile of this data set. OR if you wanted the 20th \%ile {\bf{1)}} 0.20}}25 = 5(index). {\bf{2)}}5th+6th value (62+66)/2 = 64 is the 20th \%ile. The median is the 13th score (77). \newline {\bf{BASIC PROBABILITY}} \newline {\bf{Probability Experiment -}}Any process with a result determined by chance. \newline {\bf{Sample Space - }} Each individual result that's possible for a prob experiment. \newline {\bf{Event -}}A subset of outcomes from the sample space. \newline {\bf{IE:}} Consider the experiment of rolling a dice. There are 6 possible {\bf{outcomes}},namely the number 1-6. The {\bf{sample space}} is the set of all outcomes which in this case is simply \{1,2,3,4,5,6\}. The {\bf{event}} "rolling an even number" is the subset of outcomes \{2,4,6\}. On the other hand, the event "rolling a number less than 10" is the set \{1,2,3,4,5,6\}. \newline {\bf{Subjective Probability -}}The least precise type of probability. \newline {\bf{Experimental Probability -}} specifically it is calculated by dividing the number of times an event occurs by the total number of trials performed. {\bf{F:}} If E is an event, the {\bf{P(E)}}, "the probability that E occurs is given by: {\bf{P(E) = f/n}} F= the frequency of event E, N= the total number of times the experiment is performed.{\bf{IE:}}A fisherman wants to know the prob that a fish he catches in his fav pond will be a catfish. HE records the numbers \& types of fish he catches for one week. He catches 92 fish, 43 of which were catfish. He then calculates the prob as follows: -{}-\textgreater{} P(catfish) = \# of catfish caught/total \# of fish caught -{}-\textgreater{} 43/92 = 0.4674. {\bf{Law of Large Numbers -}} The greater the number of trials, the closer the experimental probability will be to the true prob. \newline {\bf{CLASSICAL PROBABILTIY}} \newline The most precise type of probability. It is calculated by taking all possible outcomes into consideration. It states that if all outcomes are equally likely; the probability of an event is equal to the number of outcomes included in the event divided by the total number of outcomes in the sample space. \newline {\bf{P(E) = n(E)/n(S)}} {\bf{n(E) =}} the number of outcomes in the event {\bf{n(S)=}} number of outcomes in the sample space. \newline {\bf{IE:1}} All fish from the pond recorded, total \# of fish 1235, 541 are catfish. So: \newline {\bf{P(catfish) = n(E)/n(S)}} -{}-\textgreater{} 541/1235 = 0.4381 \newline {\bf{IE:2}} Idea of rolling a 6 sided die and getting an even number. There are 3 possible outcomes a 2,4, or 6. So n(E) = 3 with 6 outcomes in the sample space thus n(S) = 6. {\bf{P(even) = 3/6 -{}-\textgreater{} 1/2 = 0.5 prob}} \newline {\bf{Subjective Probability-}} An educated guess regarding the chance that an event will occur. \newline {\bf{Experimental Probability-}} Uses the outcomes obtained by repeatedly performing an experiment to calculate the probability. \newline {\bf{Complement-}} For E denoted E ,consists of all the outcomes in the sample space that are not in E. {\bf{P(E) + P(E ) = 1}} OR {\bf{P(E) = 1 - P(E )}} \newline {\bf{IE:}}Roll a pair of dice, what is the probability that neither die is a 3? It is much easier to count the outcomes in the complement E . There are 11 possible outcomes where at least 1 of the dice is a 3 = \{(3,1),(3,2),(3,4),(3,5),(3,6) (counted once per die) + \{3,3\}. {\bf{P(E )= n(E )/n(S) = 11/36}} OR better written: \newline {\bf{P(E) = 1 - P(E ) = 1 - 11/36 = 25/36 = 0.6944}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{info1}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{Addition Rule P(E or F) = P(E) + P(F) - P(E \& F)}} \newline {\bf{IE:}} What is the probability of drawing a heart or a queen from a deck of cards? There are 52 cards in a deck and 13 are hears. Probability of drawing a heart is 13/52, there are 4 queens in a deck so 4/52. Probability of drawing one or the other? {\bf{One problem -}} The queen of hearts is counted twice since it falls under both categories, so it must be subtracted as follows: \newline {\bf{P(heart or queen) = P(heart) + P(queen) - P(heart \& queen)}} = 13/52 + 4/52 - 1/52 = 16/52 = 0.3077. \newline {\bf{Mutually Exclusive-}} Events that share no outcomes. \newline {\bf{Addition Rule for Probability of Mutually Exclusive Events \newline P(E or F) = P(E) + P(F)}} \newline {\bf{IE:}} Caleb is buying a new car, he's narrowed it down to 4 cars. Kevin is betting he will chose either toyota or jeep. Find the probability Devin is right. \newline Toyota: 0.40 | Honda: 0.10 | Ford: 0.10 | Jeep: 0.35 {\emph{His friends accurately determined his interest in each brand}} \newline {\bf{P(Toyota or Jeep) = P(Toyota) + P(Jeep) = 0.40+0.35 = 0.75. \newline }}Multiplication Rules for Independent Events P(E\&F) = P(E){\emph{P(F){\bf{ \newline }}IE:{\bf{ Chose two cards from a deck, with replacement. What is the probability of choosing a king and then a queen? \newline }}P(king \& queen, w/replacement) = P(king) }} P(queen) = 4/52 {\emph{ 4/52 {\bf{ \newline }}= 1/13 }}1/13 = 1/169 = 0.0059{\bf{ \newline }}Without Replacement{\bf{ \newline }}P(king) = 4/52 = 1/13{\bf{ assume you draw a king what is the probability you draw a queen next? There are 4 queens left but only 51 cards remain. \newline }}P(queen, given king drawn first, w/o replacement) = 4/51 {\bf{ So -{}-\textgreater{} \newline }}P(king\&queen, w/o replacement) = P(king){\emph{P(queen, given king drawn first){\bf{ \newline }}= 4/52 }} 4/51 = 1/13 {\emph{ 4/51 = 4/663 = 0.0060{\bf{ \newline }}Conditional Probability-{\bf{Denoted P(F | E), it is the probability of event F occurring given that event E occurs first. }}P(F | E) = P(E \& F)/P(E){\bf{ \newline }}IE:{\bf{One card has already been chosen, w/o replacement. What is the probability of now choosing a second card from the deck and it being red, given that the first card was a diamond? Given that the first card was a diamond(red card) there is only 25 red cards left instead of 26, and only 51 total cards remaining. So : }}P(red | diamond) = 25/51 = 0.4902{\bf{ \newline }}Multiplication Rule for Probability of Dependent Events{\bf{ \newline }}P(E \& F) = P(E) }} P(F | E){\bf{ \newline }}= P(F) {\emph{ P(E | F){\bf{ \newline }}IE:{\bf{ What is the probability of choosing two face card in a row? Assume that the cards are chosen w/o replacement. When the first card is picked, all 12 face cards are available out of 52 total cards. When the second card is drawn, there are only 11 left out of 51. }}P(face card \& face card){\bf{ \newline }}= P(face card) }} P(face card | face card){\bf{ \newline }}= 12/52 {\emph{ 11/51 = 1/13 }} 11/17 = 11/221 = 0.0498{\bf{ \newline }}When you need to count the number of ways objects can be chosen out of a{\bf{ }}group of distinct objects, without replacement, then the problem you are{\bf{ }}dealing with involves combinations \& permutations.{\bf{ \newline }}Factorial-{\bf{ The product of all positive integers less than or equal to a given positive integer, n. Symbolically written as n!. \newline }}IE:{\bf{ 0! = 1 , 4!/0! = 4{\emph{3}}2{\emph{1/1 = 24/1 , 95!/93! = 95}}94{\emph{93}}92{\emph{91/93}}92{\emph{91 = 95}}94 = 8930. \newline }}Combination-{\bf{ A selection of objects from a group without regard to their arrangement. C = n!/r!(n-r)! }}When order is not important{\bf{ \newline }}Permutation-{\bf{ A selection of objects from a group where the arrangement is specific. P = n!/(n-r)! }}When order is important{\bf{ \newline }}IE:{\bf{ Given a group of 3 friends, Bubba, Lyndsay, \& Re. }}QA){\bf{ How many ways can you arrange the way they stand in line for the movies? }}order is important so permutation, were arranging 3 object so r = 3, from a group of 3 objects so n = 3.{\bf{ The number of permutations of 3 things permuted 3 at a time is calculated: P = 3!/(3-3)! = 3{\emph{2}}1/0! = 6/1 = 6 \newline }}QB){\bf{ How many ways can you choose two of them to ride in a car together? }}order is not important, so combination, controlling the number of combinations of 2 things from a group of 3 so{\bf{ C = 3!/2!(3-2)! = 3!/2! 1! = 3{\emph{2}}1/2{\emph{1}}1 = 3/1. \newline }}Special Permutations -{\bf{ Involve objects that are identical. The number of distinguishable permutations of n objects, of which K are all alike, k2 are all alike, \& so on. n!/k1!k2!....kp! \newline }}IE:{\bf{ How many different ways can you arrange the letters in the word TENNESSEE? }}You can distinguish between each E,N, or S, so group each letter together. T: 1, E: 4, N: 2, S: 2 9 total letter so -{}-\textgreater{} 9!/1!4!2!2! \newline = 9{\emph{8}}7{\emph{6}}5{\emph{4}}3{\emph{2}}1/(1)(4{\emph{3}}2{\emph{1)(2}}1)(2{\emph{1) = 9}}4{\emph{7}}3*5 = 3780.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}