R Language. What is R? Variables in R Summary of data Box plot Histogram Using Help in R.

Slides:



Advertisements
Similar presentations
1 Competition. 2 Wiederholungssendung The name of a famous Russian mathematician is … A: Smirnoff B: Gorbatschoff C: Kolmogoroff D: Stroganoff.
Advertisements

Box and Whisker Plots and the 5 number summary
Analyzing and Interpreting Data To understand a set of data, you need to organize and summarize the values. A measure of central tendency is used to.
Review of Descriptive Graphs and Measures Here is a quick review of what we have covered so far. Pie Charts Bar Charts Pareto Tables Dotplots Stem-and-leaf.
1 Statistics 202: Statistical Aspects of Data Mining Professor David Mease Tuesday, Thursday 9:00-10:15 AM Terman 156 Lecture 5 = More of chapter 3 Agenda:
Copyright © 2014 by McGraw-Hill Higher Education. All rights reserved.
WHAT DO THEY ALL MEAN?. Median Is the number that is in the middle of a set of numbers. (If two numbers make up the middle of a set of numbers then the.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 5- 1.
Continuous Numerical Data
Whiteboardmaths.com © 2004 All rights reserved
/4/2010 Box and Whisker Plots Objective: Learn how to read and draw box and whisker plots Starter: Order these numbers.
12.3 – Analyzing Data.
Exit a Customer Chapter 8. Exit a Customer 8-2 Objectives Perform exit summary process consisting of the following steps: Review service records Close.
CCGPS Coordinate Algebra
Outliers. Do Now Bill Gates makes $100 thousand a year. He s in a room with 9 teachers, 4 of whom make $40k, 3 make $45k, and 2 make $55k a year. What.
CS1512 Foundations of Computing Science 2 Lecture 20 Probability and statistics (2) © J R W Hunter,
£1 Million £500,000 £250,000 £125,000 £64,000 £32,000 £16,000 £8,000 £4,000 £2,000 £1,000 £500 £300 £200 £100 Welcome.
Box plot Edexcel S1 Mathematics 2003 (or box and whisker plot)
Describing Distributions with Numbers
Box and Whiskers with Outliers. Outlier…… An extremely high or an extremely low value in the data set when compared with the rest of the values. The IQR.
St. Edward’s University
1 1 Slide © 2003 South-Western/Thomson Learning TM Slides Prepared by JOHN S. LOUCKS St. Edwards University.
Get your calculator! Describing Data
Application of Statistical Techniques to Interpretation of Water Monitoring Data Eric Smith, Golde Holtzman, and Carl Zipper.
Turing Machines.
Data Distributions Warm Up Lesson Presentation Lesson Quiz
Are There Any Outliers? Using the 1.5*IQR Rule Say we have the following data: 1,2,5,5,7,8,10,11,11,12,15,20 Notice that you must have ordered data before.
Looking at Data-Distributions
BPS - 5th Ed. Chapter 21 Describing Distributions with Numbers.
Hours Listening To Music In A Week! David Burgueño, Nestor Garcia, Rodrigo Martinez.
Ex1E median, the interquartile range, the range and the mode.
AQA - Business Statistics , Quantitative Analysis Peter Matthews
Subtraction: Adding UP
Ζ GCSE - Histograms Dr Frost Objectives: To understand why a histogram is useful for displaying data, and how to both draw and interpret a histogram.
An Interactive Tutorial by S. Mahaffey (Osborne High School)
Five Number Summary and Box Plots
Chapter 2 Tutorial 2nd & 3rd LAB.
15-Jan-15Created by Mr. Lafferty Maths Dept Integers – Positive and Negative Add /Sub using Thermometer Integers Add / Sub Integers.
Boxplot Q1 Q3 Median largest observation that is not a suspected outlier smallest observation that is not a suspected outlier Whisker * outlier.
Tom had a set of colored pencils. He saw that 15 of the pencils in the box were a shade of blue. Which decimal is equivalent to 15 ? A B C.
Lesson Describing Distributions with Numbers parts from Mr. Molesky’s Statmonkey website.
Two topics in R: Simulation and goodness-of-fit HWU - GS.
Review Unit 4A What is the mean of the following numbers? {10, 15, 14, 8, 10, 11, 12, 13, 15, 10} Answer: Mean= = 118,
Unit 2: Some Basics. Example: Hair color at NYS Fair.
By: Jade Wright, Garth Lo Bello, Andrew Roberts, Prue Tinsey and Tania Young.
Welcome to Math 6 Statistics: Use Graphs to Show Data Histograms.
Are You Smarter Than a 5 th Grader?. 1,000,000 5th Grade Topic 15th Grade Topic 24th Grade Topic 34th Grade Topic 43rd Grade Topic 53rd Grade Topic 62nd.
Section 1 Topic 31 Summarising metric data: Median, IQR, and boxplots.
Chapter 2 Analysis using R. Few Tips for R Commands included here CANNOT ALWAYS be copied and pasted directly without alteration. –One major reason is.
1 Further Maths Chapter 2 Summarising Numerical Data.
Univariate EDA. Quantitative Univariate EDASlide #2 Exploratory Data Analysis Univariate EDA – Describe the distribution –Distribution is concerned with.
Understanding and Comparing Distributions Ch. 5 Day 1 Notes AP Statistics EQ: How do we make boxplots and why? How do we compare distributions?
Univariate EDA. Quantitative Univariate EDASlide #2 Exploratory Data Analysis Univariate EDA – Describe the distribution –Distribution is concerned with.
Statistics with TI-Nspire™ Technology Module E Lesson 1: Elementary concepts.
Box Plots March 20, th grade. What is a box plot? Box plots are used to represent data that is measured and divided into four equal parts. These.
Basics in R part 2. Variable types in R Common variable types: Numeric - numeric value: 3, 5.9, Logical - logical value: TRUE or FALSE (1 or 0)
Descriptive Statistics using R. Summary Commands An essential starting point with any set of data is to get an overview of what you are dealing with You.
Box and Whisker Plots and the 5 number summary
K-Means Lab.
Good research questions
Shape of Distributions
Measures of Central Tendency
Box & Whiskers Plots AQR.
Exploratory Data Analysis
Boxplots.
MIS2502: Data Analytics Introduction to R and RStudio
Mean As A Balancing Point
Treat everyone with sincerity,
SnapChat Mini-Project
Box and Whisker Plots and the 5 number summary
Presentation transcript:

R Language

What is R? Variables in R Summary of data Box plot Histogram Using Help in R

What is R ? R is a free, cross-platform, open-source statistical analysis language and program. Many statistical functions are already built in

Variables Numeric > a = 49 > sqrt(a) [1] 7 String > a = "The dog ate my homework" > sub("dog","cat",a) [1] "The cat ate my homework“ Logical > a = (1+1==3) > a [1] FALSE

vector: an ordered collection of data of the same type > a = c(1,2,3) To examine the contents of the variable a >a [1] > a*2 [1] > a[2] [1] 2

list: an ordered collection of data of arbitrary types. > d = list(name="john",age=28,married=F) > d$name [1] "john“ > d$age [1] 28

Mean Dataset: > x=c(0,4,15, 1, 6, 3, 20, 5, 8, 1, 3) >y= 1:6 >y [1] The Mean > mean(x) [1] 6 OR > sum(x)/length(x) [1] 6

Median Sort the dataset if it is not sorted >sort(x) [1] The Median > median(x) [1] 4 > median(y) [1] 3.5

Quantiles Q1 > quantile(x,0.25) 25% 2 Q3 > quantile(x,0.75) 75% 7 Quantiles > quantile(x,c(0,0.25,0.5,0.75,1)) 0% 25% 50% 75% 100%

Five Number Summary > summary(x) Min. 1st Qu. Median Mean 3rd Qu. Max

The Spread of the Data Set Range > range(x) [1] 0 20 IQR > IQR(x) [1] 5

Boxplot Standard Boxplot > boxplot(x,range=0) Modified Boxplot > boxplot(x)

Histogram > hist(x) Adding a title > hist(x,main=“ Weight Gain ”) Adding Axis labels >hist(x, main=“Weight Gain”,xlab=“Weight Gain”, ylab =“Frequency”) Change the color >hist(x, main=“Weight Gain”,xlab=“Weight Gain”, ylab =“Frequency”, col=“blue”)

Read CSV > mydata=read.csv("dataset.csv") > mydata Age Income

How to use help in R? R has a very good help system built in. If you know which function you want help with simply use ?_______ with the function in the blank. Ex: ?hist. If you don’t know which function to use, then use help.search(“_______”). Ex: help.search(“histogram”).

Activity 1.Using R language, Answer question 4 from the Tutorial. 2.Export the resulted graphs.