# Lesson 3: Quantitative Data

Lesson 3: Quantitative Data

## Overview

In this lesson we'll cover some basic tools for describing quantitative (or continuous) data, using Chapter 3 of Essential R.

## Objectives

Upon completion of this lesson, you should be able to:

• Describe quantitative (continuous) variables based on center and spread
• Test hypotheses about the mean of a quantitative variable
• Use resistant descriptors of center and spread
• Visualize quantitative variables in several ways
• Create a quantitative variable from a qualitative variable

## Data and R Code Files

The R code file and data files for this lesson can be found on the Essential R - Notes on learning R page.

# 3.1 - Quantitative Variables I – Center and Spread

3.1 - Quantitative Variables I – Center and Spread

Here we'll demonstrate basic measures of center and spread (mean, median, sd, quantiles) for quantitative variables.

# 3.2 - Hypothesis Tests with Quantitative data

3.2 - Hypothesis Tests with Quantitative data

In this screencast we'll demonstrate testing hypotheses about the mean by calculating a t-statistic - both by hand, and via the built-in function t-test(). Note that when we use pt() to calculalte p-values, the wrong tail gives us 1-p rather than p - the choice of upper or lower tail is important, and easy to get wrong. (Note the use of the tab key for hints on function arguments).

# 3.3 - Resistant Descriptors of Quantitative Data

3.3 - Resistant Descriptors of Quantitative Data

Here we'll consider some tools that are resistant to the presence of outliers in the data.

NOTE! Statistic "MAD" is actually "Median Absolute Deviation", not "Median Average Deviation" as mis-spoken here.

# 3.4 - Visualizing Quantitative Data: Histograms - Part i

3.4 - Visualizing Quantitative Data: Histograms - Part i

Here we introduce histograms and kernel density estimates (kde) as tools for visualising distributions. Note that the kde is somewhat sensitive to the bandwidth used to generate it - a wider bandwidth yields a smoother distribution.

# 3.5 - Visualizing Quantitative Data: Histograms - Part ii

3.5 - Visualizing Quantitative Data: Histograms - Part ii

Here we explore how we can alter histograms by changing the bin width.

# 3.6 - Visualizing Quantitative Data: Boxplots & Stripcharts

3.6 - Visualizing Quantitative Data: Boxplots & Stripcharts

In this screencast we'll demonstrate the boxplot and the stripchart, both of which can be useful tools for visualizing qualitative variables.

# 3.7 - Making Qualitative Variables from a Numeric Variable

3.7 - Making Qualitative Variables from a Numeric Variable

This screencast will demonstrate the stem-and-leaf plot and will also show how to group values from a quantitative variable using the function cut() to create a qualitative variable

 [1] Link ↥ Has Tooltip/Popover Toggleable Visibility