population
Entire group of individuals or objects to be studied
sample
Subset of population that is being studied
individual
Person or object that is part of the population being studied
statistics
Numerical summary of a sample
parameter
Numerical summary of a population
inferential statistics
uses methods thattake a result from a sample, extend it to the
population, and measure reliability of the result
variable
Variables are characteristics of an individual within a population
Qualitative / Categorical Variables
Quantitative / Numerical Variables
Provide numerical measure of individuals
Qualitative Variables
Types (3)
Qualitative Variables
Dichotomous
Qualitative Variables
Nominal
Qualitative Variables
Ordinal
Quantitative Variables
Discrete
Quantitative Variables
Continuous
Quantitative / Numerical
Interval Scale
Example: How satisfied are you
from airline service
- Scale: 10, 8, 6 ,4
- ACT or SAT scores
Quantitative / Numerical
Ratio Scale
Most of the numerical data is ratio type because it has a true
zero
- Example: Height, Weight
Categorical Variables in R
Factors
Categorical Variables in R
Factors: specific order
R code
factor(variable, order=TRUE, levels = c(…)
class(…)
Bias
Types (3)
Sampling Bias
- Technique used to obtain the individuals to be in the sample tends to favor one part of the population
Non response bias
- Individual selected to be in the sample who do not respond
Response Bias
- Answer on the survey do not represent true feeling of the respondent
Sampling in R
set.seed()
sampling
sample(x,y)
sample(x, y, replace=T)
nrow(DataFile)
returns number of rows in Data file