Analyzing Univariate Data

Introduction to Data Analysis

  • Data analysis is defined as the process of collecting and organizing data in order to draw helpful conclusions from it.

  • The primary purposes of analyzing data are:

    • To understand relationships and trends in the world around us.

    • To make predictions based on that information.

  • Examples of applications for data analysis include:

    • Personal Health Data: Tracking the number of COVID-19 cases per day.

    • Weather Data: Monitoring daily temperature or the amount of rainfall.

    • Election Results: Polls tracking which candidates voters are likely to vote for.

    • Sports Data.

    • Census Data.

Methods of Data Collection

  • Data can be collected from two primary sources:

    • Sample: A small group of people or items.

    • Census: An entire population.

  • Data collection methods include:

    • Surveys.

    • Measurements.

    • Records.

    • Observations.

  • Advancements in technology directly correlate with an increased ability to measure and store data.

Categorizing Data Analysis Approaches

  • The approach to data analysis is determined by the number of variables involved in the data set.

Univariate (Single-Variable) Analysis
  • Univariate sets provide measures of exactly one attribute.

  • Example: The analysis of a set of test scores for a single class.

  • Visualization tools for univariate analysis:

    • Bar graphs.

    • Pie graphs.

    • Boxplots.

    • Stem and leaf plots.

  • Statistical tools for univariate analysis:

    • Mean.

    • Median.

    • Mode.

Bivariate (Two-Variable) Analysis
  • Bivariate sets provide measures of two attributes for each specific item in a sample.

  • Example: Comparing a student’s test score to the amount of time that student spent studying for the test.

  • Visualization and trends in bivariate analysis:

    • Scatterplots: Used to see the relationship between variables.

    • Line of best fit or Curve of best fit: Used to represent the overall trend in the data.

Identification of Data Types (Example 1)

  • Situation A: Noah researches how many cups of coffee Canadians drink.

    • Classification: Univariate data.

  • Situation B: A study compared the length of time children spend playing video games and the time they spend reading.

    • Classification: Bivariate data.

Univariate Analysis: Measures of Central Tendency

  • Measures of central tendency (mean, median, and mode) identify the center of a data set.

  • Mean:

    • Definition: The mathematical average of a set.

    • Procedure: Add all the numbers in the set, then divide the resulting sum by the total number of items.

    • Formula:       Mean=sum of a set of itemstotal number of items\text{Mean} = \frac{\text{sum of a set of items}}{\text{total number of items}}

  • Median:

    • Procedure: Arrange the numbers in numerical order. The median is the middle number.

    • Handling Even Sets: For an even number of values, the median is calculated as the mean of the two middle numbers.

  • Mode:

    • Definition: The number in the data set that occurs most frequently.

Calculations of Central Tendency (Example 2)

Data Set #1
  • Raw Data: 9,12,15,7,13,12,14,12,10,8,179, 12, 15, 7, 13, 12, 14, 12, 10, 8, 17

  • Order of Operations:

    • Sum = 9+12+15+7+13+12+14+12+10+8+17=1299 + 12 + 15 + 7 + 13 + 12 + 14 + 12 + 10 + 8 + 17 = 129

    • Total Items (nn) = 1111

    • Mean Calculation: 1291111.73\frac{129}{11} \approx 11.73

  • Numerical Order for Median: 7,8,9,10,12,12,12,13,14,15,177, 8, 9, 10, 12, 12, 12, 13, 14, 15, 17

  • Median: 1212

  • Mode: 1212

Data Set #2
  • Raw Data: 10,12,14,8,11,15,10,12,9,13,7,1010, 12, 14, 8, 11, 15, 10, 12, 9, 13, 7, 10

  • Order of Operations:

    • Sum = 10+12+14+8+11+15+10+12+9+13+7+10=13610 + 12 + 14 + 8 + 11 + 15 + 10 + 12 + 9 + 13 + 7 + 10 = 136

    • Total Items (nn) = 1212

    • Mean Calculation: 1361211.33\frac{136}{12} \approx 11.33

  • Numerical Order for Median: 7,8,9,10,10,10,11,12,12,13,14,157, 8, 9, 10, 10, 10, 11, 12, 12, 13, 14, 15

  • Median Strategy for Even Set: Determine the mean of the 6th6\text{th} (1010) and 7th7\text{th} (1111) values.

    • Median Calculation: 10+112=10.5\frac{10 + 11}{2} = 10.5

  • Mode: 1010

Measures of Spread

  • Definition: Measures of spread summarize data by showing how scattered the values are and the extent to which they differ from the mean value.

  • Key measures include:

    • Range.

    • Standard deviation.

    • Quartiles.

    • Percentiles.

  • Application: Measures of spread are used in conjunction with measures of central tendency to provide a comprehensive understanding of the data.

Quartiles and Boxplots

  • Quartiles:

    • Function: They divide a data set into four equal quarters, similar to how a median divides a set into halves.

    • Requirement: Data must be placed in numerical order from smallest to largest before quartiles can be identified.

  • Boxplots:

    • Used to visually graph quartiles and the range of a data set.

  • Spread Formulas:

    • Range: The difference between the maximum and minimum values.       Range=MaximumMinimum\text{Range} = \text{Maximum} - \text{Minimum}

    • Interquartile Range (IQR): The difference between the third quartile (Q3Q_3) and the first quartile (Q1Q_1).       IQR=Q3Q1\text{IQR} = Q_3 - Q_1

The Five-Number Summary and Boxplot Steps (Example 3)

Execution Steps
  1. Step 1: Order the data from smallest to largest.

  2. Step 2: Find the median (Q2Q_2), which splits the data into two halves.

  3. Step 3: Find the median of the lower half (Q1Q_1) and the median of the upper half (Q3Q_3) to split the data into four parts.

  4. Step 4: Identify the minimum and maximum values.

  5. Step 5: Consolidate the five-number summary.

Data Set #1 Analysis
  • Sorted Data: 7,8,9,10,12,12,12,13,14,15,177, 8, 9, 10, 12, 12, 12, 13, 14, 15, 17

  • Five-Number Summary:

    • Minimum (Lower Extreme): 77

    • Lower Quartile (Q1Q_1): 99

    • Median (Q2Q_2): 1212

    • Upper Quartile (Q3Q_3): 1414

    • Maximum Value (Upper Extreme): 1717

  • Calculated Metrics:

    • Range: 177=1017 - 7 = 10

    • Interquartile Range (Q3Q1Q_3 - Q_1): 149=514 - 9 = 5

Data Set #2 Analysis
  • Raw Data: 43,82,56,78,60,57,61,83,90,66,73,60,65,68,74,80,65,71,78,82,9543, 82, 56, 78, 60, 57, 61, 83, 90, 66, 73, 60, 65, 68, 74, 80, 65, 71, 78, 82, 95

  • Smallest to Largest Sorting:   43,56,57,60,60,61,65,65,66,68,71,73,74,78,78,80,82,82,83,90,9543, 56, 57, 60, 60, 61, 65, 65, 66, 68, 71, 73, 74, 78, 78, 80, 82, 82, 83, 90, 95

  • Five-Number Summary (n=21n = 21):

    • Minimum (Lower Extreme): 4343

    • Lower Quartile (Q1Q_1): 60.560.5 (Mean of 5th5\text{th} and 6th6\text{th} items)

    • Median (Q2Q_2): 7171 (11th11\text{th} item)

    • Upper Quartile (Q3Q_3): 8181 (Mean of 16th16\text{th} and 17th17\text{th} items)

    • Maximum Value (Upper Extreme): 9595

  • Calculated Metrics:

    • Range: 9543=5295 - 43 = 52

    • Interquartile Range: 8160.5=20.581 - 60.5 = 20.5