Lab 3.1: Create a Plot

Jacinth Boggess

Obtain and Observe Data - Head

   Detergents_Paper Grocery Channel
1              2674    7561       2
2              3293    9568       2
3              3516    7684       2
4               507    4221       1
5              1777    7198       2
6              1795    5126       2
7              3140    6975       2
8              3321    9426       2
9              1716    6192       1
10             7425   18881       2

Obtain and Observe Data - Tail

    Detergents_Paper Grocery Channel
431              241   16483       1
432             1377    5160       1
433             1328    4754       1
434              356    1493       1
435             2371    7994       1
436              182   16027       1
437               93     764       1
438            14841   30243       2
439              168    2232       1
440              477    2510       1

Observe Summary Statistics

 Detergents_Paper     Grocery     
 Min.   :    3.0   Min.   :    3  
 1st Qu.:  256.8   1st Qu.: 2153  
 Median :  816.5   Median : 4756  
 Mean   : 2881.5   Mean   : 7951  
 3rd Qu.: 3922.0   3rd Qu.:10656  
 Max.   :40827.0   Max.   :92780  

Table of Categorical Variable


  1   2 
298 142 

Create the Plot

Annual Spending on Grocery and Detergents Paper Findings

  • Positive correlation between spending on grocery and detergents paper.
  • Retail channel spends more on both groceries and detergents paper than hotels, restaurants, or cafes.
  • Perhaps the difference between retail and hotel channels is due to their consumer base.