 # Statistics with R (part 1: very basic tutorial)

June 28, 2019

hey guys this is the introduction to our to get in to our system all you have to do from a window system go to our icon down click it or you could do something else like go to start menu or programs our folder then our now how this forms look a bit small to you maybe ok I'll change the GOI preference set it to 20 size with more maybe yeah let repeat Oh lots of things umm to get rid of the things in the screen in our press ctrl L yeah that does the magic now we are trying to get introduction for our what do you we do in our at first we do the calculation in statistics to do any analysis first we have to create the vectors we start by creating simple vectors okay how do we create vectors in our say I put X notice that is small X naught capital x equals concatenate C small C obviously break it starts with the bit will be 1 2 3 4 5 comma 2 comma 3 comma 4 comma 5 and that's it now we can see what is in X er int print X yeah 1 2 3 4 5 let's say we want to create vector but in another way say the way is like X 1 see 1 2 3 4 5 yeah firstly what is in X 1 yeah one two three four five so there are many ways to create the vectors and this is simply the two ways one way was using the Equality and another way is using the sign like this oops so the other ways could be like this say X 2 is 1 if 5 so it is X 2 1 2 3 4 5 or we could use the sequence X 3 equals sequence that starts from 1 amps at 5 with equal intervals 1 so X 3 is 1 2 3 4 5 yeah now we create a new vectors Y it is 6 to 10 yeah remember our X was 1 2 3 4 5 our Y is 6 to 10 so if I want to create some new vector or set which is like the combination of x and y so this is it we can we can do basic arithmetic using the vectors the basic arithmetic is like this like if X is 1 2 3 4 5 then X plus 1 should be 2 3 4 5 6 let's see what whether it is like this or not I mean this is like this so similarly X star it – that means it's month it's much played by 2 R divided by 2 yeah we could go up without typing it all over again and just edit the part where we want to edit this can save our time yeah yeah going in the app button yeah it gives us the history of our yeah now let's say we want to see the vector arithmetic s– like x and y whether it works or not yeah it works perfectly because the length of X and length of Y are similar that's why it works perfectly to check the length of X yeah 5 go up length of Y there's also that that's why it works and we can do similar aesthetic like this X minus y X into y X divided by Y and so on this is how we work we are using vectors and for the vectors we can use the normal arithmetic or use we can use the vector and scalar arithmetic as we have time previous to like X plus 5 this is vector plus scalar and if we do X minus y where X is back to Y is vector this is vector vector arithmetic yeah once we are done with the equity we could use some complex functions like not plus minus in to divide but more complex like that like whatever log say I want to find the logarithm of X yeah this is like this but what sort of logarithm is it I'm not sure so I want to take whether this is the logarithm for ten males or natural okay to look into the help file type question mark log if we know the command in this case we know the common log yeah clock computes logarithm by default natural logarithm so yeah this is the natural logarithm so this is how we work in our there are several other functions like square SQR t square root of x which is like this and we can find the exponential of X yeah this is like this so we came to know about the r and its basic admitting how to create vectors how to look into the help file so this is the part one of our introduction yeah let's hope that we can make it into introduction