## Brief summary of the R commands we've been using when thinking ## about distributions. # The first letter tells you what you're doing: the two common ones are # p and q. Use p to tell you how much of the distribution is below the # value you are putting in; use q to do the opposite. # The main distributions we've been using are normal (norm in R), # binomial (binom in R) and t (t in R). For binomial you need to # specify the number of trials and probability of success and for t # you need to specify the degrees of freedom. They all have extra # options (see the help commands). # So, for example, to find out what proprtion of the normal distribution # lies below 1.2 (on the "z" axis of the standardised distribution) type pnorm(1.2) # To find the same number but when you have a t distribution with 8 degrees # of freedom rather than a normal distribution use pt(1.2, 8) # To go in the other direction and find the z-score that has 45% of the # normal distribution below it use qnorm(0.45) # Given a binomial experiment with 100 trials and a 3/4 probability # of success, where is the point below which 30% of the outcomes fall? qbinom(0.3, 100, 3/4)