8/30/2021
Introduce Milo Levine (MSSC Tutor)
Sampling Activity - see agenda for our first day of class
- Put sticky notes on the white boards for the statistics we decide to compare
- Which statistic is best? Why?
Types of Variables
- A quantitative variable is a variable that takes
on numerical values for which arithmetic makes sense.
- A categorical or qualitative variable is a variable
that records which category a person place or thing falls into.
Questions about data
- What variables are being measured?
- Are these variables appropriate for answering the
question(s) of interest?
- What are the units of measurement?
- How are the data recorded?
Graphical Displays
- Why are graphing techniques useful?
- Examine the overall shape of a distribution - (symmetric
or skewed?)
- Look for deviations from the overall shape - (unusual
observations, gaps, etc.)
- Locate the center of the distribution
Stem and Leaf Plots
- Separate each observation into a stem and a leaf.
- List the stems vertically in increasing order from
top to bottom.
- Add the leaves (typically the last digit) to the
right of the stems.
Histograms
- Divide the range of the data into classes of equal
width.
- Count the number of observations in each class.
- Compute the relative frequency or percent for each
class.
- Erect bars over each class interval.
Getting started with R
- Lauch RStudio (you can download R and RStudio on your personal computer/laptop for free)
- Load our data from the class survey (ClassDataF21.csv)
- Method 1 - mydata=read.csv(file=file.choose())
- Method 2 - ClassDataF21<-read.csv("P:/data/MATH/STATS/Datasets/ClassDataF21.csv")
- Some basic R
- str(mydata)
- head(mydata)
- tail(mydata)
- names(mydata)
- libarary(mosaic) -- a package that we will be using throughout the semester.
Graphical Displays with R (Use ClassDataF21.csv)
- Bar Charts - barchart(Year, data=mydata)
- Dotplots - dotplot(Height, data=mydata)
- Stemplots - stem(mydata$Height)
- Histograms - histogram(Height, data=mydata)
- Boxplots - boxplot(mydata$HometownSize), boxplot(mydata$HometownSize~mydata$Year)
- Scatterplots - plot(Height~FootLength, data=ClassDataF21)
Please read Section 1.3 for class on Wednesday