# Loading all relevant libraries
library(DT)
## Warning: package 'DT' was built under R version 3.2.5
library(DiagrammeR)
## Warning: package 'DiagrammeR' was built under R version 3.2.5
A collection of all possible outcomes of a random study (for which probabilities are needed) (Department of Statistics Online Programs 2016).
Number of trucks (N) in thousands crossing Canadian borders to enter United States and then go on to Mexico. Every year N changes (U.S. Department of Transportation 2016), e.g.:
Nt <- data.frame(year = seq(1995, 2014, by = 1),
trucks = c(5135, 5431, 5827,
6271, 6817, 7048,
6777, 6916, 6736,
6904, 6784, 6649,
6478, 5895, 5021,
5444, 5490, 5624,
5649, 5802))
datatable(Nt)
So, a sample space of N could be something like this:
\[ S = \{5135, 5431, 5827, ...\} \]
The data could be of three different types:
mermaid("
graph TD
Data-->Discrete
Data-->Continuous
Data-->Categorical
")
Finite or countably infinite number of values in a sample space (Department of Statistics Online Programs 2016).
Examples of discrete data include the one described above, i.e. the number of trucks crossing southern Canadian borders per year.
An interval or continuous span of real numbers in a sample space (Department of Statistics Online Programs 2016).
For example, weight of the trucks at a weighing station.
Qualitatively grouped objects in a sample space (Department of Statistics Online Programs 2016).
For instance, answers of “yes” or “no” to a driver behavior question in driver interviews. On such question could be Do you feel discomfort while following large trucks? The answer would fall into one of the 2 groups, {yes, no}. Therefore, these data are binary.
Department of Statistics Online Programs, 2016. Section 1: Introduction to Probability. Available at: https://onlinecourses.science.psu.edu/stat414/node/5.
U.S. Department of Transportation, B. of T.S., 2016. Table 12-3: Border Crossings, U. S.-Canada and U.S.-Mexico (Thousands). Available at: http://nats.sct.gob.mx/go-to-tables/table-12-transportation-vehicles/table-12-3-border-crossings-u-s-canada-and-u-s-mexico/ [Accessed August 3, 2016].