Bivariate Statistics

Initially, I was just going to calculate the correlation coefficient manually in R without using the functions, but then I decided that if I was going to do it manually then I may as well do it by hand.  I ended up making a mistake with spacing by not thinking about how many digits would be made out of squaring an already triple digit number.

img_20160911_110951

From there, inputting the x and y values into R and executing the cor.tests() were very simple and straightforward.  I feel like I’ve gotten to the point with R where I don’t feel like I’m completely lost all the time.

pearsoncorrelationspearmanscorrelation

Module 2

For this assignment, I decided to to make everything as one script and use the Source with Echo command to run it all at once.  The only issue I had is that mode() does not yield a mode.  It returns what storage mode the object uses, so I had to look up how to make a function to calculate the mode.

statscript

 

From there, I was able to call mat and matrange to pull up the tables of all the values.

statstable

range